
120
μ
PD75517(A)
(4) SA register (successive approximation register)
The SA register is an 8-bit register to hold the result of A/D conversion in successive approximation.
SA is read with an 8-bit manipulation instruction. No data can be written to SA by software.
The generation of a RESET signal makes SA undefined.
SA is mapped to address FDAH.
(5) A/D converter operation
Analog input signals subject to A/D conversion are specified by setting bits 6, 5, and 4 in the A/D conversion
mode register (ADM6, ADM5, and ADM4). Comparator bias voltage selection is specified by setting bit
1 in the A/D conversion mode register (ADM1).
A/D conversion is started by setting bit 3 (SOC) of ADM to 1. After that, SOC is automatically cleared to
0. A/D conversion is performed by hardware using the successive-approximation method. The resultant
8-bit data is loaded into the SA register. Upon completion of A/D conversion, ADM bit 2 (EOC) is set to 1.
Fig. 4-59 shows the timing chart of A/D conversion.
The A/D converter is used as follows:
1
Select analog input channels and comparator bias voltage (by setting ADM6, ADM5, ADM4, and
ADM1).
Direct the start of A/D conversion (by setting SOC).
Wait for the completion of A/D conversion (wait for EOC to be set or wait using a software timer).
Read the result of A/D conversion (read the SA register).
2
3
4
Cautions 1.
1
and
2
above can be performed at the same time.
2. There is a delay of up to 2
4
/f
X
seconds (f
X
= 6.0 MHz: 2.67
μ
s, or f
X
= 4.19 MHz: 3.81
μ
s) from
the setting of SOC to the clearing of EOC after A/D conversion is started. EOC must be tested
when a time indicated in Table 4-11 has elapsed after the setting of SOC. Table 4-11 also
indicates A/D conversion times.
Table 4-11 Setting of SCC and PCC
Note
40.1
μ
s for f
X
= 4.19 MHz
Remark
×
: Don’t care
SCC0
0
1
×
PCC1
0
0
1
1
×
×
PCC0
0
1
0
1
×
×
Setting values of SCC, PCC
A/D conversion time
Wait time from SOC setting
to EOC test
168/f
X
s
Note
(28.0
μ
s/f
X
= 6.0 MHz)
Conversion stopped
Wait time from SOC setting
to A/D conversion comple-
tion
Waiting not required
1 machine cycle
2 machine cycles
4 machine cycles
Waiting not required
—
3 machine cycles
11 machine cycles
21 machine cycles
42 machine cycles
Waiting not required
—
SCC1
0
0
1