English
Language : 

MC68HC908GR8A_07 Datasheet, PDF (126/260 Pages) Freescale Semiconductor, Inc – Microcontrollers
Input/Output (I/O) Ports
Figure 12-15 shows the port D I/O logic.
READ DDRD ($0007)
WRITE DDRD ($0007)
RESET
WRITE PTD ($0003)
DDRDx
PTDx
PTDPUEx
VDD
INTERNAL
PULLUP
DEVICE
PTDx
READ PTD ($0003)
Figure 12-15. Port D I/O Circuit
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.
Table 12-5. Port D Pin Functions
PTDPUE
Bit
1
0
X
DDRD
Bit
0
0
1
PTD
Bit
X(1)
X
X
I/O Pin
Mode
Input, VDD(2)
Input, Hi-Z(4)
Output
Accesses to DDRD
Read/Write
DDRD6–DDRD0
DDRD6–DDRD0
DDRD6–DDRD0
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 PTD
Read
Write
Pin
PTD6–PTD0(3)
Pin
PTD6–PTD0(3)
PTD6–PTD0
PTD6–PTD0
MC68HC908GR8A • MC68HC908GR4A Data Sheet, Rev. 5
126
Freescale Semiconductor