The "address" is just another one or two data bytes (depending on the data type used) sent before the actual "data".So I'm curious to know what is going on with that optional "Address" parameter.
Does the I2CWrite function ignore it when it is zero?
Typically it's used for eeproms where you need to send an address parameter, or a register number.
The PCF8574 only has a single 8-bit register and doesn't require anything but the data. If you send multiple bytes to the device it'll
set the output port multiple times. For example, if you sent $00, $55 it would set all the outputs low before setting the port to $55.
So, setting the "address" to 0 will do the same thing.
I can't explain the read. It's certainly not being sent by the PCF since it's a slave device.




Bookmarks