
MC68HC08LK60 MC68HC908LK60 Advance Information Data Sheet, Rev. 1.1
Freescale Semiconductor
213
Chapter 19
Keyboard Interrupt (KBI) Module
19.1 Introduction
The keyboard interrupt (KBI) module provides eight independently maskable external interrupt pins.
19.2 Features
Features include:
Eight keyboard interrupt pins with separate keyboard interrupt enable bits and one keyboard
interrupt mask
The keyboard interrupt module shares the 8-bit bidirectional I/O port with port B.
19.3 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