Hi-

I am having this same problem running i2c-io from my gumstix.

I am grounding the ADC pin and I always return 1023 when I run:

"i2c-io 0x0b get ADC.1"

I tried all the ADC pins.

When I run"

"i2c-io 0x0b readreg pinf"

It returns the correct hex value depending on what is grounded: 0xfe, 0xfd, 0xfb, etc.
So atleast the digital reading is working.

Did Cody find an easy fix to this problem?

Thanks for any help.

-Christopher


Email Archive: gumstix-users (read-only)

Re: Fwd: ADC pins on Robostix
From: Dave Hylands <dhylands@gm...> - 2006-11-02 21:05
Hi Cody,

On 11/2/06, cody@lo... <cody@lo...> wrote:
> Thanks for getting back to me so quickly Dave!
>
> I just built a cable that simply is a "loop" (3 pin cable where the two
> outside pins are connected.)
> That should ground out the ADC line and return a value of "0."
> I tested this with a voltmeter again, to make sure it wasnt a stupid error
> on my part.
>
> I then plugged it into ADC.7 on the back of the board, the farthest away
> from the edge that has the power jack.
> when I do "i2c-io 0x0b get ADC.7" I STILL get "1023."
>
> Whats going on here??? Do I have to set some register on the ATmega128? I
> am using a standard SVN copy of i2c-io that I havent modified btw.

I'm using the i2c-io.hex from here:
http://davehylands.com/gumstix-wiki/i2c-io/

and the i2c-io program from within the i2c-io-2.6.15.tar.gz (it also
works on later versions of the kernel).

What happens if you try f.7? This is the digital version of the same pin.

Do you get the same effect on other ADC pins?

What does

i2c-io 0x0b readreg pinf

report?


If you power off the board, do you measure continuity between the
ADC.7 pin and the +5 pin?

You should also check for continuity between pin 64 and pin 62? Pin 62
is AREF, and pin 64 is AVCC. These should be connected to each other,
and you should also be able to measure continuity between either of
these pins and the +5 pin on the ADC pins.

Looking at this photo:
http://docwiki.gumstix.org/Image:Robostix-Top.jpg

Pin 64 is the leftmost pin of the ATMega128 along the top.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

 

Thread View

Thread Author Date
Re: Fwd: ADC pins on Robostix <cody@lo...> 2006-11-02 20:30

From: Dave Hylands <dhylands@gm...> - 2006-11-02 21:05
Hi Cody,

On 11/2/06, cody@lo... <cody@lo...> wrote:
> Thanks for getting back to me so quickly Dave!
>
> I just built a cable that simply is a "loop" (3 pin cable where the two
> outside pins are connected.)
> That should ground out the ADC line and return a value of "0."
> I tested this with a voltmeter again, to make sure it wasnt a stupid error
> on my part.
>
> I then plugged it into ADC.7 on the back of the board, the farthest away
> from the edge that has the power jack.
> when I do "i2c-io 0x0b get ADC.7" I STILL get "1023."
>
> Whats going on here??? Do I have to set some register on the ATmega128? I
> am using a standard SVN copy of i2c-io that I havent modified btw.

I'm using the i2c-io.hex from here:
http://davehylands.com/gumstix-wiki/i2c-io/

and the i2c-io program from within the i2c-io-2.6.15.tar.gz (it also
works on later versions of the kernel).

What happens if you try f.7? This is the digital version of the same pin.

Do you get the same effect on other ADC pins?

What does

i2c-io 0x0b readreg pinf

report?


If you power off the board, do you measure continuity between the
ADC.7 pin and the +5 pin?

You should also check for continuity between pin 64 and pin 62? Pin 62
is AREF, and pin 64 is AVCC. These should be connected to each other,
and you should also be able to measure continuity between either of
these pins and the +5 pin on the ADC pins.

Looking at this photo:
http://docwiki.gumstix.org/Image:Robostix-Top.jpg

Pin 64 is the leftmost pin of the ATMega128 along the top.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/