i2c functions using repeated start

arulchozhan:
hi sir finally i got output. thanks to guidence in my first code is correct ather then the address byte
in this code the slave address for mcp4725=0xc0;
in ltc2631-hz12 address is =0x10;
in ltc ic is onely byte transmission that meen the following format:
1.slave address (disk1 )
2.dac configure bit(the mention eadaddress )
3. data byte

I do not believe the MCP4725's address is 0xc0. I2C devices use 7bit address. The maximum value of a 7bit number is 0x7F.

Execute the following code, it will display a list of all device that respond on the I2C network.

Lets start from there.

post the results.

void scan(){
Serial.println(" Scanning I2C Addresses");
//Serial.print("   ");
uint8_t cnt=0;
for(uint8_t i=0;i<128;i++){
  Wire.beginTransmission(i);
  uint8_t ec=Wire.endTransmission(true);
  if(ec==0){
    if(i<16)Serial.print('0');
    Serial.print(i,HEX);
    cnt++;
  }
  else Serial.print("..");
  Serial.print(' ');
  if ((i&0x0f)==0x0f)Serial.println();
  }
Serial.print("Scan Completed, ");
Serial.print(cnt);
Serial.println(" I2C Devices found.");
}

Chuck.


Check out my Kickstarter Project Memory Panes an expansion RAM Shield for Mega2560's. It adds 1MB of RAM for those projects where 8KB is not enough.