MOTOROLA
4-4
MC68HC05T16
RESETS AND INTERRUPTS
4
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.
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.
Figure 4-2 Interrupt Stacking Order
CONDITION CODE REGISTER
ACCUMULATOR
INDEX REGISTER
PROGRAM COUNTER (HIGH BYTE)
PROGRAM COUNTER (LOW BYTE)
•
•
•
•
•
•
•
•
•
•
•
•
$00C0 (BOTTOM OF STACK)
$00C1
$00C2
$00FD
$00FE
$00FF (TOP OF STACK)
UNSTACKING
1
2
3
4
5
5
4
3
2
1
STACKING
ORDER
ORDER
TPG
32
Summary of Contents for MC68HC05T16
Page 2: ......
Page 14: ...MOTOROLA vi MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 12 ...
Page 16: ...MOTOROLA viii MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 14 ...
Page 18: ...MOTOROLA x MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 16 ...
Page 54: ...MOTOROLA 5 12 MC68HC05T16 TIMERS 5 THIS PAGE LEFT BLANK INTENTIONALLY TPG 52 ...
Page 64: ...MOTOROLA 6 10 MC68HC05T16 M BUS SERIAL INTERFACE 6 THIS PAGE LEFT BLANK INTENTIONALLY TPG 62 ...
Page 110: ...MOTOROLA 12 4 MC68HC05T16 LOW POWER MODES 12 THIS PAGE LEFT BLANK INTENTIONALLY TPG 108 ...
Page 116: ...MOTOROLA 13 6 MC68HC05T16 OPERATING MODES 13 THIS PAGE LEFT BLANK INTENTIONALLY TPG 114 ...