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.

CC2530进行获取片内温度传感器的数值总是0



signed int getTemperture()
{
  signed int temp=0;
  ADCCON3 = 0x3E;
  while((ADCCON1 & 0x80)!=0x80);
  temp = (signed int)ADCL;
  temp |= ((signed int)ADCH)<<8;
  temp >>= 4;
  return temp;
}

我的ADCCON2没有进行配置,可是运行过程中却发生了变化

网上有人说ADC单次转换只需要配置ADCCON3。

为什么读到的数据总是0,而且明明EOC从0变到1提示转换完成了。温度传感器已经使能,并且连接到了ADC