Panasonic MN101C77C User Manual

Page of 544
Chapter 3    Interrupts
III - 2
Overview
3-1
Overview
This LSI speeds up interrupt response with circuitry that automatically loads the branch address to the
corresponding interrupt service routine from an interrupt vector table : reset, non-maskable interrupts
(NMI), 16 maskable peripheral interrupts, and 5 external interrupts.
For interrupts other than reset, the interrupt processing sequence consists of interrupt request, interrupt
acceptance, and hardware processing. After the interrupt is accepted, the program counter (PC) and
processor status word (PSW) and handy addressing data (HA) are saved onto the stack. And an inter-
rupts handler ends by restoring, using the POP instruction and other means, the contents of any regis-
ters used during processing and then executing the return from interrupt (RTI) instruction to return to the
point at which execution was interrupted. Max.12 machine cycles before execution, and max 11 machine
cycles after execution.
Each interrupt has an interrupt control register, which controls the interrupts. Interrupt control register
consists of the interrupt level field (LV1-0), interrupt enable flag (IE), and interrupt request flag (IR).
Interrupt request flag (IR) is set to "1" by an interrupt request, and cleared to "0" by the interrupt accep-
tance. This flag is managed by hardware, but can be rewritten by software.
Interrupt enable flag (IE) is the flag that enables interrupts in the group. There is no interrupt enable flag
in non-maskable interrupt (NMI). Once this interrupt request flag is set, it is accepted without any condi-
tions. Interrupt enable flag is set in maskable interrupt. Interrupt enable flag (IE) of each maskable
interrupt is valid when the maskable interrupt enable flag (MIE flag) of PSW is "1".
Maskable interrupts have had vector numbers by hardware, but their priority can be changed by setting
interrupts level field. There are three hierarchical interrupt levels. If multiple interrupts have the same
priority, the one with the lowest vector number takes priority. Maskable interrupts are accepted when its
level is higher than the interrupt mask level (IM1-0) of PSW. Non-maskable interrupts are always ac-
cepted, regardless of the interrupt mask level.