This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Source code to get DS18B20 temperature feedback in nrf51822

Hi,

I am using nrf51822 to get DS18B20's temperature data, but I am fail to do it.

Would you please give me an sample C source code which can get temperature data from DS18B20?

Thank you,

Chianglin

Parents Reply
  • Hi Hi Martin,

    Yes. you are right.

    I had check my DS18b20 circuit again, and had connect to incorrect pin.

    After I connect DS18B20 data pin with P0.29, I had print out all the ROM data  into RTT, please find the following debug message

    According to the display result of the One-Wire waveform, the data read should be 0x0118323C7DFF. However, the data I read is 0xFFFFFFFFFFFF..

    My source code is:

    DS18B20Test_03.7z

    Would you please tell me how can I modify my code?

    Thank you,

    Chianglin

Children
Related