data format problem with I2C using Wire.h library

I use <Wire.h> library to communicate with my I2C device and use the I2C protocol analyzer to observe data format.
PS: My I2C slave device address is 0x50, I want to write data (0x09) to EEPROM address (0xE0) and then read it for check.
But I use the I2C protocol analyzer to observe data format, I found a strange thing.
The 00 data always be send before the slave device address.
Anyone who can tell me why?
Thank you!

#include <Wire.h>
#define chip1 0x50


unsigned int pointer;
byte d=0;



void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Wire.begin();
  
}



void wireData(int device, unsigned int address, byte data)
{
 Wire.beginTransmission(device);
 Wire.write((byte) (address >> 8));
  Wire.write((byte) (address & 0xFF));
  Wire.write(data);
  Wire.endTransmission();
  delay(10);
}
byte readData(int device, unsigned int address)
{
byte result;
 Wire.beginTransmission(device);
 Wire.write((byte) (address >> 8));
 Wire.write((byte) (address & 0xFF));
 Wire.endTransmission();
 Wire.requestFrom(device,1);
 result = Wire.read();
 return result;


}



void loop(){
 wireData(chip1,0xE0,9);

 d=readData(chip1,0xe0);
 Serial.println(d,DEC);
delay(1000);
  
}

T_I2C.ino (787 Bytes)

You are sending three bytes of data, but you seem to expect to receive only two. I can not fathom why you expect one byte to disappear en route.

I use the I2C protocol analyzer

I don't know what that is or how it is supposed to work, but it clearly is not picking up the device address (0x50) being sent in the Wire.beginTransmission() statement. You might need a logic analyser to see that.

Your eeprom is large enough to require an integer register address, and in your case you are storing the data(0x09) in address 0x00E0

Your "analyser" is only showing the three bytes (two address and one data) sent with the Wire.write() for the writing of the data. When you send the address to prepare for the read, it reports the two bytes 00 E0