![](http://datasheet.mmic.net.cn/30000/M30218MC-AXXXFP_datasheet_2358657/M30218MC-AXXXFP_355.png)
340
A-D Converter
Mitsubishi microcomputers
M30218 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
2.8.6 Operation of A-D Converter (in repeat sweep mode 1)
Figure 2.8.14. Operation timing of repeat sweep mode 1
In repeat sweep mode 1, choose functions from those listed in Table 2.8.6. Operations of the circled items are
described below. Figure 2.8.13 shows ANi pin's sweep sequence, Figure 2.8.14 shows timing chart, and Figure
2.8.15 shows the set-up procedure.
Operation
(1) Setting the A-D conversion start flag to “1” causes the A-D converter to start the conversion on voltage
input to the AN0 pin.
(2) After the A-D conversion on voltage input to the AN0 pin is completed, the content of the successive
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 unselected pin, and then the A-D converter carries out A-D conver-
sion from the AN0 pin again. (See Figure 2.8.13.) 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 convers
ion start flag to “0”.
Table 2.8.6. Choosed functions
Figure 2.8.13. ANi pin's sweep sequence in repeat sweep mode 1
Item
Set-up
Operation clock
φAD
Divided-by-4 fAD / divided-
by-2 fAD / fAD
8-bit / 10-bit
O
Resolution
Analog input pin
An0 (1 pin) / AN0 and AN1 (2
pins) / AN0 to AN2 (3 pins) /
AN0 to AN3 (4 pins)
O
Sample & Hold
Not activated
Activated
O
When AN0 is selected
Converted
analog
input
pin
Time
00000
1
2
3
4
5
6
7
1
2
.
When AN0, AN1 are selected
Converted
analog
input
pin
Time
0
000000
1111
111
2
3
4
5
6
7
.
0
2
Converted
analog
input
pin
Time
00000
00
2222
22
3
4
5
6
7
.
3
1
11111
When AN0 to AN2 are selected
Converted
analog
input
pin
Time
0000
00
333
3
2
4
5
6
7
.
1
1111
222
2
3
4
When AN0 to AN3 are selected
A-D
conversion
start flag
“1”
“0”
A-D register 0
A-D register 1
φAD
A-D register 2
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 0
Note: When φAD frequency is less than 1MHz, sample and hold function cannot be selected.
Conversion rate per analog input pin is 49
φAD cycles for 8-bit resolution and 59 φAD cycles for 10-bit resolution.
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