One wire DS18S20 Error
Moderator: Benj
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
- Contact:
One wire DS18S20 Error
Hi all. I use trial version of Flowcode 6 and I decided try "SingleOneWire" with DS18S20 from "Help". And it's not work. I see on display "CRC Error". If I disable CRC, I see on display "-1.-5 C". I try everything, but no result. Most interesting is that in Proteus project work. Project is the same as in "Help". Diferent is only PIC-16F876A and crystal-20MHz.
Anybody have a some idea?
Anybody have a some idea?
- Attachments
-
- SingleOneWire.rar
- (21.91 KiB) Downloaded 299 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: One wire DS18S20 Error
Do I understand you correctly
You are simulating the hex file created in Flowcode in Proteus and then the simulation is working
and the simulation in Flowcode does not work ?
I suppose you should use and injector Component/tool in FC simulation I never used the One Wire in FC but this would be my guess,you should read the help file how to use it and which one too use
You are simulating the hex file created in Flowcode in Proteus and then the simulation is working
and the simulation in Flowcode does not work ?
I suppose you should use and injector Component/tool in FC simulation I never used the One Wire in FC but this would be my guess,you should read the help file how to use it and which one too use
- Attachments
-
- 14.12.jpg
- (80.55 KiB) Downloaded 1854 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
- Contact:
Re: One wire DS18S20 Error
In Proteus circuit work.
I try real design. With PIC16F876A and crystal 20MHz, device is DS18S20. It not work. I give on display -1.-5 C.
I'm new in Flowcode and not use injector. I don't now how.
But I think this example in "Help"must be work. It's very simple.
I'm shure it's a bug.
I do not understand of programming and this program is a bonus for me. But if somewhere something will not work, but I can not fix it, then does it make sense to buy?
I try real design. With PIC16F876A and crystal 20MHz, device is DS18S20. It not work. I give on display -1.-5 C.
I'm new in Flowcode and not use injector. I don't now how.
But I think this example in "Help"must be work. It's very simple.
I'm shure it's a bug.
I do not understand of programming and this program is a bonus for me. But if somewhere something will not work, but I can not fix it, then does it make sense to buy?
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: One wire DS18S20 Error
What is working in Proteus a Proteus example or the Hex File you generated from FlowCode form the help file example ??maharadga wrote: In Proteus circuit work.
did you try to load the hex file in the Proteus model and check it ?
There could be a hardware problem as I assume the help file example is correctmaharadga wrote:I try real design. With PIC16F876A and crystal 20MHz, device is DS18S20. It not work. I give on display -1.-5 C.
Unfortunately I do not have this hardware to check it out,maybe one of the other guys that used the One Wire will help you
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: One wire DS18S20 Error
Hi
Well what i did now I compiled your project in FC and loaded the hex file into Proteus and it working fine
I am quite sure that the FC6 project and hex file are correct you need to check your hardware ,You project settings seem to be correct if you are using 20MHZ Crystal
Well what i did now I compiled your project in FC and loaded the hex file into Proteus and it working fine
I am quite sure that the FC6 project and hex file are correct you need to check your hardware ,You project settings seem to be correct if you are using 20MHZ Crystal
- Attachments
-
- 1.jpg (102.98 KiB) Viewed 10221 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
- Contact:
Re: One wire DS18S20 Error
Hi.QMESAR wrote:Hi
Well what i did now I compiled your project in FC and loaded the hex file into Proteus and it working fine
I am quite sure that the FC6 project and hex file are correct you need to check your hardware ,You project settings seem to be correct if you are using 20MHZ Crystal
Еxactly. Hex file is compiled into the Flowcode and loaded into Proteus. And it works, as you see. But when I program chip- program does not work. There is no hardware problem. I wrote to Flowcode and got the answer:
"Hello,
Unfortunately the One Wire component is bugged at the moment, making a generic One Wire which works with all chip types is proving very tricky for us. It is on our bug list to fix. I am sorry for any inconvenience this may cause.
Regards,
David"
Same problem I see in Flowcode 5. From this site http://flowcode.info/forum/index.php?si ... a20be94f25 I download revised 1-Wire.c file and replace original in FC directory. Then 1-Wire forks perfect. But in FC6 everyting is different.
Hopefully soon to fix this bug.
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: One wire DS18S20 Error
Thank you for informing however I will be very surprised with this as my experience with Proteus over the the years is that it is really accurate and it would have shown out this bug,maharadga wrote: Unfortunately the One Wire component is bugged at the moment, making a generic One Wire which works with all chip types is proving very tricky for us.
.
I have ordered a DS18B20 sensor I want to see this myself and 876A I will have one laying around
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: One wire DS18S20 Error
The DS18B20 and the DS18S20 are slightly different devices. Code for one does not work with the other.QMESAR wrote:I have ordered a DS18B20 sensor I want to see this myself and 876A I will have one laying around
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: One wire DS18S20 Error
Thank you for pointing this outkersing wrote:The DS18B20 and the DS18S20 are slightly different devices. Code for one does not work with the other.
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- 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: One wire DS18S20 Error
Hello,
Not sure if this is related but I have had a go at changing the 1-wire component timings to make it more reliable. Anyone with 1-wire hardware please could you try this updated component to see how you get on.
Anyone with currently working 1-wire hardware please let us know what 1-wire device(s) your using and make a backup of the current component so you can revert back if the changes break the existing functionality.
Not sure if this is related but I have had a go at changing the 1-wire component timings to make it more reliable. Anyone with 1-wire hardware please could you try this updated component to see how you get on.
Anyone with currently working 1-wire hardware please let us know what 1-wire device(s) your using and make a backup of the current component so you can revert back if the changes break the existing functionality.
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: One wire DS18S20 Error
Hi Ben!!
Anyway, after such a great job you deserve an answer. I am a little bysy at the monent, but soon I will test your .fcpx file, and you hear.
Is it for a DS18B20 or DS 18S20 or both?? I have both.
Best regard
Jorgen
Anyway, after such a great job you deserve an answer. I am a little bysy at the monent, but soon I will test your .fcpx file, and you hear.
Is it for a DS18B20 or DS 18S20 or both?? I have both.
Best regard
Jorgen
- 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: One wire DS18S20 Error
Hello Jorgen,
Cheers for replying
Hopefully the 1-wire routines should work with both sensor types. I'll also do some testing here when my new sensors come in.
Cheers for replying
Hopefully the 1-wire routines should work with both sensor types. I'll also do some testing here when my new sensors come in.
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: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
- Contact:
Re: One wire DS18S20 Error
Hi. I will try this component and reply soon. Therefore I found that example in help files for One_wire work only if DS1820 is connected in port A0. If I try change pin for example C4 it not work.
Incidentally anyone have any idea why I can't reset WDT in example? And how can I prescale it?
I looks in forum but I do not understand programming and be happy if anybody explane me with simple example.
Also I reading incorectly temperature under 0C. How can I calculating minus temperature?
Beer be from me
Incidentally anyone have any idea why I can't reset WDT in example? And how can I prescale it?
I looks in forum but I do not understand programming and be happy if anybody explane me with simple example.
Also I reading incorectly temperature under 0C. How can I calculating minus temperature?
Beer be from me
- Attachments
-
- Example.rar
- (18.36 KiB) Downloaded 185 times
-
- Example.fcf
- (15.64 KiB) Downloaded 208 times
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: One wire DS18S20 Error
Sorry To fast submit...
Last edited by jgu1 on Thu Jan 15, 2015 8:54 pm, edited 2 times in total.
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: One wire DS18S20 Error
Hi Ben!
Sorry i have no luck with your new .fcpx file doesn´t Work.
I hope the following may be helpful:
I thought I have a DS18S20 but I only have DS1820 and a DS18B20 none of them Work with old .fcpx file and new file.
Info to you for troubleshooting:
I have (att.) FC5 program with where I use a pic16886 with internal osc set to 8 MHz. Work perfect. But ONLY with datapin conneted to pin A0 ??
If I make the same program in FC6 I only get CRC error. With both .fcpx file.
I see that Rudi and Martin managed to get it Work with 16f1937. I think it seems to be a very critical component.
***Allow me just a second question.
When I use the Arduino with FC6 it works perfectly and is very fast to compile. Pic is very slow to compile, something new concerning speedup for pic udring compile?*
Sorry i have no luck with your new .fcpx file doesn´t Work.
I hope the following may be helpful:
I thought I have a DS18S20 but I only have DS1820 and a DS18B20 none of them Work with old .fcpx file and new file.
Info to you for troubleshooting:
I have (att.) FC5 program with where I use a pic16886 with internal osc set to 8 MHz. Work perfect. But ONLY with datapin conneted to pin A0 ??
If I make the same program in FC6 I only get CRC error. With both .fcpx file.
I see that Rudi and Martin managed to get it Work with 16f1937. I think it seems to be a very critical component.
***Allow me just a second question.
When I use the Arduino with FC6 it works perfectly and is very fast to compile. Pic is very slow to compile, something new concerning speedup for pic udring compile?*
- Attachments
-
- SingleOneWire886.fcfx
- (8.7 KiB) Downloaded 189 times
-
- 1. Single OneWire_DS18B20_886_Virker.fcf
- (15.5 KiB) Downloaded 232 times
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: One wire DS18S20 Error
Hi all!
Since I am very interested in this component (maybe also other), I am a little curious, stopped the thread concerning Ds18x20 here?.
When you look araound in the forum here, I can see there have always been problems with this component as both single, and as multiple device. I think many FC user would be happy for a One-Wire component that just works, regardless of the port, crystal, or type Pic to use. It is guaranteed not easy to fix, but Ben you turned a little light on when you tried to make a new .fcpx file .
Unfortunately it did not work, but I should like to test again if you can make magic
Best regard
Jorgen...
Since I am very interested in this component (maybe also other), I am a little curious, stopped the thread concerning Ds18x20 here?.
When you look araound in the forum here, I can see there have always been problems with this component as both single, and as multiple device. I think many FC user would be happy for a One-Wire component that just works, regardless of the port, crystal, or type Pic to use. It is guaranteed not easy to fix, but Ben you turned a little light on when you tried to make a new .fcpx file .
Unfortunately it did not work, but I should like to test again if you can make magic
Best regard
Jorgen...
-
- Posts: 258
- Joined: Wed Nov 29, 2006 6:32 pm
- Location: Finland
- Has thanked: 7 times
- Been thanked: 36 times
- Contact:
Re: One wire DS18S20 Error
Hi.
Hi I have been playing those devices, and never get them working really reliable (burned one Eberspächer chamber, because of sensor jamming -> back to the ntc temp sensing). Those devices seems to be very sensitive of timings and noise. With the noise in bus, it could jam, only way to get it working was power off the device. And I have broke many of those devices, some the way that I don't understand could work for months, and suddenly it's dead..
There is thread in FC5 forum, where I and Ben was trying to get DS sensors working at dsPIC, with no luck, with 8-bit same code works fine, so I someone is interested, there is some information..
One thing is that one some devices seems to work at some code, and some need to tweak timings, thats really nice..
There probably should use some series resistor in the bus, to prevent bus ringing and over and undershoot, the edges of modern pics are quite fast..
The S and B version uses same code, only the temp calculation is different, so any case you should see some logical change the temp, b uses 12 bit and s 9 bit temp message, no other difference..
T:Mika
Hi I have been playing those devices, and never get them working really reliable (burned one Eberspächer chamber, because of sensor jamming -> back to the ntc temp sensing). Those devices seems to be very sensitive of timings and noise. With the noise in bus, it could jam, only way to get it working was power off the device. And I have broke many of those devices, some the way that I don't understand could work for months, and suddenly it's dead..
There is thread in FC5 forum, where I and Ben was trying to get DS sensors working at dsPIC, with no luck, with 8-bit same code works fine, so I someone is interested, there is some information..
One thing is that one some devices seems to work at some code, and some need to tweak timings, thats really nice..
There probably should use some series resistor in the bus, to prevent bus ringing and over and undershoot, the edges of modern pics are quite fast..
The S and B version uses same code, only the temp calculation is different, so any case you should see some logical change the temp, b uses 12 bit and s 9 bit temp message, no other difference..
T:Mika
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: One wire DS18S20 Error
Hi all,
I have the DS18B20 temp sensor working very reliable with FC5 component macro's on a PIC18F46K22 on pin A3, but when I try and use the FC6 macros in exactly the same way as in FC5 then it no longer works. It always reads -1.-6. What's the difference (under the bonnet) between the FC5 and FC6 component macro for the DS18B20? If the FC6 macro could be changed to be exactly the same as the FC5 then at least the DS18b20 would work?
Benj...any possibilities of doing that?
I have the DS18B20 temp sensor working very reliable with FC5 component macro's on a PIC18F46K22 on pin A3, but when I try and use the FC6 macros in exactly the same way as in FC5 then it no longer works. It always reads -1.-6. What's the difference (under the bonnet) between the FC5 and FC6 component macro for the DS18B20? If the FC6 macro could be changed to be exactly the same as the FC5 then at least the DS18b20 would work?
Benj...any possibilities of doing that?