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: 14676
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4660 times
Been thanked: 4285 times
Contact:

Re: mrf49xa component

Postby Benj » Wed Feb 18, 2015 7:11 pm

Hello,

Here are my files for my little RS232 RF bridge boards I made using Flowcode 5.

v1.2.fcf
(26.41 KiB) Downloaded 263 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.
These users thanked the author Benj for the post:
mikn (Wed Feb 18, 2015 7:42 pm)
Rating: 5%
 

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

Postby mikn » Wed Oct 21, 2015 5:56 pm

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

Postby mikn » Tue Oct 27, 2015 4:50 pm

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 1863 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: 14676
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4660 times
Been thanked: 4285 times
Contact:

Re: mrf49xa component

Postby Benj » Tue Oct 27, 2015 5:53 pm

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 133 times
These users thanked the author Benj for the post:
STibor (Tue Oct 27, 2015 6:02 pm)
Rating: 5%
 

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

Re: mrf49xa component

Postby Benj » Tue Oct 27, 2015 6:06 pm

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 141 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

Postby mikn » Tue Oct 27, 2015 9:17 pm

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)