InitAdc()程序里进行配置,配置如下:
AdcRegs.ADCREFSEL.bit.REF_SEL =0x01; //选择外部参考电压为2.048v
AdcRegs.ADCTRL3.all = 0x00E0; // Power up bandgap/reference/ADC circuits
DELAY_US(ADC_usDELAY); // Delay before converting ADC channels
无论使用内部基准还是外部基准,计算公式一样吗
Digital Value =4096x(Input Analog Voltage-ADCLO)/3