ESP-BSP: ePaper display code: problem

dr_glenn
Posts: 8
Joined: Sun May 26, 2024 9:22 pm

ESP-BSP: ePaper display code: problem

Postby dr_glenn » Thu Jul 03, 2025 3:29 am

ESP-BSP contains sample code for a Waveshare 1.54" square eInk display that measures 200x200 bits.
The code can be found at esp-bsp/components/lcd/esp_lcd_ssd1681.
I hope someone who has used this code can help me. I'm trying to adapt it for other Waveshare eInk displays.

SSD1681 is an interface chip for eInk displays. Many Waveshare eInk use this chip.
I have been able to get this code partially working with a Waveshare 2.7" V2 display; the dimensions are X=176, Y=264.
The problem I'm having is that the software cannot display anything beyond Y=200. I've been all over the code and I've removed all values of 200. I cannot even clear the entire screen (which still has display from a previous project), only the first 200 rows.

To clear the display the code sets start and end values for X (0, 175) and Y (0, 263), then sets vram to the buffer to be displayed and finally initiates DMA. And yet only rows up to 200 are cleared. Crazy.

dr_glenn
Posts: 8
Joined: Sun May 26, 2024 9:22 pm

Re: ESP-BSP: ePaper display code: problem

Postby dr_glenn » Thu Jul 03, 2025 8:09 pm

SOLVED!
I discovered there is a pull request that addresses this problem: https://github.com/espressif/esp-bsp/pull/521. I guess it's not in the master/primary yet.
The master code reads:

Code: Select all

#define SSD1681_CMD_OUTPUT_CTRL             0x01
#define SSD1681_PARAM_OUTPUT_CTRL           ((uint8_t[]) {0xc7, 0x00, 0x00})
And 0xc7 == 199 decimal. It was written this way exclusively for the 1.54" square display.
The fix is simple:

Code: Select all

#define SSD1681_PARAM_OUTPUT_CTRL(rows)     ((uint8_t[]) {(rows - 1) & 0xFF, (rows - 1) >> 8, 0x00})
Now I can cleanup my changes and submit a pull request.

dr_glenn
Posts: 8
Joined: Sun May 26, 2024 9:22 pm

Re: ESP-BSP: ePaper display code: problem

Postby dr_glenn » Wed Aug 06, 2025 10:54 pm

I have created a pull request, #612 (https://github.com/espressif/esp-bsp/pull/612). It adds support for non-rectangular epaper displays with at least one dimension larger than 200. 200 is the limit of the SSD1681 controller; larger dimensions use SSD1680 controller.

Who is online

Users browsing this forum: Qwantbot and 4 guests