A-D Converter
M30240 Group
Rev.1.00 Sep 24, 2003 Page 230 of 360
2.6.1.4 Functions selection
(a) Sample & Hold function
The Sample & Hold function samples the input voltage when the A-D conversion starts and carries out
an A-D conversion on the voltage sampled. When the A-D conversion starts, the input voltage is sam-
pled for 3 cycles of the operation clock.
(b) 8-bit A-D and 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 resolution
and 8-bit resolution are given below:
(c) A-D conversion by external trigger
The user can select a software trigger or an external pin input to start the A-D conversion.
(d) Connecting or cutting Vref
Cutting Vref decreases of the current flowing into the A-D converter. To decrease the microcomputer's
power consumption, cut Vref. To carry out the A-D conversion, start the A-D conversion 1 µs or more
after connecting Vref.
The following are examples in which functions (a) through (d) are selected:
2.6.1.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.
2.6.1.6 Pins related to A-D converter
• 10-bit resolution (Vref X n / 2
10
) – (Vref X 0.5 / 10
10
) (n = 1 to 1023), 0 (n = 0)
• 8-bit resolution (Vref X n / 2
8
) – (Vref X 0.5 / 2
10
) (n = 1 to 255), 0 (n = 0)
• One-shot mode Section 2.6.2.1
• One-shot mode, trigger by AD
TRG Section 2.6.2.2
• Repeat mode, software trigger Section 2.6.2.3
• Single sweep mode, software trigger Section 2.6.2.4
• Repeat sweep mode 0, software trigger Section 2.6.2.5
• Repeat sweep mode 1, software trigger Section 2.6.2.6
(a) AN
0
pin through AN
7
pin Input pins of the A-D converter
(b) AVcc pin Power source pin of the analog section
(c) V
REF pin Input pin of reference voltage
(d) AVss pin GND pin of the analog section
(e) AD
TRG pin Trigger input pin of the A-D converter