One wire problems

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

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 796
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Contact:

One wire problems

Post by Jan Lichtenbelt »

I use the temperature sensor DS18S20 with the Flowcode as given in wiki:
https://www.matrixtsl.com/wikiv7/index. ... Interface)
I changed the microchip into 16F1847 with pin A7 for the one-wire communications. This pin has a 4k7 resistance connected to 5V.
This is as simple as possible. But I get the message "no device found". I took another sensor, but with the same result.

But Flowcode gave the error:
Test_SingleOneWire_V1.c: FCD_0bbd1_OneWire1__Get_Next_ID()
729: break;
^ (345) unreachable code (warning)
. . . . . .


Is this the problem? Or something else?

Kind regards

Jan
Test_SingleOneWire_V1.fcfx
(12.48 KiB) Downloaded 45 times
Added: Changing the output pin from A7 to A4 makes the microchip to detect the DS1820 sensor, but gives a CRC error. Still not clear what happens?

kersing
Valued Contributor
Valued Contributor
Posts: 1938
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: One wire problems

Post by kersing »

You can ignore the warning, that will be issued in working setups as well.
The 1 wire component is extremely timing critical. Make sure to get oscillator set to highest possible speed and Flowcode set to the correct click so it can calculate the delays correctly.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Jan Lichtenbelt
Posts: 796
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Contact:

Re: One wire problems

Post by Jan Lichtenbelt »

Hi Kersing

Thanks a lot for your advise. I changed to microchip 16F18857 with 32 MHz oscillator. Now I get the temperature reading of 85.0 C, which does not change in time. It is not (yet) that hot here in the Netherlands.
What can I do now?

Kind regards

Jan

User avatar
Jan Lichtenbelt
Posts: 796
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Contact:

Re: One wire problems

Post by Jan Lichtenbelt »

Hi Kersing

I tried more DS1820 samples. The third is working fine now. Indeed a rather crital IC.

Kind regards

Jan

Post Reply