Template: 0.96inch OLED (A) Spec

From Waveshare Wiki
Jump to: navigation, search


  • Operating Voltage: 3.3V/5V
  • Communication Interface: 3-wire SPI, 4-wire SPI, I2C
  • Screen Type: OLED
  • Driver Chip: SSD1306
  • Resolution: 128*64 (Pixel)
  • Display Size: 0.96inch
  • Display Color: 1/4 yellow section, 3/4 blue section
  • Operating Temp. (℃): -20°C ~ 70°C
  • Storage Temp. (℃): -30°C ~ 80°C
  • Visible Angle: >160°


PIN Description
VCC 3.3V/5V Power input
GND Ground
DIN SPI Data Input
CLK SPI Clock input
CS Chip select, low active
D/C Command signal, low level for command, high level for data
RES Reset signal, low active

Hardware Configuration

0.96inch OLED Hardware.png

The OLED module provides three drive interfaces: 3-wire SPI, 4-wire SPI and I2C interface respectively. There are two resistors that can be soldered on the back of the module, and the corresponding communication method can be selected through the selection of resistors, as shown in the figure:
The module uses the 4-wire SPI communication mode by default, that is, BS0 and BS1 are connected to 0 by default (1 and 0 do not represent the level, but the resistance is connected or connected to the welding method, the specific hardware connection is shown in the table below):
Note: The above picture is the welding on the hardware, the following table is the actual hardware connection

Communication Mode BS1/BS0
3-wire SPI 0/1
4-wire SPI 0/0
I2C 1/0

The specific hardware configuration is as follows:

  • Using 4-wire SPI:

That is, the factory program settings: BS0 and BS1 are connected to 0 and to the ground, DIN is connected to 0 and to Raspberry Pi MOSI, and CLK is connected to 0 and to Raspberry Pi SCLK;

  • Using 3-wire SPI:

Connect BS0 to 1 and to VCC, connect BS1 to 0 and to GND, connect DIN to 0 and to Raspberry Pi MOSI, connect CLK to 0 and to Raspberry Pi SCLK;

  • Using I2C:

BS0 connects to 0 and to GND, BS1 connects to 1 and to VCC (3.3V), DIN connects to 0 and to Raspberry Pi SDA, CLK connects to 1 and to Raspberry Pi SCL;
When using I2C: The high and low state of DC can control the address of the slave device. If it is connected to GND, then the 7-bit address of I2C is: 0x3C;
PS: The program defaults to SPI mode. If you need to switch the mode, please modify DEV_Config.h. For details, please refer to the program description - bottom hardware interface - interface selection
PS: When using STM32, the I2C routine uses analog I2C, please pay attention to the connection