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?
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.