1

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

K Langley
  • 19
  • 1
  • 2

1 Answers1

2

You can read the actual SPI pins with the following sketch

    void setup() {
      Serial.begin(115200);
    }
void loop() {
  Serial.print("MOSI: ");
  Serial.println(MOSI);
  Serial.print("MISO: ");
  Serial.println(MISO);
  Serial.print(" SCK: ");
  Serial.println(SCK);
  Serial.print("  SS: ");
  Serial.println(SS);
  Serial.println();
  delay(5000);
}

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.

Rohit Gupta
  • 618
  • 2
  • 5
  • 18
qubit
  • 370
  • 1
  • 4
  • 11