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 Libraries

To begin reading sensor data, you will need to download Adafruit_SSD1325 and Adafruit_GFX from the Arduino library manager.

Open up the Arduino library manager:

Search for the Adafruit SSD1325 library and install it:

Search for the Adafruit GFX library and install it:

If using an older (pre-1.8.10) Arduino IDE, locate and install Adafruit_BusIO (newer versions do this one automatically).

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

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

This guide was first published on Aug 05, 2015. It was last updated on Mar 18, 2024.

This page (Arduino Wiring & Test) was last updated on Mar 08, 2024.

Text editor powered by tinymce.