I have problem with PCF8754 component. The PCF8754 is connected to stm32 MCU and PINS A2, A1, A0 are connected to GND. It means, that 7bit address is 0x20. I want read pin state(P0 to P7), and write state(P0, to P7). I use HAL library. Function for write:
HAL_I2C_Mem_Write(&hi2c1, 0x20, MemAddress, 1, &val, 1, 1);
Function for read:
HAL_I2C_Mem_Read(&hi2c1, 0x20, MemAddress, 1, &data, 6, 100);
I don't know
MemAddress(register) for read and write data from/to pcf8574.
Where to find it?