Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use 1.3 inch TFT Module 240×240 ST7789: Examples, Pinouts, and Specs

Image of 1.3 inch TFT Module 240×240 ST7789Design with 1.3 inch TFT Module 240×240 ST7789 in Cirkit Designer

Introduction

The 1.3 inch TFT Module 240×240 ST7789 by Adafruit (part ID: GMT130-V1.0) is a compact and vibrant display module suitable for adding a colorful and high-resolution interface to your electronics projects. This module uses a thin-film-transistor (TFT) LCD to provide a bright and clear display with a 240x240 pixel resolution. The ST7789 driver integrated into the module allows for efficient communication and control over the display using a microcontroller, such as an Arduino UNO.

Explore Projects Built with 1.3 inch TFT Module 240×240 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 ESP32C3-Based Thermal Imaging Camera with TFT Display: A project utilizing 1.3 inch TFT Module 240×240 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.

Open Project in Cirkit Designer
Image of Arduino Mega 2560 Controlled TFT Touchscreen Interface: A project utilizing 1.3 inch TFT Module 240×240 ST7789 in a practical application
Arduino Mega 2560 Controlled TFT Touchscreen Interface

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.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 GND Ground
2 VCC Power supply (3.3V)
3 SCL Serial Clock for SPI
4 SDA Serial Data for SPI
5 RES Reset pin
6 DC Data/Command control pin
7 CS Chip Select for SPI
8 BLK Backlight control (PWM capable)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Connections: Connect the VCC pin to a 3.3V power supply and the GND pin to the ground.
  2. SPI Communication: Connect the SCL, SDA, RES, DC, and CS pins to the corresponding SPI and control pins on your microcontroller.
  3. Backlight Control: The BLK pin can be connected to a PWM output for backlight brightness control.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789

// Pin definitions
#define TFT_CS        10 // Chip select line for TFT display
#define TFT_RST        9 // Reset line for TFT (or connect to +3V3)
#define TFT_DC         8 // Data/command line for TFT
#define TFT_BL         7 // Backlight control pin (optional)

// Initialize Adafruit ST7789 TFT library
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  pinMode(TFT_BL, OUTPUT); // Set backlight pin to output mode
  digitalWrite(TFT_BL, HIGH); // Turn on the backlight

  tft.init(240, 240);       // Initialize display with its resolution
  tft.fillScreen(ST77XX_BLACK); // Clear the screen to black
}

void loop() {
  // Example display code
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(1);
  tft.setCursor(20, 20);
  tft.print("Hello, World!");
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use this display with a 5V microcontroller? A: Yes, but you will need to use a level shifter or logic level converter to protect the 3.3V logic of the display.

Q: Is it possible to use this display without an SPI interface? A: No, this display requires an SPI interface for communication with the microcontroller.

Q: How can I increase the brightness of the display? A: You can increase the brightness by providing a higher duty cycle PWM signal to the BLK pin.

Q: What library should I use for this display? A: The Adafruit_GFX and Adafruit_ST7789 libraries are recommended for interfacing with this display.

Q: Can I display images or animations on this screen? A: Yes, the display is capable of showing images and animations. You will need to use the Adafruit_GFX library functions to draw images and update the display accordingly.