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 SOC 为什么采集四次?



在AD采样的时候,为什么一个针脚pin安排了四次采样,是为了求平均数吗?

#define IL1_ADC_MODULE 1
#define IL1_ADC_PIN     2
#define IL1_CMPSS_NO 1
#define IL1_ADC_TRIG_SOURCE ADC_TRIG_SOURCE
#define IL1_ACQPS_SYS_CLKS 50
#define IL1_ADC_SOC1 0x10
#define IL1_ADC_READ1 AdcaResultRegs.ADCRESULT0
#define IL1_ADC_SOC2 0x16
#define IL1_ADC_READ2 AdcaResultRegs.ADCRESULT3
#define IL1_ADC_SOC3 0x1C
#define IL1_ADC_READ3 AdcaResultRegs.ADCRESULT6
#define IL1_ADC_SOC4 0x22
#define IL1_ADC_READ4 AdcaResultRegs.ADCRESULT9

iL1Meas = (((float32)(IL1_ADC_READ1+IL1_ADC_READ2+IL1_ADC_READ3+IL1_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 - iL1MeasOffset )*2.0;