biiig tricolor

This commit is contained in:
ladyada 2025-07-08 15:14:16 -04:00
parent bb035c969b
commit 963343b280
4 changed files with 97 additions and 1 deletions

View file

@ -92,9 +92,11 @@ ThinkInk_213_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY,
// ThinkInk_420_Tricolor_MFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);
// 5.83 Tricolor displays with 648 x 480 pixels and UC8179 chipset
// 5.83 Tricolor displays with 648x480 pixels and UC8179 chipset
// ThinkInk_583_Tricolor_AABMFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
// 7.5" Tricolor displays with 800x480 pixels and UC8179 chipset
// ThinkInk_750_Tricolor_AABMFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
void setup() {

View file

@ -44,5 +44,6 @@
#include "panels/ThinkInk_420_Tricolor_MFGNR.h"
#include "panels/ThinkInk_583_Mono_AAAMFGN.h"
#include "panels/ThinkInk_583_Tricolor_AABMFGNR.h"
#include "panels/ThinkInk_750_Tricolor_AABMFGNR.h"
#endif // _ADAFRUIT_THINKINK_H_

View file

@ -3,6 +3,30 @@
#include "Adafruit_EPD.h"
const uint8_t uc8179_mono_init_code[] {
UC8179_POWERSETTING, 4,
0x07, // VGH=20V
0x07, // VGL=-20V
0x3F, // VDH=15V
0x3F, // VDL=-15V
UC8179_POWERON, 0,
0xFF, 100, // busy wait
UC8179_PANELSETTING, 1,
0b010111, // BW OTP LUT
UC8179_TRES, 4,
0x02, 0x88, 0x01, 0xE0,
UC8179_DUALSPI, 1, 0x00,
UC8179_WRITE_VCOM, 2, 0x10, 0x07,
UC8179_TCON, 1, 0x22,
0xFE};
class ThinkInk_583_Mono_AAAMFGN : public Adafruit_UC8179 {
private:
public:
@ -20,6 +44,8 @@ class ThinkInk_583_Mono_AAAMFGN : public Adafruit_UC8179 {
setColorBuffer(1, false); // layer 1 uninverted
setBlackBuffer(1, false); // only one buffer
_epd_init_code = uc8179_mono_init_code;
layer_colors[EPD_WHITE] = 0b00;
layer_colors[EPD_BLACK] = 0b01;
layer_colors[EPD_RED] = 0b10;

View file

@ -0,0 +1,67 @@
#ifndef _THINKINK_750_TRI_AABMFGNR_H
#define _THINKINK_750_TRI_AABMFGNR_H
#include "Adafruit_EPD.h"
// clang-format off
const uint8_t uc8179_750_tricolor_init_code[] {
UC8179_POWERSETTING, 4,
0x07, // VGH=20V
0x07, // VGL=-20V
0x3F, // VDH=15V
0x3F, // VDL=-15V
UC8179_POWERON, 0,
0xFF, 100, // busy wait
UC8179_PANELSETTING, 1,
0b000111, // Tricolor OTP LUT
UC8179_TRES, 4,
0x03, 0x20, 0x01, 0xE0,
UC8179_DUALSPI, 1, 0x00,
UC8179_WRITE_VCOM, 2, 0x90, 0x07,
UC8179_TCON, 1, 0x22,
0xFE};
// clang-format on
class ThinkInk_750_Tricolor_AABMFGNR : public Adafruit_UC8179 {
private:
public:
ThinkInk_750_Tricolor_AABMFGNR(int16_t SID, int16_t SCLK, int16_t DC, int16_t RST,
int16_t CS, int16_t SRCS, int16_t MISO,
int16_t BUSY = -1)
: Adafruit_UC8179(800, 480, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
ThinkInk_750_Tricolor_AABMFGNR(int16_t DC, int16_t RST, int16_t CS, int16_t SRCS,
int16_t BUSY = -1, SPIClass* spi = &SPI)
: Adafruit_UC8179(800, 480, DC, RST, CS, SRCS, BUSY, spi){};
void begin(thinkinkmode_t mode = THINKINK_TRICOLOR) {
Adafruit_EPD::begin(true);
setBlackBuffer(0, false);
setColorBuffer(1, false);
_epd_init_code = uc8179_750_tricolor_init_code;
layer_colors[EPD_WHITE] = 0b00;
layer_colors[EPD_BLACK] = 0b01;
layer_colors[EPD_RED] = 0b10;
layer_colors[EPD_GRAY] = 0b10;
layer_colors[EPD_LIGHT] = 0b00;
layer_colors[EPD_DARK] = 0b01;
default_refresh_delay = 13000;
setRotation(0);
// DO NOT power down again!
};
};
#endif // _THINKINK_750_TRI_AABMFGNR