
MOTOROLA
8-6
MC68HC05F4
RESETS AND INTERRUPTS
8
8.2.3.2
Programmable 16-bit timer interrupt
There are ve different timer interrupt ags that cause a timer interrupt whenever they are set and
enabled. The timer interrupt enable bits are located in the timer control register (TCR) and the
timer interrupt ags are located in the timer status register (TSR). Both interrupts will vector to the
same service routine, whose start address is contained in memory locations $3FF6 and $3FF7.
8.2.3.3
Keyboard interrupt
When congured as input pins, all eight port A lines provide a wired-OR keyboard interrupt facility
and will generate an interrupt, provided that the keyboard interrupt enable bit (KIE) in the key
control register (KCR) is set. The address of the interrupt service routine is specied by the
contents of memory locations $3FFA and $3FFB. Since this interrupt vector is shared with the IRQ
external interrupt function the interrupt service routine should check KF to determine the interrupt
source. KF should be cleared by software in the interrupt service routine. Care must be taken to
allow adequate time for switch debounce before clearing the ag.
8.2.3.4
Low voltage interrupt
There is a low voltage interrupt ag that causes an interrupt whenever it is set and enabled. The
low voltage interrupt enable bit and the interrupt ag are located in the system option register
(SOR) described below in
Section 8.2.3.5. This interrupt will vector to the service routine, located
at the address specied by the contents of memory locations $3FF4 and $3FF5.
Table 8-1 Vector address for interrupts and reset
Register
Flag name
Interrupts
CPU
interrupt
Vector address
Reset
RESET
$3FFE$3FFF
Software interrupt
SWI
$3FFC$3FFD
External interrupt
IRQ
$3FFA$3FFB
CTCSR
CTOF
Core timer overow
CTIMER
$3FF8$3FF9
CTCSR
RTIF
Real time interrupt
CTIMER
$3FF8$3FF9
TSR
IC1F
Timer input capture1
TIMER
$3FF6$3FF7
TSR
OC1F
Timer output compare1
TIMER
$3FF6$3FF7
TSR
IC2F
Timer input capture2
TIMER
$3FF6$3FF7
TSR
OC2F
Timer output compare2
TIMER
$3FF6$3FF7
TSR
TOF
Timer overow
TIMER
$3FF6$3FF7
KCR
KF
Keyboard interrupt
KEYF
$3FFA$3FFB
SOR
LVIF
Low voltage interrupt
LVI
$3FF4$3FF5
TPG
76
05F4Book Page 6 Tuesday, August 5, 1997 1:10 pm