ADC Internal Vref 18F66K22
Posted: Sun Aug 31, 2014 8:37 pm
Hi
Using FC V5 and 18F66K22
This micro has 3 internal Vref+ sources for the ADC. Namely, VCC / 2.048 / 4.096
However, the ADC component setup allows for only "VCC/AVDD" and "External Vref"
There is no setting for 2.048 Vref.
I need to be able to have this lower Vref+ setting as my supply to the micro can go down
below 3V3 and still read ADC accurately.
Now this can be controlled in code by C icon and declaring ADCON1 = xxxxx;
Question is, does the component setting override this register manual setting
and is it critical where this ADCON1 setting is done? For example if i set this
in the program beginning will it stick or will the ADC component over write it
later on in the program when the ADC is used?
Out of the datasheet....ADCON1:
bit 5-4 VCFG<1:0>: A/D VREF+ Configuration bits
11 = Internal VREF+ (4.096V)
10 = Internal VREF+ (2.048V)
01 = External VREF+
00 = AVDD
Thanx
Mark
Using FC V5 and 18F66K22
This micro has 3 internal Vref+ sources for the ADC. Namely, VCC / 2.048 / 4.096
However, the ADC component setup allows for only "VCC/AVDD" and "External Vref"
There is no setting for 2.048 Vref.
I need to be able to have this lower Vref+ setting as my supply to the micro can go down
below 3V3 and still read ADC accurately.
Now this can be controlled in code by C icon and declaring ADCON1 = xxxxx;
Question is, does the component setting override this register manual setting
and is it critical where this ADCON1 setting is done? For example if i set this
in the program beginning will it stick or will the ADC component over write it
later on in the program when the ADC is used?
Out of the datasheet....ADCON1:
bit 5-4 VCFG<1:0>: A/D VREF+ Configuration bits
11 = Internal VREF+ (4.096V)
10 = Internal VREF+ (2.048V)
01 = External VREF+
00 = AVDD
Thanx
Mark