English
Language : 

MC908GR32AVFAE Datasheet, PDF (135/314 Pages) Freescale Semiconductor, Inc – Microcontrollers
Port A
12.3 Port A
Port A is an 8-bit special-function port that shares all eight of its pins with the keyboard interrupt (KBI)
module and the ADC module. Port A also has software configurable pullup devices if configured as an
input port.
12.3.1 Port A Data Register
The port A data register (PTA) contains a data latch for each of the eight port A pins.
Address:
Read:
Write:
Reset:
Alternate Function:
Alternate Function:
$0000
Bit 7
PTA7
KBD7
AD15
6
PTA6
KBD6
AD14
5
PTA5
KBD5
AD13
4
3
PTA4
PTA3
Unaffected by reset
KBD4
KBD3
AD12
AD11
2
PTA2
KBD2
AD10
1
PTA1
KBD1
AD9
Bit 0
PTA0
KBD0
AD8
Figure 12-2. Port A Data Register (PTA)
PTA7–PTA0 — Port A Data Bits
These read/write bits are software programmable. Data direction of each port A pin is under the control
of the corresponding bit in data direction register A. Reset has no effect on port A data.
KBD7–KBD0 — Keyboard Inputs
The keyboard interrupt enable bits, KBIE7–KBIE0, in the keyboard interrupt control register (KBICR)
enable the port A pins as external interrupt pins. See Chapter 9 Keyboard Interrupt Module (KBI)
AD15–AD8 — Analog-to-Digital Input Bits
AD15–AD8 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 A 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 A while applying analog voltages to
AD15–AD8 pins. If the appropriate ADC channel is not enabled, excessive
current drain may occur if analog voltages are applied to the
PTAx/KBDx/ADx pin, while PTA 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
135