Boards / RP2040

Raspberry Pi Pico + ILI9341

SPI0 driving a 2.8" ILI9341 with XPT2046 touch.

The Raspberry Pi Pico + ILI9341 board
Photograph: Ogidya, via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:Raspberry_Pi_Pico_top_and_bottom.jpg · CC BY-SA 4.0

Building for it

A project is made for one toolchain, picked when you start it. For this board you can use one of the four:

Toolchain
Arduino (C++)Every board, every widget and every peripheral here. The most control, and the most to set up. Start a project
MicroPythonThe MicroPython export has not been built for this chip yet. It is written for the ESP32, S2, S3, C3 and C6.
ESPHomeESPHome targets the ESP32 family. Use the Arduino export for this chip.
ESP-IDF (C)ESP-IDF is Espressif's framework, for Espressif chips. Use the Arduino export for this one.

At a glance

PartDetail
MakerGeneric
MCURP2040 (Pico / Pico W)
Cortex-M0+ dual-core @ 133 MHz, 264 KB SRAM
DisplayIlitek ILI9341, 240 x 320 px, SPI (4-wire serial), 16-bit colour
TouchXPTek XPT2046 (resistive, SPI)
BacklightGPIO 22, dimmable (PWM)
PSRAMNo
Graphics libraryTFT_eSPI

Display pins

ILI9341 on SPI (4-wire serial): SPI clock 30 MHz, host VSPI, BGR colour order, inversion off.

SignalPin
SCK / CLKGPIO 18
MOSI / SDAGPIO 19
MISO / SDOGPIO 16
CSGPIO 17
DC / RSGPIO 20
RESETGPIO 21
BacklightGPIO 22

Touch pins

XPT2046: 2000 kHz, shares the display bus.

SignalPin
SCKGPIO 18
MOSIGPIO 19
MISOGPIO 16
CSGPIO 15
IRQ / PENIRQGPIO 14

Check your revision. Only 264 KB of RAM - keep the LVGL draw buffer at roughly 1/10 screen.

Designing for it in LCD Wizard

The parts

ILI9341. The most common hobby TFT. 2.2"-2.8" modules, usually with an XPT2046 resistive panel.

XPT2046. The classic 4-wire resistive controller. Needs calibration. Can share the display SPI bus with its own CS.

RP2040 (Pico / Pico W). PIO can drive an 8-bit parallel bus. Limited RAM - use a small partial draw buffer.

TFT_eSPI. Fastest for SPI panels on ESP32. Configured via User_Setup.h build defines.

The pinout on one page

Every pin above, laid out to print and keep beside the bench. Generated from this preset, so it says exactly what the designer writes into lcd_pins.h.

Download the pinout (PNG)Open it as SVG

The same pins as data - board.json and pins.csv - are in the open pinout dataset on GitHub, free to reuse under CC BY 4.0.

From the people who made it

The board’s own documentation. Pinouts on vendor pages do sometimes disagree with the hardware in front of you - where this page and that one differ, trust your board and tell us.

Designs for this board

Nobody has published a design for this board yet. Publish yours from the designer and it appears here and in the gallery.

STM32F407 + ILI9341 SPIBlack pill / Discovery style wiring using SPI1 and an XPT2046 touch panel.STM32F4 · ILI9341 240 x 320 · XPT2046 touch
Pico + GC9A01 round240x240 round panel driven from SPI0, no touch.RP2040 · GC9A01 / GC9A01A 240 x 240 · no touch
ESP32-S3 + ILI9341 SPIESP32-S3 DevKitC wired to a 2.8" ILI9341 with XPT2046 touch.ESP32-S3 · ILI9341 240 x 320 · XPT2046 touch
ESP32 + ILI9341 2.8" SPIThe classic breadboard combination: ESP32 DevKit, 2.8" ILI9341, XPT2046 resistive touch on the same SPI bus.ESP32 · ILI9341 240 x 320 · XPT2046 touch
LCDWIKI 2.8" ESP32-S3 (ES3C28P)2.8" 240x320 IPS ILI9341V over SPI with FT6336G capacitive touch, an ES8311 codec with microphone and speaker output, a WS2812 LED, a 4-bit SD slot and battery charging.ESP32-S3 · ILI9341 240 x 320 · FT6236 / FT6336U touchPurchase this board
ESP32-S3 + GC9A01 1.28" round240x240 round panel with CST816S single-touch. Popular for watch faces and gauges.ESP32-S3 · GC9A01 / GC9A01A 240 x 240 · CST816S touch

Next