The 25C265 as mentioned in the title is a SPI EEPROM. That won't ever work with the I2C command.
If, on the other hand, it's the 24C256 then the state of the A0-A2 pins will have an effect on the address. Anyway, looking at the 24C256 datasheet:
In Byte Write mode the Master sends a START, followed
by Slave address,
two byte address and data to be written
(Figure 6).
And then your code:
Code:
I2CWrite sda, scl, 160, x, [x]
You're using the x-variable as the address (and data) but have it defined as a byte.
With that said, I have not ever used I2C so I'm certainly no expert.
Bookmarks