Hardware

Getting Started ›› Hardware ›› EPD Interfaces ›› SPI ››
Parent Previous Next


Hardware SPI


Hardware SPI is faster than Software SPI (bit-banging), but that speed advantage offers little benefit here: a refresh takes anywhere from a few hundred milliseconds to several seconds, depending on panel size, temperature, and update mode — this dwarfs any SPI transfer time by orders of magnitude, whether hardware or software-driven.
In practice, either option is fast enough, and the choice can be made based on pin availability or peripheral conflicts rather than performance.


Unlike TFT displays, EPD driver ICs can't always handle high SPI clock speeds reliably.
My advice: start with software SPI, or a slow hardware SPI clock around 2MHz, and confirm it works correctly before raising the speed from there.


That said, don't expect much practical benefit from pushing the clock higher. Even at 2MHz, SPI data transfer is already fast enough that it's a negligible fraction of total operation time — the EPD's own refresh time (hundreds of milliseconds to several seconds, as covered earlier) dominates so completely that shaving milliseconds off the transfer itself makes no visible difference to how quickly the display actually appears to update.


Note: 

On some MCUs, the hardware SPI peripheral is tied to fixed, dedicated pins; on others, it must be routed to the desired pins via PPS (Peripheral Pin Select).
This library does not configure PPS for you — it is the user's responsibility to set the PPS registers correctly for SPI operation before initializing the display.


$define EPD_COM              SPI_1  'Use SPI 1 module

Or

$define EPD_COM              SPI_2  'Use SPI 2 module 

Created with the Personal Edition of HelpNDoc: iPhone web sites made easy