English
Language : 

MC908GR32AVFAE Datasheet, PDF (140/314 Pages) Freescale Semiconductor, Inc – Microcontrollers
Input/Output (I/O) Ports
12.5 Port C
Port C is a 7-bit, general-purpose bidirectional I/O port. Port C also has software configurable pullup
devices if configured as an input port.
12.5.1 Port C Data Register
The port C data register (PTC) contains a data latch for each of the seven port C pins.
NOTE
Bit 6 through bit 2 of PTC are not available in the 32-pin LQFP package.
Address: $0002
Bit 7
6
5
4
3
2
1
Read: 1
Write:
PTC6
PTC5
PTC4
PTC3
PTC2
PTC1
Reset:
Unaffected by reset
= Unimplemented
Figure 12-9. Port C Data Register (PTC)
Bit 0
PTC0
PTC6–PTC0 — Port C Data Bits
These read/write bits are software-programmable. Data direction of each port C pin is under the control
of the corresponding bit in data direction register C. Reset has no effect on port C data.
12.5.2 Data Direction Register C
Data direction register C (DDRC) determines whether each port C pin is an input or an output. Writing a
1 to a DDRC bit enables the output buffer for the corresponding port C pin; a 0 disables the output buffer.
Address:
Read:
Write:
Reset:
$0006
Bit 7
0
6
DDRC6
5
DDRC5
4
DDRC4
3
DDRC3
2
DDRC2
1
DDRC1
0
0
0
0
0
0
0
= Unimplemented
Figure 12-10. Data Direction Register C (DDRC)
Bit 0
DDRC0
0
DDRC6–DDRC0 — Data Direction Register C Bits
These read/write bits control port C data direction. Reset clears DDRC6–DDRC0, configuring all port
C pins as inputs.
1 = Corresponding port C pin configured as output
0 = Corresponding port C pin configured as input
NOTE
Avoid glitches on port C pins by writing to the port C data register before
changing data direction register C bits from 0 to 1.
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
140
Freescale Semiconductor