Change: MY_RFM69_FREQUENCY to MY_RFM69_BAND



  • #define MY_RFM69_FREQUENCY RF69_915MHZ // this set frequency band, not the real operating frequency

    MY_RFM69_FREQUENCY is only setting the frequency band, not the real operating frequency, both should be available.

    Thanks


  • Mod

    From what I understand in the datasheet, RFM69HW uses frequency hopping within the selected band, so setting the exact frequency is not possible. @lafleur: How do you set the real operating frequency?



  • RFM69 radio are coherent, ie fixed frequency, but they can switch frequency quickly so you can make them hop.
    LoRa RFM98 series of radios are real spread spectrum radios.

    Default is 915,000.00 MHz (Freq Registers are loaded with 0xE4 0xC0 0x00)

    You can use code similar to the code below to set exact frequency :  
    
    void MYRFM69::setFrequency(uint32_t FRF)
    
    // The crystal oscillator frequency of the RF69 module
    #define MYRF69_FXOSC 32000000.0
    
    // The Frequency Synthesizer step = MYRF69_FXOSC / 2^^19
    #define MYRF69_FSTEP  (MYRF69_FXOSC / 524288)
    
    MYRF69::setFrequency(float centre)
    {
        // Frf = FRF / FSTEP
        uint32_t frf = (uint32_t)((centre * 1000000.0) / MYRF69_FSTEP);
        spiWrite(MYRF69_REG_07_FRFMSB, (frf >> 16) & 0xff);
        spiWrite(MYRF69_REG_08_FRFMID, (frf >> 8) & 0xff);
        spiWrite(MYRF69_REG_09_FRFLSB, frf & 0xff);
    }
    
    

    See data sheet on how to set a given frequency


  • Hardware Contributor

    The RFM69 library from lowpowerlab (which MS has cloned) has a setFrequency() method which is almost the same as the one @lafleur posted above. It should be available in MS via accessing the RFM69 object. My understanding was it was used for tuning the network to avoid interference or in freq hopping applications.



  • Yes, that's what it for, to allow you to change the frequency... If you have interference, other networks or other devices in the band.

    In the US, the 915 MHz ISM band is 902 to 928Mhz, the 433MHz band is 433.05 to 434.79 (not very big, unless you have a Ham License, then its 420 to 450MHz)


Log in to reply
 

Suggested Topics

  • 1
  • 10
  • 3
  • 6
  • 1
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts