mrf49xa component

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

Moderator: Benj

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: mrf49xa component

Post by Benj »

Hello,

Here are my files for my little RS232 RF bridge boards I made using Flowcode 5.
v1.2.fcf
(26.41 KiB) Downloaded 421 times
I also had problems but in the end had very repeatable and reliable comms. Mainly down to getting the correct TX and RX settings.
I see you're using microsecond delays to calculate timeout. Aren't they become invalid or converted to ms if I use 8mhz chip speed (I see, you use 49mhz)?
The warnings your getting are simply saying the delay resolution you can have is 2us instead of 1us and there is an additional overhead of 4.5us when calling the delay function.

User avatar
mikn
Posts: 209
Joined: Mon Mar 03, 2014 10:11 pm
Has thanked: 54 times
Been thanked: 41 times
Contact:

Re: mrf49xa component

Post by mikn »

Hi there!

should I reinitialize the MRF49XA when I change sync pattern with SetSyncPattern macro? the problem is eve i change syncro with Setsyncpattern the receiver still gets all data from the transmitter.
FC 6.1.3.2 (18.02.2016)

User avatar
mikn
Posts: 209
Joined: Mon Mar 03, 2014 10:11 pm
Has thanked: 54 times
Been thanked: 41 times
Contact:

Re: mrf49xa component

Post by mikn »

hi again.
either i am dumb, or the macro does not change the sync byte
here's a start code of the project (receiver)
syncbybutton.gif
syncbybutton.gif (7.34 KiB) Viewed 3900 times
so the meaning is when i power on the device with button pressed it must change sync to 87 (default=85)
i try both choices and i still receive the data from the transmitter (test byte 0x01)

i also tried to change sync pattern during the run (after initialize) and it still the same: receiver gets all data from transmitter.
however if i change sync byte in component preferences, set transmitter to 85 and receiver to 87, then compile, flash and run - it works ok, data from transmitter ignored.

are there any trick to use this or are there any bug?
FC 6.1.3.2 (18.02.2016)

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: mrf49xa component

Post by Benj »

Hello,

I have been through the code with a fine tooth comb and the only potential issue I can spot is the SendBuffer macro was using the SyncPattern from the property rather then from the local variable. The local variable is initialised during the init routine to match the property. The receive seems to be correctly assigning the new value to the variable and to the RF IC.

Have a go with this and see if this makes any difference. Here I have fixed the SendBuffer so it uses the variable value rather than the fixed property value.
Attachments
RF_ISM.fcpx
(17.56 KiB) Downloaded 287 times

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: mrf49xa component

Post by Benj »

Aha,

There are also two variables being used!!! I have changed so in all cases we refer to only one variable. Fingers crossed this should solve it.
RF_ISM.fcpx
(17.55 KiB) Downloaded 279 times

User avatar
mikn
Posts: 209
Joined: Mon Mar 03, 2014 10:11 pm
Has thanked: 54 times
Been thanked: 41 times
Contact:

Re: mrf49xa component

Post by mikn »

updated the component and recompiled the receiver hex (transmitter still with old firmware and uses sync byte 85)

but receiver still receives all data even i do SetSyncPattern before Initialization (transmitter sync=85, receiver sync=87)
FC 6.1.3.2 (18.02.2016)

Post Reply