![](http://datasheet.mmic.net.cn/110000/M30201F6-SP_datasheet_3496102/M30201F6-SP_297.png)
Mitsubishi microcomputers
M30201 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
A-D Converter
285
(4) Functions selection
(a) Sample & Hold function
Sample & Hold function samples input voltage when A-D conversion starts and carries out A-D
conversion on the voltage sampled. When A-D conversion starts, input voltage is sampled for 3
cycles of the operation clock. When the Sample & Hold function is selected, set the operation clock
for A-D conversion to 1 MHz or higher.
(b) 8-bit A-D to 10-bit A-D switching function
Either 8-bit resolution or 10-bit resolution can be selected. When 8-bit resolution is selected, the 8
higher-order bits of the 10-bit A-D are subjected to A-D conversion. The equations for 10-bit resolu-
tion and 8-bit resolution are given below:
10-bit resolution
(Vref X n / 210 ) – (Vref X 0.5 / 210 )
(n = 1 to 1023), 0 (n = 0)
8-bit resolution
(Vref X n / 28 ) – (Vref X 0.5 / 210 )
(n = 1 to 256), 0 (n = 0)
(c) Analog input group function
The analog input pins can be switched between the port P6 group (AN0 to AN4) and the port P5
group (AN50 to AN54).
(d) Connecting or cutting Vref
Cutting Vref allows decrease of the current flowing into the A-D converter. To decrease the
microcomputer's power consumption, cut Vref. To carry out A-D conversion, start A-D conversion 1
s or longer after connecting Vref.
The following are exsamples in which functions (a) through (d) are selected:
One-shot mode ......................................................................................................................... P290
Repeat mode ............................................................................................................................ P292
Single sweep mode .................................................................................................................. P294
Repeated sweep mode 0 .......................................................................................................... P296
Repeated sweep mode 1 .......................................................................................................... P298
(5) Input to A-D converter and direction register
To use the A-D converter, set the direction register of the relevant port to input.
(6) Pins related to A-D converter
(a) AN0 pin through AN7 pin
Input pins of the A-D converter (Port P6 group )
(b) AN50 pin through AN57 pin
Input pins of the A-D converter (Port P5 group )
(c) AVcc pin
Power source pin of the analog section
(d) VREF pin
Input pin of reference voltage
(e) AVss pin
GND pin of the analog section