Interrupts - Motorola MC68HC05T16 Technical Data Manual

Table of Contents

Advertisement

4.2

INTERRUPTS

The MC68HC05T16 is capable of handling eight types of interrupt, seven hardware and one
software. The interrupt mask bit ("I" bit in the Condition Code register), if set, masks all interrupts
except the software interrupt, SWI. Interrupts such as Timer, M-Bus, OSD, and MFT have several
flags which will cause the interrupt. Interrupt flags are found in "read only" status registers, while
their enables are in associated control registers. They are never mixed in the same register. If the
enable bit is "0", it masks the interrupt from occurring but does not inhibit the flag from being set.
4
A reset clears all enable bits. The general sequence for clearing an interrupt is a software
sequence of reading the status register while the flag is set followed by a read or write of an
associated register. When any of these interrupts occur, and if enabled, normal processing is
suspended at the end of the current instruction execution. The state of the machine is pushed onto
the stack (see Figure 4-2 for stacking order) and the appropriate vector points to the starting
address of the interrupt service routine (see Table 4-2). Also, the interrupt mask bit in the condition
code register is set. This masks further interrupts. At the completion of the service routine, the
software normally contains an RTI instruction which, when executed, restores the machine state
and continues executing the interrupted program. Interrupt priority is based on interrupt vector
addresses. The higher the vector addresses, the higher the priority. For example, OSD interrupts
have a higher priority than IRQ, TIMER, M-BUS, PAC, and MFT interrupts; but lower priority than
SWI and RESET.
Note:
The interrupt mask bit (I bit) will be cleared if and only if the corresponding bit stored
on the stack is zero.
MOTOROLA
4-4
UNSTACKING
ORDER
5
1
CONDITION CODE REGISTER
4
2
3
3
INDEX REGISTER
2
4
PROGRAM COUNTER (HIGH BYTE)
1
5
PROGRAM COUNTER (LOW BYTE)
STACKING
ORDER
Figure 4-2 Interrupt Stacking Order
RESETS AND INTERRUPTS
$00C0 (BOTTOM OF STACK)
$00C1
$00C2
ACCUMULATOR
$00FD
$00FE
$00FF (TOP OF STACK)
TPG
MC68HC05T16

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc705t16

Table of Contents