120Views2Replies
what is the c code for temperature indicator using lm35 pic18f uC for range o to 100 degree celcius?
I need a c code for temperature indicator using lm35 pic18f uC for range o to 100 degree Celsius.....
As lm35 is for -55 to 150 degree Celsius.....how to configure or code it for 0 to 100 degree Celsius.......?
Discussions
4 years ago
IIRC, with no external connections, the LM35 outputs from zero to 150C. You add an external pull down resistor to go to -ve temperatures, so here, all you need is the device.
The code is simple enough, configure the ADC, read the output, scale it to give temperature.
If the output range numbers are from (low_num) to (high_num) over 0...100C, then temperature = 100/(high_num-low_num) * measured number +low_num
Answer 4 years ago
+1