Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. RFM69: Wireing DIO0

RFM69: Wireing DIO0

Scheduled Pinned Locked Moved Hardware
8 Posts 4 Posters 2.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elcaron
    wrote on last edited by
    #1

    Hi,

    I am currently laying out a first project with an RFM69. The manual suggests to connect DIO0 to D2, while for the NRF24L01, the additional "non SPI" port is connected to D9. Is there any reason to this? I would prefer keeping all the radio pins on port B, such that I have port A free for interrupts. Would this have any disadvantages except for the necessity to explicitly define the port in the sketch?

    What is the purpose of DIO0 anyway? If I set an interrupt on port D (PCINT2_vect) in a deep sleep setup, would I have to expect any issues with DIO0 on there, too?

    mfalkviddM 1 Reply Last reply
    0
    • E elcaron

      Hi,

      I am currently laying out a first project with an RFM69. The manual suggests to connect DIO0 to D2, while for the NRF24L01, the additional "non SPI" port is connected to D9. Is there any reason to this? I would prefer keeping all the radio pins on port B, such that I have port A free for interrupts. Would this have any disadvantages except for the necessity to explicitly define the port in the sketch?

      What is the purpose of DIO0 anyway? If I set an interrupt on port D (PCINT2_vect) in a deep sleep setup, would I have to expect any issues with DIO0 on there, too?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @elcaron I don't understand most of what you are writing, but the DIO0is used for irq and can be moved with the following defines:

      #define MY_RF69_IRQ_PIN D1
      #define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
      

      Hope this is useful. I got the defines from https://www.mysensors.org/build/connect_radio

      Which manual are you referring to?

      1 Reply Last reply
      0
      • E Offline
        E Offline
        elcaron
        wrote on last edited by
        #3

        Yes, I was referring to that page. If it is used as an interrupt, then moving it to another pin other than D2 or D3 on an ATMEGA328 is not a good idea, because only those can be used as interrupts (https://www.arduino.cc/en/Reference/attachInterrupt).

        In which situation is this used? Is it additional functionality that isn't available on the NRF24 (where IRQ isn't implemented, according to above mentioned page), or is it needed for normal operations?

        I am working on a keyfob that is supposed to wake up on key presses on PCINT2_vect, which is D0-D7. It is supposed to be deep sleeping the rest of the time.

        mfalkviddM 1 Reply Last reply
        0
        • E elcaron

          Yes, I was referring to that page. If it is used as an interrupt, then moving it to another pin other than D2 or D3 on an ATMEGA328 is not a good idea, because only those can be used as interrupts (https://www.arduino.cc/en/Reference/attachInterrupt).

          In which situation is this used? Is it additional functionality that isn't available on the NRF24 (where IRQ isn't implemented, according to above mentioned page), or is it needed for normal operations?

          I am working on a keyfob that is supposed to wake up on key presses on PCINT2_vect, which is D0-D7. It is supposed to be deep sleeping the rest of the time.

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by mfalkvidd
          #4

          @elcaron I think the rfm sends an interrupt when a packet has been sent. Without dio0 connected, the radio driver waits forever, at least in my (limited) experience.

          E 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @elcaron I think the rfm sends an interrupt when a packet has been sent. Without dio0 connected, the radio driver waits forever, at least in my (limited) experience.

            E Offline
            E Offline
            elcaron
            wrote on last edited by
            #5

            @mfalkvidd Thanks, that is what I feared. Then as far as I understand, it would be a really bad idea to move it away from D2, at least not to anything else than D3. But i guess when the ATMEGA is sleeping, the RFM69 will also be deep asleep, so there is nothing to expect from it to trigger PCINT2_vect. And D3-D7 on the same port is just enough for my 5-button keyfob, so I'll connect it to D2.

            1 Reply Last reply
            1
            • D Offline
              D Offline
              DavidZH
              wrote on last edited by DavidZH
              #6

              If I recall correctly, the RFM is capable of a "listen mode" where the power requirements are very low, and the MCU is in sleep mode. When a message arrives, the RFM can wake the MCU with an interrupt DIO0 to process it further.

              For now, the MySensors library does not support this listen mode yet, but I know it is in the works for a future release.

              mfalkviddM 1 Reply Last reply
              0
              • D DavidZH

                If I recall correctly, the RFM is capable of a "listen mode" where the power requirements are very low, and the MCU is in sleep mode. When a message arrives, the RFM can wake the MCU with an interrupt DIO0 to process it further.

                For now, the MySensors library does not support this listen mode yet, but I know it is in the works for a future release.

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #7

                To be clear (to anyone else reading this thread, @DavidZH probably knows this already), the "listen mode" actually switches the radio between receive (16mA power consumption, messages can be received) and idle (1.2uA power consumption, messages can not be received) with configurable intervals, without requiring the mcu to be awake. As DavidZH says, the radio module can then wake up the mcu when a message is received.

                Since the radio will be sleeping most of the time, any sender must re-send continuously for an interval that is longer than the receiving node's idle time.

                Some details, including battery time calculations:
                https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/rfm69-listen-mode-(discussioncode)/msg4612/

                1 Reply Last reply
                2
                • scalzS Offline
                  scalzS Offline
                  scalz
                  Hardware Contributor
                  wrote on last edited by scalz
                  #8

                  RFm69 irq is needed by the driver in RX mode, sure, but not only. It is used in different mode, TX send for example. So IRQ signal need to be wired.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  29

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.1k

                  Posts


                  Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • MySensors
                  • OpenHardware.io
                  • Categories
                  • Recent
                  • Tags
                  • Popular