Page 1 of 1

ADC Pin Question

Posted: Thu Sep 24, 2015 8:09 pm
by JimTal001
I'm Powering a breadboard with the pyboard 3.3 V and Gnd pins and reading an analog value on pin X11. The adc value read was incorrect (checked with multimeter). Using the same code I switched to pin X19 and the adc value read is correct. The difference between the adc values read on X11 and X19 is near a factor of 2 (1202 and 2169).

Question: is there something special I need to do to make X1-X8 and X11-X12 read more accurately?

Reason: I have a need for 7 adc pins for analog and there are only 4 shielded ones (X19 - X22).

Re: ADC Pin Question

Posted: Thu Sep 24, 2015 8:28 pm
by dhylands
What code were you using to read the ADC?

What device do you have connected to the input?

Re: ADC Pin Question

Posted: Thu Sep 24, 2015 8:53 pm
by JimTal001
:o just realized I was using
adc = ADC(Pin('X11')) rather than adc = ADC(Pin('Y11'))

wasted hours on that issue.

Re: ADC Pin Question

Posted: Thu Sep 24, 2015 9:33 pm
by dhylands
Don't feel bad, - I've done things just as bad....

Re: ADC Pin Question

Posted: Fri Sep 25, 2015 6:46 am
by pythoncoder
You guys aren't alone - I've just spent the best part of a day tracking down an "obscure bug" which turned out to be a pin header one pin short of the mating socket :oops:

He who never made a mistake never made anything.