ADuC836
–18–
ADuC836
–19–
ADC0CON (Primary ADC Control Register) and ADC1CON (Auxiliary ADC Control Register)
The ADC0CON and ADC1CON SFRs are used to configure the primary and auxiliary ADC for reference and channel selection,
unipolar or bipolar coding and, in the case of the primary ADC, range (the auxiliary ADC operates on a fixed input range of ±VREF).
ADC0CON
Primary ADC Control SFR
SFR Address
D2H
Power-On Default Value
07H
Bit Addressable
No
ADC1CON
Auxiliary ADC Control SFR
SFR Address
D3H
Power-On Default Value
00H
Bit Addressable
No
Table VI. ADC0CON SFR Bit Designations
Bit
Name
Description
7
–––
Reserved for Future Use
6
XREF0
Primary ADC External Reference Select Bit.
Set by user to enable the primary ADC to use the external reference via REFIN(+)/REFIN(–).
Cleared by user to enable the primary ADC to use the internal band gap reference (VREF = 1.25 V).
5
CH1
Primary ADC Channel Selection Bits.
4
CH0
Written by the user to select the differential input pairs used by the primary ADC as follows:
CH1
CH0
Positive Input
Negative Input
0
AIN1
AIN2
0
1
AIN3
AIN4
1
0
AIN2
AIN2 (Internal Short)
1
AIN3
AIN2
3
UNI0
Primary ADC Unipolar Bit.
Set by user to enable unipolar coding, i.e., zero differential input will result in 000000H output.
Cleared by user to enable bipolar coding, i.e., zero differential input will result in 800000H output.
2
RN2
Primary ADC Range Bits.
1
RN1
Written by the user to select the primary ADC input range as follows:
0
RN0
RN2
RN1
RN0
Selected Primary ADC Input Range (VREF = 2.5 V)
0
±20 mV
(0 mV–20 mV in Unipolar Mode)
0
1
±40 mV
(0 mV–40 mV in Unipolar Mode)
0
1
0
±80 mV
(0 mV–80 mV in Unipolar Mode)
0
1
±160 mV
(0 mV–160 mV in Unipolar Mode)
1
0
±320 mV
(0 mV–320 mV in Unipolar Mode)
1
0
1
±640 mV
(0 mV–640 mV in Unipolar Mode)
1
0
±1.28 V
(0 V–1.28 V in Unipolar Mode)
1
±2.56 V
(0 V–2.56 V in Unipolar Mode)
Table VII. ADC1CON SFR Bit Designations
Bit
Name
Description
7
–––
Reserved for Future Use
6
XREF1
Auxiliary ADC External Reference Bit.
Set by user to enable the auxiliary ADC to use the external reference via REFIN(+)/REFIN(–).
Cleared by user to enable the auxiliary ADC to use the internal band gap reference.
5
ACH1
Auxiliary ADC Channel Selection Bits.
4
ACH0
Written by the user to select the single-ended input pins used to drive the auxiliary ADC as follows:
ACH1 ACH0 Positive Input
Negative Input
0
AIN3
AGND
0
1
AIN4
AGND
1
0
Temp Sensor
AGND (Temp Sensor routed to the ADC input)
1
AIN5
AGND
3
UNI1
Auxiliary ADC Unipolar Bit.
Set by user to enable unipolar coding, i.e., zero input will result in 0000H output.
Cleared by user to enable bipolar coding, i.e., zero input will result in 8000H output.
2
–––
Reserved for Future Use
1
–––
Reserved for Future Use
0
–––
Reserved for Future Use
NOTES
1.When the temperature sensor is selected, user code must select internal reference via XREF1 bit above and clear the UNI1 bit (ADC1CON.3) to select bipolar coding.
2.The temperature sensor is factory calibrated to yield conversion results 8000H at 0°C.
3. A +1°C change in temperature will result in a +1 LSB change in the ADC1H Register ADC conversion result.
REV. A