Page 1 of 1

1 wire component has problems

Posted: Mon Sep 24, 2018 4:46 pm
by JFinlayson
I am writing some code for simple switch program, 1 wire input is from serial radio, part one for receiver. there will also be another part for transmitter.

here is error code generated.

AlarmSwitch1.c: FCD_0bbd1_One_Wire1__Get_Next_ID()
692: break;
^ (345) unreachable code (warning)
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_IO.c: 209: non-reentrant function "_FC_CAL_Port_In_DDR__x" appears in multiple call graphs and has been duplicated by the compiler
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_String.c: 908: non-reentrant function "_FCI_SCOPY" appears in multiple call graphs and has been duplicated by the compiler
AlarmSwitch1.c: 131: (1250) could not find space (64 bytes) for variable _FCV_0bbd1_One_Wire1__DEV_ID
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1

I have attached programme for your advise

Regards

Re: 1 wire component has problems

Posted: Wed Sep 26, 2018 8:58 am
by JFinlayson
I also get same error with transmit byte on 1 wire coms, is there something wrong with code?

Re: 1 wire component has problems

Posted: Wed Sep 26, 2018 9:32 am
by LeighM
It looks like there is not enough RAM on the target device to support the 1-wire component, which is requesting a 64 byte array.
Maybe something can be done in the component to reduce this. Ben wrote this, so best if we wait for him to take a look

Re: 1 wire component has problems

Posted: Wed Sep 26, 2018 10:11 am
by Benj
Hello,

I've added a new property to the component called Max Devices. If you change this from 8 to a lower value e.g. 4 then it should reduce the amount of RAM required to drive the component.

Simply copy the attached file into your "Flowcode 7/Components" folder and restart Flowcode to load the changes.
One_Wire.fcpx
(13.04 KiB) Downloaded 255 times

Re: 1 wire component has problems

Posted: Wed Sep 26, 2018 10:32 pm
by JFinlayson
Thanks for your help. :D

Re: 1 wire component has problems

Posted: Fri Sep 28, 2018 8:14 am
by JFinlayson
This control works but speed is a little fast for radio, radio max speed is 200 baud, maybe a baud rate control added would extend this controls usefulness, for devices that don't have built in com component.

Regards