Ds18b20


Closed Thread
Results 1 to 25 of 25

Thread: Ds18b20

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    hi,
    can u please send me picbasic code so i can know where is the error cause i am not god in assembely

  2. #2
    Join Date
    Aug 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    hi,
    i try the code u send me but still the same result nochange the resolution still 0.5

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking

    Hi, Ahmed

    No surprise ... you do not write tte DS Config Word in the right registers ...

    our friend Fratello saw that ( and corrected it ... )

    a pair of zeros is missing in your command line ...

    Alain
    Last edited by Acetronics2; - 14th June 2009 at 13:03.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Aug 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    hi,
    still the same resolution 0.5 even after i update the code , attached is the code u send me if u want to check
    Attached Files Attached Files

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question Where's the bug ???

    Hi, Ahmed

    I must admit Fratello's program only shows half degrees ... ( just tested on an EasyPic 5 )

    but still have not found Why !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Aug 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    hi,
    i am using pic basic pro 2.44 do u think this the problem

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Ahmed

    I Finally got it !!!

    the problem is in the Waiting loop ... that doesn't wait !!!

    sooo... add :

    Code:
     Busy VAR BIT
    at the top of the program

    and change :

    Code:
    WaitLoop:
     
    ' While not DQ                      ' NOT Working !!!
    ' Wend
    by

    Code:
    WaitLoop:
    
    OWIn DQ, 4, [Busy] 			' Check for still busy converting
    
    'PORTC.4 = 1				' Show waiting for conv complete
    
    If Busy = 0 Then 
    
     GOTO waitloop
     
    ENDIF
    
    ' PORTC.4 = 0
    Port C.4 was chosen to show the time the DS is Busy ... very useful tool to verify conversion is really complete !!!

    Have fun,

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ahmed_salah View Post
    hi,
    can u please send me picbasic code so i can know where is the error cause i am not god in assembely
    complied code and also the corrected .asm are attached.

Similar Threads

  1. Reading temperature using multi DS18B20
    By KVLV in forum Code Examples
    Replies: 16
    Last Post: - 3rd November 2017, 19:48
  2. Please help with code for DS18B20
    By fratello in forum mel PIC BASIC Pro
    Replies: 109
    Last Post: - 28th April 2013, 21:12
  3. Help with DS18B20 program
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 22nd August 2012, 00:50
  4. Multi DS18b20 Code help.
    By sccsltd in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th December 2009, 06:13
  5. DS18B20 error reading
    By Gaetano in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th August 2007, 16:21

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