Hi All,
I would like to write to an ADS1292 register and read what is written. The read back byte, however, is not what I write. Executing the following lines, I get 0xD9 instead of the written byte.
The writeRgister function takes in register address, byte to be sent and an integer (number of bytes to be sent). The initiate SPI function following the main code shows the master clock frequency and spi clock polarity and phase I am using. I will appreciate your feedback.
Thanks,
Hamid
writeRegister(config2Address,0xA0, 1); // config2Address = 0x02, config2content = 0xA0
delay(5);
regContent = readRegister(config2Address,1);
void initiateSPI(){
SPI.beginTransaction(SPISettings(fclk, MSBFIRST, SPI_MODE1)); // fcls = 512k , SPI_MODE1: CPOL = 0, CPHA = 1
SPI.begin();
//SPI.setClockDivider(SPI_CLOCK_DIV16);
}