XIAO RP2040

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Amrat
Posts: 39
http://meble-kuchenne.info.pl
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

XIAO RP2040

Post by Amrat »

As XIAO RP2040 is Arduino compatible. If to program with Flowcode, which device to select ? As no XIAO RP2040 in device select list.

Please advise.

Thanks in advance.
Amrat

chipfryer27
Valued Contributor
Posts: 1695
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 585 times

Re: XIAO RP2040

Post by chipfryer27 »

Hi

Just a guess but as the XIAO uses the RP2040 chip then selecting Pico > Misc > Raspberry_Pi_RP2040 might be a good start.

Regards

Amrat
Posts: 39
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

Re: XIAO RP2040

Post by Amrat »

Thanks chipfrey27

But pin ID on XIAO RP2040 and Raspberry_Pi_RP2040 not the same !!
How to know which pin on XIAO RP2040 corespond to Raspberry_Pi_RP2040 pin ?

Thanks
Amrat

chipfryer27
Valued Contributor
Posts: 1695
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 585 times

Re: XIAO RP2040

Post by chipfryer27 »

Hi

From what I can see the XIAO uses the RP2040 chip but is packaged smaller meaning not all of the RP2040 pins are available, but these pins are "standardised".

By that I mean if you take a look at a XIAO pinout you will see that the pins used correspond to the RP2040 and therefore also to Flowcode.

XIAO Pins.JPG
XIAO Pins.JPG (27.51 KiB) Viewed 2360 times

If you look at the top left you will see P26 (which is also both an analogue input and digital I/O pin) and if you look at the RP2040 you will see that P26 corresponds to GPIO26/ADC0. Same goes for P27-29 on the XIAO, they correspond to GPIO27-29 / ADC1-3. The grey XIAO "P" numbers correspond with the RP2040 "GPIO" numbers.

In Flowcode, if you look at View > Target you will see an image of the RP2040 and the associated pin numbers which correspond to the above. If you "hover" over a pin Flowcode will tell you it's designation. Using P26 as an example (which is GPIO26) hovering over this pin shows that Flowcode calls it PORTA.26.

If you wanted to connect say an LED to this pin, in FC you would select PORTA.26

Hope this helps.

Regards

Amrat
Posts: 39
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

Re: XIAO RP2040

Post by Amrat »

Dear chipfryer27,

Thanks for detail and very clear reply.

Thanks again
Amrat

Post Reply