English
Language : 

MC68HC05P4A Datasheet, PDF (23/72 Pages) Advanced Analogic Technologies – Microcontrollers
Chapter 4
Interrupts
4.1 Introduction
The MCU can be interrupted four different ways:
• Two maskable hardware interrupts, IRQ and timer
• Non-maskable software interrupt instruction (SWI)
• Optional external asynchronous interrupt on each port A pin (enabled by pullup mask option)
Interrupts cause the processor to save register contents on the stack and to set the interrupt mask (I bit)
to prevent additional interrupts. The return to interrupt (RTI) instruction causes the register contents to be
recovered from the stack and normal processing to resume.
Unlike RESET, hardware interrupts do not cause the current instruction execution to be halted, but are
considered pending until the current instruction is complete.
NOTE
The current instruction is the one already fetched and being operated on.
When the current instruction is complete, the processor checks all pending hardware interrupts. If
interrupts are not masked (CCR I bit clear) and if the corresponding interrupt enable bit is set, the
processor proceeds with interrupt processing; otherwise, the next instruction is fetched and executed.
If both an external interrupt and a timer interrupt are pending at the end of an instruction execution, the
external interrupt is serviced first. The SWI is executed the same as any other instruction, regardless of
the I-bit state.
Table 4-1 lists vector addresses for all interrupts including reset.
Table 4-1. Vector Address for Interrupts and Reset
Register
N/A
N/A
N/A
TSR
TSR
TSR
Flag
Name
N/A
N/A
N/A
ICF
OCF
TOF
Interrupts
Reset
Software
External interrupt
Timer input capture
Timer output capture
Timer overflow
CPU
Interrupt
RESET
SWI
IRQ
TIMER
TIMER
TIMER
Vector Address
$1FFE–$1FFF
$1FFC–$1FFD
$1FFA–$1FFB
$1FF8–$1FF9
$1FF8–$1FF9
$1FF8–$1FF9
4.2 Hardware Controlled Interrupt Sequence
RESET, STOP, and WAIT are not interrupts in the strictest sense. However, they are acted upon in a
similar manner. Flowcharts for hardware interrupts are shown in Figure 4-1 and for STOP and WAIT in
Figure 6-1. STOP/WAIT Flowchart.
MC68HC05P4A Data Sheet, Rev. 7.1
Freescale Semiconductor
23