![NXP Semiconductors freescale semiconductor ColdFire MCF51CN128 Series Скачать руководство пользователя страница 221](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-semiconductor-coldfire-mcf51cn128-series/freescale-semiconductor-coldfire-mcf51cn128-series_reference-manual_1721790221.webp)
Parallel Input/Output Control
MCF51CN128 Reference Manual, Rev. 6
Freescale Semiconductor
9-8
Figure 9-6. GPIO Bit Block Diagram
Pin mux controls leave GPIO input buffers enabled for all digital functions, regardless of mux control
selection. This gives you the ability to poll a port to decode a key pressed after a keyboard interrupt is fired.
The same function can be used for IRQ pin level detection and debounce software.
NOTE
•
Use pin mux control registers from
Section 2.3, “Pin Mux Controls
” to
assign GPIO signals to the MCF51CN128 package pins.
•
Most pin functions default to GPIO and must be software configured.
9.3.2
GPIO Programming Model
Refer to tables in
,” for the absolute address assignments for all registers. This section
refers to registers and control bits only by their names.
NOTE
A Freescale Semiconductor-provided equate or header file normally is used
to translate these names into the appropriate absolute addresses.
Table 9-11. Register Set Summary
Register
Description
Access
PTxD
PORTx Data Register
read/write
PTxDD
PORTx Data Direction Register
read/write
IPb
u
s
PTxDD[n]
PTxD[n]
0
1
Port Output Enable
Port Data Out
Port Data In
Read xDD
Write xDD
Write xD
Read xD