274 instead of 304... it's not as this far. Everything is related on acurracy of the VREF. IF it's REALLY 5.000000000V then you should have
(1.5/5)*1024=307
If my maths are good after 20 hours awake, ((307-274)/1024)*100=3.22 % of error. so your supply line should be around... 5-(3.22%)=4.9844 Volt
If i use a serial communication here and if i inject 1.499 volt, VDD=5.014, i should read... (1.499/5.016)*1024=306 right? i have 305 wich is real darn close.
If your ADC input is a little bit noisy, it may change the results, same thing with the VDD line. If you respect the minimum acquisition time and the maximum input impedance... you will have the nice results.
If you need accuracy, you may decide to use a precision voltage source.
mmm, maybe 1023 instead of 1024....
Last edited by mister_e; - 5th March 2007 at 22:40.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks