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 CCS Technical Support

Need help with temperature sensors

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



Joined: 02 Aug 2008
Posts: 4

View user's profile Send private message Yahoo Messenger

PostPosted: Sat Aug 02, 2008 12:55 am     Reply with quote

i'm using 2 temperature sensor and i need to subtract both temp sensor so that i can display the result on the lcd. i'm using pic16f877. anybody can help me with the coding. i;m totally lost right now...
ECACE



Joined: 24 Jul 2006
Posts: 94

View user's profile Send private message

PostPosted: Sat Aug 02, 2008 3:52 pm     Reply with quote

Not sure what type of temp sensor you are using. There are I2C, SPI, and simple thermistor types. You need to determine that first. If I remember correctly, some of the I2C and SPI types give back a calibrated temperature. I may be wrong on that, but I think there are devices that do that. If it is a thermistor type, you need to get the datasheet for the particular thermistor you are using. The thermistor is just a variable resistor, so you will have one side of it tied to ground, and the other to Vcc via a resistor. You will then just do an A/D reading of the device.

For the Code part, look in you Examples directory at the ones that start with EX_ADxxxxx, and EX_TEMP. This should give you a couple ideas of how to do it. Good luck.
_________________
A HW Engineer 'trying' to do SW !!! Run!!!
milkman41



Joined: 16 Jun 2008
Posts: 30

View user's profile Send private message

PostPosted: Sat Aug 02, 2008 3:54 pm     Reply with quote

What temperature sensors are you using?
azakuri



Joined: 02 Aug 2008
Posts: 4

View user's profile Send private message Yahoo Messenger

PostPosted: Sun Aug 03, 2008 11:10 am     Reply with quote

I'm using 2 DS18s20. DS18s20 of temperature sensor. During my studies i was not taught about the pic so, I'm a little confused when i need to use it for my project. I'm not a good programmer and i need ur help with the coding. One more question, both coding for lcd and temperature can be combined into one sheet or not. Just asking. Could anyone help me with this... Sad
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Aug 03, 2008 11:29 am     Reply with quote

So this is a school/study project... Generally folks on this board will be glad to help you but typically they will not do your project assignment for you. That is why it is called YOUR project assignment. As an instructor I want my students to learn by doing NOT half-learn by someone ELSE doing!

To get decent help you must understand that people here (or any online board for that matter) are not mind readers and you need to give them something to go on or they cannot help.

Typically you start by posting:
1. version of your CCS compiler (the format is x.xxx)
2. which PIC chip you are using.
3. FULL description of your hardware (including the programmer)
4. what you are trying to do then a good description of the problem.

Apparently you don't even know what a PIC chip is so we can't do much to help you until that is settled. If you don't have or know these things you need to get with your instructor and figure that out first. That is what your instructor is paid to do...Help!

When you have the info come back and lay it out then things can progress much faster!
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