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

wanna know about conversion

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



Joined: 05 Sep 2007
Posts: 252

View user's profile Send private message

wanna know about conversion
PostPosted: Mon Jul 21, 2008 10:52 pm     Reply with quote

Hi everyone;
i am reading analog values from lm35(temprature IC) in pica6f877a.
I wanna know that how i convert these values in centigrade.
Range of lm35 is from 2 degrees centigrade to 150 degree centigrade and i want to read n display temprature from 2 degree to 50 degree centigrade and
also i am using 10-bit A/D converter.
plz tell me
Thanks
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Tue Jul 22, 2008 12:00 am     Reply with quote

I'm not going to tell you the answer. I am going to try and guide you so that you can find the answer yourself.

Start with the sensor's datasheet. What is its' output (mv per degree Celcius)? What sort of circuit does the datasheet recommend?

Assuming that you don't have an amplifier circuit to boost the sensor's output, what sort of voltage can you expect into the PIC's A/D input?

Start with the maximum temperature you expect to measure. What output voltage will this create?

Now think of the PIC's A/D. You said you're using it in 10 bit mode. Are you going to use the PIC's internal voltage references (Vss and Vdd)? What is your PIC's Vdd? 5V? 3.3V? What A/D voltage would result in a reading of 0? What A/D input voltage would result in a reading of 0x3ff?

Now what is the ratio of your maximum expected sensor voltage to your PIC's Vref? Multiply that by the maximum A/D reading of 0x3ff. That will be the A/D's reading at that maximum temperature.

Need I go on?
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