Fork me on GitHub

Project Notes

#087 SSD1306 OLED Bareback SPI

Test driving a monochrome 128x64 OLED Display with an Arduino and the raw command set over SPI

Here’s a quick video of the circuit in action:

OLED/SSD1306BareBack demo

Notes

It runs a simple demo cycle, including the reading and display of a voltage from the A0 pin.

There are a few commonly-used libraries - such as ladyada’s, as demoed in the SSD1306WithAdaFruitLibraries project - however this sketch uses the instruction set for device directly, as documented in the SSD1306 datasheet.

I’m using an Arduino Pro Mini running on 3.3V at 8MHz, and driving the OLED directly.

The OLED is one I got from aliexpress for USD3.93 - see the seller’s page: Yellow+Blue 0.96” SPI Serial 128X64 OLED. Although it’s a monochrome display, this unit comes with two-tinted glass, which makes the upper fifth of the screen yellow and the lower blue.

The pin breakouts are slightly different from the AdaFruit module (used in the Fritzing diagram). These are the actual pin connections for my unit:

Arduino OLED
D09 MOSI
D10 CLK
D11 D/C
D12 CS
GND GND
VCC VCC

Note that my OLED doesn’t have a reset connection, so I’m not able to use a reset to get the display back to default configuration, hence the setup method runs through and sets all the configuration options regardless.

Of course, using the raw command approach means the program leaves out all the unecessary support, so memory requirements are much less than if importing a full library:

Memory Usage
program storage 4,650 bytes (15%)
dynamic memory 505 bytes (24%)

Construction

The Breadboard

The Schematic

The Build

Credits and References

About LEAP#87 OLEDArduino

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader