English
Language : 

MC9S08GT16A Datasheet, PDF (93/300 Pages) Freescale Semiconductor, Inc – Microcontrollers
Parallel Input/Output
6.5.4 Port D Registers (PTDD, PTDPE, PTDSE, and PTDDD)
Port D includes five pins shared between general-purpose I/O, TPM1, and TPM2. Port D pins used as
general-purpose I/O pins are controlled by the port D data (PTDD), data direction (PTDDD), pullup enable
(PTDPE), and slew rate control (PTDSE) registers.
If a TPM takes control of a port D pin, the corresponding PTDDD bit is ignored. When the TPM is in
output compare mode, the corresponding PTDSE can be used to provide slew rate on the pin. When the
TPM is in input capture mode, the corresponding PTDPE can be used, provided the corresponding
PTDDD bit is 0, to provide a pullup device on the pin.
Reads of PTDD will return the logic value of the corresponding pin, provided PTDDD is 0.
7
R
0
W
Reset
0
6
5
4
3
2
0
0
PTDD4
PTDD3
PTDD2
0
0
0
0
0
Figure 6-20. Port D Data Register (PTDD)
1
PTDD1
0
0
PTDD0
0
Table 6-13. PTDD Field Descriptions
Field
Description
4:0
PTDD[4:0]
Port D Data Register Bits — For port D pins that are inputs, reads return the logic level on the pin. For port D
pins that are configured as outputs, reads return the last value written to this register.
Writes are latched into all bits of this register. For port D pins that are configured as outputs, the logic level is
driven out the corresponding MCU pin.
Reset forces PTDD to all 0s, but these 0s are not driven out the corresponding pins because reset also
configures all port pins as high-impedance inputs with pullups disabled.
7
R
0
W
Reset
0
6
5
4
3
2
0
0
PTDPE4
PTDPE3
PTDPE2
0
0
0
0
0
Figure 6-21. Pullup Enable for Port D (PTDPE)
1
PTDPE1
0
0
PTDPE0
0
Table 6-14. PTDPE Field Descriptions
Field
Description
4:0
PTDPE[4:0]
Pullup Enable for Port D Bits — For port D pins that are inputs, these read/write control bits determine whether
internal pullup devices are enabled. For port D pins that are configured as outputs, these bits are ignored and
the internal pullup devices are disabled.
0 Internal pullup device disabled.
1 Internal pullup device enabled.
MC9S08GT16A/GT8A Data Sheet, Rev. 1
Freescale Semiconductor
93