CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Temperature sensor output to PIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Arfaq



Joined: 30 Apr 2004
Posts: 1

View user's profile Send private message

Temperature sensor output to PIC
PostPosted: Fri Apr 30, 2004 7:55 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 30, 2004 10:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 30, 2004 12:43 pm     Reply with quote

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







PostPosted: Sun May 02, 2004 10:10 am     Reply with quote

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







PostPosted: Sun May 02, 2004 10:11 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group