Code:
' Int handler doesn't mess with any PBP system variables - or lower 15-bits
' of TMR1 accumulated time. Uses only 4 instructions to set TMR1H high bit,
' increment seconds, clear the interrupt flag bit, save & restore WREG, STATUS,
' BSR and return from int handler.
@myint ; create myint label
TMR1H.7=1 ' Set TMR1 high bit for 1 second overflows
seconds = seconds+1 ' Increment seconds
PIR1.0=0 ' Clear TMR1 int flag
@ retfie FAST ; Return with 'auto restore' of WREG, STATUS and BSR
Should do it.
Bookmarks