Functional Description - NXP Semiconductors MC9S08SU16 Reference Manual

Table of Contents

Advertisement

Functional Description

15.6 Functional Description
This on-chip peripheral module is called a keyboard interrupt module because originally
it was designed to simplify the connection and use of row-column matrices of keyboard
switches. However, these inputs are also useful as extra external interrupt inputs and as
an external means of waking the MCU from stop or wait low-power modes.
The KBI module allows up to eight pins to act as additional interrupt sources. Writing to
the KBI_PE[KBIPEn] bits independently enables or disables each KBI pin. Each KBI pin
can be configured as edge sensitive or edge and level sensitive based on the
KBI_SC[KBMOD] bit. Edge sensitive can be software programmed to be either falling
or rising; the level can be either low or high. The polarity of the edge or edge and level
sensitivity is selected using the KBI_ES[KBEDGn] bits.
15.6.1 Edge-only sensitivity
Synchronous logic is used to detect edges. A falling edge is detected when an enabled
keyboard interrupt (KBI_PE[KBIPEn]=1) input signal is seen as a logic 1 (the deasserted
level) during one bus cycle and then a logic 0 (the asserted level) during the next cycle. A
rising edge is detected when the input signal is seen as a logic 0 (the deasserted level)
during one bus cycle and then a logic 1 (the asserted level) during the next cycle.
Before the first edge is detected, all enabled keyboard interrupt input signals must be at
the deasserted logic levels. After any edge is detected, all enabled keyboard interrupt
input signals must return to the deasserted level before any new edge can be detected.
A valid edge on an enabled KBI pin will set KBI_SC[KBF]. If KBI_SC[KBIE] is set, an
interrupt request will be presented to the MPU. Clearing of KBI_SC[KBF] is
accomplished by writing a 1 to KBI_SC[KBACK].
15.6.2 Edge and level sensitivity
A valid edge or level on an enabled KBI pin will set KBI_SC[KBF]. If KBI_SC[KBIE] is
set, an interrupt request will be presented to the MCU. Clearing of KBI_SC[KBF] is
accomplished by writing a 1 to KBI_SC[KBACK], provided all enabled keyboard inputs
are at their deasserted levels. KBI_SC[KBF] will remain set if any enabled KBI pin is
asserted while attempting to clear KBI_SC[KBF] by writing a 1 to KBI_SC[KBACK].
MC9S08SU16 Reference Manual, Rev. 5, 4/2017
240
NXP Semiconductors

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc9s08su16vfkMc9s08su8vfk

Table of Contents