
Input/Output (I/O) Ports
MC68HC908GR60A MC68HC908GR48A MC68HC908GR32A Data Sheet, Rev. 5
144
Freescale Semiconductor
When bit DDRDx is a 1, reading address $0003 reads the PTDx data latch. When bit DDRDx is a 0,
reading address $0003 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-5 summarizes the operation of the port D pins.
Figure 12-15. Port D I/O Circuit
Table 12-5. Port D Pin Functions
PTDPUE
Bit
DDRD
Bit
PTD
Bit
I/O Pin
Mode
Accesses to DDRD
Accesses to PTD
Read/Write
Read
Write
10
X(1)
1. X = Don’t care
Input, VDD
(2)
2. I/O pin pulled up to VDD by internal pullup device.
DDRD7–DDRD0
Pin
PTD7–PTD0(3)
3. Writing affects data register, but does not affect input.
00
X
Input, Hi-Z(4)
4. Hi-Z = High imp[edance
DDRD7–DDRD0
Pin
PTD7–PTD0(3)
X
1
X
Output
DDRD7–DDRD0
PTD7–PTD0
READ DDRD ($0007)
WRITE DDRD ($0007)
RESET
WRITE PTD ($0003)
READ PTD ($0003)
PTDx
DDRDx
PTDx
IN
TERNAL
DAT
A
BUS
VDD
PTDPUEx
INTERNAL
PULLUP
DEVICE