BAT32G1x9 user manual | Chapter 15 A/D converter
493 / 1149
Rev.1.02
15.2.4 The mode register 2 (ADM2) of the A/D converter
Set the ADM2 registers via the 8-bit memory operation instructions.
After generating a reset signal, the value of this register changes to "00H".
Figure15-6 mode register 2 (ADM2) of A/D converters (1/3).
Reset value: 00H
R/W
7
6
5
4
3
2
1
0
ADM2
ADREFP1
HOMEP0
ADREFM
0
ADRCK
0
CHRDE
0
ADREFP1
ADREFP0
Selection of the positive (+) reference
for the A/D converter
0
0
Supplied by V
DD
.
0
1
Supplied by P20/AV
REFP
/ANI0.
1
0
Supplied by the
internal reference voltage of the A/D converter.
1
1
Prohibit settings
ADREFM
Selection of the negative (
–) reference
for the A/D converter
0
Supplied by V
SS
.
1
Supplied by P21/AV
REFM
/ANI1.
ADRCK
Checking of the upper and lower values of the conversion results
0
When the ADLL
register ≤
the ADCR
register ≤
the ADUL
register (AREA1), an interrupt
signal
(INTAD) is generated.
1
When ADCRRegister <ADLLRegisters (AREA2orADULTSRegister <ADCRRegisters
(AREA3), an interrupt signal is generated (INTAD)
。
The range
of the interrupt signal (INTAD) of AREA1 to AREA3
is shown in the following figure.
CHRDE
The A/D converter scans the mode when the output of the channel id is enabled
0
When scanning mode, the channel number is not identified in the conversion results
1
In scan mode, the high four bits of the conversion result ([15:12] of the ADCR register) are
the channel numbers for this result
value in ADCR register
(A/D conversion result)
when ADRCK=1, generates
INTAD interrupt
when ADRCK=0, generates
INTAD interrupt
when ADRCK=1, generates
INTAD interrupt
configure value of ADUL register
configure value of ADLL register
Figure15-7range of interrupt signal generation by ADRCK bit
Note:
1. To rewrite
the ADM2
register, it must be done in the transition stop state (ADCS=0).
2.
When using
AV
REFP
and
AV
REFM
,
THE ANI0
and
ANI1
must be
set to analog inputs and set to input mode
through pin-mode registers.
Note When IND does not occur, the A/D conversion results are not saved to the ADCR registers and ADCRH
registers.