wow.simple solution.haha.thanx a lot bruce.but are your coding mean i need to hold the push button to PWM on & release the button to PWM off...or push the button once to PWM on & push once again to PWM off????
wow.simple solution.haha.thanx a lot bruce.but are your coding mean i need to hold the push button to PWM on & release the button to PWM off...or push the button once to PWM on & push once again to PWM off????
Yep. Like Ski said, that's how it works.
Here's another flavor.
Endless simple possibilities.Code:Main: IF Push1=0 THEN GOSUB ChkState ENDIF GOTO Main ChkState: WHILE Push1=0 ' wait for button release WEND TRISC.2=TRISC.2 ^ 1 ' toggle TRISC.2 on button release RETURN
Bookmarks