TFT / Color
Interfacing ILI9341 2.8" TFT TFT / Color with Raspberry Pi
What is the ILI9341 2.8" TFT?
ILI9341 2.8" TFT practical reference
The ILI9341 2.8-inch TFT display is a versatile color screen that brings vibrant visuals and touch interactivity to your projects. With a 320×240 resolution and support for 65K colors, it delivers crisp, bright images suitable for GUIs, dashboards, and multimedia applications.
The display is built around the ILI9341 driver chip, which includes a built-in video RAM buffer and supports SPI communication. A resistive touchscreen, controlled by an XPT2046 controller, enables intuitive user interaction. Many modules also feature a microSD card slot for storing images and assets.
Available in both SPI and 8-bit parallel interface variants, the SPI version is the most common and requires only a few I/O pins to operate. The module operates at 3.3V–5V, making it compatible with a wide range of microcontrollers. Onboard level-shifting circuitry ensures safe operation with both 3.3V and 5V logic.
Note: This entry covers the SPI version of the display, which is the most widely available and easiest to interface with. Parallel versions exist but are less common and require more I/O pins.
Key specifications
- Resolution: 320 × 240 pixels (QVGA)
- Color depth: 65K colors (RGB 16-bit 565)
- Display type: TFT, transmissive
- Touchscreen: Resistive (XPT2046 controller)
- Interface: SPI (4-wire) or 8-bit parallel
- Operating voltage: 3.3V – 5V (with onboard level shifter)
- Logic voltage: 3.3V
- Backlight: 4 white LEDs
- Active area: 43.2 × 57.6 mm
- Module dimensions: ~50 × 86 mm
- Operating temperature: -20°C to 60°C
- Storage temperature: -30°C to 70°C
- Extra features: microSD card slot
Pinout and connection notes
Critical usage notes:
- SPI vs Parallel: Most modules are SPI versions. Verify your module's interface before wiring — SPI uses fewer pins and is recommended for most projects.
- Level shifting: While many modules include onboard level shifters and accept 5V power, the logic pins are 3.3V. On 5V boards like the Uno, the onboard level shifter handles this — but check your specific module.
- Backlight: The LED pin controls the backlight. Connect to a PWM-capable pin for brightness control, or tie to VCC for always-on.
- Touch controller: The resistive touch uses an XPT2046 controller over SPI. Touch pins share the same SPI bus as the display but use a separate CS pin.
- Library support: The Adafruit_ILI9341 and TFT_eSPI libraries are the most widely used and well-documented options.
- SD card: If your module has an SD slot, it uses a separate SPI CS pin — typically Pin 4 on Arduino — and shares MOSI/MISO/SCK with the display.
- VCC: Power — 3.3V to 5V (onboard regulator/level shifter)
- GND: Ground
- CS: SPI chip select (active low)
- RESET: Reset, active low
- DC/RS: Data/Command select — high for data, low for command
- SDI/MOSI: SPI data in (Master Out Slave In)
- SCK: SPI clock
- LED: Backlight control — high to enable, or connect to 3.3V
- SDO/MISO: SPI data out (optional, for reading)
- T_CS: Touch SPI chip select (XPT2046)
- T_CLK: Touch SPI clock
- T_DIN: Touch SPI data in
- T_DO: Touch SPI data out
- T_IRQ: Touch interrupt — goes low when touch detected
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Setting Up ILI9341 2.8" TFT with Raspberry Pi
Library
Adafruit_CircuitPython_ILI9341 by Adafruit
sudo raspi-config # Interface Options -> SPI -> Enable, then reboot pip3 install adafruit-circuitpython-ili9341 adafruit-circuitpython-rgb-display Pillow
Wiring
| Component pin | Raspberry Pi pin | Note |
|---|---|---|
| VCC | Pin 1 (3.3V) | |
| GND | Pin 6 (GND) | |
| CS | GPIO8 (CE0, Pin 24) | |
| RESET | GPIO25 (Pin 22) | |
| DC/RS | GPIO24 (Pin 18) | |
| SDI/MOSI | GPIO10 (MOSI, Pin 19) | |
| SCK | GPIO11 (SCK, Pin 23) | |
| LED | 3.3V (Pin 1) | Or GPIO for PWM |
| SDO/MISO | GPIO9 (MISO, Pin 21) | Optional |
Swipe sideways to see every column →
- Enable SPI via
raspi-configfirst — it's off by default. - The CircuitPython ILI9341 library requires the
adafruit-circuitpython-rgb-displaypackage. - For framebuffer / desktop mirroring, use the
fbcp-ili9341driver or themipi-dbi-spioverlay on Pi 5.
Related Components
GDEW0154
Compact e-ink panel for badges and low-power info displays.
LCD1602 I2C
The classic 16x2 text display made simple with I2C — just 4 wires and you're up and running.
LCD2004 I2C
The bigger 20x4 text display — more room for menus, logs, and multi-field status screens.
ST7789 1.3" TFT
Compact 240×240 IPS display with vivid colours and wide viewing angles.
Related Guides & Projects
Raspberry Pi Pico W and Pico 2 W: Install MicroPython with Thonny or UF2
Hold BOOTSEL, drag the correct UF2 file, open the REPL and blink the onboard LED. Includes the Pico vs Pico W vs Pico 2 W firmware differences and what to do when the drive does not appear.
Raspberry Pi Pico W Web Server in MicroPython: Control an LED and Read a Sensor
Connect the Pico W to WiFi, serve a responsive control page, switch an LED and display the onboard temperature or an external sensor, with timeouts and reconnect handling.
Raspberry Pi Pico Oscilloscope with MicroPython
Convert a Raspberry Pi Pico into a basic 500 kSPS oscilloscope using its 12-bit ADC and MicroPython. Displays waveforms on an SSD1306 OLED or streams samples over USB serial to a Python plotter on your PC.
Self-Hosted Nextcloud NAS on Raspberry Pi 4
Build a private, durable Nextcloud NAS on a Raspberry Pi 4 -- SSD boot instead of a failure-prone SD card, Docker Compose with Redis caching, Tailscale for remote access with zero ports forwarded, and an automated backup strategy that actually runs.