Pi PICO - Reading Internal Pins and ADC pins

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 132
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Pi PICO - Reading Internal Pins and ADC pins

Post by jay_dee »

Hi FC Team,
A) I have been playing with the Pi PICO for a short time and i'm aware some PICO pins are internal but non the less, are in theory readable
GP25 - Pico LED - Is this controllable? Pin A.25 not selectable.
GP24 - USB Detect - Is this readable? Pin A.24 not selectable.
GP29 - VSYS/3 Monitor - Is this readable? Pin A.24 not selectable.
ADC4 is the internal temp Sensor, can this be read?

B) ADC Pins
What is the Best component to read the native ADC pins? using the raw ADC(cal) component?
Thanks, John.

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Pi PICO - Reading Internal Pins and ADC pins

Post by Steve-Matrix »

I'll attempt to answer these backwards.

B) I would use a 2d Potentiometer component to read ADC pins.

A) I don't know, but you should be able to use C code to access these.

For example, if you have a byte variable "x", then you could try the following in a C code icon to read GP24 and write GP25:

Code: Select all

FCV_X = GET_PORT_PIN(A,24);
SET_PORT_PIN(A,25,(FCV_X));
There will be a way to use C code directly to access ADC4, but I've not been able to quickly work out a way to do this.

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Pi PICO - Reading Internal Pins and ADC pins

Post by chipfryer27 »

Hi

The Pico quickly grew on me. Really like it.

This post explains how to use the LED and also second core.

viewtopic.php?f=3&t=2065&hilit=pico&start=20

Regards

Post Reply