![](http://datasheet.mmic.net.cn/30000/MC9S12KG128VPVE_datasheet_2373209/MC9S12KG128VPVE_172.png)
Chapter 4 Port Integration Module (PIM9KG128V1)
MC9S12KG128 Data Sheet, Rev. 1.16
172
Freescale Semiconductor
4.4.3
Data Direction Register
The Data Direction Register defines whether the pin is used as an input or an output. A Data Direction
Register bit set to 0 configures the pin as an input. A Data Direction Register bit set to 0 configures the pin
as an output. If a peripheral module controls the pin the contents of the data direction register is ignored
Figure 4-47. Illustration of I/O Pin Functionality
Figure 4-48 shows the state of digital inputs and outputs when an analog module drives the port. When the
analog module is enabled all associated digital output ports are disabled and all associated digital input
ports read “1”.
Figure 4-48. Digital Ports and Analog Module
4.4.4
Reduced Drive Register
If the port is used as an output the Reduced Drive Register allows the configuration of the drive strength.
PTx
DDRx
output enable
module enable
1
0
1
0
PAD
PTIx
data out
Digital
Module
Analog
Module
1
0
1
PAD
Digital
Input
Digital
Output
1
0
Analog
Module
Enable
Output
PIM Boundary