when adc voltage greater than 1.2V , return 1023

Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Last seen: 1 year 4 months ago
Joined: 2020-03-12 07:26
when adc voltage greater than 1.2V , return 1023

i know the p01 pin adc input scale is 0~1.2V, but when i  try to input the voltage over 1.2V ,i want to get the adc value(adc_get_sample()) is 1023,but the result is not. it is a Irregular  num like 800 or others。


    uint32_t adc_sample;

    adc_init(GP_ADC_SE, GP_ADC_SIGN, 0);
    adc_sample = adc_get_sample();

    return adc_sample;

Last seen: 6 months 3 weeks ago
Joined: 2018-02-08 11:03
Hi moiify,

Hi moiify,

Please take a look at Table 40: GPADC Input Channels and Voltage Scale from the DA14585 datasheet. My suggestion would be to enable the attenuator as well. When GP_ADC_CTRL2_REG[GP_ADC_ATTN3X] =  1, input voltages up to 3.6V allowed.

Thanks, PM_Dialog