Page 1 of 1

Using two EB063 RF Modules in one programm

Posted: Wed Oct 26, 2011 6:03 pm
by AndreasR
For a special situation i need to use two RF modules in one Flowcode programm.
But i´m not able to insert two modules.
An Error occurs:
You can only insert one RF Module
Is there any chance to work with more than one module and how i have to implement this?
Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Wed Oct 26, 2011 6:25 pm
by JohnCrow
Hi

As for using 2 RF blocks on one programmer, it does'nt look like its possible, just tried it myself in flowcode, and I get the message only 1 board can be added.

I would imagine its because there are only one set of the data lines on a pic (i.e SDO & SDI etc), that the board uses.
I'm sure Benj will have a more in depth answer.

Not sure is it would be possible to use 2 pics and link them using I2C or something along thoses lines.

Re: Using two EB063 RF Modules in one programm

Posted: Thu Oct 27, 2011 12:32 pm
by AndreasR
Hi John,
on one side you are right, there is only one pair of SPI data lines.
But i´m not using hardware SPI.
The "Hardware coding" i use is the same as shown in the Documents of the EB063:

For Example Port A:
SCK on BIT3
SDI on Bit 4
SDO on Bit 5
CS on Bit 0
FSEL on Bit Bit 1

So i don´t understand why it is not possible to do the same procedure with another module for instance on Port B.

If i can do this, it may be possible to build a kind of frequeny transcoder, trancoding from 868MHZ to 433MHZ or other projects which use more than one module.

@ Benj from Matrix:
May i have a chance to implement this, because other modules can be inserted more than one time?

Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Thu Oct 27, 2011 12:34 pm
by Benj
Hello,

There is a way to enable the component so you can add multiples however I think there could be some problems with the definitions clashing between the two components.

You can test this by opening the Component C file from the Components directory and changing the following line.

MultipleAllowed=0

to

MultipleAllowed=1

As I say the definitions will probably cause all kinds of compilation errors.

This has already been tackled for Flowcode v5 where every component define has a unique reference which in theory should allow you to add multiples of each and every component.

One workaround for the defines errors would be to do a search and replace on all of the defines in the C file and append the definition name with a value that will change eg the chip select pin.

for example

MX_RF_SPI_HW

would become

%g_MX_RF_SPI_HW

Hope this helps.

Re: Using two EB063 RF Modules in one programm

Posted: Thu Oct 27, 2011 12:39 pm
by AndreasR
Alright Ben,
i will try it on weekend and post the results of my experiences.

Re: Using two EB063 RF Modules in one programm

Posted: Thu Nov 03, 2011 8:26 am
by AndreasR
Ok,
the change of MultipleAllowed is the right way to input more than one Module but...
One workaround for the defines errors would be to do a search and replace on all of the defines in the C file and append the definition name with a value that will change eg the chip select pin.

for example

MX_RF_SPI_HW

would become

%g_MX_RF_SPI_HW
is not the only thing that i have to do.
All Macro Calls like RF(0) Send_Byte can´t be used beause i have no chance to tell what module i will use.
I will think over how to do this. :(
Every Idea will be welcome.
Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Thu Nov 03, 2011 10:57 am
by Benj
Hello Andreas,

Don't worry about the function calls Flowcode will sort these out for you without having to do anything. The only thing you have to worry about is the definition names. I need to give this code a tickle today so I will see if I can help with this too.

Re: Using two EB063 RF Modules in one programm

Posted: Thu Nov 03, 2011 11:18 am
by Benj
Hello,

Here is a C file which should fix the bug for the hardware SPI and allow multiple devices to be connected to a single system.

Let me know how you get on.

Re: Using two EB063 RF Modules in one programm

Posted: Thu Nov 03, 2011 11:34 am
by Benj
Sorry, Reintroduced a bug doing this. Here is the updated file with the bug removed.

Re: Using two EB063 RF Modules in one programm

Posted: Mon Nov 21, 2011 1:38 pm
by AndreasR
Hi Ben,
sorry for my late answer.
I´m fighting against great problems in constructing a special pcb board using pics, RF-Solutions Modules like Matrix uses on the EB063 MAX 3002 Level Shifter and other silicone.
So please be patient, i will test it and post the results.
Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Mon Nov 21, 2011 6:17 pm
by Benj
For SPI you can do away with the level shifter and use potential dividers on the microcontroller outputs and then allow the inputs to connect directly.

See this diagram for an example.
Image

Or you could use the E-block...

Re: Using two EB063 RF Modules in one programm

Posted: Tue Nov 22, 2011 7:55 pm
by AndreasR
Cool idea :idea:
I will test it tomorrow.
MAX3002 is very hard to handle in a single sided board. But if you have eyes like an eagle and a good smd solder iron it works.
This is a part of the problems i got with the TRX Modules from RF.
TRX use 3.3V
The separated Modules TX and RX use 5V. No one knows why.
My first idea was to use one TX and one RX to get a complete 5V environment.
Next idea was to implement parts of the E-Block in detail the TRX and the levelshifter.
The use of a complete Block is not possible because i have only a very smal case to put the whole system in.
When everything works i will post you the schematic and tell what i have done.
Again thanks for the great idea, sometimes i think i´m a bit stupid. :roll:
Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Wed Dec 07, 2011 9:50 am
by AndreasR
Dear Ben
thx for your great idea. It works without any problems. :D
The attached schematic shows a receiversystem which comunicates with sender units.
The sender units have a pic 16F88 aTRX module from RF Solutions like you use on the RF Boards and 4 buttons.
Everytime a button is pressed, the receiver shows a text message on the LCD and switches on one of the LEDS for about 2 minutes. The buzzer beeps for 10 seconds.
Hope it helps anyone other.
Andreas

Re: Using two EB063 RF Modules in one programm

Posted: Thu Dec 08, 2011 12:25 pm
by Benj
Hi Andreas,

That's great glad its working for you and thanks for sharing your project :D