13-14
MPC561/MPC563 Reference Manual
MOTOROLA
Programming the QADC64E Registers
contents of port register PQA are driven on the port A signals. Port A can also be used as
analog inputs AN[59:52] and external multiplexer address outputs MA[2:0].
Port B signals are referred to as PQB[7:0] when used as 8-bit general-purpose digital
input-only signals. Digital input signal states are read from the 8-bit PORTQB register. Port
B can also be used as non-multiplexed analog inputs AN[51:48] and AN[3:0], and external
multiplexer analog inputs, ANw, ANx, ANy, ANz.
During a port data register read, the actual value of the signal is reported when its
corresponding bit in the data direction register defines the signal to be an input. When the
data direction bit specifies the signal to be an output, the content of the port data register is
read. PORTQA and PORTQB are not initialized by reset.
13.3.4
Port Data Direction Register (DDRQA)
The port data direction register, DDRQA, is associated with port A digital input/output
signals only. Any bit set in this register configures the corresponding signal as an output.
Any bit cleared in this register configures the corresponding signal as an input. The
software is responsible for ensuring that DDR bits are not set on signals used for analog
inputs. When the DDR bit is set, thereby selecting the signal for analog conversion, the
voltage sampled is that of the output digital driver as influenced by the load.
MSB
0
1
234567
8
9
10
11
12
13
14
LSB
15
Field
PQA
7
PQA
6
PQA
5
PQA
4
PQA
3
PQA
2
PQA
1
PQA
0
PQB
7
PQB
6
PQB
5
PQB
4
PQB
3
PQB
2
PQB
1
PQB
0
SRESET
Unaffected
Addr
(PORTQA) 0x30 4806 ; 0x30 4C06
(PORTQB) 0x30 4807, 0x30 4C07
ANALOG CHANNEL:
AN59 AN58 AN57 AN56 AN55 AN54 AN53 AN52 AN51 AN50 AN49 AN48 AN3
AN2
AN1
AN0
MULTIPLEXED ADDRESS OUTPUTS:
MA2 MA1 MA0
MULTIPLEXED ANALOG INPUTS:
ANz
ANy
ANx
ANw
Figure 13-7. Port x Data Register (PORTQA and PORTQB)
Table 13-8. PORTQA, PORTQB Bit Descriptions
Bits
Name
Description
0:7
PQA[7:0]
Port A signals are referred to as PQA when used as an 8-bit input/output port. Port A can also be
used for analog inputs (AN[59:52]), and external multiplexer address outputs (MA[2:0]).
8:15
PQB[7:0]
Port B signals are referred to as PQB when used as an 8 input-only port. Port B can also be used
for non-multiplexed (AN[51:48]/AN[3:0]) and multiplexed (ANz, ANy, ANx, ANw) analog inputs.