The INTCON register contains these interrupts: INT Pin Interrupt, the RB Port Change Interrupt,
and the TMR0 Overflow Interrupt. The INTCON register also contains the Peripheral Interrupt
Enable bit, PEIE. The PEIE bit will enable/disable the peripheral interrupts from vectoring when
the PEIE bit is set/cleared.
When an interrupt is responded to, the GIE bit is cleared to disable any further interrupt, the
return address is pushed into the stack and the PC is loaded with 0004h. Once in the interrupt
service routine the source(s) of the interrupt can be determined by polling the interrupt flag bits.
Generally the interrupt flag bit(s) must be cleared in software before re-enabling the global interrupt
to avoid recursive interrupts.
Once in the interrupt service routine the source(s) of the interrupt can be determined by polling
the interrupt flag bits. Individual interrupt flag bits are set regardless of the status of their
corresponding mask bit or the GIE bit.