Keyboard Interrupt Module (KBI)
MC68HC908QYA/QTA Family Data Sheet, Rev. 1
84
Freescale Semiconductor
Figure 9-1. Block Diagram Highlighting KBI Block and Pins
9.3.1.1 MODEK = 1
If the MODEK bit is set, the keyboard interrupt inputs are both edge and level sensitive. The KBIPx bit will
determine whether a edge sensitive pin detects rising or falling edges and on level sensitive pins whether
the pin detects low or high levels. With MODEK set, both of the following actions must occur to clear a
keyboard interrupt request:
Return of all enabled keyboard interrupt inputs to a deasserted level. As long as any enabled
keyboard interrupt pin is asserted, the keyboard interrupt remains active.
Vector fetch or software clear. A KBI vector fetch generates an interrupt acknowledge signal to
clear the KBI latch. Software generates the interrupt acknowledge signal by writing a 1 to ACKK in
KBSCR. The ACKK bit is useful in applications that poll the keyboard interrupt inputs and require
software to clear the KBI latch. Writing to ACKK prior to leaving an interrupt service routine can
also prevent spurious interrupts due to noise. Setting ACKK does not affect subsequent transitions
on the keyboard interrupt inputs. An edge detect that occurs after writing to ACKK latches another
interrupt request. If the keyboard interrupt mask bit, IMASKK, is clear, the CPU loads the program
counter with the KBI vector address.
RST, IRQ: Pins have internal pull up device
All port pins have programmable pull up device
PTA[0:5]: Higher current sink and source capability
PTB[0:7]: Not available on 8-pin devices
PTA0/TCH0/AD0/KBI0
PTA1/TCH1/AD1/KBI1
PTA2/IRQ/KBI2/TCLK
PTA3/RST/KBI3
PTA4/OSC2/AD2/KBI4
PTA5/OSC1/AD3/KBI5
2-CHANNEL 16-BIT
TIMER MODULE
KEYBOARD INTERRUPT
MODULE
SINGLE INTERRUPT
MODULE
AUTO WAKEUP
LOW-VOLTAGE
INHIBIT
COP
MODULE
6-CHANNEL
10-BIT ADC
PTB0/AD4
PTB
DDRB
M68HC08 CPU
PT
A
DDRA
PTB1/AD5
PTB2
PTB3
PTB4
PTB5
PTB6
PTB7
MC68HC908QY4A
POWER SUPPLY
VDD
VSS
CLOCK
GENERATOR
MODULE
4096 BYTES
USER FLASH
128 BYTES
USER RAM
MONITOR ROM
MC68HC908QY4A
BREAK MODULE
DEVELOPMENT SUPPORT