DS18S20

Use this section to discuss your embedded Flowcode projects.
Post Reply
B2CAP-V6
Posts: 14
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

DS18S20

Post by B2CAP-V6 »

Hello,
I created a flowchart using a DS18S20 (which I copied from the examples, but I don't fully understand it). It works in simulation under Flowcode 11, but not in Proteus.
If anyone has encountered the same problem, I would appreciate any information.
Thanks in advance :lol:
Attachments
Capture d’écran 2026-01-11 105226.jpg
Capture d’écran 2026-01-11 105226.jpg (132.71 KiB) Viewed 109 times
Prog_EG.fcfx
(31.37 KiB) Downloaded 11 times

chipfryer27
Valued Contributor
Posts: 1813
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 404 times
Been thanked: 624 times

Re: DS18S20

Post by chipfryer27 »

Hi

As it works in Flowcode, perhaps a question for the Proteus forum?

Does it work in Hardware?

Regards

B2CAP-V6
Posts: 14
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: DS18S20

Post by B2CAP-V6 »

Thanks for your reply.
I don't know if it works in Hardware, However, the DS runs under Proteus with an old program.

BenR
Matrix Staff
Posts: 2070
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 550 times
Been thanked: 735 times

Re: DS18S20

Post by BenR »

Hello,

In your program the DS18S20 component (the library to read the temperature from the sensor) isn't linked to the OneWire component (the library to perform one wire communications).

Select the DS18S20 on the panel and in the properties change the LinkTo to point to the OneWire component.

I'll maybe see if I can make this link automatic to avoid this problem.

B2CAP-V6
Posts: 14
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: DS18S20

Post by B2CAP-V6 »

Hello BenR
Thank you very much for your reply. Indeed, I hadn't connected the DS to the OneWire. It's done now, but it still doesn't work under Proteus. I don't even get a signal (on the oscilloscope) on the OneWire pin.

I'm wondering if there's an incompatibility between the DS and the PIC 18F26K22!
I asked Microchip, and they said no!
I'll have to redo the schematic with a 16F.
I'll keep you posted.
Best Regards
Luc

BenR
Matrix Staff
Posts: 2070
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 550 times
Been thanked: 735 times

Re: DS18S20

Post by BenR »

Hi Luc,

Investigating for you now the 18F device should be fine.

It looks like there may be a problem this end, bear with and I'll see what's causing it.

Are you using Flowcode v10 or v11?

Edit: Looks like it's broken in both and it's specific to the 18S20 sensor component as others are working correctly. Hmm. Ok should have a fix for you shortly....

BenR
Matrix Staff
Posts: 2070
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 550 times
Been thanked: 735 times

Re: DS18S20

Post by BenR »

Hopefully all sorted for you now in v10 and v11 via Help -> Library Updates and a project reload. Fingers crossed :D

The way to tell if it's fixed is by looking at the generated C code, specically search for this function.

DS18S20__Initialise

This is working.
DS_Working.jpg
DS_Working.jpg (65.01 KiB) Viewed 35 times

This is not working, note the use of the dummy in the function calls, basically the sensor is not correctly linking and calling the one wire library,
DS_NotWorking.jpg
DS_NotWorking.jpg (66.4 KiB) Viewed 35 times

Post Reply