DS18B20

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times
Contact:

DS18B20

Post 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
Attachments
TermometarDS18B20.fcfx
(7.02 KiB) Downloaded 366 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DS18B20

Post 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 410 times

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times
Contact:

Re: DS18B20

Post by dedajozo »

Hello Benj,

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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DS18B20

Post 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.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: DS18B20

Post 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
Attachments
TermometarDS18B20Test.fcfx
(6.82 KiB) Downloaded 371 times

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: DS18B20

Post by celebriums »

Hi Jgi

Will you try the attached file? My circuit in my running smoothly.
Attachments
TermometarDS18B20_SAD.fcfx
(10.56 KiB) Downloaded 366 times
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: DS18B20

Post 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
Attachments
TermometarDS18B20_SAD1.fcfx
(9.12 KiB) Downloaded 411 times

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times
Contact:

Re: DS18B20

Post by dedajozo »

Thank you all I will try it.

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times
Contact:

Re: DS18B20

Post by dedajozo »

Hello,

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

Post Reply