English
Language : 

MC68HC908LB8_05 Datasheet, PDF (166/234 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Resets and Interrupts
16.3 Interrupts
An interrupt temporarily changes the sequence of program execution to respond to a particular event. An
interrupt does not stop the operation of the instruction being executed, but begins when the current
instruction completes its operation.
16.3.1 Effects
An interrupt:
• Saves the CPU registers on the stack. At the end of the interrupt, the RTI instruction recovers the
CPU registers from the stack so that normal processing can resume.
• Sets the interrupt mask (I bit) to prevent additional interrupts. Once an interrupt is latched, no other
interrupt can take precedence, regardless of its priority.
• Loads the program counter with a user-defined vector address
After every instruction, the CPU checks all pending interrupts if the I bit is not set. If more than one
interrupt is pending when an instruction is done, the highest priority interrupt is serviced first. In the
example shown in Figure 16-4, if an interrupt is pending upon exit from the interrupt service routine, the
pending interrupt is serviced before the LDA instruction is executed.
•
•
•
5
4
STACKING 3
ORDER 2
1
CONDITION CODE REGISTER
ACCUMULATOR
INDEX REGISTER (LOW BYTE)(1)
PROGRAM COUNTER (HIGH BYTE)
PROGRAM COUNTER (LOW BYTE)
1
2
3 UNSTACKING
4 ORDER
5
•
•
•
$00FF DEFAULT ADDRESS ON RESET
1. High byte of index register is not stacked.
Figure 16-3. Interrupt Stacking Order
MC68HC908LB8 Data Sheet, Rev. 1
166
Freescale Semiconductor