The 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.
| Feature | SSD1306 | SH1106 (SSH1106) |
|---|---|---|
| Max Resolution | 128 x 64 | 132 x 64 |
| Internal RAM | 128 x 64 bits | 132 x 64 bits |
| Addressing | Page, Horizontal, Vertical | Mostly Page Mode only |
| Hardware Scroll | Yes | No |
| Typical Use | 0.96” OLED | 1.3“ OLED |
| Driver Library | Adafruit_SSD1306 | U8g2 / 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.
| Pin Label | Function | Description |
|---|---|---|
| GND | Ground | Ground (0V) |
| VCC | Power | 3.3V or 5V (Most modules have a voltage regulator) |
| SCL | Clock | I²C Clock (D0 pin) |
| SDA | Data | I²C Data (D1 pin) |
#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() ); }
This page has been accessed for: Today: 3, Until now: 20