Page 1 of 1

DS18B20

Posted: Tue Oct 25, 2016 4:24 pm
by dedajozo
Hello,

I'm triing to make DS18B20 termometer, chip si running with 10mhz external crystal, 4,7k resistor is connected but program is not working. Only it writes sometimes 7.5 or 0.
In the attachment is program. I tried to make termometer with LM35 an everything works fine..

Thank you in advance

Re: DS18B20

Posted: Tue Oct 25, 2016 5:32 pm
by Benj
Hello,

Is this any better? I removed one of your calculation icons which I don't think was required.
TermometarDS18B20.fcfx
(8.2 KiB) Downloaded 467 times

Re: DS18B20

Posted: Tue Oct 25, 2016 9:30 pm
by dedajozo
Hello Benj,

now I have value 127,5, and nothing hapends.

Re: DS18B20

Posted: Wed Oct 26, 2016 2:52 pm
by Benj
Hello,

Your microcontroller speed may also be a bit low, 10MHz on a PIC is probably too slow to reliably do 1-wire comms. Can you run the PIC at 20MHz instead? This should then hopefully work correctly.

Re: DS18B20

Posted: Wed Oct 26, 2016 4:53 pm
by jgu1
Hi!

I managed to get Ben“s example to work with a Pic16f877A and a 19.xx MHz Xtal signal. In on D1. I also use some calculation from an old DS18B20 project from Flowcode 5.

You remember pullup resistor :?: :lol:

It work nice by me. Maybe this work by you. Good luck.

But Ben, if you see this? If I import this program in FC7 it does not work.??

Br
Jorgen

Re: DS18B20

Posted: Thu Oct 27, 2016 9:27 pm
by celebriums
Hi Jgi

Will you try the attached file? My circuit in my running smoothly.

Re: DS18B20

Posted: Fri Oct 28, 2016 7:28 pm
by jgu1
Hi again!

Do you test mine??

Your new program work fine by me also. I dare to change a little on your program. :D

Br

Jorgen

Re: DS18B20

Posted: Sun Oct 30, 2016 9:45 pm
by dedajozo
Thank you all I will try it.

Re: DS18B20

Posted: Sun Nov 13, 2016 3:10 pm
by dedajozo
Hello,

I tried all versions with 20 mhz crystal but it is not working.