Pico ADC

For general Flowcode discussion that does not belong in the other sections.
Post Reply
User avatar
p.erasmus
Valued Contributor
Posts: 434
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Pico ADC

Post by p.erasmus »

Hi Team

Please help ;)
for the life of me I canot get the adc on the PICO to work and searching the wiki I find zero info on the PICO ,Is there any wiki pages on the Pico ?

It seems also I cannot set the conversion speed in the properties ,If I try to use the set properties macro in code then I need to give a number for conversion speed as per ref list where is this list ?
P3.jpg
P3.jpg (70.73 KiB) Viewed 2664 times
UART_ADC.fcfx
(12.53 KiB) Downloaded 90 times

P5.jpg
P5.jpg (35.77 KiB) Viewed 2664 times


Thanks a million for helping out
Regards Peter - QME Electronics

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pico ADC

Post by LeighM »

Hi,
The Pico version does not need (or use) any of those parameters.
However, you do need to call (once before start of the loop) the RawEnable()

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Pico ADC

Post by p.erasmus »

leigh
Thanks a million will try however is there something about all of this in the wiki ,I really do find zero info in my wiki :D
Regards Peter - QME Electronics

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Pico ADC

Post by p.erasmus »

Hi

I have done as you recommended however the ADC0 always show 800 to 970 counts even with no voltage applied to GIO26 I can try any of tha ADC's the result is the same
P6.jpg
P6.jpg (72.24 KiB) Viewed 2653 times
Attachments
UART_ADC.fcfx
(12.98 KiB) Downloaded 79 times
Regards Peter - QME Electronics

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pico ADC

Post by LeighM »

What did RawSample() give?
What do you mean by "no voltage applied"?
Have you got a load resistor, or a fairly low impedance supply attached?

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Pico ADC

Post by p.erasmus »

The sample give alway these numbers as shown in the terminal window

If I apply 1.0V at the ADC0 it still show the same number and I can vary it from 1V to 3,3V and the numbers stay the same
What do you mean by "no voltage applied"?
I am saying the numbers show as in the terminal even if 0V on the ADC0 pin

Yes I have low impedance source my input is buffered with an OPAMP circuit which I am using for at least 10 years on PIC ,ARDUINO and now latly on ESP32. all ways worked on all of them .

I do not know what can the issue be :oops:
Regards Peter - QME Electronics

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pico ADC

Post by LeighM »

hmm, strange, it worked when I originally wrote and tested it,
just dug out my test from May and that just used GetInt() in a loop,
no "Enable" required in that case.
Could you try same?
Thanks
Leigh

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Pico ADC

Post by p.erasmus »

Leigh,

Thank I will try this in the evening and will report Thanks again for your help. :D
Regards Peter - QME Electronics

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Pico ADC

Post by p.erasmus »

Hi Leigh.

Thank you for your help that worked and now after that the RawInt() is also working .
Just one of those things :D :D :D :D

Thanks a million
Regards Peter - QME Electronics

Post Reply