Actually, my usual stumbling about blindly programming I thought I would try this and it works. I thought I had to set things up first and I don't understand why I don't but hey. It work so I suppose I should be happy. I kinda wanted to be forced to learn how to read data sheets but now I don't have to for this project at least.
OSCCON = %1110000
TRISC = %00000000
TRISB = %00000000
DEFINE OSC 16
bright var byte
mainloop:
for bright = 254 to 0 step -1
hpwm 1,bright,1000
hpwm 2,bright,1000
hpwm 3,bright,1000
pause 5
next
goto mainloop





Bookmarks