View previous topic :: View next topic |
Author |
Message |
Arfaq
Joined: 30 Apr 2004 Posts: 1
|
Temperature sensor output to PIC |
Posted: Fri Apr 30, 2004 7:55 am |
|
|
Hi im a new CCS user and a wanted to know if it was possible to read the output voltage (mV) from a temperature sensor by the PIC, which will decode the voltage to temp?? Please could you give me a example of the code and the requirements. thank you. _________________ Arfaq Ahmed |
|
|
Couch
Joined: 20 Jan 2004 Posts: 9 Location: Ottawa, Ontario Canada
|
|
Posted: Fri Apr 30, 2004 10:04 am |
|
|
Search for LM34 and you will get a few ideas, and some sample code. There are a lot more examples if you use a serial or I2C device... |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Apr 30, 2004 12:43 pm |
|
|
If you want to see how to do it with real primitive hardware I would recommend Microchip application note AN512 which connects a thermistor to PIC digital pins with resistors and a cap and uses the timer to measure accurate temperature. AN513 uses simillar principles for general voltage measurement. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Steve H Guest
|
|
Posted: Sun May 02, 2004 10:10 am |
|
|
Here is a link to a project that I did a while back,
http://www.geocities.com/hagtronics/thermometer.html
If I was to do this today I would use a 16F873 with the 10 bit A/D and a LM50 temp sensor. If you scale the A/D reference on the 873 to 2.5 volts and use an LM50 you can do away without the OPAMP.
Steve H. |
|
|
Steve H Guest
|
|
Posted: Sun May 02, 2004 10:11 am |
|
|
Here is a link to a project that I did a while back,
http://www.geocities.com/hagtronics/thermometer.html
If I was to do this today I would use a 16F873 with the 10 bit A/D and a LM50 temp sensor. If you scale the A/D reference on the 873 to 2.5 volts and use an LM50 you can do away with the OPAMP.
Steve H. |
|
|
|