Sample code for the CFAP800480A1-0750, a 7.5" 800x480 ePaper display with the UC8179 controller.
Product page: https://www.crystalfontz.com/product/cfap800480a10750 (to be released)
Controller: https://www.crystalfontz.com/controllers/UltraChip/UC8179/
This code was written for a Seeeduino v4.2 @ 3.3V. An Arduino UNO modified to run at 3.3V will also work.
| Arduino | Wire Color | Function |
|---|---|---|
| D3 | Green | Busy Line |
| D4 | Brown | Reset Line |
| D5 | Purple | Data/Command Line |
| D10 | Blue | Chip Select Line |
| D11 | White | MOSI |
| D13 | Orange | Clock |
| 3.3V | Red | Power |
| GND | Black | Ground |
SD card chip select is on D8.
- Full screen refresh (best quality, clears ghosting)
- Fast refresh (~1.5s update, may accumulate ghosting over time)
- 4-gray grayscale (white, light gray, dark gray, black)
- Partial refresh (update a sub-region without a full redraw)
- Deep sleep mode for power saving
Demo modes are enabled via #define flags at the top of loop() in the sketch:
| Flag | Description |
|---|---|
DEMO_FULL_REFRESH |
Full screen refresh with sample image |
DEMO_FAST_REFRESH |
Fast (~1.5s) refresh with sample image |
DEMO_GRAY |
4-gray test pattern (four horizontal gray bands) |
DEMO_PARTIAL_LETTERS |
Partial refresh spelling out "CFAP" |
DEMO_CLEAR_WHITE |
Clear display to white |
DEMO_CLEAR_BLACK |
Clear display to black |
The sketch runs each enabled demo once and then halts.
A full-resolution image requires 48,000 bytes (800×480 / 8). This exceeds the program flash of an Arduino UNO or Seeeduino (32 KB total). Two options:
- RLE compression — use
bmp_to_epaperto generate a run-length encoded array. The included sample image uses this approach. - SD card streaming — load image bytes from the SD card at runtime and stream them directly to the display.
Use the bmp_to_epaper tool to convert BMP files to C image arrays. Enable RLE compression in the tool to keep array sizes small enough to fit in flash.
For 4-gray images, generate a 2bpp packed BMP (96,000 bytes for 800×480). Because this far exceeds AVR flash, store the image on an SD card and adapt showImageGray() to stream from SD rather than PROGMEM.
This is free and unencumbered software released into the public domain. See the Unlicense for details.