English
Language : 

MC9S12KG128 Datasheet, PDF (172/600 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 4 Port Integration Module (PIM9KG128V1)
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).
PTIx
0
1
PTx
0
1
PAD
DDRx
0
1
Digital data out
Module output enable
module enable
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”.
Digital
Input
11
0
Module
Enable
Analog
Module
Analog
Output
Digital
Output
0
1
PAD
PIM Boundary
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.
MC9S12KG128 Data Sheet, Rev. 1.15
172
Freescale Semiconductor