
Parallel Input/Output
MC9S08RC/RD/RE/RG Data Sheet, Rev. 1.11
78
Freescale Semiconductor
6.6.1
Port A Registers (PTAD, PTAPE, and PTADD)
Port A pins used as general-purpose I/O pins are controlled by the port A data (PTAD), data direction
(PTADD), and pullup enable (PTAPE) registers.
76543210
R
W
Reset
00000000
Figure 6-6. Port A Data Register (PTAD)
Table 6-1. PTAD Field Descriptions
Field
Description
7:0
PTAD[7:0]
Port A Data Register Bits — For port A pins that are inputs, reads of this register return the logic level on the
pin. For port A pins that are congured as outputs, reads of this register return the last value written to this
register.
Writes are latched into all bits of this register. For port A pins that are congured as outputs, the logic level is
driven out the corresponding MCU pin.
Reset forces PTAD to all 0s, but these 0s are not driven out the corresponding pins because reset also congures
all port pins as high-impedance inputs with pullups disabled.
76543210
R
W
Reset
00000000
Figure 6-7. Pullup Enable for Port A (PTAPE)
Table 6-2. PTAPE Field Descriptions
Field
Description
7:0
PTAPE[7:0]
Pullup Enable for Port A Bits — For port A pins that are inputs, these read/write control bits determine whether
internal pullup devices are enabled provided the corresponding PTADDn is a logic 0. For port A pins that are
congured as outputs, these bits are ignored and the internal pullup devices are disabled. When any of bits 7
through 4 of port A are enabled as KBI inputs and are configured to detect rising edges/high levels, the pullup
enable bits enable pulldown rather than pullup devices.
0 Internal pullup device disabled.
1 Internal pullup device enabled.