i2c

Hi All
Got a problem with the Wire.h lib. Using a pcf8574p and got the address pins set low eg B0100000 But the code doesn't seem to write to it correctly. Using a Duemilanove 328. Using pins analog 4 and 5 Still no joy. Oscilloscope says SDA SCL are firing out data. The LED just stays on. Here is the code..
#include <Wire.h>

#define expander B0100000 // Address with three address pins grounded.
// Note that the R/W bit is not part of this address.

void setup() {
Wire.begin();
Serial.begin(9600);
}

void loop() {
Serial.println("Writing B00000000.");
expanderWrite(B00000000);
Serial.print("Read: ");
Serial.println(expanderRead(), BIN);
delay(1000);
Serial.println("Writing B11111111.");
expanderWrite(B11111111);
Serial.print("Read: ");
Serial.println(expanderRead(), BIN);
delay(1000);
}

void expanderWrite(byte _data ) {
Wire.beginTransmission(expander);
Wire.send(_data);

Wire.endTransmission();
}

byte expanderRead() {
byte _data;
Wire.requestFrom(expander, 1);
if(Wire.available()) {
_data = Wire.receive();
}
return _data;
}

Can anyone please help

Thanks in advance

Bob

SORRY Ignore post. Reclaimed IC's duff one. Should've checked :frowning:

Regards
Bob