The 1.3 inch OLED display is a favorite among hobbyists, makers, and embedded developers for its compact size (perfect for portable projects) and exceptional display quality (high contrast, self-illumination, and low power consumption).
1.3 Inch OLED Display Pinout: A Complete Wiring & Compatibility Guide
1. Introduction: Why 1.3 Inch OLED Display Pinout Matters
The 1.3 inch OLED display is a favorite among hobbyists, makers, and embedded developers for its compact size (perfect for portable projects) and exceptional display quality (high contrast, self-illumination, and low power consumption). Whether you’re building a smartwatch, a Raspberry Pi sensor dashboard, or an Arduino-based weather station, understanding the 1.3 inch OLED display pinout is critical to avoid hardware damage (e.g., short circuits from wrong wiring) and ensure your project works as intended.
Unlike larger OLED displays (e.g., 2.4 inch), 1.3 inch models typically use compact interface designs—most commonly SPI (Serial Peripheral Interface) or I2C (Inter-Integrated Circuit)—to save space. Each interface has a unique pinout (set of pins and their functions), and mismatched wiring can lead to unresponsive screens, flickering, or even permanent damage to the display or your microcontroller (e.g., Arduino, Raspberry Pi).
This guide will break down everything you need to know about 1.3 inch OLED display pinouts: core pin functions, SPI vs. I2C pinout comparisons, step-by-step wiring tutorials for Arduino and Raspberry Pi, common wiring mistakes to avoid, brand-specific pinout differences (e.g., Adafruit, WaveShare), and troubleshooting tips—all optimized for beginners and experienced makers alike.
2. Key Basics: 1.3 Inch OLED Display Interfaces & Pin Types
Before diving into pinouts, it’s critical to understand the two most common interfaces for 1.3 inch OLED displays—SPI and I2C—as their pinouts differ significantly. Most 1.3 inch OLEDs use the SSD1306 or SSD1351 driver chip (check your display’s datasheet to confirm), and their pinouts are standardized around these interfaces.
2.1 SPI vs. I2C: Which Interface Does Your 1.3 Inch OLED Use?
| Feature | SPI (Serial Peripheral Interface) | I2C (Inter-Integrated Circuit) |
|---|---|---|
| Pin Count | 6–8 pins (more wires) | 4 pins (fewer wires—ideal for space-saving) |
| Speed | Faster (up to 10 MHz—good for graphics) | Slower (up to 400 kHz—good for text) |
| Wiring Complexity | Slightly more complex (needs CS/DC pins) | Simplified (only SDA/SCL pins for data) |
| Common Use Cases | High-resolution graphics (e.g., game UI) | Text displays (e.g., sensor data) |
| Typical Pin Labels | VCC, GND, SCK, MOSI, CS, DC, RST | VCC, GND, SDA, SCL (sometimes RST) |
How to check your display’s interface: Look for pin labels on the display’s PCB (printed circuit board) or in its datasheet. SPI displays will have labels like “SCK” and “MOSI”; I2C displays will have “SDA” and “SCL”.
3. 1.3 Inch OLED Display Pinout: SPI Interface (Most Common)
SPI is the most popular interface for 1.3 inch OLED displays (especially those with the SSD1351 driver chip), as it supports faster data transfer for smooth graphics. Below is the standard SPI pinout for most 1.3 inch OLEDs, along with detailed explanations of each pin’s function and compatibility with microcontrollers like Arduino Uno and Raspberry Pi.
3.1 Standard 1.3 Inch OLED SPI Pinout Table
| Pin Label | Function | Voltage | Arduino Uno Pin (Recommended) | Raspberry Pi Pin (Recommended) |
|---|---|---|---|---|
| VCC | Power Input | 3.3V (Critical! Never 5V) | 3.3V (Pin 3) | 3.3V (Pin 1) |
| GND | Ground | 0V | GND (Pin 6) | GND (Pin 6) |
| SCK | SPI Serial Clock (synchronizes data) | 3.3V logic | D13 (Hardware SPI Clock) | GPIO11 (SCK, Pin 23) |
| MOSI | SPI Master Out Slave In (data to display) | 3.3V logic | D11 (Hardware SPI MOSI) | GPIO10 (MOSI, Pin 19) |
| CS | Chip Select (selects display for SPI) | 3.3V logic | D10 | GPIO8 (CE0, Pin 24) |
| DC | Data/Command (toggles data/command mode) | 3.3V logic | D9 | GPIO25 (Pin 22) |
| RST | Reset (resets display) | 3.3V logic | D8 (or tie to VCC if unused) | GPIO24 (Pin 18) |
| LED | Backlight Control (if applicable) | 3.3V logic | D7 (PWM for dimming) | GPIO18 (PWM, Pin 12) |
3.2 Pin Function Explanations (Critical for Wiring)
- VCC (Power Input): Supplies power to the display. All 1.3 inch OLED displays are 3.3V devices—connecting to 5V will burn the SSD1306/SSD1351 driver chip. Use your microcontroller’s 3.3V pin (not 5V!).
- GND (Ground): Completes the power circuit. Must be connected to the same ground as your microcontroller (common ground is required to avoid voltage spikes).
- SCK (SPI Clock): Sent by the microcontroller (master) to synchronize data transfer. Always use the microcontroller’s hardware SPI SCK pin (e.g., Arduino D13, Raspberry Pi GPIO11) for stable communication—software SPI (using any pin) is slower and less reliable.
- MOSI (SPI Data Out): Transmits data from the microcontroller (master) to the display (slave). Like SCK, use the hardware MOSI pin (Arduino D11, Raspberry Pi GPIO10) for best performance.
- CS (Chip Select): Tells the display to listen for SPI data (low = active). If you’re using only one SPI device (your 1.3 inch OLED), you can tie CS to GND (permanently active), but using a GPIO pin lets you add more SPI devices later.
- DC (Data/Command): Toggles between “command mode” (sending instructions, e.g., “clear screen”) and “data mode” (sending pixel data, e.g., “draw a pixel here”). Must be connected to a GPIO pin—never leave it floating (unconnected).
- RST (Reset): Resets the display (e.g., if it freezes). You can tie RST to VCC (3.3V) if you don’t need manual reset, but connecting it to a GPIO pin lets you reset the display programmatically.
- LED (Backlight): Controls the display’s backlight (rare for 1.3 inch OLEDs, as most are self-illuminating). If present, use a PWM-capable pin to adjust brightness (e.g., Arduino D7, Raspberry Pi GPIO18).
4. 1.3 Inch OLED Display Pinout: I2C Interface (Simpler Wiring)
I2C is ideal for projects where space is limited (e.g., wearables) or you want fewer wires. Most 1.3 inch I2C OLEDs use the SSD1306 driver chip and have a minimal pinout—only 4 pins in most cases.
4.1 Standard 1.3 Inch OLED I2C Pinout Table
| Pin Label | Function | Voltage | Arduino Uno Pin (Recommended) | Raspberry Pi Pin (Recommended) |
|---|---|---|---|---|
| VCC | Power Input | 3.3V (Never 5V) | 3.3V (Pin 3) | 3.3V (Pin 1) |
| GND | Ground | 0V | GND (Pin 6) | GND (Pin 6) |
| SDA | I2C Serial Data (bidirectional data) | 3.3V logic | A4 (Hardware I2C SDA) | GPIO2 (SDA, Pin 3) |
| SCL | I2C Serial Clock (synchronizes data) | 3.3V logic | A5 (Hardware I2C SCL) | GPIO3 (SCL, Pin 5) |
| RST | Reset (optional) | 3.3V logic | D8 (or tie to VCC) | GPIO24 (Pin 18) |
4.2 Key I2C Pin Notes
- SDA (Serial Data): Carries bidirectional data between the microcontroller and display. Use the hardware I2C SDA pin (Arduino A4, Raspberry Pi GPIO2) for stability—avoid software I2C.
- SCL (Serial Clock): Synchronizes data transfer (sent by the microcontroller). Always use the hardware I2C SCL pin (Arduino A5, Raspberry Pi GPIO3).
- Address Jumpers: Many I2C OLEDs have small jumpers (e.g., “A0”) to change the I2C address (default: 0x3C or 0x3D). This lets you connect multiple I2C devices to the same SDA/SCL pins—check your display’s datasheet to adjust the address if needed.
- No CS/DC Pins: I2C eliminates the need for CS (Chip Select) and DC (Data/Command) pins—these functions are handled via I2C data packets, simplifying wiring.
5. Step-by-Step Wiring Tutorials: 1.3 Inch OLED + Microcontrollers
To turn pinout knowledge into action, here are two practical wiring tutorials for the most common setups: 1.3 Inch SPI OLED + Arduino Uno and 1.3 Inch I2C OLED + Raspberry Pi 4.
5.1 Tutorial 1: 1.3 Inch SPI OLED + Arduino Uno
5.1.1 Hardware Requirements
- 1.3 inch SPI OLED display (SSD1351 driver, e.g., Adafruit 1.3” Color OLED Breakout)
- Arduino Uno
- Male-to-female jumper wires (6–8 wires)
- Breadboard (optional, for neat wiring)
5.1.2 Wiring Steps (Follow the SPI Pinout Table)
- Connect VCC to 3.3V: OLED VCC → Arduino 3.3V (Pin 3).
- Connect GND to GND: OLED GND → Arduino GND (Pin 6).
- Connect SCK to D13: OLED SCK → Arduino D13 (hardware SPI clock).
- Connect MOSI to D11: OLED MOSI → Arduino D11 (hardware SPI MOSI).
- Connect CS to D10: OLED CS → Arduino D10 (GPIO for chip select).
- Connect DC to D9: OLED DC → Arduino D9 (GPIO for data/command).
- Connect RST to D8: OLED RST → Arduino D8 (GPIO for reset).
- (Optional) Connect LED to D7: OLED LED → Arduino D7 (PWM for backlight, if applicable).
5.1.3 Test Code (Arduino IDE)
Install the Adafruit SSD1351 Library (via Sketch > Include Library > Manage Libraries) and upload this test code to verify wiring:
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <SPI.h>
// Define SPI pins (match your wiring!)
#define OLED_CS 10
#define OLED_DC 9
#define OLED_RST 8
// Create OLED object
Adafruit_SSD1351 oled = Adafruit_SSD1351(OLED_CS, OLED_DC, OLED_RST);
void setup() {
Serial.begin(9600);
oled.begin(); // Initialize display
// Set rotation (0 = portrait, 2 = landscape)
oled.setRotation(2);
// Clear screen (black background)
oled.fillScreen(BLACK);
// Display test text
oled.setTextColor(WHITE);
oled.setTextSize(2);
oled.setCursor(10, 20);
oled.println("1.3 Inch OLED");
oled.setCursor(10, 50);
oled.println("SPI Test");
Serial.println("OLED test completed!");
}
void loop() {
// Blink text color every 1 second
oled.setTextColor(RED);
oled.setCursor(10, 80);
oled.println("Blinking!");
delay(1000);
oled.setTextColor(GREEN);
oled.setCursor(10, 80);
oled.println("Blinking!");
delay(1000);
}
5.1.4 Verify Success
If wiring is correct, the OLED will display “1.3 Inch OLED SPI Test” with blinking green/red text. If not, check for loose wires or incorrect pin connections (see Section 7 for troubleshooting).
5.2 Tutorial 2: 1.3 Inch I2C OLED + Raspberry Pi 4
5.2.1 Hardware Requirements
- 1.3 inch I2C OLED display (SSD1306 driver, e.g., WaveShare 1.3” I2C OLED)
- Raspberry Pi 4
- Male-to-female jumper wires (4–5 wires)
- Breadboard (optional)
5.2.2 Enable I2C on Raspberry Pi
- Open the terminal and run
sudo raspi-config. - Go to Interface Options > I2C > Enable.
- Reboot the Pi:
sudo reboot.
5.2.3 Wiring Steps (Follow the I2C Pinout Table)
- Connect VCC to 3.3V: OLED VCC → Raspberry Pi 3.3V (Pin 1).
- Connect GND to GND: OLED GND → Raspberry Pi GND (Pin 6).
- Connect SDA to GPIO2: OLED SDA → Raspberry Pi GPIO2 (SDA, Pin 3).
- Connect SCL to GPIO3: OLED SCL → Raspberry Pi GPIO3 (SCL, Pin 5).
- (Optional) Connect RST to GPIO24: OLED RST → Raspberry Pi GPIO24 (Pin 18).
5.2.4 Test Code (Python)
import Adafruit_SSD1306
from PIL import Image, ImageDraw, ImageFont
import time
# Set up I2C (128x64 is common for 1.3 inch I2C OLEDs—check your display's resolution!)
disp = Adafruit_SSD1306.SSD1306_128_64(rst=None, i2c_address=0x3C) # Default address: 0x3C
# Initialize display
disp.begin()
disp.clear()
disp.display()
# Create image buffer
width = disp.width
height = disp.height
image = Image.new('1', (width, height))
draw = ImageDraw.Draw(image)
font = ImageFont.load_default()
# Draw test content
draw.text((10, 10), '1.3 Inch OLED', font=font, fill=255)
draw.text((10, 30), 'I2C Test', font=font, fill=255)
draw.text((10, 50), 'Raspberry Pi 4', font=font, fill=255)
# Display image
disp.image(image)
disp.display()
# Keep display active
while True:
time.sleep(1)
5.2.5 Verify Success
The OLED will show “1.3 Inch OLED I2C Test” and “Raspberry Pi 4” in white text. If the screen is blank, run i2cdetect -y 1 in the terminal to confirm the Pi detects the OLED (look for the address 0x3C or 0x3D).
6. Brand-Specific 1.3 Inch OLED Pinout Differences
Not all 1.3 inch OLED displays use the “standard” pinout—popular brands like Adafruit, WaveShare, and Elecrow have minor variations. Below are key differences to watch for:
6.1 Adafruit 1.3 Inch OLED Displays
Pin labels: VCC, GND, SCK, MOSI, CS, DC, RST.
- VCC: 3.3V (no 5V support—Adafruit adds a voltage regulator, but 5V still risks damage).
- RST: Tied to VCC by default (can be disconnected and connected to a GPIO pin for manual reset).
Pin labels: VIN, GND, SDA, SCL.
- VIN: 3.3V–5V (Adafruit includes a voltage regulator, so 5V is safe here—unique to Adafruit!).
- Default I2C address: 0x3C (changeable via a jumper to 0x3D).
6.2 WaveShare 1.3 Inch OLED Displays
Pin labels: VCC, GND, SCK, MOSI, CS, DC, RST, BL (Backlight).
- BL: Controls backlight (PWM-capable—tie to 3.3V for max brightness).
- VCC: Strictly 3.3V (no 5V tolerance).
Pin labels: VCC, GND, SDA, SCL, RST.
- RST: Must be connected to a GPIO pin (not tied to VCC—leaving it floating causes the display to fail).
6.3 Elecrow 1.3 Inch OLED Displays
- SPI/I2C Combo Models (e.g., Elecrow 1.3” Dual-Interface OLED):
Pin labels: VCC, GND, SCK, MOSI, CS, DC, RST, SDA, SCL.- Dual interface: Can switch between SPI and I2C via a jumper (labeled “SPI/I2C”).
- VCC: 3.3V (5V will damage the driver chip).
7. Common 1.3 Inch OLED Pinout & Wiring Mistakes (And Fixes)
Even with a pinout guide, mistakes happen. Below are the most frequent issues and how to resolve them:
7.1 Mistake 1: Connecting VCC to 5V (Most Dangerous!)
- Symptoms: Display doesn’t turn on, 一股 burning smell, or the driver chip is hot to the touch.
- Cause: 1.3 inch OLEDs are 3.3V devices—5V exceeds their voltage tolerance and burns the SSD1306/SSD1351 chip.
- Fix: Disconnect power immediately. If the display is unresponsive after switching to 3.3V, it’s likely damaged—replace it.
- Prevention: Always check the display’s datasheet for voltage requirements. Use a multimeter to confirm your microcontroller’s “3.3V” pin outputs 3.2–3.4V.
7.2 Mistake 2: Swapping SCK and MOSI Pins (SPI)
- Symptoms: Display turns on but shows garbled text/graphics, or is completely blank.
- Cause: SPI requires precise SCK (clock) and MOSI (data) connections—swapping them breaks data transfer.
- Fix: Swap the SCK and MOSI wires to match the pinout table (e.g., Arduino D13 = SCK, D11 = MOSI).
7.3 Mistake 3: Forgetting Common Ground (GND)
- Symptoms: Display flickers, shows random pixels, or is unresponsive.
- Cause: The display and microcontroller must share the same ground (common ground) to establish a stable voltage reference. Without it, data signals are noisy.
- Fix: Ensure the display’s GND pin is connected to the microcontroller’s GND pin (not just the power supply’s GND).
7.4 Mistake 4: Wrong I2C Address (I2C)
- Symptoms: Raspberry Pi/Arduino can’t detect the display (error: “No I2C device found”).
- Cause: The display’s I2C address doesn’t match the code (default: 0x3C, but some brands use 0x3D).
- Fix:
- For Raspberry Pi: Run
i2cdetect -y 1in the terminal—look for the display’s address (e.g., 0x3D). - For Arduino: Use an I2C scanner sketch to find the address (search “Arduino I2C scanner” for code).
- Update the code with the correct address (e.g.,
i2c_address=0x3Din Python).
- For Raspberry Pi: Run
7.5 Mistake 5: Leaving DC Pin Floating (SPI)
- Symptoms: Display shows random colors or garbled data.
- Cause: The DC pin (Data/Command) tells the display whether to interpret signals as commands or data. Leaving it unconnected (floating) causes it to pick up random noise.
- Fix: Connect the DC pin to a GPIO pin (e.g., Arduino D9, Raspberry Pi GPIO25) and define it in your code.
8. Tools to Verify Pinout & Wiring
To avoid mistakes, use these tools to confirm your 1.3 inch OLED pinout and wiring:
8.1 Multimeter
- Check Voltage: Confirm VCC is receiving 3.3V (not 5V) and GND is at 0V.
- Test Continuity: Ensure wires are connected properly (no broken wires or loose connections). Set the multimeter to “continuity mode” (beep) and touch both ends of a wire—if it beeps, the connection is good.
8.2 I2C Scanner (For I2C Displays)
- Arduino: Upload an I2C scanner sketch to list all connected I2C devices and their addresses.
- Raspberry Pi: Run
i2cdetect -y 1in the terminal to see the display’s I2C address.
8.3 Datasheet
- Always refer to your display’s official datasheet for the exact pinout—brand variations are common. Download datasheets from the manufacturer’s website (e.g., Adafruit, WaveShare) or trusted retailers like Digi-Key.
9. Summary
Understanding the 1.3 inch OLED display pinout is the foundation of successful projects with this compact, high-quality display. Key takeaways:
- Choose the right interface: SPI for speed/graphics, I2C for simplicity/space-saving.
- Never use 5V: All 1.3 inch OLEDs are 3.3V devices—5V causes permanent damage.
- Follow hardware SPI/I2C pins: Use your microcontroller’s dedicated SPI (SCK/MOSI) or I2C (SDA/SCL) pins for stable communication.
- Check brand differences: Adafruit, WaveShare, and Elecrow have minor pinout variations—always consult the datasheet.
- Test wiring first: Use test code (like the examples in Section 5) to verify connections before adding other components.
With the right pinout knowledge and careful wiring, your 1.3 inch OLED display will become a reliable part of projects like smartwatches, sensor dashboards, and portable gaming devices. For more resources, explore manufacturer tutorials (Adafruit Learn, WaveShare Wiki) or maker communities like Reddit’s r/arduino and r/raspberry_pi.
Ms.Josey
Ms.Josey