
Keyboard Interrupt (KBI) Module
Functional Description
MC68HC(9)08LJ60 — Rev. 1.0
Advance Information
MOTOROLA
Keyboard Interrupt (KBI) Module
315
NON-DISCLOSURE
AGREEMENT
REQUIRED
19.4 Functional Description
Writing to the KBIE7–KBIE0 bits in the keyboard interrupt enable register
independently enables or disables each port B pin as a keyboard
interrupt pin. Enabling a keyboard interrupt pin also enables its internal
pullup device. A logic 0 applied to an enabled keyboard interrupt pin
latches a keyboard interrupt request.
A keyboard interrupt request is latched when one or more keyboard pins
goes low after all were high.
Vector fetch or software clear
A vector fetch generates an interrupt acknowledge signal to clear the
interrupt request. Software can generate the interrupt acknowledge
signal by writing a logic 1 to the ACK2, IRQ2 interrupt request
acknowledge bit in the IRQ status and control register (ISCR). The
ACK2 bit is useful in applications that poll the keyboard interrupt pins
and require software to clear the keyboard interrupt request. Writing
to the ACK2 bit in an interrupt service routine can also prevent
spurious interrupts due to noise. Setting ACK2 does not affect
subsequent transitions on the keyboard interrupt pins. A falling edge
that occurs after writing to the ACK2 bit latches another interrupt
request. If the keyboard interrupt mask bit, IMASK2, is clear, the CPU
loads the program counter with the vector address at locations $FFD2
Return of all enabled keyboard interrupt pins to logic 1
As long as any enabled keyboard interrupt pin is at logic 0, the
keyboard interrupt request remains set.
The vector fetch or software clear and the return of all enabled keyboard
interrupt pins to logic 1 may occur in any order.
Reset clears the keyboard interrupt request.
The PIN2 bit in the ISCR can be used to see if a pending interrupt exists.
The PIN2 bit is not affected by the keyboard interrupt mask bit IMASK2.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.