Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM35 with PIC question

Status
Not open for further replies.

jenifer85

New Member
Hi.

I am trying to do a system that can read temperature.
Im using a LM35(temperature sensor) to detect the temperature. The output of the LM35 give me a voltage corresponding to the temperature detected. For example at 25C I get 250mv.
Now im connecting this output to an analog input from a pic( im using 16f877A). Im trying to write a code in C programming with MPLAB, im doing a read_adc...but the pic doesn't seem to detect the voltage.. It always detect 255..

Maybe i need an amp op? Or maybe the problem is in my code?

I need help! thanks alot!

Jen
 
The problem is most likely with your code. When you post your code, make sure you surround it with the code tags. (Use the # button in the Advanced editing/posting window)
To get the best resolution from your temperature sensor, you'll need to use an OpAmp to scale the output of the LM35.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top