MCP4725 Programming through I2C

Having problems loading the D/A MCP4725.
I have A0 grounded, assuming the address is 96 Decimal.
First byte sent= 96D
Second=32D
Thhird= 0D
Fourth=50D.
When I look at the SDA line, I am only seeing the first byte.
See attached code.

MCP4725.ino (671 Bytes)

Code did not attach, please see following;

//MCP4725; 6-11-14
#include <Wire.h>

int mc4725_address=(96); //1100xx0=96D, 60hex
int command(32); //0100000=32D, 20hex
int data1(0x04);
int data2(0x00);

void setup()
{
Wire.begin();
//function_i2c();
}

void loop()
{
function_i2c();
delay (100);
}

//----------------------------------------
void function_i2c() //Get only 1 byte of data
{
Wire.beginTransmission(mc4725_address); //Send Atmel Chip Address
Wire.write(command);
Wire.write(data1);
Wire.write(data2);
Wire.endTransmission(); //Send Tx Data

}

Hi lsnook

Try this:

byte mc4725_address = 0x60;
byte command = 0x20;    
byte data1 = 0x04;
byte data2 = 0x00;

Does this change what you see on the bus?

Also, please modify your post to put code tags around the code (use the "#" button above the smileys). It makes the code much easier to read.

Regards

Ray

Also, you can use this to check what address the MCP4715 is responding to:

http://playground.arduino.cc/Main/I2cScanner