Skip to content

Commit 963343b

Browse files
committed
biiig tricolor
1 parent bb035c9 commit 963343b

File tree

4 files changed

+97
-1
lines changed

4 files changed

+97
-1
lines changed

examples/ThinkInk_tricolor/ThinkInk_tricolor.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ ThinkInk_213_Tricolor_RW display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY,
9292
// ThinkInk_420_Tricolor_MFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
9393
// EPD_BUSY, EPD_SPI);
9494

95-
// 5.83 Tricolor displays with 648 x 480 pixels and UC8179 chipset
95+
// 5.83 Tricolor displays with 648x480 pixels and UC8179 chipset
9696
// ThinkInk_583_Tricolor_AABMFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
9797

98+
// 7.5" Tricolor displays with 800x480 pixels and UC8179 chipset
99+
// ThinkInk_750_Tricolor_AABMFGNR display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
98100

99101

100102
void setup() {

src/Adafruit_ThinkInk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
#include "panels/ThinkInk_420_Tricolor_MFGNR.h"
4545
#include "panels/ThinkInk_583_Mono_AAAMFGN.h"
4646
#include "panels/ThinkInk_583_Tricolor_AABMFGNR.h"
47+
#include "panels/ThinkInk_750_Tricolor_AABMFGNR.h"
4748

4849
#endif // _ADAFRUIT_THINKINK_H_

src/panels/ThinkInk_583_Mono_AAAMFGN.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33

44
#include "Adafruit_EPD.h"
55

6+
const uint8_t uc8179_mono_init_code[] {
7+
UC8179_POWERSETTING, 4,
8+
0x07, // VGH=20V
9+
0x07, // VGL=-20V
10+
0x3F, // VDH=15V
11+
0x3F, // VDL=-15V
12+
13+
UC8179_POWERON, 0,
14+
0xFF, 100, // busy wait
15+
16+
UC8179_PANELSETTING, 1,
17+
0b010111, // BW OTP LUT
18+
19+
UC8179_TRES, 4,
20+
0x02, 0x88, 0x01, 0xE0,
21+
22+
UC8179_DUALSPI, 1, 0x00,
23+
24+
UC8179_WRITE_VCOM, 2, 0x10, 0x07,
25+
UC8179_TCON, 1, 0x22,
26+
27+
0xFE};
28+
29+
630
class ThinkInk_583_Mono_AAAMFGN : public Adafruit_UC8179 {
731
private:
832
public:
@@ -20,6 +44,8 @@ class ThinkInk_583_Mono_AAAMFGN : public Adafruit_UC8179 {
2044
setColorBuffer(1, false); // layer 1 uninverted
2145
setBlackBuffer(1, false); // only one buffer
2246

47+
_epd_init_code = uc8179_mono_init_code;
48+
2349
layer_colors[EPD_WHITE] = 0b00;
2450
layer_colors[EPD_BLACK] = 0b01;
2551
layer_colors[EPD_RED] = 0b10;
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#ifndef _THINKINK_750_TRI_AABMFGNR_H
2+
#define _THINKINK_750_TRI_AABMFGNR_H
3+
4+
#include "Adafruit_EPD.h"
5+
6+
// clang-format off
7+
8+
const uint8_t uc8179_750_tricolor_init_code[] {
9+
UC8179_POWERSETTING, 4,
10+
0x07, // VGH=20V
11+
0x07, // VGL=-20V
12+
0x3F, // VDH=15V
13+
0x3F, // VDL=-15V
14+
15+
UC8179_POWERON, 0,
16+
0xFF, 100, // busy wait
17+
18+
UC8179_PANELSETTING, 1,
19+
0b000111, // Tricolor OTP LUT
20+
21+
UC8179_TRES, 4,
22+
0x03, 0x20, 0x01, 0xE0,
23+
24+
UC8179_DUALSPI, 1, 0x00,
25+
26+
UC8179_WRITE_VCOM, 2, 0x90, 0x07,
27+
UC8179_TCON, 1, 0x22,
28+
29+
0xFE};
30+
31+
// clang-format on
32+
33+
34+
class ThinkInk_750_Tricolor_AABMFGNR : public Adafruit_UC8179 {
35+
private:
36+
public:
37+
ThinkInk_750_Tricolor_AABMFGNR(int16_t SID, int16_t SCLK, int16_t DC, int16_t RST,
38+
int16_t CS, int16_t SRCS, int16_t MISO,
39+
int16_t BUSY = -1)
40+
: Adafruit_UC8179(800, 480, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
41+
42+
ThinkInk_750_Tricolor_AABMFGNR(int16_t DC, int16_t RST, int16_t CS, int16_t SRCS,
43+
int16_t BUSY = -1, SPIClass* spi = &SPI)
44+
: Adafruit_UC8179(800, 480, DC, RST, CS, SRCS, BUSY, spi){};
45+
46+
void begin(thinkinkmode_t mode = THINKINK_TRICOLOR) {
47+
Adafruit_EPD::begin(true);
48+
49+
setBlackBuffer(0, false);
50+
setColorBuffer(1, false);
51+
52+
_epd_init_code = uc8179_750_tricolor_init_code;
53+
54+
layer_colors[EPD_WHITE] = 0b00;
55+
layer_colors[EPD_BLACK] = 0b01;
56+
layer_colors[EPD_RED] = 0b10;
57+
layer_colors[EPD_GRAY] = 0b10;
58+
layer_colors[EPD_LIGHT] = 0b00;
59+
layer_colors[EPD_DARK] = 0b01;
60+
61+
default_refresh_delay = 13000;
62+
setRotation(0);
63+
// DO NOT power down again!
64+
};
65+
};
66+
67+
#endif // _THINKINK_750_TRI_AABMFGNR

0 commit comments

Comments
 (0)