12f675 sensing temperature...


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76

    Default 12f675 sensing temperature...

    Hi all,

    I'm having a bit of trouble getting my a/d working just right. I have an LM34 connected to GPIO.0 and a pot feeding 2.55 volts to Vref pin GPIO.1

    I am trying to turn on a relay connected to GPIO.5 based on the temperature reading.h

    I don't think I have the a/d bits set correctly. It appears to still think it is 10 bit but I want it set to 8.

    Can you please look at my short code and tell me where I have gone astray.

    If you look at the txt file attached, you'll note that I have the relay turning on when my a/d result is > 330.

    By measuring the voltages and doing some math... that's right where it would be if the A/D was 10 bit. And it does work. The relay turns on and off when I touch the temperature sensor.

    Help please! :-)

    Thank you!

    Ross
    Attached Files Attached Files
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

Similar Threads

  1. Replies: 10
    Last Post: - 17th February 2012, 07:19
  2. Write Onewire data toa I2C memory / read ASCI
    By Eugeniu in forum mel PIC BASIC Pro
    Replies: 67
    Last Post: - 16th November 2008, 19:19
  3. Conversion problem
    By eva in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th March 2007, 18:21
  4. Help for decimal conversion
    By eva in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 18:20
  5. Serout "onewire.bas"
    By puru in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th July 2005, 00:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts