Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 1.54'' TFT Display 240x240 spi ST7789: Examples, Pinouts, and Specs

Image of 1.54'' TFT Display 240x240 spi ST7789
Cirkit Designer LogoDesign with 1.54'' TFT Display 240x240 spi ST7789 in Cirkit Designer

Introduction

The 1.54-inch TFT Display is a compact and vibrant display module with a resolution of 240x240 pixels. It utilizes the ST7789 driver and communicates via the SPI (Serial Peripheral Interface) protocol, making it an excellent choice for embedded systems and small devices. This display is ideal for applications requiring a high-quality graphical interface, such as IoT devices, handheld gadgets, and wearable electronics.

Explore Projects Built with 1.54'' TFT Display 240x240 spi ST7789

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Powered 1.3 inch TFT Display Module for Visual Data Output
Image of ESP32+ST7789: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-C6 and ST7735S Display: Wi-Fi Controlled TFT Display Module
Image of ESP32-C6sm-ST7735: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
This circuit features an ESP32-C6 microcontroller interfaced with a China ST7735S 160x128 TFT display. The ESP32-C6 controls the display via SPI communication, providing power, ground, and control signals to render graphics and text on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled TFT Display with Multiple Pushbuttons
Image of rey: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
This circuit features an Arduino Nano microcontroller connected to a ST7735 128x128 1.44 TFT I2C Color display and multiple pushbuttons. The display is interfaced with the Arduino via digital pins for control signals and SPI pins for data transfer. The pushbuttons are connected to various digital and analog input pins on the Arduino, likely intended for user input to control the display or other functions within the code.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32C3-Based Thermal Imaging Camera with TFT Display
Image of MLX90640-XIAO-ESP32-1.3: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 1.54'' TFT Display 240x240 spi ST7789

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32+ST7789: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
ESP32-Powered 1.3 inch TFT Display Module for Visual Data Output
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32-C6sm-ST7735: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
ESP32-C6 and ST7735S Display: Wi-Fi Controlled TFT Display Module
This circuit features an ESP32-C6 microcontroller interfaced with a China ST7735S 160x128 TFT display. The ESP32-C6 controls the display via SPI communication, providing power, ground, and control signals to render graphics and text on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of rey: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
Arduino Nano Controlled TFT Display with Multiple Pushbuttons
This circuit features an Arduino Nano microcontroller connected to a ST7735 128x128 1.44 TFT I2C Color display and multiple pushbuttons. The display is interfaced with the Arduino via digital pins for control signals and SPI pins for data transfer. The pushbuttons are connected to various digital and analog input pins on the Arduino, likely intended for user input to control the display or other functions within the code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MLX90640-XIAO-ESP32-1.3: A project utilizing 1.54'' TFT Display 240x240 spi ST7789 in a practical application
ESP32C3-Based Thermal Imaging Camera with TFT Display
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Smartwatches and fitness trackers
  • IoT dashboards and control panels
  • Portable gaming devices
  • Embedded systems requiring graphical output
  • Educational and hobbyist projects with microcontrollers like Arduino or Raspberry Pi

Technical Specifications

Below are the key technical details and pin configuration for the 1.54'' TFT Display:

Key Technical Details

Parameter Specification
Display Type TFT (Thin-Film Transistor)
Resolution 240x240 pixels
Driver IC ST7789
Communication Protocol SPI (4-wire)
Operating Voltage 3.3V (logic and backlight)
Backlight LED
Display Size 1.54 inches (diagonal)
Color Depth 65K (16-bit RGB)
Viewing Angle Wide (all directions)
Operating Temperature -20°C to 70°C

Pin Configuration and Descriptions

Pin Name Pin Number Description
GND 1 Ground connection
VCC 2 Power supply (3.3V)
SCL 3 Serial Clock Line (SPI clock input)
SDA 4 Serial Data Line (SPI data input)
RES 5 Reset pin (active low)
DC 6 Data/Command control pin
CS 7 Chip Select (active low)
BLK 8 Backlight control (connect to 3.3V for always on)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. SPI Communication: Connect the SCL (clock) and SDA (data) pins to the corresponding SPI pins on your microcontroller.
  3. Control Pins:
    • Connect the RES pin to a GPIO pin for resetting the display.
    • Use the DC pin to toggle between data and command modes.
    • Connect the CS pin to a GPIO pin to enable or disable the display.
  4. Backlight: Connect the BLK pin to 3.3V for constant backlight or to a PWM pin for brightness control.

Important Considerations and Best Practices

  • Voltage Levels: Ensure all logic signals are at 3.3V. If using a 5V microcontroller (e.g., Arduino UNO), use level shifters to avoid damaging the display.
  • SPI Speed: The ST7789 supports high SPI clock speeds, but start with a moderate speed (e.g., 4 MHz) to ensure stable communication.
  • Initialization: The display requires proper initialization commands to function. Use a compatible library (e.g., Adafruit_GFX or TFT_eSPI) to simplify this process.
  • Backlight Control: If you want to control the backlight brightness, use a PWM signal on the BLK pin.

Example Code for Arduino UNO

Below is an example of how to use the 1.54'' TFT Display with an Arduino UNO using the Adafruit_GFX and Adafruit_ST7789 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_RST   9   // Reset pin
#define TFT_DC    8   // Data/Command pin

// Initialize the display object
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(9600);
  Serial.println("Initializing display...");

  // Initialize the display
  tft.init(240, 240);  // Initialize with 240x240 resolution
  tft.setRotation(1);  // Set display rotation (0-3)

  // Fill the screen with a color
  tft.fillScreen(ST77XX_BLACK);
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(10, 10);
  tft.println("Hello, World!");
}

void loop() {
  // Example: Draw a red rectangle
  tft.fillRect(50, 50, 100, 100, ST77XX_RED);
  delay(1000);

  // Example: Clear the rectangle
  tft.fillRect(50, 50, 100, 100, ST77XX_BLACK);
  delay(1000);
}

Notes:

  • Install the Adafruit_GFX and Adafruit_ST7789 libraries via the Arduino Library Manager.
  • Use appropriate level shifters if connecting to a 5V microcontroller.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Display Not Turning On:

    • Verify the power connections (VCC and GND).
    • Ensure the BLK pin is connected to 3.3V or a PWM signal.
  2. No Output on the Screen:

    • Check the SPI connections (SCL, SDA, CS, DC).
    • Ensure the RES pin is properly connected and initialized in the code.
    • Verify that the initialization sequence in the code matches the ST7789 requirements.
  3. Flickering or Unstable Display:

    • Reduce the SPI clock speed in the code.
    • Ensure proper grounding and minimize noise in the circuit.
  4. Incorrect Colors or Artifacts:

    • Verify the color format (16-bit RGB) used in the code.
    • Check for loose or incorrect connections.

FAQs

Q: Can I use this display with a Raspberry Pi?
A: Yes, the display is compatible with Raspberry Pi. Use libraries like luma.lcd or Pillow for Python-based development.

Q: What is the maximum SPI clock speed supported?
A: The ST7789 can support SPI clock speeds up to 15 MHz, but start with lower speeds for stability.

Q: Can I power the display with 5V?
A: No, the display operates at 3.3V. Use a voltage regulator or level shifters if working with a 5V system.

Q: How do I control the backlight brightness?
A: Connect the BLK pin to a PWM-capable GPIO pin and adjust the duty cycle to control brightness.

This concludes the documentation for the 1.54'' TFT Display 240x240 SPI ST7789.