English
Language : 

MC9S08RG60 Datasheet, PDF (118/232 Pages) Motorola, Inc – Microcontrollers
Parallel Input/Output
8.6.3 Port C Registers (PTCD, PTCPE, and PTCDD)
Port C pins used as general-purpose I/O pins are controlled by the port C data (PTCD), data direction
(PTCDD), and pullup enable (PTCPE) registers.
PTCD
PTCPE
PTCDD
Bit 7
Read:
PTCD7
Write:
Reset: 0
6
PTCD6
0
5
PTCD5
0
4
PTCD4
0
3
PTCD3
0
2
PTCD2
0
1
PTCD1
0
Bit 0
PTCD0
0
Read:
PTCPE7 PTCPE6 PTCPE5 PTCPE4 PTCPE3 PTCPE2 PTCPE1 PTCPE0
Write:
Reset: 0
0
0
0
0
0
0
0
Read:
PTCDD7 PTCDD6 PTCDD5 PTCDD4 PTCDD3 PTCDD2 PTCDD1 PTCDD0
Write:
Reset: 0
0
0
0
0
0
0
0
Figure 8-8 Port C Registers
PTCDn — Port C Data Register Bit n (n = 0–7)
For port C pins that are inputs, reads return the logic level on the pin. For port C 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 C pins that are configured as outputs, the logic
level is driven out the corresponding MCU pin.
Reset forces PTCD 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.
PTCPEn — Pullup Enable for Port C Bit n (n = 0–7)
For port C pins that are inputs, these read/write control bits determine whether internal pullup devices
are enabled. For port C pins that are configured as outputs, these bits are ignored and the internal pullup
devices are disabled.
1 = Internal pullup device enabled.
0 = Internal pullup device disabled.
PTCDDn — Data Direction for Port C Bit n (n = 0–7)
These read/write bits control the direction of port C pins and what is read for PTCD reads.
1 = Output driver enabled for port C bit n and PTCD reads return the contents of PTCDn.
0 = Input (output driver disabled) and reads return the pin value.
118
MC9S08RC/RD/RE/RG
Freescale Semiconductor