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

How to Use Display TFT 1.9": Examples, Pinouts, and Specs

Image of Display TFT 1.9"Design with Display TFT 1.9" in Cirkit Designer

Introduction

The Adafruit 1.9-inch TFT Display (Part ID: ST7789) is a high-quality thin-film transistor (TFT) display designed for use in embedded systems and portable devices. It features vibrant color graphics and a compact form factor, making it ideal for applications requiring a small yet visually appealing display. The ST7789 driver chip enables efficient communication with microcontrollers, allowing for seamless integration into a variety of projects.

Explore Projects Built with Display TFT 1.9"

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 Display TFT 1.9" 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

Common Applications and Use Cases

Technical Specifications

The following table outlines the key technical details of the Adafruit 1.9-inch TFT Display:

Specification Details
Display Type TFT (Thin-Film Transistor)
Screen Size 1.9 inches
Resolution 240 x 240 pixels
Color Depth 65,536 colors (16-bit RGB)
Driver IC ST7789
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 36mm x 4.3mm
Viewing Angle Wide viewing angle
Operating Temperature -20°C to 70°C

Pin Configuration and Descriptions

The display module has the following pinout:

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 (high for data, low for command)
CS 7 Chip Select (active low)
BL 8 Backlight control (connect to 3.3V for always-on backlight or PWM for dimming)

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 and SDA pins to the SPI clock and data lines of your microcontroller, respectively.
  3. Control Pins:
    • Connect the RES pin to a GPIO pin on your microcontroller for resetting the display.
    • Use the DC pin to differentiate between data and command signals.
    • Connect the CS pin to a GPIO pin for chip selection.
  4. Backlight: Connect the BL pin to 3.3V for constant backlight or to a PWM-capable GPIO pin for brightness control.
  5. Software Setup: Use a compatible library (e.g., Adafruit_GFX and Adafruit_ST7789) to initialize and control the display.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to use the Adafruit 1.9-inch TFT Display with an Arduino UNO:

#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("TFT Display Test");

  // Initialize the display
  tft.init(240, 240);  // Initialize with 240x240 resolution
  tft.setRotation(1);  // Set display orientation

  // Fill the screen with a solid color
  tft.fillScreen(ST77XX_BLACK);

  // Draw a rectangle with text
  tft.fillRect(50, 50, 140, 140, ST77XX_BLUE);
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(60, 100);
  tft.print("Hello!");
}

void loop() {
  // Add any additional functionality here
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Display Not Turning On:

    • Verify that the VCC and GND connections are correct.
    • Ensure the backlight pin (BL) is connected to 3.3V or a PWM signal.
  2. No Output or Incorrect Graphics:

    • Check the SPI connections (SCL, SDA, CS, DC) for proper wiring.
    • Ensure the SPI clock speed is within the supported range of the ST7789.
  3. Flickering or Dim Backlight:

    • Verify the backlight voltage is stable and within the specified range (3.0V to 3.3V).
    • If using PWM for brightness control, ensure the frequency is high enough to avoid visible flicker.
  4. Reset Issues:

    • Ensure the RES pin is properly toggled during initialization.
    • Check for loose connections on the RES pin.

FAQs

Q: Can I use this display with a 5V microcontroller?
A: Yes, but you must use level shifters to convert the 5V logic signals to 3.3V.

Q: What is the maximum SPI clock speed supported?
A: The ST7789 typically supports SPI clock speeds up to 15 MHz.

Q: Can I control the backlight brightness?
A: Yes, connect the BL pin to a PWM-capable GPIO pin to adjust brightness.

Q: Is this display compatible with Raspberry Pi?
A: Yes, the display can be used with Raspberry Pi using SPI and appropriate libraries.