Arduino Duemilanove I2C MCP23016 connection...

'm trying to use arduino duemilanove to control a MCP23016 I2C expander without results. I want to put HIGH any of the GP0 ports.

I think I have problem addressing the MCP, but could be any thing.

I’m connecting 4 pin to sda, 5 to scl using 4…7k resistors.

One of my dubs is:

The datasheet says that the address of mcp23016 is 0100000, so to write i have to user 01000000 (0×40) and to read 01000001 (0×41), with the Wire library I should use 0100000 (0×20) to write?

My code:

#include <Wire.h>

#define MCP23016_I2C_WRITE 0×40
#define MCP23016_I2C_READ 0×41
#define MCP23016_I2C 0×20
#define GP0 0x00 //register
#define VALOR 0xff //all to high

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

void loop() {
//test();
delay(1000);
test2();
}

void test2(){
Serial.print(”Direccion:”);
Serial.print(MCP23016_I2C);
Serial.print(” Registro:”);
Serial.print(GP0);
Serial.print(” Valor:”);
Serial.println(VALOR);

Wire.beginTransmission(MCP23016_I2C);
Wire.send(GP0);
Wire.send(VALOR);
Wire.endTransmission();
}

Any suggestion is welcome.