
Keyboard Module (KB)
Functional description
MC68HC08AZ32
MOTOROLA
Keyboard Module (KB)
301
The MODEK bit in the keyboard status and control register controls the
triggering sensitivity of the keyboard interrupt latch. If the MODEK bit is
set, the keyboard interrupt pins are both falling-edge- and
low-level-sensitive, and both of the following actions must occur to clear
the keyboard interrupt latch:
Vector fetch or software clear — A vector fetch generates an
interrupt acknowledge signal to clear the latch. Software may
generate the interrupt acknowledge signal by writing a logic one to
the ACKK bit in the keyboard status and control register (KBSCR).
The ACKK bit is useful in applications that poll the keyboard
interrupt pins and require software to clear the keyboard interrupt
latch. Writing to the ACKK bit can also prevent spurious interrupts
due to noise. Setting ACKK does not affect subsequent transitions
on the keyboard interrupt pins. A falling edge that occurs after
writing to the ACKK bit latches another interrupt request. If the
keyboard interrupt mask bit, IMASKK, is clear, the CPU loads the
program counter with the vector address at locations $FFD2 and
$FFD3.
Return of all enabled keyboard interrupt pins to logic one — As
long as any enabled keyboard interrupt pin is at logic zero, the
keyboard interrupt latch remains set.
The vector fetch or software clear and the return of all enabled keyboard
interrupt pins to logic one may occur in any order. The interrupt request
remains pending as long as any enabled keyboard interrupt pin is at
logic zero.
Table 1. KB I/O register summary
Register Name
Bit 7
654321
Bit 0
Addr.
Keyboard Status/Control
Register (KBSCR)
R:
0000
KEYF
0
IMASK
K
MODE
K
$001B
W:
ACKK
Reset
0000000
0
Keyboard Interrupt Control
Register (KBICR)
R:
000
KB4IE KB3IE KB2IE KB1IE KB0IE $0021
W:
Reset
0000000
0
= Unimplemented
3-kbd