This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We are using C5515. We are applying a 1.04V input to GPAIN0. Its a divided voltage from a battery of 4.2V (Divider resistances of 10k and 3.3k). We enabled Channel 2 by setting the reserved bit 2 of the SARPINCTRL register .
My reference voltage set to 1.3V ANA_LDO . I am getting a voltage value of 0.89V ie a count of 704 . When I measure the input pin voltage it is 1.041V. I even tried setting the multichannel mode from normal mode. Even then the result is the same . Its a 30% error.
How to over come this where am I making the error . ??
ADC code
SAR_PINCTRL = 0x3104;
SAR_CTRL = 0xAC00;
while (SAR_DATA & ADC_BUSY);
Sar = SAR_DATA;
SAR_PINCTRL = 0x3104;
return (Sar & 0x3ff);
all the above observations were performed using
SARGPOCTRL = 0x00E0;
when SARGPOCTRL = 0x0000 then the count value read is 1023 for the same input.