Ds18b20


Closed Thread
Results 1 to 25 of 25

Thread: Ds18b20

Hybrid View

  1. #1
    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 " !!!
    *****************************************

  2. #2
    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

  3. #3
    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 " !!!
    *****************************************

  4. #4
    Join Date
    Aug 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    hi,
    so thanks for help now i got resolution 1/100 i am so happy but i want to underestand what no 4 in statement OWIn DQ, 4, [Busy] means ???
    i have another question i want to read the o/p to pc serial port i connect 1k resistance to portb.1 and send it to pc rx pin (2) and circuit ground to pc gnd pin (5)
    note : i am using usb to serial converter
    i update the program just for testing to send a message but i notice that the Rx led on usb to serial converter flashes and nothing out on hyberterminal ????
    attached is code
    Attached Files Attached Files

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