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,326件の閲覧回数
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 返答(返信)

599件の閲覧回数
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 件の賞賛
返信

599件の閲覧回数
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 件の賞賛
返信

599件の閲覧回数
kef
Specialist I

Simple. Use 10 or 12bits ATD resolution.

0 件の賞賛
返信