To make this as simple as possible, all this is, is a 5v power supply, a PIC, and two 1/4" jacks that share ground. The PIC is only connected to +5v and ground. The CCP1 pin isn't connected to anything. This is on a breadboard. I am getting a lot of noise that goes up and down in pitch as the duty cycle goes up and down.

Code:
Duty var byte
Main:

For Duty = 0 to 255 ' Gets brighter
pause 100
PWM 1, Duty, 1000
Next Duty

For Duty = 254 to 0 step -1 'Gets dimmer
pause 100
PWM 1, Duty, 1000
Next Duty
Goto Main
Name:  Screen Shot 2018-03-26 at 10.02.18 AM.png
Views: 2137
Size:  35.9 KB