Zum Inhalt springen

WSAL17344 – 2inch LCD Module/en

Aus JW Tech Wiki
Version vom 6. September 2026, 00:25 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

Technical overview of the Waveshare 2-inch LCD module: IPS panel with ST7789V driver, 240×320 resolution and 4-wire SPI connection. Includes wiring tables for Raspberry Pi, STM32F103 and Arduino UNO plus notes on driver libraries.

Related products at JW Tech

Technical overview

  • Resolution 240 (vertical) × 320 (horizontal); demos use the RGB565 color format
  • Operating voltage 3.3 V/5 V; supply voltage and logic voltage must match, otherwise the module will not work properly
  • SPI signals: DIN/MOSI, CLK/SCLK, CS, DC (DC=0 command, DC=1 data), RST, BL (backlight)
  • Raspberry Pi wiring via 8-pin header: VCC→3.3 V, GND→GND, DIN→MOSI (pin 19), CLK→SCLK (pin 23), CS→CE0 (pin 24), DS→pin 22, RST→pin 13, BL→pin 12
  • STM32F103RB example: DIN→PA7, CLK→PA5, CS→PB6, DC→PA8, RST→PA9, BL→PC7
  • Arduino UNO wiring: DIN→D11, CLK→D13, CS→D10, DC→D7, RST→D8, BL→D9, VCC→5 V
  • SPI communication mode: Mode 0 (CPOL=0, CPHA=0) is commonly used; the slave-to-master data line is omitted because only display output is needed
  • Available demo environments: BCM2835 library, WiringPi library, lgpio and Python (spidev) for Raspberry Pi; FBCP porting recommended on Bullseye, not compatible with Bookworm
  • Maximum power consumption per FAQ: 3.3 V / 46 mA
  • Dimensions: display 30.60 mm (H) × 40.80 mm (V), pixel size 0.1275 mm, module housing 58 × 35 mm

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
sudo make clean && sudo make -j 8
sudo ./main 2
sudo python3 2inch_LCD_test.py
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install spidev
sudo wget https://files.waveshare.com/upload/8/8d/LCD_Module_RPI_code.zip
sudo unzip ./LCD_Module_RPI_code.zip

Notes and version constraints

  • The example STM32 pins refer to STM32F103RBT6; when porting to other boards, the actual pin mapping must be adapted.
  • BCM2835 and WiringPi are not available on the Bookworm system; only lgpio can be used there.
  • FBCP is not compatible with the Bookworm system; Bullseye is recommended.
  • Running BCM2835 directly after a WiringPi demo may cause the screen to fail to refresh properly – restarting the Raspberry Pi resolves it.
  • The power supply must match the logic voltage; when using Arduino, a 5 V power supply must be connected.
  • Exact compatibility with microcontrollers other than those listed (e.g., Pico) is not fully documented in the source; external references were removed.
  • Version-dependent steps (Bullseye vs. Bookworm) require human confirmation before execution.

Source and revision record

  • 2inch LCD Module - Waveshare Wiki
  • Source revision: 110700
  • Captured: 2026-08-31T04:15:07+00:00
  • SHA-256: a727642dc72ad5a6b3fb1360faa4c514cb37f40ca09397d5c4ba59fb16820f9b