AVR_PWM library Flicking duty cycle and frequency using potentiometer (nano)

MD_PWM library also generates a PWM signal on any AVR pin. You may be able to use this to isolate whether the problem is in the hardware or software. Start here if interested : PWM on any I/O Pin – Arduino++ (wordpress.com). I know it produces rock solid scope traces in my projects.