English
Language : 

MC68HC908GR16 Datasheet, PDF (137/310 Pages) Motorola, Inc – Microcontrollers
Freescale Semiconductor, Inc.
Input/Output Ports (PORTS)
Port C
NOTE:
DDRC6 and DDRC0 — Data Direction Register C Bits
These read/write bits control port C data direction. Reset clears DDRC6 and
DDRC0, configuring all port C pins as inputs.
1 = Corresponding port C pin configured as output
0 = Corresponding port C pin configured as input
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.
Figure 12-11 shows the port C I/O logic.
READ DDRC ($0006)
WRITE DDRC ($0006)
RESET
WRITE PTC ($0002)
VDD
DDRCx
PTCx
PTCPUEx
READ PTC ($0002)
INTERNAL
PULLUP
DEVICE
PTCx
Figure 12-11. Port C I/O Circuit
When bit DDRCx is a logic 1, reading address $0002 reads the PTCx data latch.
When bit DDRCx is a logic 0, reading address $0002 reads the voltage level on the
pin. The data latch can always be written, regardless of the state of its data
direction bit. Table 12-4 summarizes the operation of the port C pins.
Table 12-4. Port C Pin Functions
PTCPUE
Bit
DDRC
Bit
PTC
Bit
I/O Pin
Mode
1
0
X(1)
Input, VDD(2)
0
0
X
Input, Hi-Z(4)
X
1
X
Output
1. X = Don’t care
2. I/O pin pulled up to VDD by internal pullup device.
3. Writing affects data register, but does not affect input.
4. Hi-Z = High impedance
Accesses
to DDRC
Read/Write
DDRC6–DDRC0
DDRC6–DDRC0
DDRC6–DDRC0
Accesses
to PTC
Read
Write
Pin
PTC6–PTC0(3)
Pin
PTC6–PTC0(3)
PTC6–PTC0
PTC6–PTC0
MC68HC908GR16 — Rev. 1.0
MOTOROLA
Input/Output Ports (PORTS)
For More Information On This Product,
Go to: www.freescale.com
Data Sheet
137