Would anyone happen to have a little sample code that does PWM on a 16f628a? I'm new to the PWM concept so I'm trying to find something to get me started.
Thanks,
BlackNoir
Would anyone happen to have a little sample code that does PWM on a 16f628a? I'm new to the PWM concept so I'm trying to find something to get me started.
Thanks,
BlackNoir
Have you seen the HPWM and PWM commands in the PBP manual? examples included theirin.
Actually, I think I found something. I believe this will work:
Duty VAR BYTE
Freq VAR Word
LED VAR PortB.3
' changing the value for "Duty" will change the brightness
Duty=127 ' about 50% Brightness
Freq=1000 '1 kHz
HPWM LED,Duty,Freq
Bookmarks