I think after reading the datasheet again this is what I need, can sombody please confirm?
Code:
INTCON = %10010000 ; Enable External Interupt INT0
; INTCON.7 = Enables all unmasked interrupts
; INTCON.6 = Enables all unmasked peripheral interrupts
; INTCON.5 = Disables the TMR0 overflow interrupt
; INTCON.4 = Enables INT0 which is RB0
; INTCON.3 = Disables the RB port change interrupt
; INTCON.2 = TMR0 register did not overflow
; INTCON.1 = The INT0 external interrupt did not accur
; INTCON.0 = None of the RB7:RB4 pins have changed state
INTCON2 = %11110000 ; INTCON2.7 = All pull up are disabled
; INTCON2.6 = INT0 trigger on rising edge
; INTCON2.5 = INT1 trigger on rising edge
; INTCON2.4 = INT2 trigger on rising edge
; INTCON2.3 = Not used
; INTCON2.2 = TMR0 low priority
; INTCON2.1 = Not used
; INTCON2.0 = Port change priority / LOW priority
INTCON3 = %00011000 ; INTCON3.7 = INT2 Low priority
; INTCON3.6 = INT1 LOW priority
; INTCON3.5 = Not used
; INTCON3.4 = INT2 external enabled
; INTCON3.3 = INT1 external enabled
; INTCON3.2 = Not used
; INTCON3.1 = INT2 Flag (Read Only)
; INTCON3.0 = INT1 Flag (Read Only)
Bookmarks