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
Posted: Sat Feb 18, 2012 1:17 am
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.
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