The 2.0 inch TFT LCD Display (Manufacturer: 1.21 GMT 020-02-8P, Part ID: ST7789) is a compact, high-resolution Thin-Film Transistor Liquid Crystal Display. It is designed to provide vibrant and colorful graphical output, making it ideal for applications requiring a small yet visually appealing display. This display is commonly used in embedded systems, IoT devices, handheld gadgets, and user interface panels.
Below are the key technical details of the 2.0 inch TFT LCD Display:
Parameter | Specification |
---|---|
Display Type | TFT LCD |
Screen Size | 2.0 inches |
Resolution | 240 x 320 pixels |
Controller IC | ST7789 |
Interface | SPI (Serial Peripheral Interface) |
Operating Voltage | 3.3V |
Backlight Voltage | 3.0V to 3.3V |
Current Consumption | ~20mA (typical, with backlight on) |
Viewing Angle | 160° |
Color Depth | 65K (16-bit RGB) |
Operating Temperature | -20°C to 70°C |
Dimensions (L x W x H) | 42.72mm x 60.26mm x 2.3mm |
The display has an 8-pin interface. Below is the pinout and description:
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground (0V reference) |
2 | VCC | Power supply (3.3V) |
3 | SCL | Serial Clock (SPI clock input) |
4 | SDA | Serial Data (SPI data input) |
5 | RES | Reset (Active Low) |
6 | DC | Data/Command control (High for data, Low for command) |
7 | CS | Chip Select (Active Low) |
8 | BLK | Backlight control (PWM or ON/OFF) |
To use the 2.0 inch TFT LCD Display, connect it to a microcontroller (e.g., Arduino UNO) via the SPI interface. Below is a typical wiring guide for connecting the display to an Arduino UNO:
TFT Pin | Arduino Pin |
---|---|
GND | GND |
VCC | 3.3V |
SCL | D13 (SCK) |
SDA | D11 (MOSI) |
RES | D8 |
DC | D9 |
CS | D10 |
BLK | 3.3V or PWM pin |
Below is an example Arduino sketch to initialize and display graphics on the 2.0 inch TFT LCD 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 TFT pins
#define TFT_CS 10 // Chip Select pin
#define TFT_RST 8 // Reset pin
#define TFT_DC 9 // 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, 320); // Initialize with 240x320 resolution
tft.setRotation(1); // Set display orientation (1 = landscape)
// Fill the screen with a solid color
tft.fillScreen(ST77XX_BLACK);
// Draw a rectangle with text
tft.fillRect(50, 50, 140, 100, ST77XX_BLUE); // Draw blue rectangle
tft.setTextColor(ST77XX_WHITE); // Set text color to white
tft.setTextSize(2); // Set text size
tft.setCursor(60, 80); // Set text position
tft.print("Hello!"); // Print text
}
void loop() {
// Add any animations or updates here
}
Display Not Turning On:
No Output or Incorrect Graphics:
Flickering or Unstable Display:
Backlight Not Working:
Q: Can I use this display with a 5V microcontroller?
A: Yes, but you must use level shifters for the SPI lines (SCL, SDA, CS, DC, RES) to avoid damaging the display.
Q: What is the maximum frame rate supported?
A: The frame rate depends on the SPI clock speed. At 10 MHz SPI, the display can achieve smooth updates for most applications.
Q: Can I control the backlight brightness?
A: Yes, connect the BLK pin to a PWM-capable pin on your microcontroller to adjust brightness.
Q: Is this display compatible with Raspberry Pi?
A: Yes, the ST7789 driver is supported on Raspberry Pi. Use libraries like luma.lcd
or Pillow
for Python-based development.
By following this documentation, you can effectively integrate and troubleshoot the 2.0 inch TFT LCD Display in your projects.