RFM12B
RFM12B copied to clipboard
lowVoltageThreshold doesn't seem to be used
Hi,
thank you for your work!
In RFM12B::Initialize(), I don't see where the optional parameter lowVoltageThreshold is actually used. Maybe I'm missing something?
If I understand the datasheet correctly, I think the line
XFER(0xC043); // Clock output (1.66MHz), Low Voltage threshold (2.55V)
should be
XFER(0xC040 | lowVoltageThreshold); // Clock output (1.66MHz), Low Voltage threshold
? And the defines RF12_2v25 etc. are 4 bits, so according to the formula Vlb = 2.25 + V · 0.1 [V] they could be these:
//Low battery threshold (eg 2v25 = 2.25V)
#define RF12_2v25 0
#define RF12_2v35 1
#define RF12_2v45 2
#define RF12_2v55 3
#define RF12_2v65 4
#define RF12_2v75 5
#define RF12_2v85 6
#define RF12_2v95 7
#define RF12_3v05 8
#define RF12_3v15 9
#define RF12_3v25 10
#define RF12_3v35 11
#define RF12_3v45 12
#define RF12_3v55 13
#define RF12_3v65 14
#define RF12_3v75 15
Regards... Michael