A-D Converter
M30240 Group
Rev.1.00 Sep 24, 2003 Page 243 of 360
2.6.2.6 Repeat-sweep mode 1
In repeat-sweep mode 1 select functions from those listed in Table 2.32 . An example using the indicated
options is described below. Figure 2.90 shows the timing chart, and Figure 2.91 shows the set-up
procedure
.
Table 2.32: Operation of A-D converter in repeat-sweep mode 1 functions
Operation
(1) Setting the A-D conversion start flag to “1” causes the A-D converter to start the conversion on the
voltage input to the AN
0
pin.
(2) After the A-D conversion on the voltage input to the AN
0
pin is completed, the content of the suc-
cessive comparison register (conversion result) is transmitted to A-D register 0.
(3) Every time the A-D converter carries out A-D conversion on a selected analog input pin, the A-D
converter carries out A-D conversion on only one unsettled pin, and then the A-D converter carries out
A-D conversion from the AN
0
pin again. Figure 2.89 shows ANi pin's sweep sequence. The conversion
result is transmitted to A-D register i every time conversion on a pin is completed. The A-D conversion
interrupt request bit does not go to “1”.
(4) The A-D converter continues operating until software goes the A-D conversion start flag to “0”.
Figure 2.89: ANi pin sweep sequence in repeat-sweep mode
Figure 2.90: Operation timing of repeat-sweep mode 1
Item
Set-up Item Set-up
Operation clock ΦAD O
Divided-by-4 fAD/ divided-by-2
fAD/fAD
Trigger for starting A-D
conversion
O Software trigger
Resolution O 8-bit /10-bit Trigger by AD
TRG
Analog input pin O
AN
0
(1 pin) / AN
0
and AN
1
(2
pin) / AN
0
to AN
2
(3 pin) / AN
0
to
AN
3
(4 pin)
Sample & Hold
Not activated
O Activated
When AN0 is selected
Converted analog input pin
Time
0000000000
1
2
3
4
5
6
7
1
2
.
.
.
When AN0, AN1 are selected
Converted analog input pin
Time
0000000
1111111
2
3
4
5
6
7
.
.
.
0
2
Converted analog input pin
Time
0000000
222222
3
4
5
6
7
.
.
.
3
111111
When AN0 to AN2 are selected
Converted analog input pin
Time
000000
3333
2
4
5
6
7
.
.
.
11111
2222
3
4
When AN0 to AN3
are selecte
A-D
conversion
start flag
“1”
“0”
A-D register 0
A-D register 1
φAD
A-D register 2
Result
Result
Result
Set to “1” by software
Result
Cleared to “0” by software
(2)
(3) Consecutive conversion
8-bit resolution :
28
φAD cycles
10-bit resolution :
33
φAD cycles
A-D
conversion
is complete
(4)
Conversion result is
transfered to A-D
conversion register
8-bit resolution :
28
φAD
cycles
10-bit resolution :
33
φAD cycles
8-bit resolution :
28
φAD cycles
10-bit resolution :
33
φAD cycles
8-bit resolution :
28
AD cycles
10-bit resolution :
33
AD cycles
(1) Start AN0
pin conversion