I’m trying to communicate via I2C to this device AT24MAC402 to get a unique MAC address so it can be used on a product. From the documentation, it requires one device address for writing and one device address for reading. The way it operates is that you write the memory address you want on a device address (dummy write) and then read it on a different device address.
I’m creating 2 devices. One for writing and one for reading as specified. I’m able to write to the device, but when I try to read it, it generates a CLR_E_Timeout.
Any ideas are greatly appreciated.
I2cController i2CController = I2cController.FromName(SC20260.I2cBus.I2c3);
I2cDevice i2CDeviceWriter = i2CController.GetDevice(new I2cConnectionSettings(0xB0, 100000));
I2cDevice i2CDeviceReader = i2CController.GetDevice(new I2cConnectionSettings(0xB1, 100000));
//Write to the
byte[] bytesToWRite = new byte[2];
bytesToWRite[0] = 154;
i2CDeviceWriter.Write(bytesToWRite);
Thread.Sleep(5);
//Read it
byte[] bytesToGet = new byte[6];
i2CDeviceWriter.Read(bytesToGet);