Society of Robots - Robot Forum
Software => Software => Topic started by: silo_xtreme on November 07, 2009, 09:24:59 AM
-
Hey All,
Anyone know why I would get values in the range of 65533 - 65535 on an ADC measurement? I only seem to get this on my IR receiver from my ATXMEGA chip.
I've verified that we're not exceeding any electrical characteristics.
I have an interrupt that keeps sampling the ADC pin and updated a variable.
Could I be sampling too fast or something? ???
-
Try it with another IR sensor, or another microcontroller and make sure the problem isn't hardware related.
-
Heh. Sorry for not updating this sooner.
The problem is actually cause because the Voltage was too small for the resolution selected on the ADC.
Thanks,
-
what type of ADC?
-
The Xmega128A1 ADC.
For some reason it was not resolving values less than 1.7 ma. ???
-
The Xmega128A1 ADC.
For some reason it was not resolving values less than 1.7 ma. ???
ma or mV?
Is it 10 bit ADC?
-
mV ... Yes, 10 bit. It ends up being a moot problem since I don't need to filter out ambient light in the s/w ... We have a hardware filter on it ;)
-
Well
5V/(2^10 bit) = 0.0049 V
or 4.9mV
So getting 1.7mV resolution with a 10 bit system is impossible :P
. . . well, unless you are making assumptions based on a timer in a dynamic system . . .
-
Doh! Now that is good to remember! Thanks.