LowPowerLab Forum

Hardware support => RF - Range - Antennas - RFM69 library => Topic started by: Camerart on October 31, 2016, 05:50:59 AM

Title: Using RFM69 module XTAL clock to run MCU
Post by: Camerart on October 31, 2016, 05:50:59 AM
Hi,
Does anyone know if it is possible to use the XTL on an RFM69, to run a PIC please?

If not, then how do the two chips work in sync, when using two XTLS, that most likely aren't exactly the same.

Camerart.
Title: Re: Using RFM69 module XTAL clock to run MCU
Post by: Felix on October 31, 2016, 08:43:31 AM
Doable, you'll need to set the RegDioMapping2 register in RFM69 to direct the XTAL (divisable by powers of 2) to one of the DIO pins, default is OFF 1mhz. See page 69 of the DS (http://www.semtech.com/images/datasheet/sx1231h.pdf).
Title: Re: Using RFM69 module XTAL clock to run MCU
Post by: perky on October 31, 2016, 09:01:34 AM
Possibly some misconception from the OP that the PIC has to run in some kind of synchronization with the RFM69 crystal. This is not the case, the two clocks can be completely different. The SPI interface itself is self clocking, and the SPI data is synchronized inside the RFM69 to it's own clock where necessary.
Mark.
BTW Felix, just to be clear the power-up default itself is not OFF. Note the asterisk for RegDioMapping2, this denotes a difference from the power-up state and is the recommended default setting, see page 61 which shows the power-up state is actually 0x05 for RegDioMapping2 giving 1MHz on power up. Your library turns it off.
Mark.
Title: Re: Using RFM69 module XTAL clock to run MCU
Post by: Felix on October 31, 2016, 04:32:49 PM
@perky,
You're right, I ignored the asterisk, good vigilance :)
It makes sense to have a default clock on power up to initialize the MCU to a workable state.
Title: Re: Using RFM69 module XTAL clock to run MCU
Post by: Camerart on April 09, 2017, 04:30:32 PM
Hi,
Sorry for the delay in replying :-[ I didn't receive a notification.  I've now clicked 'notify'

A lot has happened since I posted my first message!  I am now using SX1278 modules.  I can see that if needed, the CLK on the SX module could time the PIC.  I've since found out that this isn't needed (as you commented), but I'll re-check when I get to aD102/DATA or D101/DCLK stage later.

Thanks, c.