English
Language : 

MC68HC08AS20 Datasheet, PDF (191/386 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Figure 15-12 shows the port D I/O logic.
READ DDRD ($0007)
WRITE DDRD ($0007)
RESET
WRITE PTD ($0003)
READ PTD ($0003)
DDRDx
PTDx
PTDx
Figure 15-12. 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 15-5 summarizes
the operation of the port D pins.
Table 15-5. Port D Pin Functions
DDRD PTD Bit in Use
Bit Bit by ADC
I/O Pin
Mode
Accesses
to DDRD
Read/Write
0
X
No
Input, Hi-Z DDRD[6:0]
1
X
No
Output DDRD[6:0]
0
X
Yes
Input, Hi-Z DDRD[6:0]
1
X
Yes
Input, Hi-Z DDRD[6:0]
X = don’t care
Hi-Z = high impedance
1. Writing affects data register, but does not affect input.
Accesses to PTD
Read
Pin
PTD[6:0]
0
PTD[6:0]
Write
PTD[6:0](1)
PTD[6:0]
PTD[6:0](1)
PTD[6:0]
MC68HC08AS20 — Rev. 4.1
Freescale Semiconductor
Advance Information
191