Thursday 16 July 2015

microcontroller - What value to use to convert ADC value to voltage?


While working on my project, I got to a point where I don't know the answer. I have a 10-bit ADC (the one incorporated in the ATMEGA328P) and it returns values up to 1023 (210 - 1).


The official documentation states that the equation to convert the values from the ADC to the corresponding voltage is:


$$ V = \frac{V_{in} \cdot ADC}{2^{10}} $$



But, if the values go up to 1023, then wouldn't it be better to replace the 210 by 210 - 1?


Thanks.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...