English
Language : 

MC68HC908JW32_09 Datasheet, PDF (177/232 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Figure 13-13 shows the port D I/O circuit logic.
READ DDRD ($0008)
WRITE DDRD ($0008)
RESET
WRITE PTD ($0003)
DDRDx
PTDx
Port D
PTDx
READ PTD ($0003)
Figure 13-13. Port D I/O Circuit
When bit DDRDx is a logic 1, reading address $0003 reads the PTDx data latch. When bit DDRDx is a
logic 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 13-6 summarizes the operation of the port D pins.
Table 13-6. Port D Pin Functions
DDRD
Bit
PTD Bit
I/O Pin Mode
Accesses
to DDRD
Read/Write
0
X(1)
Input, Hi-Z(2)
DDRD[7:0]
1
X
Output
DDRD[7:0]
1. X = don’t care
2. Hi-Z = high impedance
3. Writing affects data register, but does not affect input.
Accesses to PTD
Read
Pin
PTD[7:0]
Write
PTD[7:0](3)
PTD[7:0]
MC68HC908JW32 Data Sheet, Rev. 6
Freescale Semiconductor
177