2024-10-10 8:24 AM - last edited on 2024-10-10 8:43 AM by Andrew Neil
2025-09-19 1:54 AM - edited 2025-09-19 2:06 AM
Hi. I released new one wire library. It is non-blocking and can run on any pins.
2025-09-19 2:29 AM - edited 2025-09-19 2:34 AM
EDIT: Oops - I missed that this is an old post (nearly a year), which has just been woken up by @nimaltd
So all of this has pretty much been said already:
First call should always be to see what the manufacturer says:
Choosing the Right 1-Wire Master for the Embedded Applications
Application Note 148: Guidelines for Reliable Long Line 1-Wire® Networks
There is basic, MCU-independent code here:
Interfacing the DS18X20/DS1822 1-Wire® Temperature Sensor in a Microcontroller Environment
See also:
@Emanuele78 wrote:even though the debug shows everything is fine.
Clearly everything is not fine - it doesn't work!
A software debugger probably won't show hardware problems.
Are you sure that the DS18B20 actually works?
Is it wired correctly?
Please show your schematics; some good, clear photos of your setup may also help - see:
How to write your question to maximize your chances to find a solution
Have you used an oscilloscope to see what's actually happening on the wire?
The DS18B20 datasheet & links above show what you should be seeing...
Note that DS18B20 are commonly faked - are you sure you have a genuine one?
Does it work with any other controller; eg, Arduino?
See:
@Emanuele78 Are you still there? Did you fix this?
2025-09-19 2:39 AM - edited 2025-09-19 2:39 AM
Yes :) @Andrew Neil
Because I released a library. It is non-blocking and very simple. And ready to use. I tested with 2 ds18b20 on bus and works perfectly.
2025-09-19 3:15 AM - edited 2025-09-19 3:16 AM
Just to collect together some more 1-WireTM tips:
#1WireTips