Hi everyone;
i am reading analog values from lm35(temprature IC) in pica6f877a.
I wanna know that how i convert these values in centigrade.
Range of lm35 is from 2 degrees centigrade to 150 degree centigrade and i want to read n display temprature from 2 degree to 50 degree centigrade and
also i am using 10-bit A/D converter.
plz tell me
Thanks
newguy
Joined: 24 Jun 2004 Posts: 1907
Posted: Tue Jul 22, 2008 12:00 am
I'm not going to tell you the answer. I am going to try and guide you so that you can find the answer yourself.
Start with the sensor's datasheet. What is its' output (mv per degree Celcius)? What sort of circuit does the datasheet recommend?
Assuming that you don't have an amplifier circuit to boost the sensor's output, what sort of voltage can you expect into the PIC's A/D input?
Start with the maximum temperature you expect to measure. What output voltage will this create?
Now think of the PIC's A/D. You said you're using it in 10 bit mode. Are you going to use the PIC's internal voltage references (Vss and Vdd)? What is your PIC's Vdd? 5V? 3.3V? What A/D voltage would result in a reading of 0? What A/D input voltage would result in a reading of 0x3ff?
Now what is the ratio of your maximum expected sensor voltage to your PIC's Vref? Multiply that by the maximum A/D reading of 0x3ff. That will be the A/D's reading at that maximum temperature.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum