I was wondering how do I control the pwm for this. lets say I have a button .. and while I pressed the button the PWM will increase.. but when the button is not pressed the pwm pauses. and when the button is pressed again the pwm resumes where it was paused.
I can think of it like this
for i = 0 to 100
if(i < PwmIncSTEP) PortD.1 = 1
if(i >= PwmINCStep) PortD.1 = 0
Next i
There is one questionable thing about this, when I have a led at the output to test the pwm. i see like a flickering. the reason why I think this is the case. is because the correct pause sequence is not there. Can you please help with a better solution
thanks.
Srig
Bookmarks