Hi team,
I am using RM57L843 microcontroller, I have doubts on ADC. To calculate digital result their is a equation is given below. In that equation why subtracting 0.5 ?

This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi team,
I am using RM57L843 microcontroller, I have doubts on ADC. To calculate digital result their is a equation is given below. In that equation why subtracting 0.5 ?

Hi Veerappan,
Look into the below thread, here QJ explained why 0.5 subtraction is required.
What QJ saying here is, consider the condition of

Now the DigitalResult for 12bit ADC will becomes as below.

That is,
DigitalResult = 4096-0.5
So, the conclusion is if we didn't use 0.5 then we will get the output as 4096(0x1000) which is more than 12bit result. If we use 0.5 then the output will be 4095(0xFFF) which is exactly 12bit.
For simplicity, you can also neglect 0.5 and use the formula like below.
This won't make big difference in the result.
--
Thanks & regards,
Jagadish.
Hi jagadish gundavarapu,
Thanks for your explanation.
Thanks,
Regards,
Veerappan.