English
Language : 

MC9S08GB60A Datasheet, PDF (95/302 Pages) Freescale Semiconductor, Inc – HCS08 Microcontrollers
Chapter 6 Parallel Input/Output
6.6.4 Port D Registers (PTDD, PTDPE, PTDSE, and PTDDD)
Port D includes eight 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.
R
W
Reset
7
PTDD7
0
6
PTDD6
5
PTDD5
4
PTDD4
3
PTDD3
2
PTDD2
0
0
0
0
0
Figure 6-21. Port D Data Register (PTDD)
1
PTDD1
0
0
PTDD0
0
Table 6-13. PTDD Field Descriptions
Field
Description
7:0
PTDD[7: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.
R
W
Reset
7
PTDPE7
0
6
PTDPE6
5
PTDPE5
4
PTDPE4
3
PTDPE3
2
PTDPE2
0
0
0
0
0
Figure 6-22. Pullup Enable for Port D (PTDPE)
1
PTDPE1
0
0
PTDPE0
0
Table 6-14. PTDPE Field Descriptions
Field
Description
7:0
PTDPE[7: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.
MC9S08GB60A Data Sheet, Rev. 2
Freescale Semiconductor
95