English
Language : 

MC9S08GB60 Datasheet, PDF (148/290 Pages) Motorola, Inc – Microcontrollers
Keyboard Interrupt (KBI) Module
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.4.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 KBI1SC 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.5 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 chapter 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.
9.5.1
KBI Status and Control Register (KBI1SC)
Bit 7
6
5
4
3
2
Read:
KBF
KBEDG7 KBEDG6 KBEDG5 KBEDG4
Write:
0
KBACK
Reset: 0
0
0
0
0
0
= Unimplemented or Reserved
Figure 9-4. KBI Status and Control Register (KBI1SC)
1
Bit 0
KBIE KBIMOD
0
0
MC9S08GB/GT Data Sheet, Rev. 2.3
148
Freescale Semiconductor