my doubt is we giving input voltage 5 volt to adc and it converts it to digital range from 0 to 1023 for 10 bit resolution , how i convert to original value (before step down value) to display in lcd ..
To display the voltage as 0 to 500 (0 to 5v) you can try this;
Rich (BB code):
unsigned int volts;
unsigned long math;
math = adc_value; // 0-1023 range
math = (((math * 500)+512) / 1024); // convert 0-1023 to 0-500 with +/- rounding
volts = math;
display_with_dp(volts); // display 500 as "5.00"