![NXP Semiconductors freescale semiconductor ColdFire MCF51CN128 Series Скачать руководство пользователя страница 223](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-semiconductor-coldfire-mcf51cn128-series/freescale-semiconductor-coldfire-mcf51cn128-series_reference-manual_1721790223.webp)
Parallel Input/Output Control
MCF51CN128 Reference Manual, Rev. 6
Freescale Semiconductor
9-10
9.4
V1 ColdFire Rapid GPIO Functionality
The V1 ColdFire core can perform higher speed I/O via its local bus, which does not have latency penalties
associated with the on-chip peripheral bus bridge. The Rapid GPIO module contains separate set/clear/data
registers based at address 0x(00)C0_0000. This functionality can be programmed to take priority on ports
A and B.
This functionality is further defined in
Chapter 10, “Rapid GPIO (RGPIO).”
9.5
Keyboard Interrupts
The block diagram for each keyboard interrupt logic is shown
.
Figure 9-9. Port Interrupt Block Diagram
Writing to KBI
x
PE[KBIPEn] independently enables or disables each port pin. Each port can be configured
as edge-sensitive or edge- and level-sensitive based on the KBI
x
SC[KBIMOD] bit. Edge sensitivity can
be software programmed to be falling or rising; the level can be either low or high. The polarity of the
edge-sensitivity or edge- and level-sensitivity is selected using the KBI
x
ES[KBEDGn].
Synchronous logic is used to detect edges. Prior to detecting an edge, enabled port inputs must be at the
deasserted logic level. A falling edge is detected when an enabled port 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 during one bus cycle and then a logic 1 during
the next cycle.
9.5.1
Keyboard Functional Considerations
9.5.1.1
Edge Only Sensitivity
A valid edge on an enabled port pin sets KBI
x
SC[KBF]. If KBI
x
SC[KBIE] is set, an interrupt request is
generated to the CPU. Write a 1 to KBI
x
SC[KBACK] to clear KBF.
KBEDG
n
D
Q
CK
CLR
VDD
KBIMOD
KBIE
KEYBOARD
INTERRUPT FF
KBACK
RESET
SYNCHRONIZER
KBF
STOP BYPASS
STOP
BUSCLK
KBIPE
n
0
1
S
KBIPE0
0
1
S
KBEDG0
KBI
x
P0
KBI
x
P
n
KBI
INTERRUPT
REQUEST