I am using atmega328p for my project. I have to read my battery voltage and display it in my cloud. For that, i am using ADC. Now I am getting the ADC value for input voltage applied. But i need to convert the ADC to voltage.
So to convert ADC,
But When i searched the google I found another equation and it is
Now I doubt that which equation is to use?
If we use 1024, ADC value will be 0001 when the input voltage is equal to 1LSB voltage(
If we use 1023(second equation), ADC value will be 0000 when the input voltage is equal to 1LSB voltage (