Page 1 of 1
					
				Pico ADC
				Posted: Thu Oct 21, 2021 12:31 pm
				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 (70.73 KiB) Viewed 4992 times
 
			
		
				
			 
- P5.jpg (35.77 KiB) Viewed 4992 times
 
Thanks a million for helping out
 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 12:52 pm
				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()
			 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 12:57 pm
				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  

 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 1:13 pm
				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 (72.24 KiB) Viewed 4981 times
  
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 1:34 pm
				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?
			 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 1:46 pm
				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  

 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 2:16 pm
				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
			 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 3:12 pm
				by p.erasmus
				Leigh,
Thank I will try this in the evening and will report Thanks again for your help. 

 
			
					
				Re: Pico ADC
				Posted: Thu Oct 21, 2021 3:49 pm
				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  
 
   
   
   
 
Thanks a million