1Wire conversion


+ Reply to Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 1Wire conversion

    Thanks Richard, I had forgotten about the DIG function. Thanks for the reminder, I'll give it a try.

  2. #2
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 1Wire conversion

    Continuing with the same project. I have run into this problem many times over the years and I have yet to understand it. Why does this "If Then" statement fail to compile.
    Code:
        if Bvar = 0 then Cimage
            else Avar = Bvar
            gosub GetImage
        endif
    I can rewrite it in any form with the same results. It does not compile.
    I get an error code "Endif without a If...Then statment. It seems like a no brainer but I just don't' understand what I'm doing wrong.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: 1Wire conversion

    one of the reasons snippets are fairly useless is that assumptions have to be made, however assuming Cimage is a subroutine

    the correct syntax is
    Code:
       if Bvar = 0 then 
            gosub Cimage
       else 
            Avar = Bvar
            gosub GetImage
       endif
    Warning I'm not a teacher

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 1Wire conversion

    Your right as always! Not very forgiving is it. The format doesn't seem to fallow that of other functions.
    thanks Richard

  5. #5
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 1Wire conversion

    I've been trying to find some code to extract the 64-bit serial code from the 1wire devise. I think DT posted this routine but I have been unable to find it. Can anyone help?

Similar Threads

  1. 1Wire serial EEPROM, DS28EC20 and similar, any experience?
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 9th January 2022, 22:27
  2. Problems with CRC8 Calc in 1Wire
    By JohnB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 23:01
  3. conversion
    By pramodsinha in forum Forum Requests
    Replies: 2
    Last Post: - 19th January 2006, 16:58
  4. ºC -> ºF Conversion
    By CocaColaKid in forum General
    Replies: 6
    Last Post: - 15th March 2005, 10:42
  5. enumerate 1wire bus
    By justDIY in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 30th June 2004, 20:19

Members who have read this thread : 14

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