Sample code for the CFAP960640A0-1020, a 960x640 ePaper display with the SSD1677 controller.
Product page: https://www.crystalfontz.com/product/cfap960640a01020 (to be released)
This code was written for a Seeeduino v4.2 @ 3.3V. An Arduino UNO modified to run at 3.3V will also work.
| Arduino | Function |
|---|---|
| GND | Ground |
| D3 | Busy Line |
| D4 | Reset Line |
| D5 | Data/Command Line |
| D8 | SD Card CS |
| D10 | Chip Select Line |
| D11 | MOSI |
| D13 | Clock |
| 3.3V | Power |
- Full screen refresh (best quality, clears ghosting)
- Fast refresh (uses partial update mechanism for faster updates)
- Partial refresh (for small region updates)
- Deep sleep mode for power saving
- RLE image compression support
- SD card support for storing large images at runtime
Each full image requires 76,800 bytes (960×640÷8). This far exceeds the flash available on an Arduino UNO or Seeeduino (32KB total). Use RLE compression via bmp_to_epaper, or store images on an SD card and stream them at runtime.
Enable demos by setting the corresponding #define to 1 in CFAP960640A0-1020.ino:
| Define | Description |
|---|---|
DEMO_FULL_REFRESH |
Full screen refresh with RLE image |
DEMO_PARTIAL_LETTERS |
Partial refresh demo showing CFAP letters |
DEMO_CLEAR_WHITE |
Clear display to white |
DEMO_CLEAR_BLACK |
Clear display to black |
Before using partial updates, call setBaseMapWhite() after initEPD(). The SSD1677 uses Red RAM (0x26) as the background reference for partial updates; skipping this step causes ghosting and unstable output.
The x_start parameter in writePartialImage() must be byte-aligned (a multiple of 8).
Use the bmp_to_epaper tool to convert BMP files to RLE-compressed image arrays suitable for PROGMEM.
This is free and unencumbered software released into the public domain. See the Unlicense for details.