English
Language : 

MC9S08AW16CFUE Datasheet, PDF (157/324 Pages) Freescale Semiconductor, Inc – MC9S08AW60 Features
Chapter 9
Keyboard Interrupt (S08KBIV1)
9.1 Introduction
The MC9S08AW60 Series has one KBI module with eight keyboard interrupt inputs that are shared with
port D and port G pins. See Chapter 2, “Pins and Connections,” for more information about the logic and
hardware aspects of these pins.
9.2 Keyboard Pin Sharing
The KBI input KBIP7 shares a common pin with PTD7 and AD15. When KBIP7 is enabled the pin is
forced to its input state regardless of the value of the associated port D data direction bit. The port D pullup
enable is still used to control the pullup resistor and the pin state can be sensed through a read of the port
D data register (this requires that bit 7 of the port D DDR is 0). In the case that the pin is enabled as an
ADC input, both the PTD7 and KBIP7 functions are disabled, including the pullup resistor.
The KBI input KBIP6 shares a common pin with PTD3 and AD11, and KBI input KBIP5 shares a common
pin with PTD2 and AD10. The sharing of each of these inputs with port and ADC functions operates in
the same way as described above for KBIP7.
The KBI inputs KBIP4 – KBIP0 are shared on common pins with PTG4 – PTG0. These pins all operate
in the same way as described above for KBIP7 except that none are shared with an ADC input.
KBIP3 – KBIP0 are always falling-edge/low-level sensitive. KBIP7 – KBIP4 can be configured for
rising-edge/high-level or for falling-edge/low-level sensitivity. When any of the inputs KBIP7 – KBIP0 are
enabled and configured to detect rising edges/high levels, and the pin pullup is enabled through the
corresponding port pullup enable bit for that pin, a pulldown resistor rather than a pullup resistor is enabled
on the pin.
PTxPEn
(Pull Enable)
0
1
x
1
1
0
1 x = Don’t care
Table 9-1. KBI and Parallel I/O Interaction
PTxDDn
KBIPEn
KBEDGn
(Data Direction) (KBI Pin Enable) (KBI Edge Select)
0
0
x1
0
0
x
1
0
x
x
1
0
x
1
1
x
1
x
Pullup
disabled
enabled
disabled
enabled
disabled
disabled
Freescale Semiconductor
MC9S08AW60 Data Sheet, Rev 2
Pulldown
disabled
disabled
disabled
disabled
enabled
disabled
157