Datasheet

Port A
MC68HC908GR16A Data Sheet, Rev. 1.0
Freescale Semiconductor 119
Figure 12-4 shows the port A I/O logic.
Figure 12-4. Port A I/O Circuit
When bit DDRAx is a 1, reading address $0000 reads the PTAx data latch. When bit DDRAx is a 0,
reading address $0000 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-2 summarizes the operation of the port A pins.
Table 12-2. Port A Pin Functions
PTAPUE
Bit
DDRA
Bit
PTA
Bit
I/O Pin
Mode
Accesses to DDRA Accesses to PTA
Read/Write Read Write
10
X
(1)
1. X = Don’t care
Input, V
DD
(2)
2. I/O pin pulled up to V
DD
by internal pullup device
DDRA7–DDRA0 Pin
PTA7–PTA0
(3)
3. Writing affects data register, but does not affect input.
00X
Input, Hi-Z
(4)
4. Hi-Z = High impedance
DDRA7–DDRA0 Pin
PTA7–PTA0
(3)
X 1 X Output DDRA7–DDRA0 PTA7–PTA0 PTA7–PTA0
READ DDRA ($0004)
WRITE DDRA ($0004)
RESET
WRITE PTA ($0000)
READ PTA ($0000)
PTAx
DDRAx
PTAx
INTERNAL DATA BUS
V
DD
PTAPUEx
INTERNAL
PULLUP
DEVICE