|
Re: Gyroscope Code
Thanks for that breakdown! Now I understand.
You actually DO get more resolution from oversampling!
So, at 16 samples per update, I have a 12-bit ADC value, that is completely valid, and does not have to be divided any further. I looked at the code again, and you take 16 samples, then divide by 4, leaving 4*[0, 1023]. This is awesome. 12-bits is exactly the resolution that's required to be as accurate as I need to be in my application.
Previously I had thought that oversampling gave more "resolution" due to the fact that when the samples were completely averaged together, they would just eliminate more noise.
Now I think I understand better.
Thanks again.
__________________
Joel Johnson
Division By Zero ( 229) Alumni, 2003-2007
RAGE ( 173) Alumni, 1999-2003
|