RFM70 - how to write code for the RFM70

Hi forum,

The RFM70 (and the newer RFM73) from HopeRF is a cheap and powerful 2.4GHz transceiver that I use in some of my projects.
Unfortunately the documentation from HopeRF is not the best, many things are missing in the datasheet and some things I have found to be actually misinforming.
The sample code from HopeRF is kinda OK but even the code is not consistent with the info in the datasheet.

Godfather helped me with some things I was struggling with and suggested me to post my trial-and-error findings here for others to use.

I myself use Microchip PIC devices and the CCS compiler.

Here are the first notes, more will be added later.

NOTES
- Only change mode between RX and TX (set/clear the PRIM_RX bit) while CE is low.
- In TX mode, set CE high AFTER the payload has been loaded in the TX FIFO.

HOWTO
Transmit a package (no auto acknowledge):
1. CE must be low.
2. Clear the PRIM_RX bit to enable TX mode.
3. Put payload in TX FIFO.
4. Set CE high.
5. Wait for IRQ.
6. Clear the TX_DS bit.
7. Set CE low.

Replies

  • Harshad Italiya
    Harshad Italiya
    Great work buddy. 😀 This may be useful for those who are starting with RFM70.
  • vishal131291
    vishal131291
    I m not able to receive the data. Please help me to sort this problem.
  • Harshad Italiya
    Harshad Italiya
    vishal131291
    I m not able to receive the data. Please help me to sort this problem.
    Sure #-Link-Snipped-#,
    Will you please share some information about your hardware please and also some more detail about what exact issue you have in reception?
  • vishal131291
    vishal131291
    I m using atmega2560 for tx and i m getting tx status flag set.
    And on rx site i m using atmega32 but i m not getting CD i.e carrier detect flag.
  • vishal131291
    vishal131291
    i m sending my code.Please go through it.
  • Harshad Italiya
    Harshad Italiya
    vishal131291
    I m using atmega2560 for tx and i m getting tx status flag set.
    And on rx site i m using atmega32 but i m not getting CD i.e carrier detect flag.
    I would like know few things before I go by code in detail. Are you able to read and write RFM70 register in Atmega32?
  • vishal131291
    vishal131291
    Yes .because now I m getting CD bit set but while reading payload, feedback from device is 0x00.
    If possible pleas check my code and suggest any changes I need to do in my code
  • vishal131291
    vishal131291
    This is my tx code.
  • vishal131291
    vishal131291
    If possible please send register configuration for rx side

You are reading an archived discussion.

Related Posts

Many plants and animals camouflage themselves either for defence or occasionally for offence. Octopusses (Should I say octopi) do this with amazing celerity. Researchers have built this gimmick into soft...
sir, i am going for ppt. Please suggest me some mechanical topics with different content. And also please tell me how to start myself in ppt at first,,because this is...
So, let's not envy the Kansas folks because Google's laying the 1Gbps fiber cables there. India too is expected to get its own very high speed internet in 2013. Check...
what is difference betw'n flash memory & EEPROM ...mostly specified in atmega series microcontroller like atmega 16.
create a class medicine.provide a function displaylabel() in this class to print name and address of the company. Derive tablet,syrup and oinment classes from the medicine class.Override the display label()...