Edge Only Sensitivity; Edge And Level Sensitivity; Pull-Up/Pull-Down Resistors; Keyboard Interrupt Initialization - ROHS MC9S08QE128 Reference Manual

Table of Contents

Advertisement

edge is detected when the input signal is seen as a logic 0 during one bus cycle and then a logic 1 during
the next cycle.
7.4.1

Edge Only Sensitivity

A valid edge on an enabled port pin will set KBF in KBIxSC. If KBIE in KBIxSC is set, an interrupt
request will be presented to the CPU. Clearing of KBF is accomplished by writing a 1 to KBACK in
KBIxSC.
7.4.2

Edge and Level Sensitivity

A valid edge or level on an enabled port pin will set KBF in KBIxSC. If KBIE in KBIxSC is set, an
interrupt request will be presented to the CPU. Clearing of KBF is accomplished by writing a 1 to KBACK
in KBIxSC provided all enabled port inputs are at their deasserted levels. KBF will remain set if any
enabled port pin is asserted while attempting to clear by writing a 1 to KBACK.
7.4.3

Pull-Up/Pull-Down Resistors

The keyboard interrupt pins can be configured to use an internal pull-up/pull-down resistor using the
associated I/O port pull-up enable register. If an internal resistor is enabled, the KBIxES register is used to
select whether the resistor is a pull-up (KBEDGn = 0) or a pull-down (KBEDGn = 1).
7.4.4

Keyboard Interrupt Initialization

When an interrupt pin is first enabled, it is possible to get a false interrupt flag. To prevent a false interrupt
request during pin interrupt initialization, the user should do the following:
1. Mask interrupts by clearing KBIE in KBIxSC.
2. Select the pin polarity by setting the appropriate KBEDGn bits in KBIxES.
3. If using internal pull-up/pull-down device, configure the associated pull enable bits in KBIxPE.
4. Enable the interrupt pins by setting the appropriate KBIPEn bits in KBIxPE.
5. Write to KBACK in KBIxSC to clear any false interrupts.
6. Set KBIE in KBIxSC to enable interrupts.
Freescale Semiconductor
MC9S08QE128 MCU Series Reference Manual, Rev. 2
Chapter 7 Keyboard Interrupt (S08KBIV2)
143

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for ROHS MC9S08QE128

This manual is also suitable for:

Mc9s08qe96Mc9s08qe64

Table of Contents