Hi I want to debounce my button without a flag bit.Here is the coding but its not working well.
SHOW contains displaying digit stuff in the segments.
SHOW contains displaying digit stuff in the segments.
Code:
btfsc PORTA,0 ;check the button is pressed?
goto SHOW ;NO its not pressed then display the digits
call DEL50mS ;YES its pressed then add a small debounce delay
btfss PORTA,0 ;check the button has it released?
goto SHOW ;NO then again show the digits
goto COUNTUP ;YES it has released then count up