Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

About RFM01 and RFM02...

Status
Not open for further replies.

frengk1

New Member
hello,,,
any body can help me how to programe RFM01 and RFM02 using ATEMEGA8535,, I am confused use this RF..

please help me..
Thanks before..
 
These can be hard to set up, but work well when you do. I haven't used them yet (I have some), but I have used the RFM12B transciever which is harder to set up.

Start by setting up the things.

Commands are 16 bits long and they work over an SPI interface. Connect the SPI, write the command code as the first byte to your hardware spi shift register, then write the second bit. Make sure you slave select before you send it or it will ignore you forever.

It is often the case that an address is only a few bits of the first byte.

For instance, (not looking at a datasheet here, just pulling out of my head), the FREQDEVIATION (just giving a random name here for example) register may be addressed by bits 15 through 10 and the actual configuration is given in bits 9 through 0.

The address may be 101100 and the command for 120Khz frequency deviation might be 1110101010.

So, you store this in byte one:
10110111
and this in byte two:
0101010

You then slave select, move byte one into your hardware spi shift register, check the "spi shift complete flag" for completion, and then move byte two into the shift reg without any slave deselection.

Repeat this over and over until you've configured the module completely and then start sending and receiving data.

I will add that I had success in using the full sync word instead of the sync byte. Not sure if the 01 and 02 can use a full sync word, but it they can use that.
 
I don't use AVRs and don't know BASCOM, but I know another version of basic so go ahead and post your code and I'll see what I can do to help.
 
Status
Not open for further replies.

Latest threads

Back
Top