Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 128x64 OLED Display (I2C IIC SPI Serial): Examples, Pinouts, and Specs

Image of 128x64 OLED Display (I2C IIC SPI Serial)
Cirkit Designer LogoDesign with 128x64 OLED Display (I2C IIC SPI Serial) in Cirkit Designer

Introduction

The DollaTek 128x64 OLED Display (SSH1106) is a compact, high-resolution display module that utilizes organic light-emitting diodes (OLED) to produce bright and vivid images. With a resolution of 128x64 pixels, this display is ideal for applications requiring clear and detailed visual output. It supports both I2C and SPI communication protocols, making it compatible with a wide range of microcontrollers, including Arduino, Raspberry Pi, and ESP32.

Explore Projects Built with 128x64 OLED Display (I2C IIC SPI Serial)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wi-Fi Controlled RGB LED and OLED Display with ESP8266
Image of ESP thermometer reciever: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
This circuit features an ESP8266 microcontroller interfaced with a 128x64 OLED display via I2C for visual output and an RGB LED controlled through current-limiting resistors. The ESP8266 provides power and control signals to both the display and the LED, enabling visual feedback and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with I2C OLED Display Interface
Image of OLED_Display: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
This circuit connects an Arduino UNO to a 128x64 OLED display using I2C communication protocol. The Arduino provides power to the display and communicates with it via the SDA and SCL lines connected to the A4 and A5 pins, respectively. The embedded code initializes the display and prints 'Hello, World!' on it.
Cirkit Designer LogoOpen Project in Cirkit Designer
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
Image of dgd: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled OLED Display Interface
Image of Chandru: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
This circuit connects an Arduino Nano to an OLED 128x64 I2C Monochrome Display. The Arduino provides power to the OLED display and communicates with it via the I2C protocol, using its A4 and A5 pins as SDA and SCK lines, respectively. The embedded code initializes the display and draws a single pixel on it, which suggests that the circuit is designed for visual output, possibly for a user interface or data visualization.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 128x64 OLED Display (I2C IIC SPI Serial)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP thermometer reciever: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
Wi-Fi Controlled RGB LED and OLED Display with ESP8266
This circuit features an ESP8266 microcontroller interfaced with a 128x64 OLED display via I2C for visual output and an RGB LED controlled through current-limiting resistors. The ESP8266 provides power and control signals to both the display and the LED, enabling visual feedback and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of OLED_Display: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
Arduino UNO with I2C OLED Display Interface
This circuit connects an Arduino UNO to a 128x64 OLED display using I2C communication protocol. The Arduino provides power to the display and communicates with it via the SDA and SCL lines connected to the A4 and A5 pins, respectively. The embedded code initializes the display and prints 'Hello, World!' on it.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of dgd: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Chandru: A project utilizing 128x64 OLED Display (I2C IIC SPI Serial) in a practical application
Arduino Nano Controlled OLED Display Interface
This circuit connects an Arduino Nano to an OLED 128x64 I2C Monochrome Display. The Arduino provides power to the OLED display and communicates with it via the I2C protocol, using its A4 and A5 pins as SDA and SCK lines, respectively. The embedded code initializes the display and draws a single pixel on it, which suggests that the circuit is designed for visual output, possibly for a user interface or data visualization.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Wearable devices and smart gadgets
  • IoT dashboards and data visualization
  • Portable instruments and measurement tools
  • Embedded systems requiring graphical interfaces
  • Educational and prototyping projects

Technical Specifications

Below are the key technical details of the DollaTek 128x64 OLED Display:

Parameter Specification
Manufacturer DollaTek
Part ID SSH1106
Display Type OLED (Organic Light-Emitting Diode)
Resolution 128x64 pixels
Communication Protocol I2C, SPI
Operating Voltage 3.3V to 5V
Current Consumption ~20mA (typical)
Driver IC SSH1106
Display Color Monochrome (White)
Dimensions 27mm x 27mm x 4mm

Pin Configuration and Descriptions

The display module has a total of 4 pins for I2C communication and 7 pins for SPI communication. Below is the pinout for both modes:

I2C Pin Configuration

Pin Name Description
1 GND Ground (0V reference)
2 VCC Power supply (3.3V to 5V)
3 SCL Serial Clock Line for I2C communication
4 SDA Serial Data Line for I2C communication

SPI Pin Configuration

Pin Name Description
1 GND Ground (0V reference)
2 VCC Power supply (3.3V to 5V)
3 SCL Serial Clock Line for SPI communication
4 SDA Serial Data Line for SPI communication
5 RES Reset pin
6 DC Data/Command control pin
7 CS Chip Select for SPI communication

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Display: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Select Communication Protocol:
    • For I2C: Connect the SCL and SDA pins to the corresponding I2C pins on your microcontroller.
    • For SPI: Connect the SCL, SDA, RES, DC, and CS pins to the appropriate SPI pins on your microcontroller.
  3. Install Required Libraries: For Arduino, install the Adafruit_GFX and Adafruit_SSD1306 libraries via the Arduino Library Manager.
  4. Write Code: Use the example code below to initialize and display content on the OLED.

Important Considerations and Best Practices

  • Ensure the power supply voltage matches the display's operating range (3.3V to 5V).
  • Use pull-up resistors (typically 4.7kΩ) on the I2C lines (SCL and SDA) if not already present.
  • Avoid excessive current draw from the microcontroller by powering the display from an external power source if needed.
  • Handle the display module carefully to avoid damaging the OLED screen.

Example Code for Arduino (I2C Mode)

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// Define the OLED display width and height
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

// Create an instance of the display object
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(9600);

  // Initialize the OLED display
  if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Halt execution if initialization fails
  }

  // Clear the display buffer
  display.clearDisplay();

  // Display a welcome message
  display.setTextSize(1);      // Set text size to 1 (smallest)
  display.setTextColor(SSD1306_WHITE); // Set text color to white
  display.setCursor(0, 0);     // Set cursor to top-left corner
  display.println(F("Hello, OLED!")); // Print message
  display.display();           // Update the display with the buffer
}

void loop() {
  // Add your code here to update the display dynamically
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Display Not Turning On:

    • Verify the power connections (VCC and GND).
    • Ensure the correct voltage (3.3V or 5V) is supplied to the display.
  2. No Output on the Display:

    • Check the I2C or SPI connections and ensure they are correctly wired.
    • Confirm the I2C address (default is 0x3C) matches the one in your code.
    • Ensure the required libraries (Adafruit_GFX and Adafruit_SSD1306) are installed.
  3. Flickering or Unstable Display:

    • Use shorter wires to reduce noise in the communication lines.
    • Add decoupling capacitors (e.g., 0.1µF) near the power pins.
  4. Library Initialization Fails:

    • Double-check the wiring and ensure the correct pins are used.
    • Verify that the display driver IC is SSH1106 and not SSD1306. If using a different driver, modify the library accordingly.

FAQs

Q: Can this display work with 3.3V microcontrollers like ESP32?
A: Yes, the display is compatible with both 3.3V and 5V systems.

Q: How do I switch between I2C and SPI modes?
A: The display module typically has solder jumpers on the back to select the communication mode. Refer to the module's datasheet for details.

Q: Can I use this display for animations?
A: Yes, the display supports fast refresh rates, making it suitable for simple animations and dynamic content.

Q: Is the display sunlight-readable?
A: The OLED display is bright but not optimized for direct sunlight readability. Use it in shaded or indoor environments for best results.