PIC16F877A DS18B20 multiple sensors connection

Thread Starter


Joined Jul 15, 2020
Hello. I have a problem with connecting N number of DS18B20 sensors on pic16f877 microcontroller on same pin in proteus simulation. I got it working with one sensor. But I cant get it working with multiple sensors (number of sensors greater then 1). So the C code needs to do next: when I connect multiple sensors on pic pin, it reads data from all sensors, when i change number of connected sensors and restart simulation it should read data again from all sensors. My proteus 8 Untitled.pngscheme and CSS C code is atached.



Joined Jan 18, 2008
Lack of that code explains why it works with only one sensor attached and why it gets garbled with 2 or more. With one sensor, it is "one-drop" and apparently is not needed.