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

Need help with MCP9700

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



Joined: 17 Feb 2012
Posts: 2

View user's profile Send private message Visit poster's website

Need help with MCP9700
PostPosted: Fri Feb 17, 2012 8:18 am     Reply with quote

Hi there. I am required to setup the PIC18F46K20 and enable the ADC module to read a temperature sensor using PIC then display at LCD. I'm using MCP9700 and the temperature range is from -40 to +125 deg C. I'm learn a BASIC for the code. Can anyone help to provide the code?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 18, 2012 1:17 am     Reply with quote

The basic form of test program will be similar to this:
http://www.ccsinfo.com/forum/viewtopic.php?t=32168&start=1
You read the A/D value, then convert it to temperature by a math
formula, and then display it on the LCD. Do this every 1/2 second.
In the code in the link, it converts the A/D value to volts. You will
need to create a different formula to convert it to temperature.

The MCP9700 data sheet tells, on the first page on the right side,
how the output voltage is related to the temperature:
http://ww1.microchip.com/downloads/en/devicedoc/21942a.pdf
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