Author Topic: i2c: PCF8575 read write problem  (Read 2197 times)

0 Members and 1 Guest are viewing this topic.

Offline chiart_norTopic starter

  • Newbie
  • Posts: 3
i2c: PCF8575 read write problem
« on: March 03, 2014, 09:04:07 am »
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.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: i2c: PCF8575 read write problem
« Reply #1 on: March 03, 2014, 09:31:01 am »
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.
 

Offline uwezi

  • Supporter
  • ****
  • Posts: 272
  • Country: se
    • GreenPhotons
Re: i2c: PCF8575 read write problem
« Reply #2 on: March 03, 2014, 10:37:31 am »
So no you can not read back data you earlier sent.

That is correct! Reading from the chip automatically reconfigures the pins as input, rather than reading back the values you set for output.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf