English
Language : 

MC68HC908QY4A_10 Datasheet, PDF (84/200 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Keyboard Interrupt Module (KBI)
PTA0/TCH0/AD0/KBI0
PTA1/TCH1/AD1/KBI1
PTA2/IRQ/KBI2/TCLK
PTA3/RST/KBI3
PTA4/OSC2/AD2/KBI4
PTA5/OSC1/AD3/KBI5
PTB0/AD4
PTB1/AD5
PTB2
PTB3
PTB4
PTB5
PTB6
PTB7
MC68HC908QY4A
128 BYTES
USER RAM
M68HC08 CPU
MC68HC908QY4A
4096 BYTES
USER FLASH
CLOCK
GENERATOR
KEYBOARD INTERRUPT
MODULE
SINGLE INTERRUPT
MODULE
AUTO WAKEUP
MODULE
LOW-VOLTAGE
INHIBIT
2-CHANNEL 16-BIT
TIMER MODULE
COP
MODULE
6-CHANNEL
10-BIT ADC
VDD
POWER SUPPLY
VSS
DEVELOPMENT SUPPORT
MONITOR ROM
BREAK MODULE
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
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.
MC68HC908QYA/QTA Family Data Sheet, Rev. 3
84
Freescale Semiconductor