rfm12 with avr

RFM12 Wireless module discussion.

rfm12 with avr

Postby ktec1 » Tue Jul 22, 2008 10:18 am

hi
as i've study the datasheet of rfm12 it will recieve cammand in 16bits spi
for example we should send number(8022), i'm working with avr and bascom it's really easy to send and recieve bytes
from spi bus
but for sending data we are able to send only bytes,for example for sending a byte i should write
spiout 20,1 (send 20 to spi bus one time)
my problem is that can i send two 8bit spi to send command to rfm12
spiout 80,1
spiout 22,1
instead of sending 16 bits spi
thanks
ktec1
 
Posts: 1
Joined: Mon Jul 21, 2008 7:23 pm

Re: rfm12 with avr

Postby seaton » Tue Aug 05, 2008 2:58 pm

ktec1 wrote:hi
as i've study the datasheet of rfm12 it will recieve cammand in 16bits spi
for example we should send number(8022), i'm working with avr and bascom it's really easy to send and recieve bytes
from spi bus
but for sending data we are able to send only bytes,for example for sending a byte i should write
spiout 20,1 (send 20 to spi bus one time)
my problem is that can i send two 8bit spi to send command to rfm12
spiout 80,1
spiout 22,1
instead of sending 16 bits spi
thanks


Yes you should be able to send out 2 bytes, but when doing this via a PIC and hardware SPI, I found that the RFM12 did not like pauses in-between sending the two bytes, in the end I ended up bit bashing the SPI and all worked ok, I've not gone back to the the hardware spi to troubleshoot further.

So if you can minimise the delay then it should be fine.
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