I receive the correct temperature from one LM35, while receive a constant number from the other one

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

I receive the correct temperature from one LM35, while receive a constant number from the other one

跳至解决方案
2,675 次查看
Alex_2221
Contributor IV

Hello everyone, I'm using adcs of LPC1768 to read 2 temperatures of two LM35 sensors. I receive the correct temperature from one of the sensors, but keep receiving a constant number like 151 from the other one. My code used to work fine before, but I had to reprogram my board with another computer and all of a sudden this problem showed up. I added the C files of keil. I was wondering if you you'd mind helping me resolve this issue 

Thanks in advance

0 项奖励
回复
1 解答
2,603 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Alex,

If there was no modification to the code then software should not be an issue. I would check hardware connections, if sensor is appropriately connected or even testing with an external power supply instead of sensor.

If you think code maybe was modified then I recommend you to compare register configuration for each channel and see if there is any difference.

Best regards,

Felipe

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,604 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Alex,

If there was no modification to the code then software should not be an issue. I would check hardware connections, if sensor is appropriately connected or even testing with an external power supply instead of sensor.

If you think code maybe was modified then I recommend you to compare register configuration for each channel and see if there is any difference.

Best regards,

Felipe

0 项奖励
回复
2,591 次查看
Alex_2221
Contributor IV

Thanks for the reply, yeah there was a hardware issue and I resolved it. Thank you so much

0 项奖励
回复
2,655 次查看
Alex_2221
Contributor IV

@xiangjun_rong  What do you think about this? Last time you helped me with this code and it worked

0 项奖励
回复