Thanks Bruce
I am using PBP ON INTERRUPT for the PORTB.0 interrupt
Would this work?
ON INTERRUPT GOTO myint ' Define interrupt handler
INTCON = %10110000 ' enable both RB0 and Timer 0 INTS
loop:
Goto loop ' Normal program would be here
DISABLE ' No interrupts past this point
myint:
IF INTCON.1 = 1 THEN RB0_INT 'Go to the PORTB.0 Int Routine
'********************
'''' THE TIMER INTERRUPT ROUTINE WOULD BE HERE
'''''''''''''''''''''
GOTO INTDONE
'*****************************
RB0_INT:
''''' NORMAL PORTB.0 ROUTINE
''''
INTDONE:
INTCON.1 = 0 ' Clear interrupt flag
INTCON.2 = 0 'Clear Timer 0 overflow
RESUME ' Return to main program
ENABLE




Bookmarks