ADC0STA 0x11
楼主的ADC0怎么设置的?
如果是1.2v的 internal reference 那应该是overrange了.
楼主ADC1闲着也是闲着可以配置一下做个芯片温度监控
UG-367.pdf Page 27 Temperature Sensor Settings.
AdcGo(pADI_ADC1,ADCMDE_ADCMD_IDLE);
AdcMski(pADI_ADC1,ADCMSKI_RDY,1);
AdcFlt(pADI_ADC1,25,8,FLT_NORMAL|ADCFLT_NOTCH2|ADCFLT_CHOP);
AdcRng(pADI_ADC1,ADCCON_ADCREF_INTREF,ADCMDE_PGA_G2,ADCCON_ADCCODE_UINT);
AdcBuf(pADI_ADC1,ADCCFG_EXTBUF_OFF,ADCCON_BUFBYPN|ADCCON_BUFBYPP|ADCCON_BUFPOWP|ADCCON_BUFPOWN);
AdcPin(pADI_ADC1,ADCCON_ADCCN_TEMP,ADCCON_ADCCP_TEMP);
AdcGo(pADI_ADC1,ADCMDE_ADCMD_CONT);
Temperature = (ADC1DAT*1.2*1000/268435456 - 82.1)*4 + 25;
[
本帖最后由 wywxm 于 2013-4-26 00:34 编辑 ]