The TFT ST7789V 2.8' is a 2.8-inch thin-film transistor (TFT) display module that utilizes the ST7789V driver. This display is known for its high resolution, vibrant color depth, and compact size, making it ideal for a wide range of embedded applications. It is commonly used in projects requiring graphical user interfaces, such as IoT devices, handheld instruments, and portable displays.
Below are the key technical details and pin configuration for the TFT ST7789V 2.8' display module:
Parameter | Value |
---|---|
Display Type | TFT LCD |
Driver IC | ST7789V |
Screen Size | 2.8 inches |
Resolution | 240 x 320 pixels |
Color Depth | 16-bit (65,536 colors) |
Interface | SPI (Serial Peripheral Interface) |
Operating Voltage | 3.3V |
Backlight Voltage | 3.0V to 3.3V |
Backlight Current | ~20mA |
Operating Temperature | -20°C to 70°C |
Viewing Angle | 80° (all directions) |
The TFT ST7789V 2.8' module typically has the following pinout:
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Power supply (3.3V) |
3 | SCL | Serial Clock (SPI clock input) |
4 | SDA | Serial Data (SPI data input) |
5 | RES | Reset pin (active low) |
6 | DC | Data/Command control pin |
7 | CS | Chip Select (active low) |
8 | BLK | Backlight control (connect to 3.3V for always on) |
VCC
pin to a 3.3V power source and the GND
pin to ground.SCL
(clock) and SDA
(data) pins to the corresponding SPI pins on your microcontroller.RES
pin to a GPIO pin on your microcontroller for resetting the display.DC
pin to toggle between data and command modes.CS
pin to a GPIO pin to enable or disable the display.BLK
pin to 3.3V for constant backlight or to a PWM pin for brightness control.Below is an example of how to interface the TFT ST7789V 2.8' with an Arduino UNO using the Adafruit ST7789 library:
#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 ST7789V 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 color
tft.fillScreen(ST77XX_BLACK);
// Draw a simple rectangle
tft.fillRect(50, 50, 140, 100, ST77XX_RED);
// Display text
tft.setTextColor(ST77XX_WHITE);
tft.setTextSize(2);
tft.setCursor(60, 80);
tft.print("Hello, World!");
}
void loop() {
// Nothing to do here
}
TFT_CS
, TFT_RST
, TFT_DC
) to match your wiring.No Display Output:
CS
pin is correctly toggled to enable the display.BLK
pin) is powered.Flickering or Unstable Display:
Incorrect Colors or Artifacts:
DC
pin is correctly toggled between data and command modes.Display Not Resetting:
RES
pin is connected to a GPIO pin and is toggled during initialization.Q: Can I use this display with a 5V microcontroller?
A: Yes, but you must use level shifters to convert 5V logic to 3.3V logic for the SPI and control pins.
Q: How do I control the backlight brightness?
A: Connect the BLK
pin to a PWM-capable GPIO pin on your microcontroller and adjust the duty cycle to control brightness.
Q: Can I use this display with Raspberry Pi?
A: Yes, the display is compatible with Raspberry Pi. Use the SPI interface and appropriate libraries (e.g., luma.lcd
or ST7789
Python libraries).
Q: What is the maximum SPI clock speed supported?
A: The ST7789V driver typically supports SPI clock speeds up to 15 MHz. Check your specific module's datasheet for exact details.