8.3 Interrupt Latency
Interrupt latency is defined as the time from the interrupt event (the interrupt flag bit gets set) to
the time that the instruction at address 0004h starts execution (when that interrupt is enabled).
For synchronous interrupts (typically internal), the latency is 3TCY.
For asynchronous interrupts (typically external), such as the INT or Port RB Change Interrupt,
the interrupt latency will be 3 - 3.75TCY (instruction cycles). The exact latency depends upon
when the interrupt event occurs (Figure 8-2) in relation to the instruction cycle.
The latency is the same for both one and two cycle instructions.
8.4 INT and External Interrupts
The external interrupt on the INT pin is edge triggered: either rising if the INTEDG bit
(OPTION) is set, or falling, if the INTEDG bit is clear. When a valid edge appears on the INT
pin, the INTF flag bit (INTCON) is set. This interrupt can be enabled/disabled by setting/clearing
the INTE enable bit (INTCON). The INTF bit must be cleared in software in the interrupt
service routine before re-enabling this interrupt. The INT interrupt can wake-up the processor
from SLEEP, if the INTE bit was set prior to going into SLEEP. The status of the GIE bit decides
whether or not the processor branches to the interrupt vector following wake-up. See the
“Watchdog Timer and Sleep Mode” section for details on SLEEP and for timing of wake-up
from SLEEP through INT interrupt