pinout-xyz / pico.pinout.xyz

Raspberry Pi Pico Pinout Page
https://pico.pinout.xyz/
31 stars 10 forks source link

Adding an option to reverse the Pico pinout. #2

Closed twisst closed 2 years ago

twisst commented 2 years ago

The only downside (pun intended) to switching to the Pico as your go-to microcontroller, is that its pin numbers are printed on the underside. Other boards are more practical in that sense and easier to use as an educational tool, as those boards more clearly indicate what all pins are for. This inconvenience is remedied by soldering the pins so that the board sits on the breadboard with the underside facing up. This change adds the option to reverse the pinout to reflect that configuration.

lurch commented 2 years ago

This inconvenience is remedied by soldering the pins so that the board sits on the breadboard with the underside facing up.

But that means you then can't see the LED or press the BOOTSEL button? :confused:

EDIT: But regardless of that, this looks like a useful PR :+1:

twisst commented 2 years ago

@lurch true, but then you don't use BOOTSEL that often. Anytime you want to use it you could just take the Pico out of the breadboard of course.

The only thing that would be annoying when you have a Pico with pins on backwards is when you want to use it with ready-made components like a display. But then we would just use another Pico and that's why this proposed pull request is for an option, not for reversing the whole pinout permanently :-) In our educational setting we're not usually using SHIMs and such anyway, so not really a problem there.

lurch commented 2 years ago

but then you don't use BOOTSEL that often.

From that comment I guess you must be using MicroPython? If you're programming the Pico in C then you need to use the BOOTSEL button every time you want to flash a new UF2 file to the board (unless you're loading code using the SWD pins instead of loading code over USB).

twisst commented 2 years ago

Ah I see. Yes, one of the main reasons I'm switching over from Arduino Uno to the Pico as the go-to board in my electronics workshop is MicroPython. Teaching students to program in Python is easier than Arduino’s C++ and also (I think) a more useful skill for them to learn.

Gadgetoid commented 2 years ago

Isn't there a UART knock to put the Pico into BOOTSEL mode, or did I imagine that?

All my MicroPython bringup tends to require liberal use of a reset button... and you could probably reverse mount one of those :laughing:

Also sorry I still haven't got to this PR. It's been a busy and rough couple of weeks.

Gadgetoid commented 2 years ago

Merged in https://github.com/Gadgetoid/pico.pinout.xyz/commit/941e7714e66cf467b4cb5945227361d69d9c2494

I broke GitHub because I rebased out the .DS_Store commit and rewrote history so that :magic_wand: it neeevver happened :magic_wand: :laughing:

I think I managed to make my proposed changes without breaking it. Gosh I forgot how much Javascript I'd already unleashed upon this, too.

lurch commented 2 years ago

Isn't there a UART knock to put the Pico into BOOTSEL mode, or did I imagine that?

Yeah, you can trigger a reset into BOOTSEL mode using picotool, but that requires that you're using USB-CDC for stdio. See Appendix B of https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf and the PICO_STDIO_USB_RESET_* settings in Appendix B of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf (EDIT: and of course that requires that the USB stack is still running on the RP2040, so won't work if the Pico crashes or locks up)