BAT32G1x9 user manual | Chapter 15 A/D converter
498 / 1149
Rev.1.02
15.2.7 12-bit A/D conversion result register (ADCR).
This is the 16-bit register that holds the results of the A/D conversion, which is readable only. Whenever an
A/D conversion ends, the conversion result note is loaded from the successive approximation register (SAR).
The high 4 bits of this register are fixed to "0" when the mode is selected, and the channel number of the
conversion result can be configured by ADM2.CHRDE=1 in scan mode.
Read the ADCR registers via 16-bit memory manipulation instructions. After generating a reset signal, the
value of this register changes to "0000H".
Note: If the value of the A/D conversion result is not within the set value range of the A/D conversion result comparison
function (set by the ADRCK bit and the ADUL/ADLL register), the A/D is not saved Conversion results.
Figure15-10 Format of the 12-bit A/D Conversion Result Register (ADCR).
Reset value: 0000H R
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
ADCR ADCH3 ADCH2
ADCH1 ADCH0
ADCR[11:0]
Note:
1. If only 8
bit resolution
A/D conversion results are required, the high 8 bits of the conversion result can be read
through the ADCRH register.
2. When 16 bits of access are made to the ADCR register, the high 1 2 bits of the conversion result can be read
sequentially from bit1 1.
○ Selection mode (ADM1. ADMD=0)
The readout value of ADCH0~3 is fixed at
4'b0000
○ Scan mode (ADM1. ADMD=1) and ADM2 The relationship between the readout values of
CHRDE=1 and ADCH0~3 and the conversion channel is as follows:
ADCH3
ADCH2
ADCH1
ADCH0
The conversion
channel ID
0
0
0
0
ANI0(P20)
0
0
0
1
ANI1(P21)
0
0
1
0
ANI2(P22)
0
0
1
1
ANI3(P23)
0
1
0
0
ANI4(P24)
0
1
0
1
ANI5(P25)
0
1
1
0
ANI6(P26)
0
1
1
1
ANI7(P27)
1
0
0
0
ANI8(P11)
1
0
0
1
ANI9(P10)
1
0
1
0
ANI10(P03)
1
0
1
1
ANI11(P02)
1
1
0
0
ANI12(P147)
1
1
0
1
ANI13(P04)
1
1
1
0
ANI14(P120)
1
1
1
1
ANI15(P146)