
This circuit connects an ESP32 microcontroller to a 1.3 inch TFT display module (ST7789). The ESP32 provides power and control signals to the display, enabling it to show graphical data.

The Adafruit ST7789 is a 1.9-inch thin-film transistor (TFT) display with a resolution of 170x320 pixels. It is designed for use in a wide range of electronic projects, offering vibrant colors and a crisp display for text, images, and graphics. This display is ideal for applications requiring a compact, high-quality screen, such as handheld devices, IoT projects, and user interfaces for embedded systems.

This circuit connects an ESP32 microcontroller to a 1.3 inch TFT display module (ST7789). The ESP32 provides power and control signals to the display, enabling it to show graphical data.

This circuit connects an Arduino Mega 2560 microcontroller to a 3.5-inch 480x320 TFT LCD display. The Arduino provides power, ground, and digital signals to control the display, including data lines for pixel information and control lines for reset, write, and command/data selection. The embedded code initializes the display and configures the Arduino's pins for communication, likely to create a user interface or visual output for a project.

This circuit connects a 1.3 inch TFT Module 240×240 ST7789 display, a GY-MCU90640 thermal camera module, and a XIAO ESP32C3 microcontroller to create a thermal imaging system. The ESP32C3 microcontroller is programmed to read temperature data from the thermal camera, process it, and display a visual representation of the temperature distribution on the TFT screen. The circuit is designed for applications requiring thermal monitoring, such as detecting heat sources or monitoring temperature variations in an environment.

This circuit features an RTL8720DN microcontroller interfaced with a China ST7735S 160x128 TFT LCD display and four pushbuttons. The microcontroller reads the states of the pushbuttons and displays their statuses on the TFT LCD, providing a visual feedback system for button presses.
| Parameter | Value |
|---|---|
| Manufacturer | Adafruit |
| Manufacturer Part ID | ST7789 |
| Display Type | TFT (Thin-Film Transistor) |
| Diagonal Size | 1.9 inches |
| Resolution | 170x320 pixels |
| Color Depth | 18-bit (262,144 colors) |
| Interface | SPI (Serial Peripheral Interface) |
| Operating Voltage | 3.3V (logic level) |
| Backlight Voltage | 3.0V to 3.3V |
| Current Consumption | ~20mA (backlight on) |
| Dimensions | 36mm x 52mm x 4.3mm |
The Adafruit ST7789 TFT display has the following pinout:
| Pin Name | Description | Notes |
|---|---|---|
| VIN | Power input (3.3V or 5V) | Connect to 3.3V or 5V supply |
| GND | Ground | Connect to ground |
| SCK | Serial Clock (SPI) | Connect to Arduino SCK (D13) |
| MOSI | Master Out Slave In (SPI Data) | Connect to Arduino MOSI (D11) |
| CS | Chip Select | Active low, connect to a GPIO |
| DC | Data/Command | Connect to a GPIO |
| RST | Reset | Connect to a GPIO or reset pin |
| BL | Backlight Control | Optional, connect to 3.3V or PWM |
To use the Adafruit ST7789 TFT display with an Arduino UNO, follow these steps:
Wiring the Display:
VIN pin to the 5V pin on the Arduino.GND pin to the GND pin on the Arduino.SCK pin to the Arduino's D13 (SPI clock).MOSI pin to the Arduino's D11 (SPI data).CS pin to a digital pin (e.g., D10).DC pin to another digital pin (e.g., D9).RST pin to another digital pin (e.g., D8).BL pin to 3.3V or a PWM-capable pin for backlight control.Install Required Libraries:
Adafruit_GFX and Adafruit_ST7789 libraries from the Arduino Library Manager.Example Code: Use the following example code to initialize and display graphics on the screen:
// Include necessary libraries
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7789.h> // ST7789 driver library
#include <SPI.h> // SPI library
// Define pin connections
#define TFT_CS 10 // Chip select pin
#define TFT_DC 9 // Data/command pin
#define TFT_RST 8 // Reset pin
// Create an instance of the display
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
Serial.println("TFT Display Test");
// Initialize the display
tft.init(170, 320); // Initialize with resolution 170x320
tft.setRotation(1); // Set display orientation (1 = landscape)
// Fill the screen with a color
tft.fillScreen(ST77XX_BLACK);
// Display some text
tft.setTextColor(ST77XX_WHITE);
tft.setTextSize(2);
tft.setCursor(10, 10);
tft.println("Hello, World!");
// Draw a rectangle
tft.drawRect(50, 50, 100, 50, ST77XX_RED);
}
void loop() {
// Nothing to do here
}
BL) can be connected to a PWM pin for brightness control.No Display Output:
CS, DC, and RST pins are correctly defined in the code.Flickering or Artifacts:
Backlight Not Turning On:
BL pin is connected to 3.3V or a PWM pin.Text or Graphics Not Displaying Properly:
Adafruit_GFX and Adafruit_ST7789 libraries are up to date.Adafruit_ST7789 library to rule out software issues.By following this documentation, you can successfully integrate and use the Adafruit ST7789 TFT display in your projects.