MC9S12XEP100 : ATD Resoltuion is 19.53mv with 8bit data, but LM35 has 10mv per degree celsius

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

MC9S12XEP100 : ATD Resoltuion is 19.53mv with 8bit data, but LM35 has 10mv per degree celsius

1,388 次查看
Darshan_The_Gee
Contributor I

Hello All,

 

I am trying to use LM35 temperature sensor on AN1 port of ATD0. But I wanted to convert the value from the ATD to the temperature value for which I can print on the LCD display. But LM35 has resolution of 10mv per degree celsius and ATD (8 bit resolution, VDD = 5v) has 19.53mv. Hence I how can I know whats the temperature in degree celsius? I dont want to use power supply of 3.3v but only 5v. I have to make the ATD resolution as well 10mv per degree celsius.

 

Looking for some inputs / suggestions

 

Darshan

标签 (1)
0 项奖励
回复
3 回复数

661 次查看
bigmac
Specialist III

Hello Darshan,

 

If you use 10-bit resolution, as Kef suggested, this will result in a resolution of 4.88mV, or slightly less than 0.5 degree.

 

If you then wished to adjust the resolution to exactly 0.5 degree C, to simplify the calculation process, you could place a resistive voltage divider between the temperature sensor and the ATD input.  This might consist of a 820 ohm series resistor, and a 33k shunt resistor, and would provide a voltage change of 9.76mV per degree C at the ATD input.

 

Regards,

Mac

 

0 项奖励
回复

661 次查看
kef
Specialist I

XEP100 has 1MB of flash. Conversion from ADC reading to integer degC costs well under 20 bytes of code and about 10  bus cycles...

0 项奖励
回复

661 次查看
kef
Specialist I

Simple. Use 10 or 12bits ATD resolution.

0 项奖励
回复