Help communication I2C PCF

Hello,

I’m using an Arduino Pro Mini to communicate with a PCF 8574AP.
But I can not communicate.
some can help me?

Code:

#include <Wire.h>
#define PCF 0x70
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
void loop()
{
Wire.beginTransmission(0x70); // transmit to device #4
Wire.write(B10101010); // sends five bytes
Wire.endTransmission(); // stop transmitting

}

thanks,

I'm using an Arduino Pro Mini to communicate with a PCF 8574AP.

That "link" doesn't seem to work. Try again.

  Wire.beginTransmission(0x70); // transmit to device #4

No, it doesn't.

  Wire.write(B10101010);  // sends five bytes

No, it doesn't.

But I can not communicate.

How do you know you can't?

You're using the 8 bit address (0x70) and should be using the 7 bit address of the I2C device (0x38) instead. Bit 0 of the slave address determines direction of data flow (read or write) and is automatically inserted by the Wire library.

Ok, thanks, I think the problem is solved.

I am being a bit thick here , but presumably by bitshifting one to the right :-

byte saa1064 = 0x70 >> 1; // define the I2C bus address for our SAA1064 add pin grounded

will be bitshifted one to the left again by the Arduinos read/right bit, and lefthand 0 will drop away.

The program is written for address 0x70 (Arduino address 0x38).

so the chip will still see 0x70 as its address, and simply using 0x38 as an address would confuse things as its not the address associated with the device ?