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

How to Use Waveshare 2 Inch LCD Display Module 240x320: Examples, Pinouts, and Specs

Image of Waveshare 2 Inch LCD Display Module 240x320
Cirkit Designer LogoDesign with Waveshare 2 Inch LCD Display Module 240x320 in Cirkit Designer

Introduction

The Waveshare 2 Inch LCD Display Module (Part ID: EC-5480) is a compact and versatile display solution designed for embedded systems and projects requiring a high-quality visual interface. With a resolution of 240x320 pixels and support for multiple communication interfaces, this module is ideal for applications such as IoT devices, handheld instruments, and graphical user interfaces for microcontroller-based systems. Its small form factor and vibrant display make it a popular choice for developers and hobbyists alike.

Explore Projects Built with Waveshare 2 Inch LCD Display Module 240x320

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 Nano Controlled LCD Interface with Pushbutton Inputs
Image of MacroDisplay: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 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
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
Image of godmode: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and I2C LCD Display Power Supply Project
Image of lcd display: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
This circuit features an Arduino Nano microcontroller interfaced with a 20x4 I2C LCD panel for display purposes. The LCD panel is powered by a 5V AC-DC power supply unit, and the Arduino Nano communicates with the LCD via I2C protocol using its A5 (SDA) and A1 (SCL) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Controlled TFT Touchscreen Interface
Image of Tablero Moto: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
This circuit connects an Arduino Mega 2560 microcontroller to a 3.5-inch 480x320 TFT LCD display. The Arduino provides power, ground, and digital signals to control the display, including data lines for pixel information and control lines for reset, write, and command/data selection. The embedded code initializes the display and configures the Arduino's pins for communication, likely to create a user interface or visual output for a project.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Waveshare 2 Inch LCD Display Module 240x320

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 MacroDisplay: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 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
Image of godmode: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of lcd display: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
Arduino Nano and I2C LCD Display Power Supply Project
This circuit features an Arduino Nano microcontroller interfaced with a 20x4 I2C LCD panel for display purposes. The LCD panel is powered by a 5V AC-DC power supply unit, and the Arduino Nano communicates with the LCD via I2C protocol using its A5 (SDA) and A1 (SCL) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Tablero Moto: A project utilizing Waveshare 2 Inch LCD Display Module 240x320 in a practical application
Arduino Mega 2560 Controlled TFT Touchscreen Interface
This circuit connects an Arduino Mega 2560 microcontroller to a 3.5-inch 480x320 TFT LCD display. The Arduino provides power, ground, and digital signals to control the display, including data lines for pixel information and control lines for reset, write, and command/data selection. The embedded code initializes the display and configures the Arduino's pins for communication, likely to create a user interface or visual output for a project.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • IoT devices with graphical interfaces
  • Portable monitoring systems
  • Embedded system development
  • Educational and prototyping projects
  • Visual output for Arduino, Raspberry Pi, and other microcontrollers

Technical Specifications

Below are the key technical details of the Waveshare 2 Inch LCD Display Module:

Specification Details
Manufacturer Waveshare
Part ID EC-5480
Display Type TFT LCD
Screen Size 2 inches
Resolution 240x320 pixels
Color Depth 65K colors
Interface SPI
Operating Voltage 3.3V
Backlight Control Yes
Dimensions 42mm x 60mm
Driver IC ST7789
Operating Temperature -20°C to 70°C

Pin Configuration

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

Pin Name Description
1 VCC Power supply (3.3V)
2 GND Ground
3 SCL Serial Clock Line (SPI clock input)
4 SDA Serial Data Line (SPI data input)
5 RES Reset pin (active low)
6 DC Data/Command control pin
7 BL Backlight control (PWM or ON/OFF)
8 CS Chip Select (active low)

Usage Instructions

Connecting the Module

To use the Waveshare 2 Inch LCD Display Module, follow these steps:

  1. Power Supply: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. SPI Interface: Connect the SCL (clock) and SDA (data) pins to the corresponding SPI pins on your microcontroller.
  3. Control Pins:
    • Connect the RES pin to a GPIO pin for resetting the display.
    • Use the DC pin to toggle between data and command modes.
    • Connect the CS pin to a GPIO pin to enable or disable the display.
  4. Backlight: The BL pin can be connected to a PWM-capable GPIO pin for brightness control or directly to 3.3V for constant backlight.

Example Code for Arduino UNO

Below is an example of how to interface the display 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("Initializing display...");

  // Initialize the display
  tft.init(240, 320); // Initialize with 240x320 resolution
  tft.setRotation(1); // Set display orientation

  // Fill the screen with a color
  tft.fillScreen(ST77XX_BLACK);
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(10, 10);
  tft.println("Hello, Waveshare!");
}

void loop() {
  // Add your code here to update the display
}

Important Considerations

  • Voltage Levels: Ensure the module is powered with 3.3V. Using 5V may damage the display.
  • SPI Speed: Use an appropriate SPI clock speed to avoid communication errors.
  • Backlight Control: If using PWM for backlight control, ensure the frequency is high enough to avoid visible flicker.
  • Library Compatibility: Use libraries compatible with the ST7789 driver for seamless integration.

Troubleshooting and FAQs

Common Issues

  1. No Display Output:

    • Verify all connections, especially power and SPI lines.
    • Ensure the CS pin is correctly toggled to enable the display.
    • Check if the RES pin is properly initialized in your code.
  2. Flickering or Artifacts:

    • Reduce the SPI clock speed in your code.
    • Ensure proper grounding to avoid noise interference.
  3. Backlight Not Working:

    • Confirm the BL pin is connected to 3.3V or a PWM-capable GPIO pin.
    • Check for loose connections or damaged traces.
  4. Incorrect Colors or Orientation:

    • Verify the initialization code and ensure the correct driver (ST7789) is used.
    • Adjust the setRotation() parameter to match your desired orientation.

FAQs

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

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

Q: Can I use this display with a Raspberry Pi?
A: Yes, the module is compatible with Raspberry Pi. Use the SPI interface and appropriate libraries (e.g., luma.lcd or Pillow) for integration.

Q: How do I control the backlight brightness?
A: Connect the BL pin to a PWM-capable GPIO pin and adjust the duty cycle in your code to control brightness.

By following this documentation, you can effectively integrate and utilize the Waveshare 2 Inch LCD Display Module in your projects.