
HYUNDAI MicroElectronics
40
2.12.4. Interrupt Sequence
When interrupt is accepted, the on-going process is stopped and the interrupt service routine is
executed. After the interrupt service routine is completed it is necessary to restore everything to the
state before the interrupt occurred.
As soon as an interrupt is accepted, the contents of the program counter and the program status
word are saved in the stack area. At the same time, the contents of the vector address
corresponding to the accepted interrupt, which is in the interrupt vector table, enters into the
program counter and interrupt service routine is executed.
In the interrupt service routine, the corresponding interrupt request flag is cleared and interrupt
master enable flag(I-flag) becomes "0", thereby another interrupts are not accepted before I-flag is
set to "1" by program.
In order to execute the interrupt service routine, it is necessary to write the jump address(the first
address of the interrupt service routine) in vector table corresponding to each interrupt.
Interrupt Accept Timing
The valid timing after executing Interrupt control Flag
I-Flag is valid, after EI, DI executed
IENH, IENL register is valid after next instruction
1 Cycles
0
12 Cycles
8 Cycles
System Clock
Instruction
Fetch
Interrupt Overhead : 9
21 Cycles
Int.request Sampling
Interrupt Process Step
Interrupt routine
A command before
Interrupt