AnsweredAssumed Answered

AD7124-4 convertion code to voltage question

Question asked by Di0f on May 30, 2018
Latest reply on May 31, 2018 by JellenieR

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!