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

How to Use ILI9341 2.8" TFT With Touch: Examples, Pinouts, and Specs

Image of ILI9341 2.8" TFT With Touch
Cirkit Designer LogoDesign with ILI9341 2.8" TFT With Touch in Cirkit Designer

Introduction

The ILI9341 2.8" TFT display, manufactured by Ilitek, is a versatile and compact graphical display module. It features a 240x320 pixel resolution and an integrated touchscreen interface, making it ideal for projects requiring both visual output and user interaction. This display is widely used in embedded systems, IoT devices, and DIY electronics projects due to its vibrant color rendering, touch functionality, and compatibility with popular microcontrollers like Arduino and Raspberry Pi.

Explore Projects Built with ILI9341 2.8" TFT With Touch

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
RTL8720DN-Based Interactive Button-Controlled TFT Display
Image of coba-coba: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered 1.3 inch TFT Display Module for Visual Data Output
Image of ESP32+ST7789: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Health Monitoring System with TFT Display and RTC
Image of RemindeRx Circuit Design: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
This circuit features an ESP32 microcontroller interfaced with an ILI9341 TFT display, a DS3231 RTC module, and a MAX30102 sensor for health monitoring. The ESP32 handles display updates and sensor data acquisition, while the ULN2003 driver controls a 28BYJ-48 stepper motor. The setup is designed for a health monitoring system with a graphical user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32C3-Based Thermal Imaging Camera with TFT Display
Image of MLX90640-XIAO-ESP32-1.3: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ILI9341 2.8" TFT With Touch

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 coba-coba: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
RTL8720DN-Based Interactive Button-Controlled TFT Display
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32+ST7789: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
ESP32-Powered 1.3 inch TFT Display Module for Visual Data Output
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RemindeRx Circuit Design: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
ESP32-Based Health Monitoring System with TFT Display and RTC
This circuit features an ESP32 microcontroller interfaced with an ILI9341 TFT display, a DS3231 RTC module, and a MAX30102 sensor for health monitoring. The ESP32 handles display updates and sensor data acquisition, while the ULN2003 driver controls a 28BYJ-48 stepper motor. The setup is designed for a health monitoring system with a graphical user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MLX90640-XIAO-ESP32-1.3: A project utilizing ILI9341 2.8" TFT With Touch in a practical application
ESP32C3-Based Thermal Imaging Camera with TFT Display
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • User interfaces for embedded systems
  • IoT dashboards and control panels
  • Portable devices with graphical displays
  • Educational and DIY electronics projects
  • Industrial control systems

Technical Specifications

Below are the key technical details of the ILI9341 2.8" TFT display:

Parameter Specification
Manufacturer Ilitek
Part ID ILI9341 2.8" Touch
Display Type TFT LCD
Screen Size 2.8 inches
Resolution 240x320 pixels
Color Depth 16-bit (65,536 colors)
Touchscreen Type Resistive or Capacitive (varies)
Interface SPI (Serial Peripheral Interface)
Operating Voltage 3.3V (logic level)
Backlight Voltage 3.3V to 5V
Current Consumption ~50mA (typical, backlight on)
Controller IC ILI9341
Operating Temperature -20°C to 70°C

Pin Configuration

The ILI9341 2.8" TFT display typically has the following pinout:

Pin Name Description
1 VCC Power supply for the display (3.3V or 5V, depending on the module).
2 GND Ground connection.
3 CS Chip Select pin for SPI communication.
4 RESET Reset pin to initialize the display.
5 DC (RS) Data/Command pin to differentiate between data and command signals.
6 SDI (MOSI) SPI Master Out Slave In (data input to the display).
7 SCK SPI Clock pin.
8 LED Backlight control pin (connect to 3.3V or 5V for constant backlight).
9 T_IRQ Touchscreen interrupt pin (used for touch detection).
10 T_CS Chip Select pin for the touchscreen controller.
11 T_CLK SPI Clock pin for the touchscreen controller.
12 T_DIN SPI data input for the touchscreen controller.
13 T_DO SPI data output from the touchscreen controller.

Note: Some modules may have slight variations in pin configuration. Always refer to the specific datasheet for your module.

Usage Instructions

Connecting the ILI9341 to an Arduino UNO

To use the ILI9341 2.8" TFT display with an Arduino UNO, follow these steps:

  1. Wiring the Display: Connect the pins of the display to the Arduino as shown below:

    ILI9341 Pin Arduino Pin
    VCC 3.3V
    GND GND
    CS D10
    RESET D9
    DC (RS) D8
    SDI (MOSI) D11
    SCK D13
    LED 3.3V or 5V
    T_CS D4
    T_CLK D13
    T_DIN D11
    T_DO D12
    T_IRQ D2
  2. Install Required Libraries:

    • Install the Adafruit_GFX and Adafruit_ILI9341 libraries from the Arduino Library Manager.
    • For touch functionality, install the Adafruit_STMPE610 library (if using a resistive touchscreen).
  3. Example Code: Below is an example sketch to display text and detect touch input:

    #include <Adafruit_GFX.h>       // Graphics library
    #include <Adafruit_ILI9341.h>  // ILI9341 driver library
    #include <Adafruit_STMPE610.h> // Touchscreen library
    
    // Define pins for the display
    #define TFT_CS   10
    #define TFT_DC   8
    #define TFT_RST  9
    
    // Define pins for the touchscreen
    #define TS_CS    4
    
    // Create display and touchscreen objects
    Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
    Adafruit_STMPE610 ts = Adafruit_STMPE610(TS_CS);
    
    void setup() {
      // Initialize serial communication
      Serial.begin(9600);
    
      // Initialize the display
      tft.begin();
      tft.setRotation(1); // Landscape orientation
      tft.fillScreen(ILI9341_BLACK);
      tft.setTextColor(ILI9341_WHITE);
      tft.setTextSize(2);
      tft.println("ILI9341 TFT Display");
    
      // Initialize the touchscreen
      if (!ts.begin()) {
        Serial.println("Touchscreen not found!");
        while (1);
      }
      Serial.println("Touchscreen initialized.");
    }
    
    void loop() {
      // Check for touch input
      if (ts.touched()) {
        TS_Point p = ts.getPoint();
    
        // Map touch coordinates to screen coordinates
        int x = map(p.x, 0, 240, 0, tft.width());
        int y = map(p.y, 0, 320, 0, tft.height());
    
        // Draw a circle at the touch point
        tft.fillCircle(x, y, 5, ILI9341_RED);
    
        // Print touch coordinates to the serial monitor
        Serial.print("Touch at: ");
        Serial.print(x);
        Serial.print(", ");
        Serial.println(y);
      }
    }
    

Important Considerations

  • Ensure the display operates at 3.3V logic levels. Use a level shifter if your microcontroller operates at 5V.
  • Avoid excessive current draw by limiting the backlight voltage to the recommended range.
  • Use proper decoupling capacitors near the power pins to reduce noise.

Troubleshooting and FAQs

Common Issues

  1. The display does not turn on:

    • Verify the power connections (VCC and GND).
    • Ensure the backlight pin (LED) is connected to 3.3V or 5V.
  2. No image on the screen:

    • Check the SPI connections (CS, DC, MOSI, SCK).
    • Ensure the Adafruit_ILI9341 library is correctly installed and initialized.
  3. Touchscreen not responding:

    • Verify the touchscreen SPI connections (T_CS, T_CLK, T_DIN, T_DO).
    • Ensure the Adafruit_STMPE610 library is installed and initialized.
  4. Flickering or distorted display:

    • Check for loose connections or poor soldering.
    • Ensure the power supply is stable and noise-free.

Tips for Troubleshooting

  • Use a multimeter to verify voltage levels at the display pins.
  • Test the display with a known working example sketch to rule out software issues.
  • Consult the module's datasheet for additional details on pin configuration and operation.

By following this documentation, you can successfully integrate the ILI9341 2.8" TFT display with touch functionality into your projects.