English
Language : 

MC9S08AW32CPUE Datasheet, PDF (161/324 Pages) Freescale Semiconductor, Inc – Microcontrollers
9.4.1
Chapter 9 Keyboard Interrupt (S08KBIV1)
KBI Status and Control Register (KBI1SC)
7
R
KBEDG7
W
6
KBEDG6
5
KBEDG5
4
KBEDG4
3
KBF
2
0
KBACK
Reset
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 9-3. KBI Status and Control Register (KBI1SC)
1
KBIE
0
0
KBIMOD
0
Table 9-2. KBI1SC Register Field Descriptions
Field
Description
7:4
Keyboard Edge Select for KBI Port Bits — Each of these read/write bits selects the polarity of the edges and/or
KBEDG[7:4] levels that are recognized as trigger events on the corresponding KBI port pin when it is configured as a keyboard
interrupt input (KBIPEn = 1). Also see the KBIMOD control bit, which determines whether the pin is sensitive to
edges-only or edges and levels.
0 Falling edges/low levels
1 Rising edges/high levels
3
Keyboard Interrupt Flag — This read-only status flag is set whenever the selected edge event has been
KBF detected on any of the enabled KBI port pins. This flag is cleared by writing a 1 to the KBACK control bit. The
flag will remain set if KBIMOD = 1 to select edge-and-level operation and any enabled KBI port pin remains at
the asserted level.
KBF can be used as a software pollable flag (KBIE = 0) or it can generate a hardware interrupt request to the
CPU (KBIE = 1).
0 No KBI interrupt pending
1 KBI interrupt pending
2
KBACK
Keyboard Interrupt Acknowledge — This write-only bit (reads always return 0) is used to clear the KBF status
flag by writing a 1 to KBACK. When KBIMOD = 1 to select edge-and-level operation and any enabled KBI port
pin remains at the asserted level, KBF is being continuously set so writing 1 to KBACK does not clear the KBF
flag.
1
KBIE
Keyboard Interrupt Enable — This read/write control bit determines whether hardware interrupts are generated
when the KBF status flag equals 1. When KBIE = 0, no hardware interrupts are generated, but KBF can still be
used for software polling.
0 KBF does not generate hardware interrupts (use polling)
1 KBI hardware interrupt requested when KBF = 1
KBIMOD
Keyboard Detection Mode — This read/write control bit selects either edge-only detection or edge-and-level
detection. KBI port bits 3 through 0 can detect falling edges-only or falling edges and low levels. KBI port bits 7
through 4 can be configured to detect either:
• Rising edges-only or rising edges and high levels (KBEDGn = 1)
• Falling edges-only or falling edges and low levels (KBEDGn = 0)
0 Edge-only detection
1 Edge-and-level detection
MC9S08AW60 Data Sheet, Rev 2
Freescale Semiconductor
161