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.

28335内置A/D转换出现野值点如何解决

Other Parts Discussed in Thread: CONTROLSUITE

我用28335的内置A/D采样5路信号,采样顺序采样的方式,连续采样模式,相关配置程序如下所示,但是在线调试的时候从变量观测器里发现大部分时候A/D转换值波动范围都很小,但是偶尔会出现偏差较大的野值点,请问我该如何解决这个问题?

void ConfigADC(void)
{
    InitAdc();
    EALLOW;
        SysCtrlRegs.HISPCP.all = ADC_MODCLK;//25MHz
    EDIS;
    AdcRegs.ADCTRL1.bit.ACQ_PS = 0x0;//pulse width: ACQ_PS+1 ADCLK cycle
    AdcRegs.ADCTRL1.bit.CPS = 0; //0:bufenpin, 1:erfenpin
    AdcRegs.ADCTRL3.bit.ADCCLKPS = 0x0;//frequency dividing coefficients:2*ADCCLKPS,0:No frequency division
    AdcRegs.ADCTRL3.bit.SMODE_SEL = 0;//sequential sampling
    AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 4;//number of conversion channel: 4+1
    AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;//cascade mode
    AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x0;
    AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 0x1;
    AdcRegs.ADCCHSELSEQ1.bit.CONV02 = 0x2;
    AdcRegs.ADCCHSELSEQ1.bit.CONV03 = 0x3;
    AdcRegs.ADCCHSELSEQ2.bit.CONV04 = 0x4;
    AdcRegs.ADCTRL1.bit.CONT_RUN = 1;//continuous operation mode
}

void ReadADC_Results(void)
{
    while(AdcRegs.ADCST.bit.INT_SEQ1 == 0); //Wait for the end of conversion
    AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1; //clear interrupt flag
    Vpv = AdcRegs.ADCRESULT0>>4;
    Vc1 = AdcRegs.ADCRESULT1>>4;
    Vc2 = AdcRegs.ADCRESULT2>>4;
    Ig = AdcRegs.ADCRESULT3>>4;
    Vg = AdcRegs.ADCRESULT4>>4;
}