Chapter 7 Keyboard Interrupt (S08KBIV2)
MC9S08QE128 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor
143
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.
Содержание MC9S08QE128
Страница 2: ......
Страница 4: ......
Страница 49: ...Chapter 3 Modes of Operation MC9S08QE128 MCU Series Reference Manual Rev 2 50 Freescale Semiconductor ...
Страница 138: ...Chapter 6 Parallel Input Output Control MC9S08QE128 MCU Series Reference Manual Rev 2 138 Freescale Semiconductor ...
Страница 144: ...Chapter 7 Keyboard Interrupt S08KBIV2 MC9S08QE128 MCU Series Reference Manual Rev 2 144 Freescale Semiconductor ...
Страница 166: ...Chapter 8 Central Processor Unit S08CPUV4 MC9S08QE128 MCU Series Reference Manual Rev 2 166 Freescale Semiconductor ...
Страница 174: ...MC9S08QE128 MCU Series Reference Manual Rev 2 174 Freescale Semiconductor Analog Comparator S08ACMPV3 ...
Страница 202: ...12 bit Analog to Digital Converter S08ADCV1 MC9S08QE128 MCU Series Reference Manual Rev 2 202 Freescale Semiconductor ...
Страница 282: ...Serial Peripheral Interface S08SPIV3 MC9S08QE128 MCU Series Reference Manual Rev 2 282 Freescale Semiconductor ...
Страница 306: ...Timer PWM Module S08TPMV3 MC9S08QE128 MCU Series Reference Manual Rev 2 306 Freescale Semiconductor ...
Страница 320: ...Development Support MC9S08QE128 MCU Series Reference Manual Rev 2 320 Freescale Semiconductor ...