I am having problems with this ADC. Here is the datasheet:

I connected it in Single-Ended Input, so I have 15-bits from 0v (0x0000) to 2.048v (0x7FFF).

According to the page 8 of the datasheet, the output code is (max code + 1)*((Vin+ - Vin-)/2.048)

So if I measure 0.994v (Vin+ - Vin-) I should get 15904 (decimal), but I get 7957 instead. This rule of the "half part" is always true.

Any idea of what I am doing wrong?

Thank you.

• What microcontroller are you reading it with? Maybe there's a code problem. If it's always half what you expect, perhaps you're simply not reading the final bit so everything is shifted left one place (i.e. divided by two). The datasheet says the MSB is a sign bit, which is an additional bit. Commented Feb 17, 2015 at 13:05
• I feel stupid now. The data is read over i2c so the first byte you get are the most 8 significant bits, and then the 8 less significant ones. I was reading it with this: int ADC = (buff[0]<<7) + buff[1];. Obviously its "(buff[0]<<8)". Sorry for the dumb question, and thank you! Commented Feb 17, 2015 at 13:34
• No worries, it's not a dumb question. You should write your own answer and accept it ! :) Commented Feb 17, 2015 at 13:52
• @zapeitor Well, the only reason I suggested it was because I've done the same thing myself. Dumb and dumber .... ;-) Commented Feb 17, 2015 at 14:07

ADC = (buff[0]<<7) + buff[1]

ADC = (buff[0]<<8) + buff[1]