Datasheet

Input/Output (I/O) Ports
MC68HC908GZ16 • MC68HC908GZ8 Data Sheet, Rev. 4
162 Freescale Semiconductor
13.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.
13.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.
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.
CAN
RX
and CAN
TX
— MSCAN08 Bits
The CAN
RX
–CAN
TX
pins are the MSCAN08 modules receive and transmit pins. The CANEN bit in the
MSCAN08 control register determines, whether the PTC1/CAN
RX
–PTC0/CAN
TX
pins are MSCAN08
pins or general-purpose I/O pins. See Chapter 12 MSCAN08 Controller (MSCAN08).
13.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
logic 1 to a DDRC bit enables the output buffer for the corresponding port C pin; a logic 0 disables the
output buffer.
Address: $0002
Bit 7654321Bit 0
Read: 1
PTC6 PTC5 PTC4 PTC3 PTC2 PTC1 PTC0
Write:
Reset: Unaffected by reset
Alternative
Function:
CAN
RX
CAN
TX
= Unimplemented
Figure 13-9. Port C Data Register (PTC)
Address: $0006
Bit 7654321Bit 0
Read: 0
DDRC6 DDRC5 DDRC4 DDRC3 DDRC2 DDRC1 DDRC0
Write:
Reset:00000000
= Unimplemented
Figure 13-10. Data Direction Register C (DDRC)