The oscillo trace show you exactly what is suppose to happen with any mechanical push-button.
theory and explanation bellow
http://www.elexp.com/t_bounc.htm
Solution... there's many different. Using PBP BUTTON command, use Timers interrupts, OR use a simple loop
Code:
PushButtonA VAR PORTA.0
'
'
'
'
IF PORTA.0=1 THEN
' Do your Stuff
'
WHILE PORTA.0=1 : Wend ' wait untill push button is release
PAUSE 50 ' Debounce delay
ENDIF
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks