English
Language : 

MC908GR32AVFAE Datasheet, PDF (149/314 Pages) Freescale Semiconductor, Inc – Microcontrollers
Port G
Table 12-7. Port F Pin Functions
DDRF
PTF
Bit
Bit
0
X(1)
1
X
I/O Pin
Mode
Input, Hi-Z(2)
Output
Accesses to DDRF
Read/Write
DDRF7–DDRF0
DDRF7–DDRF0
1. X = Don’t care
2. Hi-Z = High impedance
3. Writing affects data register, but does not affect input.
Accesses to PTF
Read
WritE
Pin
PTF7–PTF0(3)
PTF7–PTF0
PTF7–PTF0
12.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.
12.9.1 Port G Data Register
The port G data register (PTG) contains a data latch for each of the eight port pins.
Address:
Read:
Write:
Reset:
Alternate Function:
$0441
Bit 7
6
5
4
3
2
PTG7
PTG6
PTG5
PTG4
PTG3
PTG2
AD23
AD22
AD21
Unaffected by reset
AD20
AD19
AD18
Figure 12-23. Port G Data Register (PTG)
1
PTG1
AD17
Bit 0
PTG0
AD16
PTG7–PTG0 — Port G Data Bits
These read/write bits are software-programmable. Data direction of each port G pin is under the control
of the corresponding bit in data direction register G. Reset has no effect on port G data.
AD23–AD16 — Analog-to-Digital Input Bits
AD23–AD16 are pins used for the input channels to the analog-to-digital converter module. The
channel select bits in the ADC status and control register define which port G pin will be used as an
ADC input and overrides any control from the port I/O logic by forcing that pin as the input to the analog
circuitry.
NOTE
Care must be taken when reading port G while applying analog voltages to
AD23–AD16 pins. If the appropriate ADC channel is not enabled, excessive
current drain may occur if analog voltages are applied to the PTGx/ADx pin,
while PTG is read as a digital input during the CPU read cycle. Those ports
not selected as analog input channels are considered digital I/O ports.
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
Freescale Semiconductor
149