English
Language : 

MC68HC908KX8 Datasheet, PDF (175/310 Pages) Motorola, Inc – Microcontrollers
Keyboard Interrupt Module (KBI)
Keyboard Initialization
13.5 Keyboard Initialization
When a keyboard interrupt pin is enabled, the pin may initially be low and
cause a false interrupt to occur. A false interrupt on an edge-triggered
pin can be acknowledged immediately after enabling the pin. A false
interrupt on an edge- and level-triggered interrupt pin must be
acknowledged after the pin has been pulled high.
The internal pullup device, the pin capacitance, as well as the external
load will factor into the actual amount of time it takes for the pin to pull
high. Considering only an internal pullup of 48 kΩ and pin capacitance
of 8 pF, the pullup time will be on the order of 1 µs.
To prevent a false interrupt on keyboard initialization:
1. Mask keyboard interrupts by setting the IMASKK bit in the
keyboard status and control register.
2. Enable the KBI pins by setting the appropriate KBIEx bits in the
keyboard interrupt enable register.
3. Write to the ACKK bit in the keyboard status and control register
to clear any false interrupts.
4. Clear the IMASKK bit.
Another way to avoid a false interrupt:
1. Configure the keyboard pins as outputs by setting the appropriate
DDRA bits in data direction register A.
2. Write logic 1s to the appropriate port A data register bits.
3. Enable the KBI pins by setting the appropriate KBIEx bits in the
keyboard interrupt enable register.
MC68HC908KX8 • MC68HC908KX2 • MC68HC08KX8 — Rev. 1.0
MOTOROLA
Keyboard Interrupt Module (KBI)
Technical Data
175