Configuring MAX40080 sensor wrong values on I2C

Hi,
I am having good experience with I2C till now and have worked on creating sensor libraries as well but I am not able to correctly configure I2C for MAX40080 sensor.
The sensor datasheet essentially mentions two registers for Configuration(0x00) and other for FIFO_Configurations.(0x0A). Those are the only registers needs to be configured to read values for the current and Voltage.

But after trying several different values, I am not getting any data for Voltage and Current.
The exmple values are as given in the following. There is only 00h read from the data registers.

uint8_t  reading[] = {0x0D, 0x0F};
 maxd.writei2cbytes(Configuration, 2, reading);
 tmp[0] = 0x02; tmp[1] = 0x74;
  maxd.writei2cbytes(FIFO_Configuration, 2, tmp);

I have current 6 click board from microelectronica and I have gone through the example from them to see which values are used, but still there is not a success.

To me it seems that there is a problem in writing the bytes or I have wrong configurations(which is rare cause I have tried a few options).

Here is my write function used for this code.After writing some values as shown in previous post if I read the register I get the reset values. Which is ........!!

void Max40080::writei2cbytes(uint8_t reg, int count, uint8_t value[]){

  Wire.beginTransmission(address);
  Wire.write(reg);
  for(int i=0; i<count; i++){
    Wire.write(value[i]);
    }
  Wire.endTransmission(false);
  
  }

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.