
This circuit connects an ESP32 microcontroller to a 1.3 inch TFT display module (ST7789). The ESP32 provides power and control signals to the display, enabling it to show graphical data.

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.

This circuit connects an ESP32 microcontroller to a 1.3 inch TFT display module (ST7789). The ESP32 provides power and control signals to the display, enabling it to show graphical data.

This circuit features an RTL8720DN microcontroller interfaced with a China ST7735S 160x128 TFT LCD display and four pushbuttons. The microcontroller reads the states of the pushbuttons and displays their statuses on the TFT LCD, providing a visual feedback system for button presses.

This circuit interfaces an Arduino UNO with an ILI9341 TFT display using two bi-directional logic level converters to manage voltage differences. The Arduino runs a program to test various graphical functions on the TFT display, demonstrating its capabilities through a series of visual benchmarks.

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.
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 |
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) |
VCC pin to a 3.3V power source and the GND pin to ground.SCL and SDA pins to the SPI clock and data lines of your microcontroller, respectively.RES pin to a GPIO pin on your microcontroller for resetting the display.DC pin to differentiate between data and command signals.CS pin to a GPIO pin for chip selection.BL pin to 3.3V for constant backlight or to a PWM-capable GPIO pin for brightness control.RES pin at startup.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
}
Display Not Turning On:
VCC and GND connections are correct.BL) is connected to 3.3V or a PWM signal.No Output or Incorrect Graphics:
SCL, SDA, CS, DC) for proper wiring.Flickering or Dim Backlight:
Reset Issues:
RES pin is properly toggled during initialization.RES pin.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.