cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor II

Hi,I use ADC to detect external voltage,and I have same question about this article

ADC SAR & ADC Delsig reading deviation

adc result is bigger than measurement value by multimeter

I want to use the same way( ADC_SetGain() ) to solve it

SetGain() can got only integers while i need 0.8

Anyone can tell me? thanks

        if(ADC_SAR_SEQ_IsEndConversion(ADC_SAR_SEQ_RETURN_STATUS) != 0)

        {

            count = ADC_SAR_SEQ_GetResult16(0);

            mvolts = ADC_SAR_SEQ_CountsTo_mVolts(0,count);

        }

0 Likes
Reply
1 Solution
Employee

Following is the snapshot of the ADC_SAR_Seq component datasheet.

GS004793.png

It says the adcGain parameter indicates the ADC count for 10V result.  So, if you get 1024 count for 1V input, set the adcGain to 10240 (count/10V)

Regards,

Noriaki

View solution in original post

1 Reply
Employee

Following is the snapshot of the ADC_SAR_Seq component datasheet.

GS004793.png

It says the adcGain parameter indicates the ADC count for 10V result.  So, if you get 1024 count for 1V input, set the adcGain to 10240 (count/10V)

Regards,

Noriaki

View solution in original post