

The 2.0-inch TFT Display with EC11 Rotary Encoder, manufactured by EstarDyn, is a compact and versatile display module designed for high-quality color output. It features the ST7789 driver, which ensures vibrant and sharp visuals, and an EC11 rotary encoder for intuitive user input. The module communicates via the SPI (Serial Peripheral Interface), offering fast and efficient data transfer.
This component is ideal for applications such as:








| Parameter | Specification |
|---|---|
| Display Size | 2.0 inches |
| Resolution | 240 x 320 pixels |
| Driver IC | ST7789 |
| Communication Interface | SPI |
| Input Voltage (VCC) | 3.3V - 5V |
| Backlight Voltage | 3.0V - 3.3V |
| Backlight Current | 20mA (typical) |
| Rotary Encoder Type | EC11 (incremental, 20 steps per rev) |
| Operating Temperature | -20°C to 70°C |
| Dimensions | 40mm x 60mm x 10mm |
| Pin Name | Pin Number | Description |
|---|---|---|
| VCC | 1 | Power supply input (3.3V - 5V) |
| GND | 2 | Ground |
| SCL | 3 | SPI clock input |
| SDA | 4 | SPI data input (MOSI) |
| RES | 5 | Reset pin (active low) |
| DC | 6 | Data/Command control pin |
| BLK | 7 | Backlight control (active low) |
| CS | 8 | Chip select (active low) |
| Pin Name | Description |
|---|---|
| CLK | Clock signal output |
| DT | Data signal output |
| SW | Push-button switch output |
| VCC | Power supply input (3.3V - 5V) |
| GND | Ground |
Below is an example of how to use the display and rotary encoder with an Arduino UNO.
| TFT Display Pin | Arduino Pin | Rotary Encoder Pin | Arduino Pin |
|---|---|---|---|
| VCC | 5V | VCC | 5V |
| GND | GND | GND | GND |
| SCL | D13 | CLK | D2 |
| SDA | D11 | DT | D3 |
| RES | D9 | SW | D4 |
| DC | D8 | ||
| CS | D10 | ||
| BLK | GND |
#include <Adafruit_GFX.h> // Graphics library for displays
#include <Adafruit_ST7789.h> // Library for ST7789 driver
#include <Encoder.h> // Library for rotary encoder
// Define TFT pins
#define TFT_CS 10
#define TFT_DC 8
#define TFT_RST 9
// Define rotary encoder pins
#define ENCODER_CLK 2
#define ENCODER_DT 3
#define ENCODER_SW 4
// Initialize TFT display
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
// Initialize rotary encoder
Encoder myEnc(ENCODER_CLK, ENCODER_DT);
void setup() {
// Initialize serial communication
Serial.begin(9600);
// Initialize TFT display
tft.init(240, 320); // Initialize with 240x320 resolution
tft.setRotation(1); // Set display orientation
tft.fillScreen(ST77XX_BLACK); // Clear screen with black color
tft.setTextColor(ST77XX_WHITE);
tft.setTextSize(2);
tft.setCursor(10, 10);
tft.println("TFT Display Ready!");
// Initialize rotary encoder switch pin
pinMode(ENCODER_SW, INPUT_PULLUP);
}
void loop() {
// Read rotary encoder position
static long oldPosition = -999;
long newPosition = myEnc.read() / 4; // Divide by 4 for EC11 resolution
if (newPosition != oldPosition) {
oldPosition = newPosition;
Serial.print("Encoder Position: ");
Serial.println(newPosition);
// Display position on TFT
tft.fillRect(10, 50, 200, 30, ST77XX_BLACK); // Clear previous text
tft.setCursor(10, 50);
tft.print("Position: ");
tft.print(newPosition);
}
// Check if rotary encoder button is pressed
if (digitalRead(ENCODER_SW) == LOW) {
tft.fillRect(10, 100, 200, 30, ST77XX_RED); // Highlight button press
tft.setCursor(10, 100);
tft.print("Button Pressed!");
delay(500); // Debounce delay
tft.fillRect(10, 100, 200, 30, ST77XX_BLACK); // Clear button text
}
}
Q: Can I use this display with a 3.3V microcontroller?
A: Yes, the display is compatible with both 3.3V and 5V systems.
Q: How do I adjust the brightness of the backlight?
A: Use a PWM signal on the BLK pin to control the backlight brightness.
Q: What is the maximum SPI clock speed supported?
A: The ST7789 driver supports SPI clock speeds up to 15 MHz for optimal performance.
Q: Can I use the rotary encoder without the display?
A: Yes, the rotary encoder can function independently for other applications.