help regarding rfm12b

RFM12 Wireless module discussion.

help regarding rfm12b

Postby antonbarua » Sat Mar 08, 2008 6:47 pm

hi guys
i am a newbie in this forum.i know the main purpose of the forum is for strobbist project,but i need help regarding the rfm12b.
my project is wireless data communication between pcs.i have purchased rfm12b modules and i have connected them to the parrallel port.then i have written code for the spi interface as written in the demo code provided by HOPE(rf12b_code.pdf).
the problem is,there is no indication that any bytes have been transmitted.i run the receiver in another pc and wait for the nIRQ pin to go low,as the receiver buffer fills up,but it never goes low.is there any way of finding out that the bytes i am writing are actually being sent?there is no indication that the tx register is being filled up and the data being transmitted,or the receiver is receiving data.please help me.(btw,i am using vc++ 6 for coding).
antonbarua
 
Posts: 1
Joined: Sun Feb 24, 2008 5:46 pm

Re: help regarding rfm12b

Postby seaton » Wed Mar 26, 2008 6:19 am

Hi anton,

I think you've contacted me via email, but for everyone elses sake.

I've had the same problem with the nIRQ signal, it doesn't seem to work, but I haven't delved too far into it and I would really like a logic analyzer to see what everything is doing at the same time, and it's a bit hard to see it all on a 2 channel CRO

However what I do is check the first bit returned of the status command (0x0000). In my code I drop CS and output a low bit to SPI and then check the returned bit (which in RX mode is the FIFO interrupt status) then I finish the command by raising the CS, the result is a 1 then I read the fifo to get my received character, if not I just keep doding this until I receive a characer. This way I don't have to read in the entire 16 bits of the status command result.

The only problem with this approach is its polled not interrupt driven.

Hope it helps,

Stephen...
seaton
Site Admin
 
Posts: 134
Joined: Mon Jan 23, 2006 8:48 am
Location: Bunbury, Western Australia

Re: help regarding rfm12b

Postby ayesha » Wed Jun 04, 2008 4:55 am

I want to transmit data from one PC to another over an RF link. I am using Mega32 and RFM12BP module. I have take help from the site
zenburn.net/~goroux/rfm12b/rfm12b_and_avr-%20quick_start.pdf

but my modules are not working. This PDF has connected MISO >> SDI and MOSI >> SDO. but i have done the reverse connection becoz i think that the reverse connections are correct. ARE they? ........The red led of transmitter turns on but it never gets off.Reciver's led also gest on but i recive nothing on the hyperterminal of mt PC :? .may be the antenna i am using is not right. datasheet says a 50 ohm antenna. i have taken antenna of a walky talky of range 460MHz and 50 ohm. but no use. I have spent months on this module but no use . can any one help me out with this matter.I am really tired :( :(
ayesha
 
Posts: 3
Joined: Thu May 29, 2008 6:42 am

Re: help regarding rfm12b

Postby seaton » Tue Jun 17, 2008 2:14 am

ayesha wrote:I want to transmit data from one PC to another over an RF link. I am using Mega32 and RFM12BP module. I have take help from the site
zenburn.net/~goroux/rfm12b/rfm12b_and_avr-%20quick_start.pdf

but my modules are not working. This PDF has connected MISO >> SDI and MOSI >> SDO. but i have done the reverse connection becoz i think that the reverse connections are correct. ARE they? ........The red led of transmitter turns on but it never gets off.Reciver's led also gest on but i recive nothing on the hyperterminal of mt PC :? .may be the antenna i am using is not right. datasheet says a 50 ohm antenna. i have taken antenna of a walky talky of range 460MHz and 50 ohm. but no use. I have spent months on this module but no use . can any one help me out with this matter.I am really tired :( :(


I can certainly appreciated what you are going through :) there is not much documentation out there and it can be frustrating as the HopeRF examples just don't work.

You need to make sure your SPI routines are talking to the module, can you confirm that this is working correctly? without a logic analyser or a scope it can be a pain to troubleshoot, what I did to make sure my SPI routines were working by switching the modules CLK pin from default 1MHZ to 10MHZ and measured this with a Scope or frequency counter, once I got that working then I knew my SPI was all working then I concentrated on the Rx and Tx side of things.

MISO should be connected to SDO and MOSI should be connected to SDI and the nSEL needs to be tied High and pulled low to enable the module. One trap I came across is to make sure that you are sending the SPI commands as an uninterrupted 16bit command, when I tried using the hardware SPI on the PIC it sent out x2 8bit commands and for some reason a very small pause in between the two bytes caused the module to ignore the command, so until I resolve that I am just bit banging my SPI, you may need to do the same. Unfortunately I don't have much experience with the ATMEL atm so I don't really know the the registers etc to use.

Also make sure nRES is tied high.

What voltage source are you using? make sure it's within specs.

The antenna can be just a length of wire, but make sure it is connected to the ANT and not GND, also make sure all GNDs are tied to GND. The lengths of wire for the antennas I have mentioned earlier.

You may be better to use the RFM12B module and get things working then move to the RFM12BP, this way it cuts out the complexity of using the extra voltage source for the PA, and anything associated with the PA side of things.
seaton
Site Admin
 
Posts: 134
Joined: Mon Jan 23, 2006 8:48 am
Location: Bunbury, Western Australia


Return to RFM12

Who is online

Users browsing this forum: No registered users and 1 guest

cron