Datasheet
Input/Output Ports (I/O)
Technical Data MC68HC908GR8 — Rev 4.0
218 Input/Output Ports (I/O) MOTOROLA
Figure 16-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 16-4 summarizes
the operation of the port C pins.
READ DDRC ($0006)
WRITE DDRC ($0006)
RESET
WRITE PTC ($0002)
READ PTC ($0002)
PTCx
DDRCx
PTCx
INTERNAL DATA BUS
V
DD
INTERNAL
PTCPUEx
PULLUP
DEVICE
Table 16-4. Port C Pin Functions
PTCPUE Bit DDRC Bit PTC Bit I/O Pin Mode
Accesses to DDRC Accesses to PTC
Read/Write Read Write
10
X
(1)
Input, V
DD
(4)
DDRC1–DDRC0 Pin
PTC1–PTC0
(3)
00X
Input, Hi-Z
(2)
DDRC1–DDRC0 Pin
PTC1–PTC0
(3)
X 1 X Output DDRC1–DDRC0 PTC1–PTC0 PTC1–PTC0
Notes:
1. X = Don’t care
2. Hi-Z = High impedance
3. Writing affects data register, but does not affect input.
4. I/O pin pulled up to V
DD
by internal pullup device.
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...