Source: https://mokxi.com/parts/st7789
Updated: 2026-11-10

Part

# IPS display, ST7789

An IPS color TFT, 240x240, 240x320 or 135x240. It shows a negative until the driver sends INVON.

See every part

- 8 pins
- 1 setting
- In 1 project
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The IPS display, ST7789 in brief

What it is, and every setting the properties panel gives it.

The ST7789 is the controller behind the small IPS color TFTs: the square 1.3 inch 240x240 board, the 2 inch 240x320 and the 1.14 inch 135x240 on the TTGO T-Display. Its pins say SCL and SDA but it is SPI, not I2C: SCL goes to the SPI clock, pin 13 on an Uno, and SDA to MOSI on 11, with RES, DC and an optional CS on any free pins and BLK for the backlight. The modules run at 3.3 volts. The chip always has 240x320 of memory, so the 240x240 glass is its top 240 rows and a flipped rotation has to start at row 80, while the 135x240 is a window from column 52 and row 40; a driver with the wrong offset draws where nobody can see. IPS glass shows the colors inverted until the driver sends INVON, so a hand-written init without it gives a photographic negative. With CS unwired, as on the 1.3 inch board, only the reset on RES lines the bits up. Gamma, scrolling and the waits after reset are not modeled.

Family

Displays

Pins

8

size

240x240 (or 240x320, 135x240)

240x240 (the default), 240x320 or 135x240. Match it to the numbers the
sketch passes to init().

Pins

## 8 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

Role

What it does

GND

Input or output

Ground.

VCC

Input or output

Supply, 3.3 V.

SCL

Input

The SPI clock. It is not I2C, whatever the name says.

SDA

Input

The SPI data in.

RES

Input

Reset, active low.

DC

Input

Low for a command, high for data.

CS

Input

Chip select, active low. The 1.3 inch board has none; leave it unwired.

BLK

Input or output

The backlight. Pull it low and the picture goes out.

How to use it

## How to use an ST7789 IPS TFT with an Arduino

The 1.3 inch board has no CS pin, so it listens to every clock on its wires and needs pins of its own: here SDA on A0, SCL on A1, DC on 7 and RES on 6, with BLK and VCC on 5 V. The five-argument Adafruit_ST7789 constructor runs software SPI on any pins, with -1 for the missing chip select.

Call init() with the panel’s real size and SPI_MODE3, the mode the no-CS boards are usually driven in. Wire RES: with no chip select, the reset is what lines the bits up. Set the part’s size to the numbers init() is given, or the picture lands off the glass.

Part pin

Board pin

SDA

A0

SCL

A1

DC

Pin 7

RES

Pin 6

BLK

5 V

VCC

5 V

GND

GND

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Text on a 240x240 ST7789 with no chip select

How it is modeled

## What is true about the IPS display, ST7789, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

The offsets. The chip always has 240x320 of memory. The 240x240 glass is the top
240 rows of it, so a rotation that counts rows from the bottom has to start at row 80,
which is the 80 in every ST7789 library. The 135x240 glass is a window from column 52
and row 40. The part stores only the glass, so a driver with the wrong offset draws
where nobody can see, as it does on the bench.

The inverted glass. IPS panels show the controller's colors inverted, and every
ST7789 driver sends INVON (0x21) to put them right. Leave it out and the picture
is a photographic negative: white is black. That is modeled.

No chip select. A CS left unwired is taken as tied to ground, the way the 1.3
inch board has it. With nothing to mark where a byte starts, the hardware reset on
RES is what lines the bits up, so a driver without a reset pin has to be lucky here
as on the bench. The chip samples on the rising clock in either SPI mode, so the mode
3 that the no-CS boards are usually driven in works, and so does mode 0.

MADCTL rotation, the window, 16-bit and 18-bit pixels, sleep and display on and off
behave as on the ILI9341.

### Not modeled

The color order bit, 12-bit color, register reads, timing (the waits after reset
and sleep-out are not enforced), gamma, frame rate, partial mode and scrolling. The
170x320 and 240x280 panels are not in the size list.

From ST7789 IPS TFT, in full.

Projects

## See the IPS display, ST7789 in a project

One built-in project uses it. It opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino ST7735: 1.8 Inch Color TFT Wiring and Code

Boards

## The boards it is shown on

This board has a built-in project with the IPS display, ST7789 in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the IPS display, ST7789

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Adafruit ST7735 and ST7789 Library
- TFT_eSPI

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the IPS display, ST7789

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
