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
Bookmarks