+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Junior Member level 2
    Points: 938, Level: 6

    Join Date
    Nov 2012
    Posts
    20
    Helped
    1 / 1
    Points
    938
    Level
    6

    Problem in receiving data from DS18b20

    I am working on one wire protocol based temperature sensor ds18b20 which is powered by external source. First i am resetting DS18b20 and then i am sending skip ROM command ie CCh followed by 44h i.e. temperature conversion. Datasheet says that if the temperature conversion is in progress then DS18B20 will send zero else one. But in my case i am only receiving zero.


    Plz help

  2. #2
    Advanced Member level 4
    Points: 7,678, Level: 20
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,371
    Helped
    321 / 321
    Points
    7,678
    Level
    20

    Re: Problem in receiving data from DS18b20

    After 'reset' do you check 'presents' pulse?
    Love me or hate me. All infractions will be ignored.


    1 members found this post helpful.

    •   Alt3rd March 2016, 20:58

      advertising

        
       

  3. #3
    Super Moderator
    Points: 44,825, Level: 51
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    9,182
    Helped
    2211 / 2211
    Points
    44,825
    Level
    51

    Re: Problem in receiving data from DS18b20

    Hi,

    Circuit.
    Scope pictures with voltage levels and timing.

    Klaus



  4. #4
    Junior Member level 2
    Points: 938, Level: 6

    Join Date
    Nov 2012
    Posts
    20
    Helped
    1 / 1
    Points
    938
    Level
    6

    Re: Problem in receiving data from DS18b20

    yes.... and also i DS18b20 is responding with zero.



    •   Alt4th March 2016, 17:19

      advertising

        
       

  5. #5
    Super Moderator
    Points: 64,679, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,700
    Helped
    3478 / 3478
    Points
    64,679
    Level
    62

    Re: Problem in receiving data from DS18b20

    First check if you are getting a presence pulse after the first reset and before sending the commands. It sounds like a complete communication failure.

    Are you using the DS18B20 with it's own power source or in parasite power mode?
    What value pull-up resistor are you using?

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  6. #6
    Junior Member level 2
    Points: 938, Level: 6

    Join Date
    Nov 2012
    Posts
    20
    Helped
    1 / 1
    Points
    938
    Level
    6
    i have attached the circuit diagram.

    Yes i am getting the presence pulse after the first reset.
    I am providing external power to DS18b20 with 4.7k pullup resistor.



  7. #7
    Advanced Member level 4
    Points: 7,678, Level: 20
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,371
    Helped
    321 / 321
    Points
    7,678
    Level
    20

    Re: Problem in receiving data from DS18b20

    No reason to try get any data without getting 'presents' pulse. Anyway, you didn't provided anything. That means that you don't realy need to solve you problem and we a not able to force you to do that.
    Love me or hate me. All infractions will be ignored.



  8. #8
    Junior Member level 2
    Points: 938, Level: 6

    Join Date
    Nov 2012
    Posts
    20
    Helped
    1 / 1
    Points
    938
    Level
    6

    Re: Problem in receiving data from DS18b20

    Quote Originally Posted by Easyrider83 View Post
    No reason to try get any data without getting 'presents' pulse. Anyway, you didn't provided anything. That means that you don't realy need to solve you problem and we a not able to force you to do that.
    i am getting the "presents" pulse from DS18B20. I have attached the circuit diagram and datasheet of DS18b20 and also code for writing and reading for DS18b20 using assembly language. I am using AT89S52 microcontroller and p3.1 as DQ pin of DS18b20

    Sorry Mr Easyrider....i have attached the document but it disappeared...again i have attached the document please find it

    - - - Updated - - -

    In the datasheet it is mentioned that after sending 44h to DS18b20, it will respond zero if temperature conversion is taking place and one if it is completed. My question is after sending 44h what should be the status of DQ pin means i should release it or make it low.??.

    - - - Updated - - -

    plz help.....i am not receiving data from ds18b20...

    i am getting the present pulse then i am sending cch followed by 44h for skip rom and temperature conversion (as i am providing external supply to ds18b20), but the problem is, in the datasheet it is mentioned that ds18b20 will sent "0" if the temperature coversion is in progress while "1" if the temperature conversion has completed after sending 44h to ds18b20.

    What is the problem..??



    •   Alt4th March 2016, 18:25

      advertising

        
       

  9. #9
    Junior Member level 2
    Points: 938, Level: 6

    Join Date
    Nov 2012
    Posts
    20
    Helped
    1 / 1
    Points
    938
    Level
    6

    Re: Problem in receiving data from DS18b20

    Finally got the output.......i have done mistake in "reading" part.....thanks all



--[[ ]]--