Page 1 of 2

DS18B20 or 1-wire issue

Posted: Tue Dec 24, 2024 3:25 pm
by TheShadowOfTriumph
Hi,

DS18B20 component always return 99 or 0 (when CRC is off).
Conditions:
Electrically everything is OK, i see data on oscilloscope (but can`t read separate bits);
Trying different sensors, Dallas and UMW (same result);
Trying pins B9 and B2 (STM32F030C8T6).
Flowchart is copied from wiki example.

Re: DS18B20 or 1-wire issue

Posted: Thu Jan 16, 2025 10:10 am
by Stathis
I TRY THE SAME CODE WITH ARDUINO AND I HAVE THE SAME PROBLEM!!!
RETURN IS 0

Re: DS18B20 or 1-wire issue

Posted: Thu Jan 16, 2025 10:26 am
by medelec35
Hello.
Please don't use all caps as that is perceived as shouting on forums.
I will see if I can find the issue with DS18B20.
For me to replicate your setup, what value pull-up resistor did you use?

Re: DS18B20 or 1-wire issue

Posted: Thu Jan 16, 2025 8:25 pm
by Stathis
Sorry for the caps.
The pull up resistor is 4k7.
Thank you.

Re: DS18B20 or 1-wire issue

Posted: Fri Jan 17, 2025 9:55 am
by medelec35
Hello.
I have just tried DS18B20 on the Uno and 18F18877 (running with internal osc at 32MHz) and no issues at all.
DS18B20 Uno UART.png
DS18B20 Uno UART.png (11.06 KiB) Viewed 1656 times
For that reason, moving this topic from bugs to General, as there must be an issue with your setup.
Can you try selecting DS18B20 properties, and check that LinkTo drop down box is not blank.
If is, select One_Wire1 and recompile.

Re: DS18B20 or 1-wire issue

Posted: Fri Jan 17, 2025 4:49 pm
by Stathis
Thank you very much.
Can you post the flowcode file Please..
I am doing something wrong and i don't know what.
Thank you again

Re: DS18B20 or 1-wire issue

Posted: Fri Jan 17, 2025 5:12 pm
by medelec35
I replicated your setup by downloading the example from the wiki and changing the target device to Uno.
Changed number of devices from 2 to 1.
if that don't work for you, I will upload my version.

Re: DS18B20 or 1-wire issue

Posted: Sat Jan 18, 2025 7:57 am
by Stathis
Thank you !!

Re: DS18B20 or 1-wire issue

Posted: Sat Jan 18, 2025 10:56 am
by medelec35
Sorry, I have noticed I used the wrong tag. Edited for the wiki link.

Re: DS18B20 or 1-wire issue

Posted: Sat Jan 18, 2025 3:04 pm
by Stathis
I still have the same issue.
At simultion works ok.
But in real life not.
Can you please check it
Thank you once again
oled_temp.fcfx
(18.58 KiB) Downloaded 63 times