Page 1 of 1

DS18B20 x2 Ports x2 One Wire x2

Posted: Fri Feb 03, 2023 4:40 pm
by darrynenig22
Hi,

Please can you help with the connecting x 2 DS18B20 to separate ports pins, Only one is working and showing the tempeature value in hardware and the other is static at 85
I have tested both with separate V10 code on the port A.0 and C.0 and both probes work fine in hardware.
Not sure if the problem is the reference for x2 DS18B20 and x2 One wire at the same time.


Thanks Darryn

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Fri Feb 03, 2023 6:47 pm
by mnfisher
One thing to check - you initialise the ds18b20 sensors and then the one-wire component. Since the sensor initialisation uses the one-wire component this should be the other way around.

Martin

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Mon Feb 06, 2023 8:49 am
by darrynenig22
Hi
Have swapped the one wire component and then the DS18B20 initialisation order but the second instance of the DS18B20v2 showing 85 in hardware.
If I remove 1 set so only single DS18B20 on the port C.0 or A.1 both work individually.
Another observation the new 2d panel does not show the link between the two components where the legacy 3d has the connection shown.

Any thing else that I can try.
Thanks Darryn

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Tue Feb 07, 2023 9:16 am
by BenR
Hello,

I've looked into this for you and I can see why there is a problem. It's a bug I've not seen before so I'll try and chase it through and work out why it's happening. Basically one of the DS18B20 components is calling the internal macros of the other DS18B20 which is very bizarre.

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Wed Feb 08, 2023 10:43 am
by BenR
Hello,

Many thanks for letting us know of the problem.

Hopefully should be fixed for you now via an update using the Help -> Library updates menu.

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Wed Feb 08, 2023 4:59 pm
by darrynenig22
Thanks Ben,

That worked for the two probes connected so continued with three and also working just fine. All three stable and converting to temperature on the LCD
But the 4 x probes test has an issue with the port pin C.7 and no temperature showing on the hardware test.
The port C.7 is working with v5 for single connection and multiple x4 connections but not with v10, Any thoughts for this.
Thanks Darryn

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Thu Feb 09, 2023 11:58 am
by BenR
Hello,

I guess the problem now is to do with pin C7 and not the fact you've got 4 sensors. Looking at the code generated it all seems to be correct now anyway which is good.

So far I've not spotted anything that would cause C7 not to work, it might be worth checking you can use C7 as a simple digital output (LED) and input (switch) without any problems. It might also be worth double checking connections to make sure there isn't an open or a short on the fourth sensor.

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Fri Feb 10, 2023 9:01 am
by darrynenig22
Hi Ben,
Specifically C.7 is the problem with v10, hardware always works with perfect results with v5 flowcode. C.7 tested with probes and working as digital and v.


Any combination and ordering of the v10 code will always have the C.7 port not converting, Can you check the defines for the PIC18F66K22

tested
Thanks Darryn

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Tue Feb 21, 2023 8:48 am
by darrynenig22
Hi Ben,
Can you take a look at the one wire component and coms to find out why port C.7 fails to return the temperature,
The hardware works with 1 wire code from flowcode v5 on C.7 port and not working with v10

Thanks Darryn

Re: DS18B20 x2 Ports x2 One Wire x2

Posted: Fri Dec 01, 2023 11:52 am
by celebriums
Yes dear Medelec;
Dt=976ms There's a 25 ms difference compared to the oscilloscope.