On Tue, Sep 27, 2011 at 11:17 AM, Charles Howard <howar039@...> wrote:
> Hey we are trying to use the adc on the Overo earth and we are able to access and use the adc but the numbers we are getting seem to be out of range. For example when we input 1.6 volts we get out 1336 from the adc. I thought the adc was 10 bits which means the maximum value would be 1023, is this correct thinking? And why are we getting such high numbers from the adc?
I assume you are using the /sys/class/hwmon interface. If so, you
should take a look at the documentation for the driver:
Specifically this sentence:
"The Sysfs nodes will represent the voltage in the units of mV"
So you are actually getting a reading of 1336 mV or 1.336 volts. Why
it isn't 1.6 volts is another issue :-)
If I look at input 8, which is vbus for usb, I get a reading of 5036,
or 5.036 volts. That seems about right.