What is SPI3 and How to Write Code in SPI3 (3-Wire SPI)
- 30 Jan, 2026
SPI3 (3-wire SPI) is a serial communication method used in some character OLED modules where the display works with only three control lines: SCK (clock), SDI (data), and CS (chip select). Unlike SPI4, SPI3 does not use a separate D/C pin. Instead, the command or data selection is sent inside the serial stream using extra control bits (RS and RW). This blog explains how SPI3 works, why it is popular in compact projects, and how to wire and program a 16x2 1602 Character OLED Display using an Arduino UNO. It covers the SPI3 10-bit write frame format [RS][RW][D7..D0], why bit-banging is often required, and how to build core functions like clock pulse, command write, data write, initialization, and line addressing. You also learn common troubleshooting tips like correct mode selection, timing delays, CS handling, and display address mapping for line 1 and line 2. The guide is ideal for beginners and makers using the Uno R3 DIP Microcontroller Board Arduino for display-based projects.