Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 2inch LCD Module: Examples, Pinouts, and Specs

Image of 2inch LCD Module
Cirkit Designer LogoDesign with 2inch LCD Module in Cirkit Designer

Introduction

The 2-inch LCD Module (Manufacturer: Waveshare, Part ID: ST7789V) is a compact display module designed for visual output in embedded systems and electronics projects. With a diagonal size of 2 inches, this module offers vibrant color representation and high resolution, making it ideal for applications requiring clear and detailed image or text display. It is commonly used in IoT devices, handheld gadgets, and DIY electronics projects.

Explore Projects Built with 2inch LCD Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO with I2C LCD and Bluetooth Control
Image of Copy of circuit diagram: A project utilizing 2inch LCD Module in a practical application
This circuit features an Arduino UNO connected to an I2C LCD screen for display and an HC-05 Bluetooth module for wireless data communication. It includes flex resistors potentially used for sensing applications, with pull-up resistors to maintain signal integrity.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Leonardo Controlled LCD Display with I2C Interface
Image of ert: A project utilizing 2inch LCD Module in a practical application
This circuit connects an Arduino Leonardo microcontroller to a 16x2 LCD display via an LCM1602 IIC interface module, enabling the display of text on the LCD. The Arduino is programmed to display the messages 'TEST LCD i2C' and 'KelasRobot.com' on the LCD. The IIC module facilitates communication between the Arduino and the LCD using the I2C protocol, simplifying the wiring and pin usage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Hall Effect Sensor Interface with LCD Display
Image of Cadence Sensor: A project utilizing 2inch LCD Module in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an LCM1602 IIC module, which is connected to a 16x2 LCD display for visual output. The Arduino is also connected to a Hall sensor and a tactile switch, both of which likely serve as input devices. The Hall sensor is used to detect magnetic fields, and the tactile switch is a user interface component. The circuit is powered by a 9V battery, with resistors presumably used for current limiting or pull-up/down configurations.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled LCD Interface with Pushbutton Inputs
Image of MacroDisplay: A project utilizing 2inch LCD Module in a practical application
This circuit features a Nano 3.0 ATmega328P microcontroller connected to a 16x2 I2C LCD display for output. Two pushbuttons, each with a 10k Ohm pull-down resistor, are connected to digital pins D2 and D3 of the microcontroller for input. The LCD and pushbuttons are powered by the 5V output from the microcontroller, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 2inch LCD Module

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 Copy of circuit diagram: A project utilizing 2inch LCD Module in a practical application
Arduino UNO with I2C LCD and Bluetooth Control
This circuit features an Arduino UNO connected to an I2C LCD screen for display and an HC-05 Bluetooth module for wireless data communication. It includes flex resistors potentially used for sensing applications, with pull-up resistors to maintain signal integrity.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ert: A project utilizing 2inch LCD Module in a practical application
Arduino Leonardo Controlled LCD Display with I2C Interface
This circuit connects an Arduino Leonardo microcontroller to a 16x2 LCD display via an LCM1602 IIC interface module, enabling the display of text on the LCD. The Arduino is programmed to display the messages 'TEST LCD i2C' and 'KelasRobot.com' on the LCD. The IIC module facilitates communication between the Arduino and the LCD using the I2C protocol, simplifying the wiring and pin usage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Cadence Sensor: A project utilizing 2inch LCD Module in a practical application
Arduino UNO Based Hall Effect Sensor Interface with LCD Display
This circuit features an Arduino UNO microcontroller interfaced with an LCM1602 IIC module, which is connected to a 16x2 LCD display for visual output. The Arduino is also connected to a Hall sensor and a tactile switch, both of which likely serve as input devices. The Hall sensor is used to detect magnetic fields, and the tactile switch is a user interface component. The circuit is powered by a 9V battery, with resistors presumably used for current limiting or pull-up/down configurations.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MacroDisplay: A project utilizing 2inch LCD Module in a practical application
Arduino Nano Controlled LCD Interface with Pushbutton Inputs
This circuit features a Nano 3.0 ATmega328P microcontroller connected to a 16x2 I2C LCD display for output. Two pushbuttons, each with a 10k Ohm pull-down resistor, are connected to digital pins D2 and D3 of the microcontroller for input. The LCD and pushbuttons are powered by the 5V output from the microcontroller, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT Devices: Displaying sensor data, system status, or user interfaces.
  • Wearable Electronics: Compact displays for smartwatches or fitness trackers.
  • DIY Projects: Visual output for Arduino, Raspberry Pi, or other microcontroller-based systems.
  • Prototyping: Testing graphical user interfaces (GUIs) in embedded systems.
  • Industrial Applications: Compact displays for control panels or monitoring systems.

Technical Specifications

Below are the key technical details of the 2-inch LCD Module:

General Specifications

Parameter Value
Manufacturer Waveshare
Part ID ST7789V
Display Size 2 inches (diagonal)
Resolution 240 x 320 pixels
Display Type TFT LCD
Color Depth 65K/262K colors
Interface SPI (Serial Peripheral Interface)
Operating Voltage 3.3V
Backlight Voltage 3.0V to 3.3V
Operating Temperature -20°C to 70°C

Pin Configuration and Descriptions

The module features a standard pin header for easy interfacing. Below is the pinout:

Pin Number Pin Name Description
1 GND Ground connection
2 VCC Power supply (3.3V)
3 SCL Serial Clock Line for SPI communication
4 SDA Serial Data Line for SPI communication
5 RES Reset pin (active low)
6 DC Data/Command control pin
7 BL Backlight control (connect to 3.3V for always on)
8 CS Chip Select (active low)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. SPI Communication: Connect the SCL and SDA pins to the SPI clock and data lines of your microcontroller, respectively.
  3. Control Pins:
    • Use the RES pin to reset the display during initialization.
    • The DC pin determines whether the data being sent is a command or display data.
    • The CS pin enables or disables communication with the module.
  4. Backlight: Connect the BL pin to 3.3V to keep the backlight on, or use a PWM pin from your microcontroller for brightness control.

Important Considerations and Best Practices

  • Voltage Levels: Ensure all input signals are at 3.3V logic levels. Use level shifters if your microcontroller operates at 5V.
  • Initialization: Properly initialize the display using the ST7789V driver commands before sending data.
  • Backlight Control: Avoid exceeding the recommended backlight voltage to prevent damage.
  • SPI Speed: Use an appropriate SPI clock speed (typically up to 10 MHz) to ensure reliable communication.

Example Code for Arduino UNO

Below is an example of how to interface the 2-inch LCD Module with an Arduino UNO 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 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("2-inch LCD Module 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_BLUE);

  // Display text
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(10, 10);
  tft.println("Hello, World!");
}

void loop() {
  // Add your code here for dynamic updates
}

Notes:

  • Install the Adafruit GFX and Adafruit ST7789 libraries via the Arduino Library Manager before running the code.
  • Ensure the SPI pins on the Arduino UNO (MOSI, MISO, SCK) are correctly connected to the module.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Display Output:

    • Verify all connections, especially power (VCC and GND) and SPI lines.
    • Ensure the CS pin is correctly toggled during communication.
    • Check if the display is properly initialized in the code.
  2. Flickering or Unstable Display:

    • Reduce the SPI clock speed to improve communication stability.
    • Ensure the backlight voltage is stable and within the recommended range.
  3. Incorrect Colors or Artifacts:

    • Verify that the correct initialization commands for the ST7789V driver are used.
    • Check for loose or faulty connections on the data lines.
  4. Backlight Not Working:

    • Ensure the BL pin is connected to 3.3V or a PWM signal.
    • Check for any damage to the backlight circuitry.

FAQs

Q: Can I use this module with a 5V microcontroller?
A: Yes, but you must use level shifters to convert the 5V logic signals to 3.3V to avoid damaging the module.

Q: What is the maximum SPI clock speed supported?
A: The module typically supports SPI clock speeds up to 10 MHz. Check the microcontroller's SPI capabilities for compatibility.

Q: Can I control the backlight brightness?
A: Yes, you can use a PWM signal on the BL pin to adjust the brightness.

Q: Is this module compatible with Raspberry Pi?
A: Yes, the module can be used with Raspberry Pi via SPI, but you may need to install the appropriate libraries and drivers.

By following this documentation, you can effectively integrate the 2-inch LCD Module into your projects and troubleshoot common issues.