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.

CC2538 实现ADC 连续读取电压值

Other Parts Discussed in Thread: CC2538

我们的方案是通过一个热敏电阻连接到C2538 的PA7 pin,根据热敏电阻的变化,通过读取PA7的电压值来计算芯片的温度。 但是我在CC2538源码上通过以下方式实现,怎么读取的值一直都是0呢。附上电路图。Detail info please check attached cc2538.doc      Thanks.

在zmain.c main 函数中定义以下。

uint8 channel=0x07, resolution=0x03;

uint16 tempValue; 

tempValue = HalAdcRead(channel, resolution); 

其它相关Hal_adc.c 的代码保持不变。

cc2538.doc