Datasheet

Input/Output (I/O) Ports
MC68HC908GZ60 • MC68HC908GZ48 • MC68HC908GZ32 Data Sheet, Rev. 6
186 Freescale Semiconductor
Figure 13-22. Port F I/O Circuit
When bit DDRFx is a 1, reading address $0440 reads the PTFx data latch. When bit DDRFx is a 0,
reading address $0440 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-7 summarizes the operation of the port F pins.
13.9 Port G
Port G is an 8-bit special-function port that shares all eight of its pins with the analog-to-digital converter
(ADC) module.
13.9.1 Port G Data Register
The port G data register (PTG) contains a data latch for each of the eight port pins.
Table 13-7. Port F Pin Functions
DDRF
Bit
PTF
Bit
I/O Pin
Mode
Accesses
to DDRF
Accesses
to PTF
Read/Write Read WritE
0
X
(1)
1. X = Don’t care
Input, Hi-Z
(2)
2. Hi-Z = High impedance
DDRF7–DDRF0 Pin
PTF7–PTF0
(3)
3. Writing affects data register, but does not affect input.
1 X Output DDRF7–DDRF0 PTF7–PTF0 PTF7–PTF0
Address: $0441
Bit 7654321Bit 0
Read:
PTG7 PTG6 PTG5 PTG4 PTG3 PTG2 PTG1 PTG0
Write:
Reset: Unaffected by reset
Alternate Function: AD23 AD22 AD21 AD20 AD19 AD18 AD17 AD16
Figure 13-23. Port G Data Register (PTG)
READ DDRF ($0444)
WRITE DDRF ($0444)
RESET
WRITE PTF ($0440)
READ PTD ($0440)
PTFx
DDRFx
PTFx
INTERNAL DATA BUS