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
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?
One wire problems
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
-
- 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 problems
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.
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
― C.S. Lewis
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: One wire problems
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
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
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: One wire problems
Hi Kersing
I tried more DS1820 samples. The third is working fine now. Indeed a rather crital IC.
Kind regards
Jan
I tried more DS1820 samples. The third is working fine now. Indeed a rather crital IC.
Kind regards
Jan