Waveshare LCD Modules

Overview

The Waveshare LCD modules are available in different sizes and resolutions. Nearly all displays comes with a special LCD controller wired over SPI up to the board by free wiring.

Supported Modules

Hardware

The Waveshare 2.4 LCD Module [1] with a resolution of 240 × RGB × 320 pixels, is based on the built-in controller ILI9341 [6] inside the 2.4-inch LCD. The LCD supports 6-bit, 16-bit, and 18-bit input color formats per pixel, namely RGB222, RGB565, and RGB666 three color formats. This integration uses the RGB565 color format, which is also a commonly used RGB format. The LCD uses a four-wire SPI communication interface.

Features and Resources

Printed Circuit Board

3V3/~25㎃ or 5V/~15㎃

LCD

3 1 1

  • 1 serial 2.4-inch 240×320 TFT 65K LCD

  • 1 LCD Backglight LED

  • 1 RST signal to LCD controller

  • 1 C/D signal to LCD controller

  • optional 2.54㎜ pin header

  • free wiring

Design Data

Waveshare 2.4 LCD

Positions

Waveshare 2.4 LCD details

Outputs:

  1. ILI9341
    2.4-inch 240×320 pixels 65K colorful TFT LCD

Connections:

  1. JST connector for free wiring

  2. optional 2.54㎜ pin header

Data Sheets

Pinouts

Pin Mapping

Pinout

on-edge(1-8):

3 1 1

on-shield:

1 BL 1 LCD

Default Zephyr Peripheral Mapping

 

  • 1 3V3(OUT)
  • 2 GND
  • 3 SPI_TX : D11
    nc on-shield LCD i/f data LCD_DIN
  • 4 SPI_SCK : D13
    nc on-shield LCD i/f clock LCD_CLK
  • 5 SPI_CSN : D10
    nc on-shield LCD chip select LCD_CS
  • 6 PIO/PWM : D7
    nc on-shield LCD data/cmd LCD_DC
  • 7 PIO/PWM : D8
    nc on-shield LCD reset LCD_RST
  • 8 PIO/PWM : D9 PWM9
    nc on-shield LCD backlight LCD_BL


    nc SPI_RX : D12

Devicetree compatible

Waveshare 2.4 LCD edge pinout

Requirements

This shields can be used with any board which provides a configuration either for Arduino or Arduino Nano connectors or for a special connector set and defines node aliases for SPI and GPIO interfaces (see Shields for more details).

Pin Assignments

Arduino Connector Pin

Shield Function (LCD Module)

D9

LCD Backlight Enable

D8

ILI9341 Reset

D7

ILI9341 DC (Data/Command)

D10

ILI9341 SPI CSn

D11

SPI COPI (Serial Data Input)

D12

SPI CIPO (Serial Data Out)

D13

SPI SCK (Serial Clock Input)

Utilization

This shields can be used with any development board, shield, or snippet that provides a Devicetree node with either the arduino-nano-header-r3 or the seeed,grove-laced-if property for the compatibility. In particular, the &arduino_nano_spi or &grove_spi bus and some GPIO signals of &arduino_nano_header or &grove_gpio must be free for communication with the LCD on the modules. On Devicetree level, the shields also providing the special node label &board_spi_lcd for this purpose.

Programming

Using the Display driver API with chosen display. That is:

LCD : chosen { zephyr,display = &lcd_panel; };
ILI9341 : lcd_panel: &ili9341_240x320 {};

If the shield is connected to a board which has Arduino Nano connector, set -DSHIELD=waveshare_2_4_lcd when you invoke west build. For example:

Using west:

west build -b cytron_maker_nano_rp2040 -p -S usb-console --shield waveshare_2_4_lcd -d build/waveshare_2_4_lcd-display_test zephyr/samples/drivers/display
west flash -r uf2 -d build/waveshare_2_4_lcd-display_test

Using CMake and ninja:

# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_2_4_lcd-display_test -GNinja -DBOARD=cytron_maker_nano_rp2040 -DSHIELD="waveshare_2_4_lcd" zephyr/samples/drivers/display

# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_2_4_lcd-display_test flash
Waveshare 2.4 LCD Display Sample Animation

TOP LEFT, TOP RIGHT, BOTTOM RIGHT

References