Hello everyone!

I have a problem with converting code to voltage on bipolar channel with gain = 1 and Vref = 2.5. Using formula from p.47 of datasheet I get:

Code = 0x7FFFFF x ((Ain x 1/2.5) + 1)

which is mean

Ain = (Code/0x7FFFFF - 1) x 2.5

So, I've got a problem when Code comes lesser than 0x7FFFFF — voltage become negative which is obviously not true (right?). For example Code = decimal 10 — positive number but I'm getting negative voltage value.

Can someone calm me down — is this formula behave just like it have to or I'm missing something important?

Best regards!

Hi,

I'm confused with the question but as the datasheet stated, When the ADC is configured for bipolar operation, the output code is offset binary with a negative full-scale voltage resulting in a code of 000 … 000, a zero differential input voltage resulting in a code of 100 … 000, and a positive full-scale input voltage resulting in a code of 111 … 111. So if you have a 2.5V Vref, the ADC can accept a differential input voltage of +/-2.5V, so code 0 to 100...000 is expected to have a voltage value of -2.5V to 0 V.

Thanks,

Jellenie