Functional Description
MC68HC908QL4 MC68HC908QL3 MC68HC908QL2 Data Sheet, Rev. 4
Freescale Semiconductor
91
The keyboard interrupt latch is set when one or more enabled keyboard interrupt inputs are asserted.
If the keyboard interrupt sensitivity is edge-only, for KBIPx = 0, a falling (for KBIPx = 1, a rising)
edge on a keyboard interrupt input does not latch an interrupt request if another enabled keyboard
pin is already asserted. To prevent losing an interrupt request on one input because another input
remains asserted, software can disable the latter input while it is asserted.
If the keyboard interrupt is edge and level sensitive, an interrupt request is present as long as any
enabled keyboard interrupt input is asserted.
Figure 9-2. Keyboard Interrupt Block Diagram
9.3.1.1 MODEK = 1
If the MODEK bit is set, the keyboard interrupt inputs are both edge and level sensitive. The KBIPx bit will
determine whether a edge sensitive pin detects rising or falling edges and on level sensitive pins whether
the pin detects low or high levels. With MODEK set, both of the following actions must occur to clear a
keyboard interrupt request:
Return of all enabled keyboard interrupt inputs to a deasserted level. As long as any enabled
keyboard interrupt pin is asserted, the keyboard interrupt remains active.
Vector fetch or software clear. A KBI vector fetch generates an interrupt acknowledge signal to
clear the KBI latch. Software generates the interrupt acknowledge signal by writing a 1 to ACKK in
KBSCR. The ACKK bit is useful in applications that poll the keyboard interrupt inputs and require
software to clear the KBI latch. Writing to ACKK prior to leaving an interrupt service routine can
also prevent spurious interrupts due to noise. Setting ACKK does not affect subsequent transitions
KBI LATCH
KEYBOARD
INTERRUPT
REQUEST
ACKK
INTERNAL BUS
RESET
KBIE0
KBI0
0
1
S
KBIP0
KBIEx
KBIx
0
1
S
KBIPx
D
Q
CK
CLR
V
DD
MODEK
IMASKK
SYNCHRONIZER
KEYF
TO PULLUP/
PULLDOWN ENABLE
(see Note)
TO PULLUP/
PULLDOWN ENABLE
(see Note)
VECTOR FETCH
DECODER
AWUIREQ
(SEE
Figure4-1
)
NOTE:
To enable internal pullup/pulldown, requires both the KBIPx and the corresponding PTAPUEN to both be set.