s908gr32ag3vfa Freescale Semiconductor, Inc, s908gr32ag3vfa Datasheet - Page 149

no-image

s908gr32ag3vfa

Manufacturer Part Number
s908gr32ag3vfa
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
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.
PTG7–PTG0 — Port G Data Bits
AD23–AD16 — Analog-to-Digital Input Bits
Freescale Semiconductor
1. X = Don’t care
2. Hi-Z = High impedance
3. Writing affects data register, but does not affect input.
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 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.
DDRF
Bit
0
1
Alternate Function:
PTF
X
Bit
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.
X
(1)
Address:
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
Reset:
Read:
Write:
Input, Hi-Z
$0441
PTG7
AD23
Bit 7
I/O Pin
Output
Mode
Figure 12-23. Port G Data Register (PTG)
(2)
PTG6
AD22
Table 12-7. Port F Pin Functions
6
Accesses to DDRF
PTG5
AD21
DDRF7–DDRF0
DDRF7–DDRF0
5
Read/Write
NOTE
Unaffected by reset
PTG4
AD20
4
PTG3
AD19
3
PTF7–PTF0
PTG2
AD18
Read
Pin
2
Accesses to PTF
PTG1
AD17
1
PTF7–PTF0
PTF7–PTF0
PTG0
AD16
Bit 0
WritE
(3)
Port G
149

Related parts for s908gr32ag3vfa