display-examples

A collection of examples for driving displays from microcontrollers

Home
Display Technologies
Driver Technologies
Control Protocols
Display Libraries for Arduino
TFT LCD Examples
OLED Examples
ePaper Examples
8x8 LED Matrix examples
QR Code Examples
Inventory

This project is maintained by tigoe

ePaper Displays

There are lots of ePaper displays on the market now. These notes are not comprehensive, but they cover a few available boards and support parts.

You can find the code examples at this link.

The refresh rate on ePaper displays is very slow, on the order of several seconds per frame. However, the advantage to them is that they retain their image when powered down. They have a crisp image, in either black and white, or black, white and one other color. They’re ideal for applications where the text or image changes infrequently, but needs to be updated dynamically.

Hardware

eInk displays are sold either as the bare display or as a breakout board. Figure 1 shows four different boards; the bottom left is a bare display and the others are breakout boards. The breakout boards will connect easily to a solderless breadboard, but the bare displays have only a flexible ribbon connector, typically designed for a 24 Position, 0.5mm pitch ZIF connector.

See the Inventory page for the various models I’ve tested.

Figure 1. Four ePaper Displays

Figure 1. Four ePaper displays. Clockwise from top left: WaveShare 1.54” breakout board; Sparkfun SparkX 1.54” tri-color breakout board; Adafruit 1.54” monochrome breakout board; Adafruit 2.13” tri-color bare display. The breakout boards all have connectors that fit nicely into breadboards.

Pin Connections

eInk displays have an SPI interface with a few additional pins. Some breakout boards such as the WaveShare do not send data to the microcontroller, so they do not have a serial data out (SDO) pin. In addition to the usual SPI data in (SDI), data out (SDO), clock (SCK), and chip select (CS), these displays also have a BUSY pin, a Data/Command (DC) and a RESET pin.

Adafruit and Sparkfun add SRAM frame buffers and SD cards to their breakout boards so you can transfer a frame from an SD image or video to the buffer, and then to the screen. These additional features share the SPI bus, but add two required pins: SRCS is the SRAM chip select; SDCS is the SD card chip select. If you are not using the SD card, you can leave this one unconnected.

WaveShare and other breakout boards don’t have the frame buffer or SD card. That means that if you use the Adafruit library to drive a third party board, you’ll need to indicate that there is no buffer. You can do this by setting the SRAM_CS pin to -1 in your code. If you’re using the Adafruit or Sparkfun boards, can use the SD card using the SD card library, of course, and the SRAM simply by setting the SRAM_CS pin to whatever pin you want to connect it to.

See the SPI connections section of the main page of this repository for a list of typical pin connections.

Libraries

I’ve tried a few libraries, but I’ve had the most success with Adafruit’s Adafruit_EPD library. It runs all the panels above so far, with some modifications. Their guide is also helpful.

Adafruit’s Adafruit_EPD library supports a lot of different driver boards, and if you don’t know which one yours is, you need to experiment to find out. Their EPDTest example helps. It lists all the drivers that the library supports, each with its own initializer function. You pick the one you need. If you have to guess, start with what you know about your board:

This usually narrows your choice to 2 or 3 initializers. Try each one in turn until you see the display react as described in the comments. Make sure to change the pin #defines at the top of the code to match your pin numbers as well.