The RFM12B is on its way out in favor of the RFM69. So, seems like a good idea to make an RFM69 receive this data too.
First: the RFM69 has to be wired up with DIO2, via a 100 ohm resistor, to A0. Fortunately that's all the hardware mod that you have to do to the RFM69 (unlike the RFM12B, which needed that cap replaced).
Second: time to code up the differences between the 12B and the 69.
Initialization sequence:
rfm69_write(RegOpMode, RegOpModeStandby);
rfm69_write(RegDataModul, RegDataModulContinuous | RegDataModulOOK); // Set continuous OOK mode
RegBitrateSet(8000); // 8.0kb/s
RegFrfSet(433920000); // fundamental frequency = 433.92MHz (really 433.920044 MHz)
rfm69_write(RegRxBw, RegRxBwDccFreq4 | RegRxBwOOK50k); // 4% DC cancellation; 50k bandwidth in OOK mode
rfm69_write(RegLna, RegLnaZ200 | RegLnaGainSelect12db); // 200 ohm, -12db
rfm69_write(RegOokPeak,
RegOokThreshPeak | RegOokThreshPeakStep0d5 | RegOokThreshPeakDec1c );
rfm69_write(RegOpMode, RegOpModeRX);
rfm69_write(RegAfcFei, RegAfcFeiAfcClear);
Ignoring the specific differences between the RFM12B and the RFM69, there are still a few differences between the two initializations. The RFM12B code I used sets the datarate to 2.4Mb/s; this, to just 8Kb/s. The RFM12 code is also setting the frequency farther away from 433.92 MHz, which this is spot-on -- something that's also more obvious by the smaller bandwidth in this code (50khz instead of 270khz).
So perhaps it's time to go back and tune the RFM12's initialization, given what I now know. Or maybe not, since I'm not likely to use them again...
Regardless, the code's pushed to github in a branch named 'rfm69'.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.