SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 60 Version 1.5
6.9 MULTI-INTERRUPT OPERATION
Under certain condition, the software designer uses more than one interrupt requests. Processing multi-interrupt
request requires setting the priority of the interrupt requests. The IRQ flags of interrupts are controlled by the interrupt
event. Nevertheless, the IRQ flag “1” doesn’t mean the system will execute the interrupt vector. In addition, which
means the IRQ flags can be set “1” by the events without enable the interrupt. Once the event occurs, the IRQ will be
logic “1”. The IRQ and its trigger event relationship is as the below table.
Trigger Event Description
P0.0 trigger controlled by PEDGE
For multi-interrupt conditions, two things need to be taking care of. One is to set the priority for these interrupt requests.
Two is using IEN and IRQ flags to decide which interrupt to be executed. Users have to check interrupt control bit and
interrupt request flag in interrupt routine.
Example: Check the interrupt request under multi-interrupt operation
; Push routine to save ACC and PFLAG to buffers.
; Check INT0 interrupt request
; Jump check to next interrupt
; Jump to INT0 interrupt service routine
; Check T0 interrupt request
; Jump check to next interrupt
; Jump to T0 interrupt service routine
; Check TC0 interrupt request
; Jump to TC0 interrupt service routine
; Pop routine to load ACC and PFLAG from buffers.