• AVR Freaks

Hot!DS18B20 digital temperature sensor

Author
HighTechPower
Starting Member
  • Total Posts : 46
  • Reward points : 0
  • Joined: 2021/01/27 01:35:43
  • Status: offline
2021/03/01 04:43:58 (permalink)
0

DS18B20 digital temperature sensor

Hi. I want to use DS18B20 with PIC16F690. I read somewhere that it's protocol is 1-wire which is different than I2C protocol of PIC controllers. Any idea how to convert it to I2C or any link for header file to be used with XC8 compiler? I have seen somewhere source code but that works only for Arduino.
#1

2 Replies Related Threads

    oliverb
    Super Member
    • Total Posts : 435
    • Reward points : 0
    • Joined: 2009/02/16 13:12:38
    • Location: 0
    • Status: offline
    Re: DS18B20 digital temperature sensor 2021/03/01 05:11:48 (permalink)
    +1 (1)
    Mikroelektronika have a usable 1-wire library, though that would mean using their compiler and when I tried it they didn't support bus-powered operation of the sensor.
     
    1-wire tends to be implemented as a "bit bang" protocol, with timing generated in software.
     
     
    #2
    GilJ
    Super Member
    • Total Posts : 119
    • Reward points : 0
    • Joined: 2011/04/05 02:36:47
    • Location: 0
    • Status: offline
    Re: DS18B20 digital temperature sensor 2021/03/01 05:24:22 (permalink)
    +2 (2)
    Hi,
     
    HighTechPower
    Hi. I want to use DS18B20 with PIC16F690. I read somewhere that it's protocol is 1-wire which is different than I2C protocol of PIC controllers. Any idea how to convert it to I2C or any link for header file to be used with XC8 compiler? I have seen somewhere source code but that works only for Arduino.



    I've just searched for "pic16 1-wire" and got multiple results with application notes, source code, tutorials...
    Searching for "pic16 1-wire DS18B20" first result shows up a project with a pic16 and DS18B20 using XC8.
     
    Are you having a specific issue?
    #3
    Jump to:
    © 2021 APG vNext Commercial Version 4.5