1 wire component has problems

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

Moderator: Benj

Post Reply
JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

1 wire component has problems

Post 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
Attachments
AlarmSwitch1.fcfx
(18.96 KiB) Downloaded 223 times
The older the boy the bigger the toy

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: 1 wire component has problems

Post by JFinlayson »

I also get same error with transmit byte on 1 wire coms, is there something wrong with code?
The older the boy the bigger the toy

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 1 wire component has problems

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 1 wire component has problems

Post 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 232 times

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: 1 wire component has problems

Post by JFinlayson »

Thanks for your help. :D
The older the boy the bigger the toy

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: 1 wire component has problems

Post 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
The older the boy the bigger the toy

Post Reply