I am using the 16f628a as a lamp dimmer for my mountain bike light. I can change the duty cycle of the hpwm but can't get the pin to just stop without setting the on time to 0-HPWM just runs and runs and.... Any ideas??
Thanx Dan
Printable View
I am using the 16f628a as a lamp dimmer for my mountain bike light. I can change the duty cycle of the hpwm but can't get the pin to just stop without setting the on time to 0-HPWM just runs and runs and.... Any ideas??
Thanx Dan
Hi,
just have a ZERO for PWM value ...
CCP1CON = 0 Disables the PWM unit ... think to re-Enable it somewhere.
Alain
AND it's probably safe to set the pin low after that... Maybe.
I know setting on time to zero turns things off but I wanted to use the same pin for flashing the light and hpwm does not run slow enough. CCP1CON = 0
worked great.
Thanx for helping us newbies out.
Dan
This is why forums exist dude!
Good luck!
PS: keep it for you... i learn almost everything here by reading other posts and solutions, datasheet, do experiments and, when possible, helping others. Don't give up.. oh no, don't give up.