Not sure to understand the whole thing... but if you just want to Toggle the state of a pin with a single button... i would suggest
Still doable in a ISR...Code:IF PORTB.0 = 0 TOGGLE PORTB.1 ' or PORTB.1=PORTB.1 ^1 WHILE PORTB.0=0 : WEND ' wait 'till button is released PAUSE 50 ' debounce delay ENDIF
Bookmarks