LowPowerLab / RFM69

RFM69 library for RFM69W, RFM69HW, RFM69CW, RFM69HCW (semtech SX1231, SX1231H)
GNU General Public License v3.0
778 stars 381 forks source link

Replicating these in RFM63W modules #180

Closed apurv1305 closed 2 years ago

apurv1305 commented 2 years ago

I was trying to replicate these same operations with RFM63 module (changes already made in accordance with the Datasheet), but unable to read all the registers correctly. From what I have observed, certain registers work perfectly as they should (read-write operations), but some registers are not consistent with the values when read in a loop. Some registers are infact un-writable unless you have a 0 at address 0. Tested it with a Logical Analyzer and everything seems to be fine and perfect with respect to Datasheet. To eliminate possibility of damaged hardware tested this with two different RF63 modules Completely unable to find any information except the datasheet on the web in context of RFM63. Wanted help to identify what the problem might be. Any Help would be hugely appreciated. Thanks

CODE: `#include

define nssDataPin 10

define nssConfigPin 9

int delayMicro = 20; uint8_t address = 0x02; uint8_t value = 0x03;

void setup() { Serial.begin(9600);

pinMode(nssConfigPin, OUTPUT); pinMode(nssDataPin, OUTPUT);

SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV4); SPI.setDataMode(SPI_MODE0); SPI.setBitOrder(MSBFIRST);

digitalWrite(nssConfigPin, HIGH); digitalWrite(nssDataPin, HIGH);

writeRegister(address, value); delay(1); }

void loop() { // put your main code here, to run repeatedly: uint8_t vals = 0;

vals = readRegister(address); Serial.println(vals); delay(1); }

void writeRegister(uint8_t address, uint8_t value){ digitalWrite(nssConfigPin, LOW); delayMicroseconds(delayMicro);

uint8_t addr = address << 1; SPI.transfer(addr | 0x00); SPI.transfer(value);

delayMicroseconds(delayMicro); digitalWrite(nssConfigPin, HIGH); delayMicroseconds(delayMicro); }

uint8_t readRegister(uint8_t address){ uint8_t valReg =0; digitalWrite(nssConfigPin, LOW); delayMicroseconds(delayMicro);

uint8_t addr = address << 1; SPI.transfer(addr | 0x40); valReg = SPI.transfer(0);

DelayMicroseconds (delayMicro); digitalWrite(nssConfigPin, HIGH); delayMicroseconds(delayMicro); return valReg;

}`

OUTPUT: g

LOGIC ANALYZER OUTPUT while Writing Register write

LOGIC ANALYZER OUPUT while reading the Register h

LowPowerLab commented 2 years ago

Sorry but this library is for RFM69.

apurv1305 commented 2 years ago

could you give some advice in this regard, of any sort?

LowPowerLab commented 2 years ago

The datasheet is probably the best place to consult when creating a library.