Ross,
there is an easy way to achieve that "fading effect"
even on a PIC with no Hardware PWM, use Software PWM:
Duty VAR BYTE
Cycle VAR BYTE
LED VAR PortB.1
' changing the value for "Cycle" will change the time it takes
' to fade from 100% to 0%
Cycle=10
Loop:
For Duty=255 to 0 Step -1
PWM LED,Duty,Cycle
Next
Pause 3000
GOTO Loop
rgds




Bookmarks