Hi Piotr,
Here is an example code to read the WHO_AM_I register (0x0D) using I2C when SA0 = SA1 = 0.
//FXLS8471Q 7-bit I2C address
#define FXLS8471Q_I2C_ADDRESS 0x1E // SA0 pin = SA1 = 0 -> 7-bit I2C address is 0x1E
who_am_i = I2C_ReadRegister(FXLS8471Q_I2C_ADDRESS, 0x0D);
unsigned char I2C_ReadRegister(unsigned char u8SlaveAddress, unsigned char u8RegisterAddress)
{
unsigned char result;
I2C_Start();
I2C0_D = u8SlaveAddress << 1; /* Send I2C device address with W/R bit = 0 */
I2C_Wait();
I2C0_D = u8RegisterAddress; /* Send register address */
I2C_Wait();
I2C_RepeatedStart();
I2C0_D = (u8SlaveAddress << 1) | 0x01; /* Send I2C device address this time with W/R bit = 1 */
I2C_Wait();
I2C_EnterRxMode();
I2C_DisableAck();
result = I2C0_D;
I2C_Wait();
I2C_Stop();
result = I2C0_D;
Pause(50);
return result;
}
A copy from the data sheet:


I hope it helps.
Regards,
Tomas
PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.