Hello,
please can you help me with the wrong operation when using internally generated negative voltage reference for A/D converter on PIC16F18877?
I would like to use ADC with references 0.416 V and Vdd (5 V).
It works perfectly when I connect 0.416 V to the Vref- pin (RA2) from an external source.
Then I generate 0.416 V on RA2 from FVR and D/A converter as follows:
FVRCON = 0x84;
DAC1CON0 = 0xA8;
DAC1CON1 = 0x0D;
The DAC also works perfectly and there is about 0.416 V on the Vref- pin (RA2).
But now ADC works only if the negative reference is Gnd. If I switch this from Gnd to Vref- (just by changing ADREF from 0 to 0x10), a failure occurs. The voltage on the RA2 pin changes to 2.1 V (and of course the A/D gives bad results).
Workaround attempts:
- 0.416 V output from DAC to RB7, directly conneted to RA2 via a wire, works just as badly as above.
- After interconnecting via an op amp voltage follower instead of the wire, the A/D starts to work properly.
I assumed the PIC analog circuits were designed for internal connections from the VRef- pin, without any external workaround. Please, advise.
Many thanks.
Mila.