Adc配置为内部基准参考,查阅手册,电压为3.3V
AdcRegs.ADCCTL1.bit.ADCREFSEL = 0; // Select interal BG 0:internal 1:external
AdcRegs.ADCCTL1.bit.ADCBGPWD = 1; // Power up band gap Device_cal
AdcRegs.ADCCTL1.bit.ADCREFPWD = 1; // Power up reference
AdcRegs.ADCCTL1.bit.ADCPWDN = 1; // Power up rest of ADC
AdcRegs.ADCCTL1.bit.ADCENABLE = 1; // Enable ADC
采样直流电压0-330Vdc对于进入Adc口的电压为0-3.3V。现在直流设定200V,ADC入口电压2V,采样值应该为4096*2/3.3=2482,但是实际采样为2256,采样值相差10%,
这是为什么,谢谢各位大神