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

How to Use TFT display 1.9" 170x320: Examples, Pinouts, and Specs

Image of TFT display 1.9" 170x320Design with TFT display 1.9" 170x320 in Cirkit Designer

Introduction

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.

Explore Projects Built with TFT display 1.9" 170x320

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 Arduino Mega 2560 Controlled TFT Touchscreen Interface: A project utilizing TFT display 1.9" 170x320 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
Image of ESP32C3-Based Thermal Imaging Camera with TFT Display: A project utilizing TFT display 1.9" 170x320 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

Technical Specifications

Key Technical Details

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

Pin Configuration

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

Usage Instructions

Connecting the Display to an Arduino UNO

To use the Adafruit ST7789 TFT display with an Arduino UNO, follow these steps:

  1. Wiring the Display:

    • Connect the VIN pin to the 5V pin on the Arduino.
    • Connect the GND pin to the GND pin on the Arduino.
    • Connect the SCK pin to the Arduino's D13 (SPI clock).
    • Connect the MOSI pin to the Arduino's D11 (SPI data).
    • Connect the CS pin to a digital pin (e.g., D10).
    • Connect the DC pin to another digital pin (e.g., D9).
    • Connect the RST pin to another digital pin (e.g., D8).
    • Optionally, connect the BL pin to 3.3V or a PWM-capable pin for backlight control.
  2. Install Required Libraries:

    • Install the Adafruit_GFX and Adafruit_ST7789 libraries from the Arduino Library Manager.
  3. 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
    }
    

Important Considerations

Troubleshooting and FAQs

Common Issues

  1. No Display Output:

    • Verify all connections are secure and match the pinout.
    • Ensure the CS, DC, and RST pins are correctly defined in the code.
    • Check the power supply voltage and current.
  2. Flickering or Artifacts:

    • Reduce the SPI clock speed in the code.
    • Ensure proper grounding between the Arduino and the display.
  3. Backlight Not Turning On:

    • Confirm the BL pin is connected to 3.3V or a PWM pin.
    • Check for loose connections or insufficient power supply.
  4. Text or Graphics Not Displaying Properly:

    • Verify the resolution and orientation settings in the code.
    • Ensure the Adafruit_GFX and Adafruit_ST7789 libraries are up to date.

Tips for Troubleshooting

By following this documentation, you can successfully integrate and use the Adafruit ST7789 TFT display in your projects.