English
Language : 

MC908QY8CDWE Datasheet, PDF (85/232 Pages) Freescale Semiconductor, Inc – Addendum to MC68HC908QB8, rev. 3
Chapter 9
Keyboard Interrupt Module (KBI)
9.1 Introduction
The keyboard interrupt module (KBI) provides independently maskable external interrupts.
The KBI shares its pins with general-purpose input/output (I/O) port pins. See Figure 9-1 for port location
of these shared pins.
9.2 Features
Features of the keyboard interrupt module include:
• Keyboard interrupt pins with separate keyboard interrupt enable bits and one keyboard interrupt
mask
• Programmable edge-only or edge and level interrupt sensitivity
• Edge sensitivity programmable for rising or falling edge
• Level sensitivity programmable for high or low level
• Pullup or pulldown device automatically enabled based on the polarity of edge or level detect
• Exit from low-power modes
9.3 Functional Description
The keyboard interrupt module controls the enabling/disabling of interrupt functions on the KBI pins.
These pins can be enabled/disabled independently of each other. See Figure 9-2.
9.3.1 Keyboard Operation
Writing to the KBIEx bits in the keyboard interrupt enable register (KBIER) independently enables or
disables each KBI pin. The polarity of the keyboard interrupt is controlled using the KBIPx bits in the
keyboard interrupt polarity register (KBIPR). Edge-only or edge and level sensitivity is controlled using the
MODEK bit in the keyboard status and control register (KBISCR).
Enabling a keyboard interrupt pin also enables its internal pullup or pulldown device based on the polarity
enabled. On falling edge or low level detection, a pullup device is configured. On rising edge or high level
detection, a pulldown device is configured.
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.
MC68HC908QB8 Data Sheet, Rev. 3
Freescale Semiconductor
83