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
DS18B20
Moderator: Benj
- 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
Hello,
Is this any better? I removed one of your calculation icons which I don't think was required.
Is this any better? I removed one of your calculation icons which I don't think was required.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: DS18B20
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
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
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
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
- celebriums
- Posts: 125
- Joined: Sun Sep 25, 2016 3:50 pm
- Has thanked: 71 times
- Been thanked: 33 times
- Contact:
Re: DS18B20
Hi Jgi
Will you try the attached file? My circuit in my running smoothly.
Will you try the attached file? My circuit in my running smoothly.
- Attachments
-
- TermometarDS18B20_SAD.fcfx
- (10.56 KiB) Downloaded 366 times
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: DS18B20
Hi again!
Do you test mine??
Your new program work fine by me also. I dare to change a little on your program.
Br
Jorgen
Do you test mine??
Your new program work fine by me also. I dare to change a little on your program.
Br
Jorgen
- Attachments
-
- TermometarDS18B20_SAD1.fcfx
- (9.12 KiB) Downloaded 411 times