Overview

The SSD1306 is a single-chip CMOS OLED/PLED driver with controller manufactured by Solomon Systech. It is designed to drive 128x64 or 128x32 dot-matrix graphic organic light-emitting diode (OLED) displays.

Commonly found on 0.96" and 0.91" monochrome display modules, the SSD1306 embeds an internal 1 KB Graphic Display Data RAM (GDDRAM), an onboard charge pump circuit to generate high OLED driving voltage (VCC9 VV_{CC} \sim 9\text{ V}) from a low logic supply, contrast control, and an internal oscillator.

Quick reference

Module VCC3.3 V to 5.0 V DC (onboard LDO & charge pump)
Logic voltage (VDDV_{DD})1.65 V to 3.3 V
Display resolution128 × 64 pixels or 128 × 32 pixels
GDDRAM capacity1 KB (128×64128 \times 64 bits)
Communication interfacesI2C (up to 400 kHz), 4-wire / 3-wire SPI
Default I2C address0x3C (SA0 = LOW) / 0x3D (SA0 = HIGH)
Display colorMonochrome (White, Blue, Yellow, or Yellow-Blue dual color)

Pinout

Standard 4-Pin I2C Breakout Module

PinNameTypeDescription
1GNDPowerGround (0 V)
2VCCPowerPower supply input (+3.3 V to +5.0 V DC)
3SCL / SCKDigital InputI2C Serial Clock input pin
4SDADigital I/OI2C Serial Data line

7-Pin SPI / I2C Breakout Module

PinNameTypeDescription
1GNDPowerGround (0 V)
2VCCPowerSupply voltage (+3.3 V to +5.0 V)
3D0 / CLKDigital InputSPI Clock line
4D1 / MOSIDigital InputSPI Data line (Master Out Slave In)
5RES / RSTDigital InputActive-LOW Hardware Reset line
6DC / A0Digital InputData / Command control pin (LOW = Command, HIGH = Data)
7CSDigital InputActive-LOW Chip Select line

Specifications

ParameterSymbolMinTypMaxUnitConditions
Chip Logic VoltageVDDV_{DD}1.652.83.3VCore logic supply
Display Panel VoltageVCCV_{CC}7.09.015.0VGenerated via internal charge pump or external
Operating CurrentICCI_{CC}1525mA128x64 display, 50% pixels ON
Sleep CurrentIsleepI_{sleep}110µADisplay OFF / Sleep mode
I2C Clock FrequencyfSCLf_{SCL}0400kHzFast Mode
SPI Clock Cycletcyclet_{cycle}100nsMax 10 MHz SPI clock
Operating TemperatureTOPT_{OP}-4085°C

Addressing & Command set

I2C Framing & Control Byte

On the I2C bus, data bytes are preceded by a Control Byte containing the D/CˉD/\bar{C} (Data/Command) bit:

  • 0x00 (Command byte): Following byte is interpreted as a setup/configuration command.
  • 0x40 (Data byte): Following byte is written directly to GDDRAM.

Key Configuration Commands

Command HexDescription
0xAEDisplay OFF (Sleep mode)
0xAFDisplay ON (Normal mode)
0x20Set Memory Addressing Mode (0x00 = Horizontal, 0x01 = Vertical, 0x02 = Page)
0x81Set Contrast Control (followed by contrast value 0x000xFF)
0x8DCharge Pump Setting (followed by 0x14 to enable internal charge pump)
0xA6 / 0xA7Set Normal (0xA6) / Inverse (0xA7) display

Wiring

SSD1306 I2C ModuleMicrocontroller (Arduino Uno / ESP32)Notes
GNDGNDGround
VCC5V (or 3.3V)Power supply
SCLSCL (A5 on Uno, GPIO22 on ESP32)I2C Clock
SDASDA (A4 on Uno, GPIO21 on ESP32)I2C Data

Common mistakes

  • Forgetting to enable internal charge pump: Without sending 0x8D followed by 0x14 during initialization, the internal high-voltage display supply (VCCV_{CC}) remains disabled and the screen remains completely black.
  • I2C address mismatch: Cheap 0.96" OLED modules alternate between 0x3C (default for 128x64) and 0x3D depending on how the hardware SA0 resistor jumper is populated on the back PCB.
  • RAM footprint on small MCUs: Storing a full 128×64128 \times 64 bit monochrome frame buffer requires 1024 bytes of SRAM. On ATmega328P (2 KB SRAM), this leaves only 1 KB of RAM for remaining application code.

Notes

  • Monochrome OLED pixels degrade over extended continuous display of static images. Implement a screen saver or pixel-shifting routine for long-running displays.

Assets & downloads