Electronic – Problems writing with I2C to registers in Allegro ACS71020

i2c

I am wanting to change some of the configuration parameters contained in registers in the Allegro Microsystems ACS71020. I am using an I2C version of the IC. Here is the datasheet: https://www.allegromicro.com/-/media/Files/Datasheets/ACS71020-Datasheet.ashx . In particular, I would like to set a specific I2C address for the chip and disable the default analog voltage input selection approach to choosing the I2C address so I can use those pins for other purposes. The datasheet suggests that I should be able to permanently make such a change by updating register 0x0F/0x1F.

I am able to read data from registers but I have been unable to write to any register including register 0x0F. The wire.endTransmission() call terminates successfully but on reading back the register, nothing has changed. I am clearly missing something. There are ECC codes for these registers. Is that something I have to set?

I can post a sample program if someone has the patience to look at it.

Update: Problem solved. See comments to Umar's answer below.

Thanks for the help.

Best Answer

The ACS71020 supports factory and customer EEPROM space as well as volatile registers. The customer access code must be sent prior to writing these customer EEPROM spaces. In addition, the device includes a set of free space EEPROM registers that are accessible with or without writing the access code.

Th datasheet quotes about access code. Check whether the location you are using is in need of it or not.