English
Language : 

MC9S08RG60 Datasheet, PDF (121/232 Pages) Motorola, Inc – Microcontrollers
SoC Guide — MC9S08RG60/D Rev 1.10
Chapter 9 Keyboard Interrupt (KBI) Module
9.1 Introduction
The MC9S08RC/RD/RE/RG has two KBI modules. One has eight keyboard interrupt inputs that share
port A pins. The other KBI module has four inputs that are shared on the upper four pins of port C. See the
Pins and Connections section for more information about the logic and hardware aspects of these pins.
Port A is an 8-bit port that is shared between the KBI1 keyboard interrupt inputs and general-purpose I/O.
The eight KBI1PEn control bits in the KBI1PE register allow selection of any combination of port A pins
to be assigned as KBI1 inputs. Any pins that are enabled as KBI1 inputs will be forced to act as inputs and
the remaining port A pins are available as general-purpose I/O pins controlled by the port A data (PTAD),
data direction (PTADD) and pullup enable (PTAPE) registers. The eight PTAPEn control bits in the
PTAPE register allow the user to select whether an internal pullup device is enabled on each port A pin
that is configured as a port input or a KBI1 input.
KBI1 inputs can be configured for edge-only sensitivity or edge-and-level sensitivity. Bits 3 through 0 of
port A are falling-edge/low-level sensitive and bits 7 through 4 can be configured for
rising-edge/high-level or for falling-edge/low-level sensitivity.
Port C is an 8-bit port with its lower four pins shared between the KBI2 keyboard interrupt inputs and
general-purpose I/O. The four KBI2PEn control bits in the KBI2PE register allow selection of any
combination of the lower four port C pins to be assigned as KBI2 inputs. Any pins that are enabled as KBI2
inputs will be forced to act as inputs and the remaining port C pins are available as general-purpose I/O
pins controlled by the port C data (PTCD), data direction (PTCDD) and pullup enable (PTCPE) registers.
The eight PTCPEn control bits in the PTCPE register allow the user to select whether an internal pullup
device is enabled on each port C pin that is configured as a port input or a KBI2 input.
Any enabled keyboard interrupt can be used to wake the MCU from wait, standby (stop3), partial
power-down (stop2) or power-down modes (stop1). In either stop1 or stop2 mode, an input functions as a
falling edge/low-level wakeup, therefore it should be configured to use falling-edge sensing if the MCU
will be used in stop1 or stop2 modes.
Freescale Semiconductor
MC9S08RC/RD/RE/RG
121