I'd rather code the button to debounce something like below:
CHECK_PB:
IF PB = 0 THEN DEBOUNCE_PB
RETURN
DEBOUNCE_PB:
PAUSEUS 200
IF PB = 0 THEN CHECK_PB
MENU_CNT = MENU_CNT + 1
RETURN
and before that I would prefer to make the pin connected to button as output..
Bookmarks