
CHAPTER 12 INTERRUPT FUNCTIONS
159
12.4.4 Multiple interrupt servicing
Acknowledging another interrupt while one interrupt is processed is called multiple interrupts.
A multiple interrupt is not generated unless acknowledge of the interrupt request is enabled (IE = 1) (except the
non-maskable interrupt). When an interrupt request is acknowledged, the other interrupt requests are disabled (IE
= 0). To enable a multiple interrupt, therefore, the IE flag must be set to 1 by executing the EI instruction during interrupt
servicing and the interrupt must be enabled. Even in the EI status, a multiple interrupt may not be enabled. In such
a case, it is controlled according to the priority of the interrupt. An interrupt has two types of priorities: default priority
and programmable priority. The multiple interrupt is controlled by the programmable priority.
In the EI status, if an interrupt request having the same as or higher priority than that of the interrupt currently
processed is generated, and it is acknowledged as the multiple interrupt. If an interrupt request with a priority lower
than that of the interrupt currently processed is generated, the multiple interrupt is not acknowledged.
If an interrupt is disabled, or if a multiple interrupt is not acknowledged because it has a low priority, the interrupt
is kept pending. After the processing of the current interrupt has been completed, and after one instruction of the
main processing has been executed, the pending interrupt is acknowledged.
Multiple interrupts are not acknowledged while the non-maskable interrupt is processed.
Table 12-4 shows interrupt requests enabled for multiple interrupts. Figure 12-14 shows multiple interrupt
examples.
Table 12-4. Interrupt Request Enabled for Multiple Interrupt during Interrupt Servicing
Multiple Interrupt Request
Non-maskable
Maskable Interrupt Request
Interrupt Request
xx PR = 0
xx PR = 1
Interrupt being Serviced
IE = 1
IE = 0
IE = 1
IE = 0
Non-maskable interrupt
¥
¥
¥
¥
¥
Maskable interrupt
ISP = 0
¥
¥
¥
ISP = 1
¥
¥
Software interrupt
¥
¥
Remarks 1.
: Multiple interrupt enable
¥
: Multiple interrupt disable
2.
ISP and IE are flags included in PSW.
ISP = 0
: High-priority interrupt servicing
ISP = 1
: Interrupt request is not acknowledged or low-priority interrupt servicing
IE = 0
: Interrupt request acknowledge disabled
IE = 1
: Interrupt request acknowledge enabled
3.
xxPR is a flag included in PR0L and PR0H.
xxPR = 0: High-priority flag
xxPR = 1: Low-priority flag