'************************************************* ************************************************** ***
DISABLE ' do NOT place interrupt checking code below
Halt: ' Halt Routine
temp = PORTB
TOGGLE PORTE.1
IF temp.0 = 0 THEN
WHILE PORTB.0=0 ' wait for button release & end mismatch condition on portb
WEND
PAUSE 20 ' Debounce delay
INTCON.0 = 0 ' Clear the interrupt-on-change flag
RESUME SCORE_PLAYER1
ENDIF
IF temp.1 = 0 THEN
WHILE PORTB.1=0 ' wait for button release & end mismatch condition on portb
WEND
PAUSE 20 ' Debounce delay
INTCON.0 = 0 ' Clear the interrupt-on-change flag
RESUME SCORE_PLAYER2
ENDIF
INTCON.0 = 0 ' Clear the interrupt-on-change flag
RESUME ' Resume program running before interrupt occurred
ENABLE ' Enable all active interrupts
'************************************************* ************************************************** ***
Bookmarks