← All parts

Adafruit 1.3in 240x240 ST7789 TFT

Adafruit

Adafruit 1.3in 240x240 ST7789 TFT display with SPI interface, suitable for various microcontrollers.

In stock

Specifications

4
Display Type
240x240 ST7789 TFT display
Operating Voltage
3-5VDC
Logic Level
3.3V logic out (but can be read by 5V logic)
Gpio Count
7

Pinout

8
PinNameFunctionsNotes
GndGND
GND
Vin3V3
POWER
SCKCL
SPI
SOMISO
SPI
SIMOSI
SPI
TCSTCS
SPI
RSTRT
GPIO
D/CDC
SPI

Interactive pinout

Highlight:
BOARD

Click a pin to copy its name · tap a tag above to spotlight a bus.

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

Arduino library: Adafruit ST7735 and ST7789 Library (+ Adafruit GFX)

arduino
// ST7789 240x240 TFT (SPI) — community starter example
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>

#if defined(ESP32)
  #define TFT_CS 5
  #define TFT_DC 16
  #define TFT_RST 17
#else
  #define TFT_CS 10
  #define TFT_DC 9
  #define TFT_RST 8
#endif

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  tft.init(240, 240);
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(4, 4);
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.println("Hello!");
}

void loop() {}

MicroPython

MicroPython library: st7789 (russhughes/st7789py_mpy)

python
# ST7789 240x240 TFT (ESP32) — community starter example
# lib: russhughes/st7789py_mpy (st7789py.py on the board)
from machine import Pin, SPI
import st7789py as st7789

spi = SPI(2, baudrate=30000000, sck=Pin(18), mosi=Pin(23))
tft = st7789.ST7789(spi, 240, 240, reset=Pin(17), dc=Pin(16), cs=Pin(5))
tft.fill(st7789.BLACK)

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
Vin+5V3V3Regulated breakout (3-5 V)
GNDGNDGND
SCKD13 (SCK)GPIO18
MOSI (SI)D11 (MOSI)GPIO23
MISO (SO)D12 (MISO)GPIO19Often unused by these displays
TCSD10GPIO5Chip select
DCD9GPIO16Data/Command
RSTD8GPIO17Reset

Typical uses

  • 240x240 color UI / graphics
  • Watch faces, gauges, status screens

Related parts

6