QE128 Quick Reference User Guide, Rev. 1.0
Freescale Semiconductor
4-1
Chapter 4
Using the Keyboard Interrupt (KBI) for the QE
Microcontrollers
4.1
Overview
This is a quick reference for using the keyboard interrupt (KBI) module for the QE family
microcontrollers (MCUs). Basic information about the functional description and configuration options
are provided.
The following example may be modified to suit an application. The KBI project is made for the
MC9S08QE128 and MCF51QE128 MCUs.
4.2
KBI project for EVB
4.2.1
Code example and explanation
This example code is available from the Freescale Web site www.freescale.com
KBIxSC
KBF
KBACK
KBIE
KBMOD
Module Configuration
KBF – set when event occurs
KBACK – clears KBF
KBI Quick Reference
KBIxPE
KBIPE7
KBIPE6
KBIPE5
KBIPE4
KBIPE3
KBIPE2
KBIPE1
KBIPE0
KBI Pin Enable
KBIPE[7:0] — enables and disables each port pin to operate as a keyboard interrupt pin.
KBIxES
KBEDG7
KBEDG6
KBEDG5
KBEDG4
KBEDG3
KBEDG2
KBEDG1
KBEDG0
KBI Pin Enable
KBEDG[7:0] – determines the polarity edge that is recognized as a trigger event for the
KBIE – interrupt enable
KBMOD – mode select
corresponding pin.
Because there is more than one KBI module on this device, there may be more than one full
set of registers on your device. In the register name below, where there's a small x, there
would be a 1 or a 2 in your software to distinguish the register that is on KBI1 from KBI2.