SSD1677 E-Paper Display Driver
A no_std driver for the SSD1677 e-paper display controller, supporting displays up to 960x680 pixels (datasheet max) with tri-color (black/white/red) support.
Features
no_stdcompatible - suitable for bare-metal embedded systemsembedded-halv1.0 supportembedded-graphicsintegration (optional, enabled by default)- Full and fast refresh modes
- Custom Look-Up Table (LUT) support for custom waveforms
- Display rotation support (0°, 90°, 180°, 270°)
- Type-safe configuration builder
- Efficient buffer management
Supported Displays
The SSD1677 controller supports various e-paper display sizes, including:
- 4.2" (400x300)
- 5.83" (648x480)
- 7.5" (800x480)
- 9.7" (960x680)
Quick Start
Add to your Cargo.toml:
[]
= "0.1.0"
= "1.0.0"
Basic usage example:
use ;
use DelayNs;
// Create hardware interface (SPI + GPIO pins)
let interface = new;
// Configure display dimensions and rotation
// Note: Dimensions::new(rows, cols) == (height, width)
if let Ok = new
Using with embedded-graphics
Enable the graphics feature (enabled by default):
[]
= { = "0.1.0", = ["graphics"] }
= "0.8"
use ;
use ;
// Setup display...
let display = new;
// Create graphic display with buffers
let mut graphic_display = new;
// Draw using embedded-graphics
new
.draw?;
// Update display
graphic_display.update?;
Hardware Interface
The SSD1677 requires:
Pin Connections
| SSD1677 Pin | MCU Pin | Description |
|---|---|---|
| VCC | 3.3V | Power supply |
| GND | GND | Ground |
| DIN | MOSI | SPI Data In |
| CLK | SCK | SPI Clock |
| CS | GPIO (CS) | SPI Chip Select |
| DC | GPIO | Data/Command select |
| RST | GPIO | Hardware reset |
| BUSY | GPIO (Input) | Busy status (active high) |
Wiring Diagram
MCU SSD1677 Display
┌─────────┐ ┌───────────────┐
│ │ │ │
│ MOSI ├─────────────┤ DIN │
│ SCK ├─────────────┤ CLK │
│ CS ├─────────────┤ CS │
│ GPIO ├─────────────┤ DC │
│ GPIO ├─────────────┤ RST │
│ GPIO ├─────────────┤ BUSY │
│ │ │ │
│ 3.3V ├─────────────┤ VCC │
│ GND ├─────────────┤ GND │
│ │ │ │
└─────────┘ └───────────────┘
Development
Setup
This project uses just for task running. To set up the development environment:
# Install just (if not already installed)
# Setup rust components (rustfmt, clippy)
# Run all checks
Available Commands
Required Rust Components
The rust-toolchain.toml file specifies required components:
rustfmt- Code formattingclippy- Lintingrust-docs- Documentation
These are automatically installed when you run just setup or when rustup detects the toolchain file.
Configuration
Display Dimensions
Dimensions must meet these constraints:
- Rows: 1 to 680 (height)
- Columns: 8 to 960, must be multiple of 8 (width)
use Dimensions;
// 7.5" display (800x480) -> rows=480, cols=800
let dims = new?;
// 5.83" display (648x480) -> rows=480, cols=648
let dims = new?;
// 4.2" display (400x300) -> rows=300, cols=400
let dims = new?;
Panel-Specific Settings
Some SSD1677 parameters are panel-dependent (booster soft-start, gate scanning, data entry mode, RAM Y inversion, update control values, and clear values). The defaults aim to be reasonable, but many panels require tuning.
Example (800x480 panel configuration):
use ;
let config = new
.dimensions
.gate_scanning
.data_entry_mode // X increment, Y decrement
.ram_y_inverted
.clear_bw_value
.clear_red_value
.display_update_ctrl2_full
.display_update_ctrl2_partial
.display_update_ctrl2_fast
.build?;
Advanced Configuration
use Builder;
let config = new
.dimensions
.rotation
.vcom // VCOM voltage
.border_waveform // Border waveform
.booster_soft_start
.build?;
Refresh Modes
// Full refresh - clears entire display, best quality
;
// Partial update from buffers
;
Custom LUT
For custom waveforms (e.g., grayscale or fast refresh):
// Load custom 112-byte LUT
const CUSTOM_LUT: = ;
display.load_lut?;
Examples
See the examples/ directory for complete examples including:
- Basic initialization and display update
- Graphics drawing with embedded-graphics
- Custom LUT usage
- Rotation handling
Resources
- SSD1677 Datasheet
- embedded-hal - Hardware abstraction layer
- embedded-graphics - 2D graphics library
License
- MIT license (LICENSE)