Hi all,
I have acquired data from ADC and want to write it to LCD. When I write ADC10MEM data into LCD it writes 1022 corresponding to 5V. Here, I want to write it as 5V on LCD, so I need to divide it by 1022 and multiply by 5. However there are two problems.
1. It does not give exact solution at 3V or 2V, it just shows "0" on LCD. Is it because the numbers are rounded to "0" when divided by 1022?
2. I want to show up to 2 decimals as "2.34V". How could I prevent rounding and write as "x.xx V"?
Thanks in advance.