English
Language : 

MC9S08GT16A Datasheet, PDF (99/300 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 7
Keyboard Interrupt (S08KBIV1)
7.1 Introduction
The MC9S08GT16A/GT8A has one KBI module with eight keyboard interrupt inputs that share port A
pins. See Chapter 2, “Pins and Connections,” for more information about the logic and hardware aspects
of these pins.
7.1.1 Port A and Keyboard Interrupt Pins
MCU Pin:
PTA7/
KBIP7
PTA6/
KBIP6
PTA5/
KBIP5
PTA4/
KBIP4
PTA3/
KBIP3
Figure 7-1. Port A Pin Names
PTA2/
KBIP2
PTA1/
KBIP1
PTA0/
KBIP0
The following paragraphs discuss controlling the keyboard interrupt pins.
Port A is an 8-bit port which is shared among the KBI keyboard interrupt inputs and general-purpose I/O.
The eight KBIPEn control bits in the KBIPE register allow selection of any combination of port A pins to
be assigned as KBI inputs. Any pins which are enabled as KBI 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.
KBI 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 while bits 7 through 4 can be configured for
rising-edge/high-level or for falling-edge/low-level sensitivity.
The eight PTAPEn control bits in the PTAPE register allow you to select whether an internal pullup device
is enabled on each port A pin that is configured as an input. When any of bits 7 through 4 of port A are
enabled as KBI inputs and are configured to detect rising edges/high levels, the pullup enable bits enable
pulldown rather than pullup devices.
An enabled keyboard interrupt can be used to wake the MCU from wait or standby (stop3).
7.1.2 Features
The keyboard interrupt (KBI) module features include:
• Keyboard interrupts selectable on eight port pins:
— Four falling-edge/low-level sensitive
— Four falling-edge/low-level or rising-edge/high-level sensitive
— Choice of edge-only or edge-and-level sensitivity
— Common interrupt flag and interrupt enable control
— Capable of waking up the MCU from stop3 or wait mode
MC9S08GT16A/GT8A Data Sheet, Rev. 1
Freescale Semiconductor
99