Tool/software:
Hello, I am trying to read one byte of data from the EEPROM device AT24CM01.
I only have one question regarding the device address that I should use for writing vs reading.
e.g.
I use the dummy code below to write one byte:
#define I2cChannel_EEPROM_WR_ADDR (0u)
#define I2cChannel_EEPROM_WR_DATA (1u)
#define I2cChannel_EEPROM_RD_ADDR (2u)
#define I2cChannel_EEPROM_RD_DATA (3u)
#define I2cSequence_EEPROM_Write_MCU_I2C0 (0u)
#define I2cSequence_EEPROM_Read_MCU_I2C0 (1u)
I2c_SetupEBDynamic(I2cChannel_EEPROM_WR_DATA, 0x50, &Tx_Buffer_AT24CM01[0], NULL_PTR, 1u);
I2c_AsyncTransmit(I2cSequence_EEPROM_Write_MCU_I2C0);
And I use the dummy code below to read one byte from the same address
void function()
{
}
So, as the last bit of the device address shall 0 for writing and 1 for reading, my question is: should I use the adress 0x51 instead of 0x50 when calling I2c_SetupEBDynamic to indicate a read operation ?
or do you activate that bit internally before seding the address to the bus when a read operation is detected ?