CrazyEngineers
  • RFM70 - how to write code for the RFM70

    Futterama

    Member

    Updated: Oct 26, 2024
    Views: 1.3K
    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.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Harshad Italiya

    MemberOct 20, 2012

    Great work buddy. 😀 This may be useful for those who are starting with RFM70.
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 3, 2014

    I m not able to receive the data. Please help me to sort this problem.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 3, 2014

    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?
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 3, 2014

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 3, 2014

    i m sending my code.Please go through it.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 4, 2014

    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?
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 4, 2014

    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
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 5, 2014

    This is my tx code.
    Are you sure? This action cannot be undone.
    Cancel
  • vishal131291

    MemberOct 6, 2014

    If possible please send register configuration for rx side
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register