From 280d95183cb099de15aa4cd11325334a6012d8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20=C5=A0imun=20Ku=C4=8Di?= Date: Thu, 11 Jun 2026 12:06:53 +0200 Subject: [PATCH] Add support for AC057TC1 5.7" panel used on Inkplate 6COLOR. --- src/bb_ep.inl | 23 +++++++++++++++++++++++ src/bb_epaper.cpp | 8 ++++++++ src/bb_epaper.h | 2 ++ 3 files changed, 33 insertions(+) diff --git a/src/bb_ep.inl b/src/bb_ep.inl index 6b598ae..c992b05 100644 --- a/src/bb_ep.inl +++ b/src/bb_ep.inl @@ -78,6 +78,11 @@ const uint8_t u8Colors_7clr[16] = { // ACeP 7-color BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK }; +const uint8_t u8Colors_7clr_v2[16] = { // Alternative ACeP 7-color, black white green blue red yellow orange + BBEP_BLACK, BBEP_WHITE, 0x05, 0x04, 0x03, 0x02, BBEP_ORANGE, BBEP_BLACK, + BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK +}; + const uint8_t u8Colors_spectra[16] = { // Spectra 6 BBEP_BLACK, BBEP_WHITE, BBEP_YELLOW, BBEP_RED, 0x05, 0x06, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK, BBEP_BLACK @@ -3626,6 +3631,23 @@ const uint8_t epd73_spectra_init[] PROGMEM = { BUSY_WAIT, 0 }; +// AC057TC1 5.7" 600x448 7-color ACeP init sequence +const uint8_t epd57_acep_init[] PROGMEM = { + 3, UC8151_PSR, 0xef, 0x08, // panel setting + 5, UC8151_PWR, 0x37, 0x00, 0x05, 0x05, // power setting + 2, UC8151_PFS, 0x00, // power off sequence + 4, UC8151_BTST, 0xc7, 0xc7, 0x1d, // booster soft start + 2, UC8151_TSE, 0x00, // temperature sensor enable + 2, UC8151_CDI, 0x37, // VCOM and data interval + 2, UC8151_TCON, 0x20, // TCON + 5, UC8151_TRES, 0x02, 0x58, 0x01, 0xc0, // resolution 600x448 + 2, UC8151_PWS, 0xaa, + 2, UC8151_CDI, 0x37, // VCOM and data interval + 1, UC8151_PON, // power on + BUSY_WAIT, + 0 +}; + // Spectra 6 (GDEP040E01) 400x600 7-color init sequence // GoodDisplay reference; normal (host-managed power cycling) mode const uint8_t epd40_spectra_init[] PROGMEM = { @@ -3817,6 +3839,7 @@ const EPD_PANEL panelDefs[] PROGMEM = { {400, 600, 0, epd40_spectra_init, NULL, NULL, BBEP_7COLOR, BBEP_CHIP_UC81xx, u8Colors_spectra}, // EP40_SPECTRA_400x600 GDEP040E01 Spectra 6 4" 400x600 {176, 264, 0, badger2350_init_full, badger2350_init_fast, badger2350_init_part, BBEP_NEEDS_EXTRA_INIT, BBEP_CHIP_SSD16xx, u8Colors_2clr}, // EP27_176x264 {176, 264, 0, badger2350g_init_full, badger2350g_init_fast, NULL, BBEP_NEEDS_EXTRA_INIT | BBEP_4GRAY, BBEP_CHIP_SSD16xx, u8Colors_4gray},// EP27_176x264_4GRAY + {600, 448, 0, epd57_acep_init, NULL, NULL, BBEP_NEEDS_EXTRA_INIT | BBEP_7COLOR, BBEP_CHIP_UC81xx, u8Colors_7clr_v2}, // EP57_ACEP_600x448 AC057TC1 }; // // Set the e-paper panel type diff --git a/src/bb_epaper.cpp b/src/bb_epaper.cpp index 12fb220..6a405a1 100644 --- a/src/bb_epaper.cpp +++ b/src/bb_epaper.cpp @@ -230,6 +230,14 @@ int rc = BBEP_ERROR_BAD_PARAMETER; return BBEP_SUCCESS; } break; + case EPD_INKPLATE6COLOR: // DC:33 RST:19 BUSY:32 CS:27 MOSI:23 SCK:18 + if (setPanelType(EP57_ACEP_600x448) == BBEP_SUCCESS) { + initIO(33, 19, 32, 27, 23, 18, 2000000); + setRotation(180); + return BBEP_SUCCESS; + } + break; + case EPD_TRMNL_OG: // DC:5 CS:6 RST:10 BUSY:4 MOSI:8 SCK:7 if (setPanelType(EP75_800x480) == BBEP_SUCCESS) { initIO(5, 10, 4, 6, 8, 7, 10000000); diff --git a/src/bb_epaper.h b/src/bb_epaper.h index b4ac819..2c794ab 100644 --- a/src/bb_epaper.h +++ b/src/bb_epaper.h @@ -185,6 +185,7 @@ enum { EPD_WAVESHARE_397_4GRAY, EPD_LILYGO_T3S3, EPD_M5_PAPER_COLOR, // 4" 600x400 Spectra6 + EPD_INKPLATE6COLOR, EPD_PRODUCT_COUNT }; @@ -266,6 +267,7 @@ enum { EP40_SPECTRA_400x600, // GDEP040E01 Spectra 6 4" 400x600 EP27_176x264, // Badger2350 EP27_176x264_4GRAY, // Badger2350 + EP57_ACEP_600x448, // AC057TC1 7-color ACeP EP_PANEL_COUNT }; #ifdef FUTURE