Arduino + 16 bit DAC on I2C bus problems.

So, hello there fellow programmers! (sorry for the long post)

I've been using Arduino's for my projects about 1 year now..and the forums and information on the internet helped me a lot about any issue i had. But now I've hit a brick wall.

So here is the issue.

I'm making a project where i control with an arduino some digital to analog converters. I'm using an Arduino Uno  and since i have a lot other divices connected to it, I went for the I2C protocol tha uses just 2 pins for every slave device. 

So far i was using some MCP4725 chips and an ads1015 analog to digital to do my job. the documentation on the internet about those two, is more than enough so clearly i had no issues.

But the time came that i realized that these two ain't gonna cut it for my purposes. So i went to an ADS1115(16-bit) ADC and for the DAC part i used a MAX5215(14-bit).

No problem with the ADS1115 since is used the same library, but not the same for the MAX5215.
Before going any further i would like to mention that i had experience using the Wire library commands for custom I2C commands that were not in the MCP4725 library. 

e.g.  Wire.beginTransmission(0x66);
      Wire.write(0x42);
      Wire.write(0);
      Wire.write(0);
      Wire.endTransmission();

that was an MCP4725 power down command at the I2C address 0x66 (A3 version of the chip).

So, i've been using various I2C scanner Sketches to verify the addresses that i use, and so far i had no problem. SO i connect the MAX5215...and i see something i do NOT expect.

The from the datasheet i figured that the slave address should be 0x38 or 0x3A or 0x3E by the state of the address pin (HIGH,LOW,N.C.) , BUT the slave addresses that i get back from the I2C scanner , are, 0x1C or 0x1F or 0x1D   respectively . Trying to communicate at any of these addresses, doesnt have an effect. no response at all. 

It seems like the addresses it returns are like shifted right one bit. But i can't explain why or how this happens. These devices are pretty straightforward at operation. The receive 4 bytes of data. first the 7bit address followed by 1bit of w/r operation, then 1 byte of command data and then 2 bytes of programming data for the DAC registers.

I've baught 6 MAX5215 Ic's and they all behave the same way.

IS there any limitation from the Wire.Library? 

Sorry for the long post! i Hope someone can shed some light on this :)

found the problem...for some reason now the IC communicated and responded...maybe a glitch at my code before....:confused:

Moderators can delete this post freely !! :slight_smile: