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.

28335AD采集问题



我按照官网提供的例程编写了AD采集程序,当输入电压为0时,采集正确。当输入电压不为0时,假如我从CCS的registers中读到 AdcRegs.ADCRESULT0的结果为0x3270,在程序中,我设置一个变量=AdcRegs.ADCRESULT0>>4,我把 AdcRegs.ADCRESULT0添加到Expressions中,从Expressions中读取到的AdcRegs.ADCRESULT0值为 12400,0x3270对应的十进制值应该是12917,为什么从Expressions中读取的值有误差呢?经过反复试验,发现不管输入的是什么值 (0除外),从registers中读取到的和从Expressions中读取到的总是有误差。
请问大师们,这应该和代码没有什么关系吧?问题出在了哪里呢?