English
Language : 

MC9S08RG60 Datasheet, PDF (124/232 Pages) Motorola, Inc – Microcontrollers
Keyboard Interrupt (KBI) Module
A falling edge is detected when an enabled keyboard input signal is seen as a logic 1 (the deasserted level)
during one bus cycle and then a logic 0 (the asserted level) during the next cycle.
A rising edge is detected when the input signal is seen as a logic 0 during one bus cycle and then a logic 1
during the next cycle.
The KBIMOD control bit can be set to reconfigure the detection logic so that it detects edges and levels.
In KBIMOD = 1 mode, the KBF status flag becomes set when an edge is detected (when one or more
enabled pins change from the deasserted to the asserted level while all other enabled pins remain at their
deasserted levels), but the flag is continuously set (and cannot be cleared) as long as any enabled keyboard
input pin remains at the asserted level. When the MCU enters stop mode, the synchronous edge-detection
logic is bypassed (because clocks are stopped). In stop mode, KBI inputs act as asynchronous
level-sensitive inputs so they can wake the MCU from stop mode.
9.3.3 KBI Interrupt Controls
The KBF status flag becomes set (1) when an edge event has been detected on any KBI input pin. If
KBIE = 1 in the KBIxSC register, a hardware interrupt will be requested whenever KBF = 1. The KBF
flag is cleared by writing a 1 to the keyboard acknowledge (KBACK) bit.
When KBIMOD = 0 (selecting edge-only operation), KBF is always cleared by writing 1 to KBACK.
When KBIMOD = 1 (selecting edge-and-level operation), KBF cannot be cleared as long as any keyboard
input is at its asserted level.
9.4 KBI Registers and Control Bits
This section provides information about all registers and control bits associated with the KBI modules.
Refer to the direct-page register summary in the Memory section of this data sheet for the absolute address
assignments for all KBI registers. This section refers to registers and control bits only by their names. A
Freescale-provided equate or header file is used to translate these names into the appropriate absolute
addresses.
Some MCU systems have more than one KBI, so register names include placeholder characters to identify
which KBI is being referenced. For example, KBIxSC refers to the KBIx status and control register and
KBI2SC is the status and control register for KBI2.
9.4.1 KBI x Status and Control Register (KBIxSC)
Bit 7
6
5
4
3
Read:
KBF
KBEDG7 KBEDG6 KBEDG5 KBEDG4
Write:
Reset: 0
0
0
0
0
= Unimplemented or Reserved
2
0
KBACK
0
1
Bit 0
KBIE KBIMOD
0
0
Figure 9-3 KBI x Status and Control Register (KBIxSC)
124
MC9S08RC/RD/RE/RG
Freescale Semiconductor