Zum Inhalt springen

WSAL24691 – 1.27inch RGB OLED Module/en

Aus JW Tech Wiki

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

The 1.27-inch RGB OLED module (Waveshare WSAL24691) is a self-luminous display with 128×96 resolution and 262K colors. It is driven via 4-wire SPI or 3-wire SPI and uses the SSD1351 controller.

Related products at JW Tech

Technical overview

  • Resolution: 128(H) × 96(V), 262K colors, pixel size 0.047 × 0.185 mm; dimensions 25.708 × 19.28 mm.
  • Operating voltage: 3.3 V / 5 V – supply voltage and logic voltage must match, otherwise the module will not work properly.
  • Interface: 4-wire SPI (default) or 3-wire SPI, switchable via a solderable resistor on the back (BS0 = 0 for 4-wire, BS = 1 for 3-wire).
  • SSD1351 controller: supports 262K and 65K color depth, 128×128×18-bit SRAM as display buffer.
  • Pinout: VCC, GND, DIN (MOSI), SCL (SCK), CS (active low), DC (low = command, high = data), RST (reset, active low).
  • In 4-wire SPI, set DC before sending: DC=0 → command byte, DC=1 → data bytes into SRAM.
  • In 3-wire SPI, the DC pin is removed; each transfer byte is extended by one bit (9 bits instead of 8) to distinguish command from data; DC must be grounded.
  • Raspberry Pi connection: 7-pin cable; pin mapping: VCC→3.3V, GND→GND, DIN→BCM19/Pin3, CLK→BCM23/Pin5, CS→CE0 (BCM24), DC→BCM25/Pin22, RST→BCM27/Pin13.
  • Enable SPI: raspi-config → Interfacing Options → SPI → Yes, then reboot; enable I2C similarly.
  • Python environment: install python3-pip, python3-pil, python3-numpy, spidev, python3-smbus; run demo via OLED_1in27_rgb_test.py.
  • C demo: in the c directory: make clean, make -j 8, then sudo ./main 1.27rgb.
  • Bitmap conversion: horizontal scan, 16-bit true color, high-order first.
  • On Bookworm OS only lgpio is available; bcm2835 and WiringPi cannot be installed there.

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install spidev
sudo apt-get install python3-smbus
sudo apt-get install p7zip-full
sudo wget https://files.waveshare.com/upload/2/2c/OLED_Module_Code.7z
7z x OLED_Module_Code.7z
cd OLED_Module_Code/RaspberryPi/c
sudo make clean
sudo make -j 8
sudo ./main 1.27rgb
cd OLED_Module_Code/RaspberryPi/python/example
sudo python3 OLED_1in27_rgb_test.py

Notes and version constraints

  • The source does not list exact current values specifically for the 1.27-inch RGB OLED module; the listed values refer to other sizes (0.95 inch, 0.96 inch, 1.3 inch, 1.51 inch, 2.42 inch).
  • The 3.3 V / 5 V operating range is based on the manufacturer's 24-hour aging test; compatibility at 5 V should be verified against the target board individually.
  • Switching between 4-wire and 3-wire SPI requires soldering a resistor on the back – soldering requires care and appropriate equipment.
  • On Bookworm, only lgpio can be used; attempts with bcm2835 or WiringPi will fail there.
  • Displaying a static image for an extended period can cause residual images and damage the OLED; regular image changes are recommended.
  • Before running the demos, ensure SPI is not occupied by other devices (check /boot/config.txt).
  • All instructions in the source text that reference external downloads or installations should be reviewed for relevance and safety before execution.

Source and revision record