[SOLVED] analog input with voltage divided AREF not giving expected result

It strongly depends on the definition of the word "correct". One could say there is no correct way to assign a single voltage to ADC reading...

Smajdalf:
It strongly depends on the definition of the word "correct".

Mr. Clinton? Is that you?

Yes, I've used that in an earlier post and another Guru moderator jumped in my face and said the CORRECT divisor was 1023, the number you get when you put exactly AREF voltage on the input pin. Why don't you have a Guru moderator convention, argue out the CORRECT value and publish it as the CONVENTIONAL absolutely correct value?

I defer to the engineers who designed the analog-to-digital converter. They published the divisor in a datasheet. Guess what it is.

outsider:
Why don't you have a Guru moderator convention, argue out the CORRECT value and publish it as the CONVENTIONAL absolutely correct value?

Because there in general there is NO correct value. There was a loooong discusion about this topic somewhere.

Anyway 1023 vs 1024 is about 1‰ difference which is hardly significant. To get reading in volts I usualy use analogRead(x)/200 because it is fast and my USB "5V" is around 5.1 V. IIRC USB should output 5 ± 0.25V so it is poor reference. And when you add all the noise from digital switching...

Smajdalf:
Anyway 1023 vs 1024 is about 1‰ difference which is hardly significant.

While it may be a small error, you are arguing in favour of a mistake that essentially has a cost of zero to correct. Why would you do that? Why would you go out of your way to defend a mistake?

You assume 1% is "hardly significant" for everyone reading your post. Is that true? Are you really able to divine the thoughts of others so accurately?