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

Resistance to Temperature

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







Resistance to Temperature
PostPosted: Wed Sep 09, 2009 4:19 am     Reply with quote

Hi,

I´m trying to make a conversion table, to read a temperature.

I already have the table in paper, but i can´t make in C.

What I´m trying to do is this:

Read the ADC-> Calc the RESIT. -> and them go to a table get the values.
On that table need (based on the previous calculated resistance) the closest lower value, the closest higher value, and the closest lower temperature.

Them with this I can calculate the temperature using interpolation,
(measured value - closest lower value)* resolution in ºC
----------------------------------------------------------------- + closest lower temperature
closest higher value - closest lower value)

Example:

My table on paper:
ºC-------Ohms
... -------....
5 -------101.95
10-------103.9
15-------105.85
20-------107.79
....-------.........

So lets say I have calculated a resistance of 104 Ohms.
I need to get from table the value 103.9 Ohms, 105.85 Ohms and 10ºC.

How can i make this?
Where direction i have to take?
I´m begin to write in C, and i don´t have the necessary skills to do this, or where start.


Thank´s in advance.
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Wed Sep 09, 2009 6:23 am     Reply with quote

One solution is to do interpolation.
One way is to get the slope and the offset between the two points where your value belongs and consider it as linear.Apply your value and get the temperature.

Good Luck...
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