Electronics > Microcontrollers
i2c: PCF8575 read write problem
(1/1)
chiart_nor:
Hi,
I'm connecting the PCF8575 with the P89C51RD2 microcontroller. I've managed to communicate with the PCF8575 chip using the i2c lines. However, i'm facing a problem with the read and write function with this chip.
Meaning that, I have no problem in reading the data, also no problem in sending the data, but I'm having problem to read back the data I've already sent.
Once the data sent to the PCF8575, the value that i read back will be different from what ive sent.
Is it possible to do read back the data that we've already sent using this chip?
Any help highly appreciated.
Thanks.
Kjelt:
I haven't looked at this ic before but scanning the datasheet in a minute it looks like this chip does NOT have any registers or commands for reading back the written data. You can only use it to write data to the ports or read data from the ports (if you made them logic 1 on forehand). So no you can not read back data you earlier sent.
uwezi:
--- Quote from: Kjelt on March 03, 2014, 09:31:01 am ---So no you can not read back data you earlier sent.
--- End quote ---
That is correct! Reading from the chip automatically reconfigures the pins as input, rather than reading back the values you set for output.
Navigation
[0] Message Index
Go to full version