Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Now, to get the digital equivalent from the analog voltage you do the following math:
Vref = 255 (for 8 bits ADC; 4095 for 12 bits and so on)
Vanalog = x
x = Vanalog(255) / Vref
So you put in your dip switch the bynary number "x". Keep in mind that ADC rounds numbers, if you got 128.5 or more it wil be 129 on the ADC output; in the other hand if you got 128.4 or less it will be 128 on the ADC output.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.