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.

ADC采集电源电压问题



我的ADC代码如下

unsigned int Read_Battery() {

    unsigned int value;

    unsigned char tmpADCCON3 = ADCCON3;

    ADCIF = 0;

    ADCCON3 = (HAL_ADC_REF_125V|0x00|HAL_ADC_CHN_VDD3);

    while(!ADCIF);

    value = ADCL >> 2;

    value |= ((unsigned int)ADCH) << 6;

    ADCCON3 = tmpADCCON3;

    return (value);

}

由于精度不高,我想通过多次采集取平均值。。但是只有第一次采集才是对的(至少我是这么认为的),因为后面不管采集多少次,都是7.2v。。一点波动都没有。求问这是正常的情况么??谢谢