I am using ADP1046a for high power SMPS.
It is using i2c as communication for programming its EEPROM and Registers.
I want to read the registers but always getting 0xFF as data. Here are my codes.
for (int cntr = 0; cntr <= 0x80 ; cntr++) {
Wire.beginTransmission(0x50);
Wire.write(byte(cntr));
Wire.endTransmission();
Wire.requestFrom(0x50, 1);
Serial.print(cntr, HEX);
Serial.print(" ");
while (Wire.available()) { // slave may send less than requested
char c = Wire.read(); // receive a byte as character
Serial.println(c, HEX); // print the character
}
delay(500);
}
the slave's output is like shown below:
0 FF
1 FF
2 FF
3 FF
4 FF
5 FF