rfm12 newbie

RFM12 Wireless module discussion.

rfm12 newbie

Postby mobbarley » Thu Jan 22, 2009 5:47 am

Hi Stephen / all.

I purchased some 915mhz rfm12b's a while ago and have finally found an application for them. while spi etc is nothing new to me reading the programming instructions for this module makes my head hurt. I would like to use the 4 wire configuration that you describe here:
http://blog.everythingrobotics.com/2008 ... hroughput/
does this mean that on the transmitter I set nSEL low, send spi data then raise nSEL, and on the reciever: wait for SDO to go high, set nSEL low, read spi data, raise nSEL?

Are you able to advise me on what configuration bits I need to set to use this configuration? I have no baud requirements, slow is perfectly fine.

John.
mobbarley
 
Posts: 3
Joined: Wed Apr 09, 2008 12:25 pm

Re: rfm12 newbie

Postby seaton » Tue Jan 27, 2009 1:14 am

G'day John,

Yes you have the right idea about sending and receiving, you can also poll the receiver and check for the FFIT bit in the status command, this is the first bit clocked out so you don't have to clock in the whole status bit, just nSEL low, MOSI high, toggle clock, read MISO, if high then fifo interrupt has been triggered, if low then nSELl high and do again

To send a command out to the these modules, you need to do the following:

Assumes that SPI interface has been initialised and that nSEL is High

to send command:

nSEL low
send SPI command
as the spi command is being clocked out of the MPU via MOSI, the result is being clocked in via MISO.
When last bit has been sent raise the nSEL

A good start for configuration for the 915Mhz at 9600 can be found in the sample code for the PIC that I posted on the forum, however here is the abridged version

Also a few samples posted by other users on the forum,m just make sure you check the config and enable for 915MHZ band.

Let me know how you go.

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

Re: rfm12 newbie

Postby mobbarley » Tue Feb 03, 2009 2:19 pm

thanks! I will try it again soon.
mobbarley
 
Posts: 3
Joined: Wed Apr 09, 2008 12:25 pm


Return to RFM12

Who is online

Users browsing this forum: No registered users and 1 guest

cron