Beginner with the Pi Pico here, but I studied electronics engineering and am reasonably hardware literate. I've used mbed online for a project prior to covid.

I want to use SPI to connect to a display using the ILI9488, (480 x 320 TFT panel), however, I cannot see how or where I would define SPI pins, and my understanding is that using SPI.h would default to Arduino pinouts - the uno etc being pin incompatible with the pi pico.

Do I need to trudge through the SPI.h file to try to work out how I set the pins manually? Or am I barking up the wrong tree?

I am using macOS, Arduino IDE 2.1.1 and have no issues connecting to the pico W. Please ask for any other clarification, I can provide a schematic of my design if it makes things easier. Love the pico but am finding it hard to use with C/C++.

Thanks, KL

  • the pins are defined in the variants file for the selected board so the SPI library has the pins specific for the board
    – Juraj
    Commented Aug 8, 2023 at 17:27
  • Depend on which Arduino Core you installed. The variants definition of Arduino Core describe the pin assignments for each board. There are two Arduino Core for Pico, the board variants definitions for the one by Earle Philhower can be found here, another one based on mbed by Arduino is here.
    – hcheung
    Commented Aug 9, 2023 at 1:02

1 Answer 1


You can read the actual SPI pins with the following sketch

    void setup() {
    void loop() {
      Serial.print("MOSI: ");
      Serial.print("MISO: ");
      Serial.print(" SCK: ");
      Serial.print("  SS: ");

As Juraj wrote, they are defined in the board files.

I have no experience with your ILI9488 display and the corresponding library. Many libraries allow you to use software defined pins. I would not recommend that, especially for a display with 480 x 320 pixels. You really need the speed of the hardware SPI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.