1
\$\begingroup\$

I know that mathematically the k-V analog input on an A to D converter could be converted to the digital code of \$\dfrac{k(2^n-1)}{VDD}\$. But I really don't understand where it comes from and the logic behind it. Any help would be appreciated.

\$\endgroup\$
14
  • \$\begingroup\$ The values of a n-bit number range from 0 to 2**n-1. \$\endgroup\$ – Ignacio Vazquez-Abrams Sep 30 '15 at 11:54
  • \$\begingroup\$ yes but how we get to that formula in the question? \$\endgroup\$ – Jack Sep 30 '15 at 11:56
  • \$\begingroup\$ The minimum value is represented by 0V and the maximum value is represented by Vdd. The rest is just linear interpolation. \$\endgroup\$ – Ignacio Vazquez-Abrams Sep 30 '15 at 11:57
  • 2
    \$\begingroup\$ I think my problem was that I didn't realize that the value of the 1024 level is 1023 because it is all ones. I think I get it now. Let me know if I am right. \$\endgroup\$ – Jack Sep 30 '15 at 12:55
  • 2
    \$\begingroup\$ You are correct. \$\endgroup\$ – Alexxx Sep 30 '15 at 13:40
1
\$\begingroup\$

My problem was that I didn't realize that the value of the 1024 level is 1023 because it is all ones.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.