![](http://datasheet.mmic.net.cn/110000/M32186F8VFP_datasheet_3496152/M32186F8VFP_529.png)
11
A/D CONVERTER
11-31
32185/32186 Group Hardware Manual
Rev.1.10 REJ09B0235-0110 May 15, 07
b0
12
34
56
78
9
10
11
12
13
14
b15
ADSAR
0
00
??
?
??
?
11.2 A/D Converter Related Registers
11.2.9 A/D Successive Approximation Register
A/D0 Successive Approximation Register(AD0SAR)
<Address: H’0080 0088>
<Upon exiting reset: Undefined>
b
Bit Name
Function
R
W
0–5
No function assigned. Fix to "0."
00
6–15
ADSAR
A/D successive approximation value (A/D conversion mode)
R
W
A/D successive approximation value/comparison value
Comparison value (comparator mode)
Note: This register must always be accessed in halfwords.
The A/D Successive Approximation Register (ADSAR) is used to read the conversion result of the A/D
Converter when operating in A/D conversion mode or write a comparison value when operating in com-
parator mode.
In A/D conversion mode, the successive approximation method is used to perform A/D conversion. With
this method, the reference voltage VREF0 and analog input voltages are sequentially compared bitwise
beginning with the high-order bit, and the comparison result is set in the A/D Successive Approximation
Register (ADSAR) bits 6–15. When the A/D conversion has finished, the value of this register is transferred
to the 10-bit A/D Data Register (ADDTn) corresponding to each converted channel. When this register is
accessed for read in the middle of A/D conversion, the value read from the register indicates the interme-
diate result of conversion.
In comparator mode, this register is used to write a comparison value (the voltage with which to
“comparate”). Simultaneously with a write to this register, the A/D Converter starts comparing the voltage
on the analog input pin selected with A/D Single Mode Register 1 and the value written in this register. After
comparate operation, the result is stored in the A/D Comparate Data Register (ADCMP).
Use the calculation formula shown below to find the comparison value to be written to the A/D Successive
Approximation Register (ADSAR) during comparator mode.
Comparison value = H’3FF x
Comparate comparison voltage [V]
VREF0 input voltage [V]