Overview

If you've been diggin' our monochome OLEDs but need something bigger, this display will delight you. These displays are 2.7" diagonal, and very readable due to the high contrast of an OLED display. This display is made of 128x64 individual white OLED pixels, each one is turned on or off by the controller chip. Because the display makes its own light, no backlight is required. This reduces the power required to run the OLED and is why the display has such high contrast; we really like this graphic display for its crispness!

The driver chip, SSD1325 can communicate in two ways: 8-bit or SPI. Personally we think SPI is the way to go, only 4 or 5 wires are required. The OLED itself requires a 3.3V power supply and 3.3V logic levels for communication. We include a breadboard-friendly level shifter that can convert 3V or 5V down to 3V, so it can be used with 5V-logic devices like Arduino.

The power requirements depend a little on how much of the display is lit but on average the display uses about 50-150mA from the 3.3V supply. Built into the OLED driver is a simple switch-cap charge pump that turns 3.3V into a high voltage drive for the OLEDs.

Each order comes with one assembled OLED module with a nice bezel and 4 mounting holes. The display is 3V logic & power so we include a HC4050 level shifter. We also toss in a 220uF capacitor, as we noticed an Arduino may need a little more capacitance on the 3.3V power supply for this big display! This display does not come with header attached but we do toss in a stick of header you can solder on. Also, the display may come in 8-bit mode. You can change modes from 8-bit to SPI with a little soldering, check out the tutorial for how to do so.

Getting started is easy! We have a detailed tutorial and example code in the form of an Arduino library for text and graphics. You'll need a microcontroller with more than 1K of RAM since the display must be buffered. The library can print text, bitmaps, pixels, rectangles, circles and lines. It uses 1K of RAM since it needs to buffer the entire display but its very fast! The code is simple to adapt to any other microcontroller.

Pinouts

The pins on these modules are not well marked, but the one on left is #1 and the pins increment in order until the one on the very right, #20

Power Pins

  • Pin #1 is power and signal Ground
  • Pin #2 is 3V Power In - provide 3V with 100-150mA current capability
  • Pin #3 is not used, do not connect to anything

Signal Pins

  • Pin #4 is DC - the data/command pin. This is a 3V logic level input pin and is used for both SPI and 8-bit connections
  • Pin #5 is WR - the 8-bit write pin. This is a 3V logic level input pin and is used for 8-bit connections. Do not connect if using SPI
  • Pin #6 is RD - the 8-bit read pin. This is a 3V logic level input pin and is used for 8-bit connections. Do not connect if using SPI
  • Pin #7 is Data0 - this pin is the SPI Clock pin and the 8-bit data bit 0 pin. This is a 3V logic level input pin when used with SPI, and an input/output when used in 8-bit.
  • Pin #8 is Data1 - this pin is the SPI Data In pin and the 8-bit data bit 1 pin. This is a 3V logic level input pin when used with SPI, and an input/output when used in 8-bit.
  • Pins #9-14 are Data2-7 - Used for 8-bit mode. These is a 3V input/output when used in 8-bit. Do not connect if using SPI
  • Pin #15 is CS - the chip select pin. This is a 3V logic level input pin and is used for both SPI and 8-bit connections
  • Pin #16 is RESET - the reset pin. This is a 3V logic level input pin and is used for both SPI and 8-bit connections

Remaining Pins

  • Pins #17-19 are not connected, do not use
  • Pin #20 is the 'frame ground' pin and is connected to the metal case around the OLED, you can connect to ground or leave floating.

Assembly

Changing "modes"

These modules can be used in SPI or 8-Bit mode. Somewhat annoyingly, the only way to switch modes is to desolder/solder jumpers on the back of the modules.

8-Bit "6800" mode

Your module probably came with this setting by default. The R20 and R18 resistors are in place and the R21 and R19 are missing.

SPI Mode

This is the mode you likely want to be in. You'll need to remove the R18 and R20 resistors by heating up the resistor with a soldering iron and maybe even melting a little solder on. Then remove the resistor and solder in R19 and R21 either by placing the resistors there (or, really, any 0-10K 0805 resistor) or a piece of wire.

Wiring & Test

We will demonstrate using this display with an Arduino UNO compatible. If you are using a 3V logic device you can skip the level shifter and connect direct from the microcontroller to display. You can also use another kind of level shifter if you like.

Any microcontroller with 4 or 5 pins can be used, but we recommend testing it out with an UNO before you try a different processor.

Don't forget you have to set the display to SPI mode, see the Assembly step on how to do that!

SPI Wiring

Since this is a SPI-capable display, we can use hardware or 'software' SPI. To make wiring identical on all Arduinos, we'll begin with 'software' SPI. The following pins should be used:

  • Connect Pin #1 to common power/data ground line (black wires)
  • Connect Pin #2 to the 3V power supply on your Arduino. (red wires)
  • Skip pin #3
  • Connect Pin #4 (DC) to digital #8 via the level shifter (white wires) any pin can be used later
  • Connect Pin #7 (SCLK) to digital #13 via the level shifter (blue wires) any pin can be used later
  • Connect Pin #8 (DIN) to digital #11 via the level shifter (green wires) any pin can be used later
  • Skip pins #9-14
  • Connect Pin #15 (CS) to digital #10 via the level shifter (yellow wires) any pin can be used later
  • Connect Pin #16 (RST) to digital #9 via the level shifter (orange wires) any pin can be used later

Later on, once we get it working, we can adjust the library to use hardware SPI if you desire, or change the pins to any others.

Level Shifter Wiring

You will also want to power the HC4050 level shifter by connecting pin #1 to 3V (the red wire) and pin #8 to ground (the black wire)

3.3V Capacitor

We also include a 220uF capacitor with your order because we noticed that the 3V line can fluctuate a lot when powered via an Arduino's 3.3V regulator. We really recommend installing it. Clip the leads on this capacitor and connect the negatve pin to GND and the positive pin to 3V

Download Adafruit_SSD1325 library

To begin reading sensor data, you will need to download Adafruit_SSD1325 from our github repository. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip

Rename the uncompressed folder Adafruit_SSD1325 and check that the Adafruit_SSD1325 folder contains Adafruit_SSD1325.cpp and Adafruit_SSD1325.h

Place the Adafruit_SSD1325 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

We also have a great tutorial on Arduino library installation at: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

Installing Adafruit_GFX

You'll also need to download the 'underlying' graphics support library that does all the lines, text, rectangle drawing for you. You can grab it from  https://github.com/adafruit/Adafruit-GFX-Library 

Or click on the button below and follow the same instructions you did for the Adafruit_SSD1325 library. Uncompress and rename the folder to Adafruit_GFX (contains Adafruit_GFX.cpp and .h). Then place them inside your Arduino libraries folder and restart the Arduino IDE. If this is all unfamiliar, we have a tutorial introducing Arduino library concepts and installation.

Restart the IDE!

Running the Demo

After restarting the Arduino software, you should see a new example folder called Adafruit_SSD1325 and inside, an example called ssd1325test

Now upload the sketch to your Arduino. That's pretty much it! You should see immediate update of the display.

If nothing shows up at all, make sure you have your wiring correct, we have a diagram above you can use. Also, check that you converted the module to "SPI" mode (see the Assembly) step on how to do that

Changing Pins

Now that you have it working, there's a few things you can do to change around the pins.

If you're using Hardware SPI, the CLOCK and MOSI pins are 'fixed' and cant be changed. But you can change to software SPI, which is a bit slower, and that lets you pick any pins you like. Find these lines:

// If using software SPI, define CLK and MOSI
#define OLED_CLK 13
#define OLED_MOSI 11

// These are neede for both hardware & softare SPI
#define OLED_CS 10
#define OLED_RESET 9
#define OLED_DC 8

Change those to whatever you like!

Using Hardware SPI

If you want a little more speed, you can 'upgrade' to Hardware SPI. Its a bit faster, maybe 2x faster to draw but requires you to use the hardware SPI pins.

  • SPI CLK connects to SPI clock. On Arduino Uno/Duemilanove/328-based, thats Digital 13. On Mega's, its Digital 52 and on Leonardo/Due its ICSP-3 (See SPI Connections for more details)
  • SPI DATA IN connects to SPI MOSI. On Arduino Uno/Duemilanove/328-based, thats Digital 11. On Mega's, its Digital 51 and on Leonardo/Due its ICSP-4 (See SPI Connections for more details)

To enable hardware SPI, look for these lines:

// this is software SPI, slower but any pins
Adafruit_SSD1325 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

// this is for hardware SPI, fast! but fixed oubs
//Adafruit_SSD1325 display(OLED_DC, OLED_RESET, OLED_CS);

Comment out the top line and uncomment the bottom line

Using Adafruit GFX

The Adafruit_GFX library for Arduino provides a common syntax and set of graphics functions for all of our TFT, LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of displays.

The GFX library is what lets you draw points, lines, rectangles, round-rects, triangles, text, etc.

Check out our detailed tutorial here http://learn.adafruit.com/adafruit-gfx-graphics-library It covers the latest and greatest of the GFX library!

Since this is a 'buffered' display, dont forget to call the "display()" object function whenever you want to update the OLED. The entire display is drawn in one data burst, so this way you can put down a bunch of graphics and display it all at once.

F.A.Q.

How come sometimes I see banding or dim areas on the OLED?

These OLEDs are passively drawn, which means that each line is lit at once. These displays are fairly inexpensive and simple, but as a tradeoff the built in boost converter has to drive all the OLED pixels at once. If you have a line with almost all the pixels lit it wont be as bright as a line with only 50% or less lit up.

The display works, because I can see the splash screen, but when I draw to the display nothing appears!

Don't forget you must call .display() to actually write the display data to the display. Unlike many of our TFTs, the entire display must be written at once so you should print all your text and draw all your squares, then call display()

How do I get rid of the splash screen?

Open up Adafruit_SSD1325.cpp in the libraries/Adafruit_SSD1325 folder and find these lines

static uint8_t buffer[SSD1325_LCDHEIGHT * SSD1325_LCDWIDTH / 8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
....
0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01
};

and delete everything after static uint8_t buffer[SSD1325_LCDHEIGHT * SSD1325_LCDWIDTH / 8] = {
and before };

Downloads

This guide was first published on Aug 05, 2015. It was last updated on Oct 20, 2018.