Read DS18S20


Closed Thread
Results 1 to 17 of 17

Thread: Read DS18S20

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by skimask View Post
    I know that's not ALL of the code...
    You are correct; it’s not all the code. The rest of the code is working fine this is only going to be the part (subroutine) to measure temperature. And it’s also the part that does not compile.

    Thanks!

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Looks like you have dq defined as a WORD VS BYTE.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PICante View Post
    You are correct; it’s not all the code. The rest of the code is working fine this is only going to be the part (subroutine) to measure temperature. And it’s also the part that does not compile.

    Thanks!
    The rest of the code may very well be working fine, but the rest of the code also has any setup/initialization/interrupts that you are using, therefore, is just as important as the code that's messing up.
    I must be making this up as I go or something...

  4. #4


    Did you find this post helpful? Yes | No

    Default

    We need to see how the variables are declared as well as other settings. Its obviously not this part of the code that is the culprit because it compiles fine for others which means there is a problem somewhere else in the code. Like Bruce said, it could be something simple like a word variable being declared as a byte.

  5. #5
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Red face

    Hi Guys!

    Been busy doing other stuff but now I’m back to finish this project! As some of you suspected it was a “simple” mistake, a word variable was declared as a byte! Now it runs like clockwork!
    It seems the problem is always simple, finding the problem is the hard part!

    Thank you all!

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  3. Replies: 13
    Last Post: - 12th May 2009, 17:26
  4. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  5. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25

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