and the tricolor 5.83"

This commit is contained in:
ladyada 2025-07-08 14:54:51 -04:00
parent 4edb6e088b
commit bb035c969b
4 changed files with 76 additions and 0 deletions

View file

@ -76,6 +76,9 @@ ThinkInk_213_Mono_B72 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_
// 4.2 Grayscale/Monochrome displays with 400x300 pixels and SSD1683 chipset
// ThinkInk_420_Grayscale4_MFGN display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
// 5.83 Monochrome displays with 648 x 480 pixels and UC8179 chipset
// ThinkInk_583_Mono_AAAMFGN display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
void setup() {
Serial.begin(115200);
while (!Serial) {

View file

@ -92,6 +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
// ThinkInk_583_Tricolor_AABMFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
void setup() {
Serial.begin(115200);
while (!Serial) {

View file

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

View file

@ -0,0 +1,67 @@
#ifndef _THINKINK_583_TRI_AABMFGNR_H
#define _THINKINK_583_TRI_AABMFGNR_H
#include "Adafruit_EPD.h"
// clang-format off
const uint8_t uc8179_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,
0x02, 0x88, 0x01, 0xE0,
UC8179_DUALSPI, 1, 0x00,
UC8179_WRITE_VCOM, 2, 0x90, 0x07,
UC8179_TCON, 1, 0x22,
0xFE};
// clang-format on
class ThinkInk_583_Tricolor_AABMFGNR : public Adafruit_UC8179 {
private:
public:
ThinkInk_583_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(648, 480, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
ThinkInk_583_Tricolor_AABMFGNR(int16_t DC, int16_t RST, int16_t CS, int16_t SRCS,
int16_t BUSY = -1, SPIClass* spi = &SPI)
: Adafruit_UC8179(648, 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_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_583_TRI_AAAMFGNR