MAX6965 I2C

Has anyone used a MAX6965 over I2C (only interface)? I'm having trouble getting mine to do anything. I can post code/etc if anyone is interested in looking at it but it's not an I2C issue, I'm likely missing something buried in the MAX6965 Datasheet: (next post :( )

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4099

CODE FOLLOWS:

#include <Wire.h>

#define LED_PIN 13
byte x = 0;
byte wmax6965 = 0x40; // write to device 40h (01000000 binary)
byte rmax6965 = 0x41; // read from device 41h (01000001 binary)

void setup()
{
Wire.begin(); // Start I2C Bus as Master
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
Serial.begin(9600); // start serial for output
}

void loop()
{
Wire.beginTransmission(9); // transmit to device #9
Wire.send(x); // sends x
Wire.endTransmission(); // stop transmitting
x = 2*x+1;
if (x > 3) x=0;
delay(450);

//Handle MAX6965
Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x01); //Set Blink Phase 0 Outputs
Wire.send(0xCC); //Write data
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x09); //Set Blink Phase 1 Outputs
Wire.send(0xCC); //Write data
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x0E); //Set Mater and O8 Intensity
Wire.send(0xCC); //Write data
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x0F); //Configuration byte
Wire.send(0x34); //Write data
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x10); //Set address to write data to
Wire.send(0xCC); //Write intensity data to 0x10
Wire.send(0xCC); //Write intensity data to 0x11
Wire.send(0xCC); //Write intensity data to 0x12
Wire.send(0xCC); //Write intensity data to 0x13
Wire.endTransmission(); //Actually send queued data

Serial.println(“Sent Data”);
delay(500);
}

My next attempt (since I can't get any LED's doing anything useful) will be to write and read from the RAM to figure out if the chip is doing anything at all.

First mistake, I tried to use 8bit addresses to indicate direction, I guess the Wire.h library takes care of that.

Got it all figured out, you have to shift the address of the device 1 bit right, so in my case leaving the AD0 address pin to ground the device was at:
01000000 (0x40)
which translates to:
00100000 (0x20)

Functional test code for this device (have another arduino monitoring i2c bus at address 9):

#include <Wire.h>

#define LED_PIN 13
byte x = 0;
byte wmax6965 = 0x20; // write to device 40h (01000000 binary)
byte rmax6965 = 0x21; // read from device 41h (01000001 binary)

void setup()
{
Wire.begin(); // Start I2C Bus as Master
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
Serial.begin(9600); // start serial for output

// Wire.beginTransmission(wmax6965); // open stream to write to max6965
// Wire.send(0x01); //Set Blink Phase 0 Outputs
// Wire.send(0xCC); //Write data
// Wire.endTransmission(); //Actually send queued data

// Wire.beginTransmission(wmax6965); // open stream to write to max6965
// Wire.send(0x09); //Set Blink Phase 1 Outputs
// Wire.send(0xCC); //Write data
// Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x0E); //Set Master and O8 Intensity
Wire.send(0x0F); //Write data
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x0F); //Configuration byte
Wire.send(0x30); //Write data
Wire.endTransmission(); //Actually send queued data
}

void loop()
{
Wire.beginTransmission(9); // transmit to device #9
Wire.send(x); // sends x
Wire.endTransmission(); // stop transmitting
x = 2*x+1;
if (x > 3) x=0;
delay(450);

//Change LED Status
Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x10); //Set address to write data to
Wire.send(0xC0); //Write intensity data to 0x10
Wire.send(0xCF); //Write intensity data to 0x11
Wire.send(0xC0); //Write intensity data to 0x12
Wire.send(0xCF); //Write intensity data to 0x13
Wire.endTransmission(); //Actually send queued data

Wire.beginTransmission(wmax6965); // open stream to write to max6965
Wire.send(0x0E); //Set Master and O8 Intensity
Wire.send(0xF0); //Write data
Wire.endTransmission(); //Actually send queued data

Serial.println(“Sent Data”);
delay(500);
}