RF component not working

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

RF component not working

Post by electronix »

Hi everybody.

Could someone please have a look into this.
What i´m trying to do is establish a comunication between to RF modules(Alpha tranceivers from RF Solutions), but with no sucess what so ever :-(

TX:
Chip: 16F886
20MHz

868MHz
FSEL B0
CS B1
SDO B2
SDI B3
SCK B4

RX:
Chip: 18F4550
20MHz

868MHz
FSEL B0
CS B1
SDO B2
SDI B3
SCK B4

I have tried to just toggle the FSEL pin and I can measure a change on the pin(TX board) but the receiver does not respond anyway.
Any suggestions??

Regards
/Stefan

/Edit

Done some more testing, changed the pins on both TX and RX MCUs
FSEL B1
CS B0
SDO B5
SDI B4
SCK B3

But still no comunication in between the tranceivers.
Tried to send a byte instead, toggle 100 and 0. but no response.
Checked all RF settings again, changed the sync pattern and adjusted the receiver bandwith, still doesn´t work..

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Here´s the flowcode files in case someone cares to have a look.

Thanks in advance
/Stefan
Attachments
RX.fcf
(9 KiB) Downloaded 326 times
TX.fcf
(6 KiB) Downloaded 316 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: RF component not working

Post by JohnCrow »

Hi
I assume you are using the RF modules themselves rather than the full e-blocks.

Also I dont have the PIC you are using, but Ive attached a couple of test programs that work on my hardware using the EB-063 eblocks
Hope these might help you setting them up. I'm using the PIC 16F877A.
EB063-Keypad Rx.fcf
(7.5 KiB) Downloaded 346 times
EB063-Keypad Tx.fcf
(9 KiB) Downloaded 311 times
1 in 10 people understand binary, the other one doesn't !

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi John.

Thanks a lot for trying to help me, but it still doesn´t work, alos I had to reconfigure because I dont have the right chips at home.
So I tried using 16F886 instead.

But thank you.

Regards
/Stefan

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: RF component not working

Post by JohnCrow »

One thing I have just noticed on your flowchart at the start where you try to read retval for the initialisation.

Have a look at Seans comments (Aug 17) on this topic.
http://www.matrixmultimedia.com/mmforum ... 063#p26738
1 in 10 people understand binary, the other one doesn't !

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Yes I see, so there should be more info in the retval then just: module OK, or module not OK.
So then I just need to figure out how to hook upp the LCDs, both boards are running at 3.3VDC unfortunately.
But as I mentioned, I really appriciate your help :-)


Best Regard
/Stefan

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

I have read the post written by Sean, but the problem is that I get retval: -1
Any clues??

Regards
/Stefan

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: RF component not working

Post by Benj »

Hello Stephan,

If you look at the datasheet for our EB005 E-block then this should help you to connect up a LCD. The displays should run fine at 3.3V as long as you have a pot to set the contrast.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Ben.

Yes I have connected the LCDs succesfully.
Now I get the returnvalue: -1 from both trancievers.

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

I will hope it helps.
First strike is that you don´t care about the results of the init macro.
Do the following:
Init RF
wait 100ms
and go on with your program.

Next strike is:
Done some more testing, changed the pins on both TX and RX MCUs
FSEL B1
CS B0
SDO B5
SDI B4
SCK B3
This is the definition in Flowcode.
Physically you have to crosswire SDI and SDO when you don´t use the E-Blocks and the Programmer.
Connect SDI to B4 and SDO to B3 and it will work.

Last strike:
Be sure that you use identical external properties on both sides.
Use the extended sync pattern because this will help eliminate noise.
Andreas
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Andreas.

I will definently try out your suggestions. Unfortunately the TX and RX looks like this:

TX:
16F886@20MHz
VDD: 3.3VDC
RF: AlphaTRX 868

RF Port:
FSEL B1
CS B2
SDO B0
SDI B7
SCK B3

RX:
18F4550@24MHz using PLL 96MHZ/4(20MHZcrystal)
VDD: 5VDC
Level translator 5<->3.3VDC for the comms.
RF: Alpha TRX 868

RF port:
FSEL D4
CS D2
SDO D3
SDI D0
SCK D1
This is the definition in Flowcode.
Physically you have to crosswire SDI and SDO when you don´t use the E-Blocks and the Programmer.
Connect SDI to B4 and SDO to B3 and it will work.
But... what is crosswired? SDI<->SDO OR SDO<->SCK??
These are really great ideas though and well worth trying, because i´m almost ready to give these damn modules up... phew..
So any kind of help are REALLY appriciated :-)
By the way, are you using pullups on the logic lines?

Thanx Andreas :-)

Best Regards

/Stefan

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

Hi Stefen,
ok i will declare what i mean with crosswiring.
If you don´t use the EBlocks and the programmer, i fingered out that you have to cross sdi and sdo.
For example :
You have defined in Flowcode SDO to B0 and SDI to B7.
Than you have to physically connect them "crossed" .
Physical line SDI to B0
Physical line SDO to B7
All other lines leave as you have done it.

To declare this is very simple but i need a longer time like you to cut the gordian node.
SDI -> Serial Data IN
SDO -> Serial Data OUT

On one Chip you have to connect the IN Wire to the OUT wire of the next Chip.
I´m not quite sure if the "crosswiring" phenomeneon is a bug in Flowcode. So at the beginning i thought like you that the definition in Flowcode is the instruction to wire the chips.

Potentially the guys from Matrix can give us a hint.

To your question about the Pull ups.
No i don´t use them. I directly connected the pins.
Here´s another hint.
Take a look at the EBlocks section of the forum. Here i have a discussion with Ben from Matrix about the RF EBlock.
Good luck
Andreas
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Andreas.

So I have tried physically swapping SDI and SDO on both TX and RX but still no luck, the RX doesn´t even receive noise!
I have also tried out several different settings for both TX and RX...but no result what so ever.
Feels like it´s time to give up, beacuse I out of ideas.

Any further ideas?

Thanks a lot for helping me out Andreas.

/Stefan

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

Don´t give up Stefan
last evening i damaged my chair because nothing works like i planed. But i don´t give up :evil:
Take a look at the attached schematic and the flowcode. Both together works. I had built 10 of them.
The usage is in a calling environment to call one of 4 persons.
The receiver is not quite ready (see the damaged chair) bur i will post it to you if it is ready to produce.
Use the schematic and the definitions in Flowcode to test you system
We have the whole day to do our work and later i will be sure the receiver will do what i want.
Andreas
Attachments
16F88-TRX-Abt-1.fcf
Flowcode for the transceiver
(13.21 KiB) Downloaded 220 times
Transceiver.pdf
Schematic
(16.36 KiB) Downloaded 263 times
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Andreas.

No I actually don´t give up that easy, but I have been working with this project for about 2weeks now and it´s becoming ever so frustrating.

I tried your settings for the TX and RX except for the wirings since it´s very hard to change the PCBs.

But as I wrote before I crosswired the SDI and SDO on both modules.

Both modules seem to initialize as far as I can tell, but then all I get from the the RX is just 00. even though I try transmitting different bytes.

By the way, how did you confirm that your TX module works??

I sincerely hope that we can sort this one out :-)

Best Regards

/Stefan

By the way here´s the .fcf files that i´m currently using.
Attachments
USB_RF_18F4550.fcf
RX
(12.5 KiB) Downloaded 204 times
RF_16F886.fcf
TX
(12.5 KiB) Downloaded 199 times

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

Now i fighting against an LCD 16x2 Caractermodule but this another never ending story :cry:
Testing the Modules i constructed based on the schematic is very simple.
I use the Multiprogrammer.
See the attached Flowcode and have a look to the implemeted EBlocks.
They work :)

By the way, what kind of modules do you use?
The TRX module from RF?
I sold them from RS
Be carefull when you try to use the separated TX and RX Modules. They have a different Pinout and a different Supplyvoltage.
I tested some separated TX and RX Modules and tey work too.
One time some modules that i sold had a differnt Board Revision ( seen on the back of the small PCB) and they are blown up.
The layout was different so supply pins are not identical to the datasheet.
Actual Revision is RFM02S REV4.0, but this is only important if you handle with separated RX / TX Modules.
hope too we can sort it
Andreas
Attachments
16F877_Empfangstest.fcf
Testsystem for the sender units
(18.5 KiB) Downloaded 200 times
often i ask myself:
why i´m not a gardener ?
=:-)

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

I think i have found your problems.
Init the modules first in your programm.
You had a mistake in the "External Properties" of the RF Modules.
All Properties have to be identical otherwise it will not work.
You had differences in Bandwidth and frequency deviation.
In the first USB_RF_18F4550 file you sent a 0 to complete port D. This is the port of your RF.
No good idea. I don´t know what happens if you send a 0 to the RF
:!:

For those i use a two monitor system and so i can start two sessions of Flowcode and compare directly the two programms.
The Atachments will show you the correct way.
Go on, i will hope it works :D
Andreas
Attachments
USB_RF_18F4550_Andreas.fcf
recreated code
(13 KiB) Downloaded 198 times
RF_16F886_Andreas.fcf
recreatd code
(13 KiB) Downloaded 213 times
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Andreas.

I bought these modules from RF Solutions on a recomendation from Benj.
RFM12BSP Rev: 1.0
And it is a TRX module.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Sorry that I have to say it didn´t work any way...

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

ok the TRX Modules Revisions may be ok and i had never found bad ones.
Are you sure everything is ok with your pcb layout?
Be carefull because the TRX modules use 3,3V and not 5V.
Have you done a look on my schematic?
Try to write a simple Testroutine like:
Sender:
Send one pulse every second in a never ending loop
See attached file

I had done such tests on a breadboard with separate EBlocks before i made a PCB.
Is it possible that your hardware (PCB or other) is quite bad?
Can it be true that you damaged the TRX Modules because you used 5V?
Let me know a bit more about the hardware environment like Multiprogrammer PCBs and other.
Andreas
Attachments
16F88-Sending-second-pulses.fcf
(9 KiB) Downloaded 220 times
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Hi Andreas.
Yes i´m pretty much certain about the PCBs, I have checked the layout a very large number of times now :) .

The TX is powered@3.3VDC by a linear voltage regulator.
The RX Uses a linear 5,5->3,3VDC voltage regulator for the RF modul, all logic lines pass trough a level translator(ADG33).
Actually the only component that is new to me is the ADG33..hmmmm...

Programmer:
MPLAB
ICD2

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

Alright,
first you should have a look a the EBlock section of the forum and the discussion between me and Ben from Matrix. Search for EB063.
He gave me a cool tip to circumnavigate the level shifters.
Only some resistors are necessary.
I work with MAX3002 like used on the original EB063RF Board. Hard to solder but it works.
Next you should test the Multiprogrammerboard if possible. I had some trouble with the mplab and the icd2.
For production i use a selfmade programmer based on the clasical tait basics.
If you are a german look at http://www.sprut.de.
I think the problems you have yet are based on the environment and not on the chips. I had a lot of trouble with not quite correct config sections of the pics i used.
The Datasheet of the ADG3300 look like the MAX3002, so here it seems ok.
If you don´t need 5V on the boards, why you don´cut of the levelshifter and go directly from RF module to Pic?
Most Pics work fine with 3.3V. See my Sender schematic. This will eliminate one source of trouble.
Talk to you tomorrow because my stomach says "Hello World". :wink:
Bye
Andreas
often i ask myself:
why i´m not a gardener ?
=:-)

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times
Contact:

Re: RF component not working

Post by electronix »

Guten morgen Andreas :)

After lots and lots of tweakning, soldering, desoldering and changes of config settings... It finally works! :D :D

Turned out to be a comination of several things:

Crystal speed for example, because of the USB port I was using the PLL 96MHz and a 20MHz crystal, then 96MhzPLL/4=24MHz CPU speed right?
Well it wasnt... more like 16MHz it turned out.

SDO and SDI that was definently a major error.

And one last thing, I used the divider resistor ladder instead of the translator IC altough I think i´ll give it one more try now that everything else seem to work .

For all your help in this matter, I owe you BIGTIME Andreas :D Thanks alot.

Best Regards

/Stefan

User avatar
AndreasR
Posts: 44
Joined: Tue Aug 02, 2011 9:27 am
Location: Germany
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: RF component not working

Post by AndreasR »

Guten Morgen Stefen :D
Hey Ho it works :mrgreen:
Bis dann
Andreas
often i ask myself:
why i´m not a gardener ?
=:-)

Post Reply