SPI

Getting Started ›› Hardware ›› EPD Interfaces ››
… visits
Parent Previous Next

SPI (Serial Peripheral Interface)


There are two SPI interface options available for connecting an EPD module: software SPI and hardware SPI.
Software SPI uses bit-banging implemented in software, while hardware SPI uses the microcontroller's dedicated SPI peripheral.
Although some modern PIC microcontrollers provide multiple SPI modules, TFT & EPD Graphic Library 2 uses only SPI1 or SPI2 when operating in hardware SPI mode.


Unlike a TFT write, an EPD refresh command doesn't complete when the MCU finishes sending it — the controller continues driving the waveform internally, on its own clock, for as long as the update takes.
Almost all EPD controllers expose a BUSY pin specifically so the host can tell when this internal process has actually finished, and a new command must not be issued while the controller is still mid-refresh, or the in-progress update can be corrupted.
(This library handles BUSY polling automatically — see "Communicating With the Controller" — but the pin is still part of the required wiring.)


Most controllers have no RAM readback capability at all — and even where the silicon technically supports it, it's rarely exposed or reliable on inexpensive modules — so the SDA line is practically used for writes only, not for reading back image/RAM data (or registers because there is no practical use of that).

Recommended Design

SPI Interface Signal Lines:

  • CS - Output - EPD chip select.
  • RST - Output - Hardware reset for the display controller.
  • D/C - Output - Data/command select, indicating the type of data being transmitted.
  • SDA/MOSI - Output - SPI single-line (bidirectional) data. In practice not used for reads — see note above.
  • SCL/SCLK - Output - SPI clock for the EPD module
  • BUSY - Input - indicates when the internal refresh/update process has actually finished

Additional Power and Control Lines (Non-SPI):

  • VCC - Power - Connect to a 3.3–5 V supply if the display includes an onboard 3.3 V LDO or regulator; otherwise, connect directly to a 3.3 V supply. Some modules include a bypass resistor allowing direct connection to the PCB VCC. 
  • GND - Power - Ground connection.

Notes

There is no universal standard pinout, though manufacturers tend to be fairly consistent among themselves.
Always check the pin label table printed on the back of the module's PCB, as shown below — pinouts can be mirrored between otherwise similar-looking modules, and connecting by pin position alone rather than by label is a common source of hardware damage.

 SPI

Created with the Personal Edition of HelpNDoc: Maximize Your Reach: Convert Your Word Document to an ePub or Kindle eBook