Table of Contents

SSH1106/SSD1306 OLED Display with I²C communication

SSH1106 OLED Display with I²C communicationThe SSD1306 and SH1106 (often misspelled as SSH1106 or SSH1306) are both popular single-chip CMOS OLED drivers used for small monochrome displays (0.91“, 0.96”, 1.3“). While they are very similar and often share the same I²C address (0x3C), they are not directly compatible because of differences in memory mapping and supported operating modes.

The key difference is that the SH1106 has more internal RAM (132×64) compared to the SSD1306 (128×64). As a result, a 128×64 display using an SH1106 chip may display garbage pixels or appear shifted by 2 pixels on each side when controlled with a standard SSD1306 library.

FeatureSSD1306SH1106 (SSH1106)
Max Resolution128 x 64132 x 64
Internal RAM128 x 64 bits132 x 64 bits
AddressingPage, Horizontal, VerticalMostly Page Mode only
Hardware ScrollYesNo
Typical Use0.96” OLED1.3“ OLED
Driver LibraryAdafruit_SSD1306U8g2 / Adafruit_SH110x

Both are commonly used with Arduino, Raspberry Pi, and ESP8266/ESP32 via I²C (SDA/SCL) or SPI, typically requiring only 4 pins (VCC, GND, SDA, SCL). If an SH1106 display is initialized with an SSD1306 library, the screen will likely show “garbage” or shifted lines.

SSH1106 Chip 128 x 64 PixelSSD1306 Chip 64×48 PixelSSD1306 Chip 128 x 32 PixelSSD1306 Chip 128 x 64 Pixel
SSH1106 OLED Display with I²C communicationSSH1106 OLED Display with I²C communicationSSH1106 OLED Display with I²C communicationSSH1106 OLED Display with I²C communication

Pinout

Pin LabelFunctionDescription
GNDGroundGround (0V)
VCCPower3.3V or 5V (Most modules have a voltage regulator)
SCLClockI²C Clock (D0 pin)
SDADataI²C Data (D1 pin)

Features of particular types

NameIDCharacteristics
AZ-Delivery 1.30' IIC V21AZ-Delivery 1.30' IIC V211.3 inch OLED Display
SH1106
128 x 64 pixel
AZ-Delivery 0.96 inch OLED SSD1306AZ-Delivery 0.96 inch OLED SSD13060.96 inch OLED
SSD1306
128 x 64 pixel

SSH1106 Arduino

  1. Installing the olikraus/u8g2 library (installation only works manually) from here: https://github.com/olikraus/u8g2
  2. Example program:

#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
 
// Constructor for SH1106 128x64 I2C (Hardware I2C)
// U8G2_R0: No rotation. U8X8_PIN_NONE: No hardware reset pin.
U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
 
void setup(void) {
  u8g2.begin();
}
 
void loop(void) {
  u8g2.firstPage();
  do {
    // https://docs.rs/u8g2-fonts/latest/u8g2_fonts/fonts/index.html
    u8g2.setFont(u8g2_font_ncenB14_tr); // Set font
    u8g2.drawStr(0, 24, "Hello World!"); // Draw text
  } while ( u8g2.nextPage() );
}

I²C topics on lamaPLC

PageDateTags
2025/05/31 21:56, , , , , , ,
2025/09/23 19:25, , , , , ,
2025/10/10 08:37, , , , , , , , ,
2026/02/10 16:02, , , , , , , , , , , , ,
2026/02/08 21:45, , , , , , , , , , ,
2026/02/08 21:45, , , , , , , , , ,
2026/02/08 21:45, , , , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/08 21:45, , , , , , ,
2025/11/21 23:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/03 20:22, , , , , , , , ,
2026/02/08 21:45, , , , , , , ,
2025/11/22 21:26, , , ,
2026/02/08 21:45, , , , , , , ,
2025/09/23 19:08, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2025/10/09 21:58, , , , , ,
2025/12/04 00:34, , , , , , ,
2026/02/10 13:47, , , , , , , ,
2026/02/08 21:45, , , , , , , , ,
2026/02/08 21:45, , , , , , , , , , , , , ,
2025/11/22 19:12, , , ,
2025/11/22 18:48, , , , , ,
2025/10/09 16:03, , , ,
2026/02/09 16:05, , , , , , , , , , , , ,
2026/02/09 15:35, , , , , , , , , , ,
2026/02/09 15:48, , , , , , , ,
2026/02/06 16:40, , , , , , ,




This page has been accessed for: Today: 3, Until now: 20