Skip to content

Commit

Permalink
refresh init command
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed Jul 24, 2024
1 parent 7709ac6 commit b3d1908
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 42 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ ESP32LCD8, ESP32LCD16 and ESP32RGBPanel only supported by arduino-esp32 v2.x and
* SSD1331 96x64 [[demo video](https://youtu.be/v20b1A_KDcQ)]
* SSD1351 128x128 [[demo video](https://youtu.be/5TIM-qMVBNQ)]
* SSD1351 128x96
* ST7262 800x480 [[demo video](https://youtu.be/VvpILAVyPt8)]
* ST7735 128x160 (various tabs) [[demo video](https://youtu.be/eRBSSD_N9II)]
* ST7735 128x128 (various tabs) [[demo video](https://youtu.be/6rueSV2Ee6c)]
* ST7735 80x160 [[demo video](https://youtu.be/qESHDuYo_Mk)]
Expand Down
159 changes: 118 additions & 41 deletions src/display/Arduino_ST77916.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,21 @@

static const uint8_t st77916_init_operations[] = {
BEGIN_WRITE,
WRITE_C8_D8, 0xF0, 0x28,
WRITE_C8_D8, 0xF2, 0x28,
WRITE_C8_D8, 0x7C, 0xD1,
WRITE_C8_D8, 0x83, 0xE0,
WRITE_C8_D8, 0x84, 0x61,
WRITE_C8_D8, 0xF2, 0x82,
WRITE_C8_D8, 0xF0, 0x08,
WRITE_C8_D8, 0xF2, 0x08,
WRITE_C8_D8, 0x9B, 0x51,
WRITE_C8_D8, 0x86, 0x53,
WRITE_C8_D8, 0xF2, 0x80,
WRITE_C8_D8, 0xF0, 0x00,
WRITE_C8_D8, 0xF0, 0x01,
WRITE_C8_D8, 0xF1, 0x01,
WRITE_C8_D8, 0xB0, 0x49,
WRITE_C8_D8, 0xB1, 0x4A,
WRITE_C8_D8, 0xB2, 0x1F,
WRITE_C8_D8, 0xB0, 0x54,
WRITE_C8_D8, 0xB1, 0x3F,
WRITE_C8_D8, 0xB2, 0x2A,
WRITE_C8_D8, 0xB4, 0x46,
WRITE_C8_D8, 0xB5, 0x34,
WRITE_C8_D8, 0xB6, 0xD5,
WRITE_C8_D8, 0xB7, 0x30,
WRITE_C8_D8, 0xB8, 0x04,
WRITE_C8_D8, 0xBA, 0x00,
WRITE_C8_D8, 0xBB, 0x08,
WRITE_C8_D8, 0xBC, 0x08,
Expand All @@ -79,14 +77,16 @@ static const uint8_t st77916_init_operations[] = {
WRITE_C8_D8, 0xC5, 0x37,
WRITE_C8_D8, 0xC6, 0xA9,
WRITE_C8_D8, 0xC7, 0x41,
WRITE_C8_D8, 0xC8, 0x01,
WRITE_C8_D8, 0xC8, 0x51,
WRITE_C8_D8, 0xC9, 0xA9,
WRITE_C8_D8, 0xCA, 0x41,
WRITE_C8_D8, 0xCB, 0x01,
WRITE_C8_D8, 0xCB, 0x51,
WRITE_C8_D8, 0xD0, 0x91,
WRITE_C8_D8, 0xD1, 0x68,
WRITE_C8_D8, 0xD2, 0x68,
WRITE_C8_D8, 0xD2, 0x69,
WRITE_C8_D16, 0xF5, 0x00, 0xA5,
WRITE_C8_D8, 0xDD, 0x3F,
WRITE_C8_D8, 0xDE, 0x3F,
WRITE_C8_D8, 0xF1, 0x10,
WRITE_C8_D8, 0xF0, 0x00,
WRITE_C8_D8, 0xF0, 0x02,
Expand All @@ -101,12 +101,12 @@ static const uint8_t st77916_init_operations[] = {
0x70, 0x08, 0x11, 0x0C,
0x0B, 0x27, 0x38, 0x43,
0x4C, 0x18, 0x14, 0x14,
0x2B, 0x24,
0x2B, 0x2D,
WRITE_C8_D8, 0xF0, 0x10,
WRITE_C8_D8, 0xF3, 0x10,
WRITE_C8_D8, 0xE0, 0x08,
WRITE_C8_D8, 0xE1, 0x00,
WRITE_C8_D8, 0xE2, 0x0B,
WRITE_C8_D8, 0xE2, 0x00,
WRITE_C8_D8, 0xE3, 0x00,
WRITE_C8_D8, 0xE4, 0xE0,
WRITE_C8_D8, 0xE5, 0x06,
Expand Down Expand Up @@ -152,71 +152,71 @@ static const uint8_t st77916_init_operations[] = {
WRITE_C8_D8, 0x79, 0x00,
WRITE_C8_D8, 0x7A, 0x00,
WRITE_C8_D8, 0x7B, 0x00,
WRITE_C8_D8, 0x80, 0x38,
WRITE_C8_D8, 0x80, 0x48,
WRITE_C8_D8, 0x81, 0x00,
WRITE_C8_D8, 0x82, 0x04,
WRITE_C8_D8, 0x82, 0x05,
WRITE_C8_D8, 0x83, 0x02,
WRITE_C8_D8, 0x84, 0xDC,
WRITE_C8_D8, 0x84, 0xDD,
WRITE_C8_D8, 0x85, 0x00,
WRITE_C8_D8, 0x86, 0x00,
WRITE_C8_D8, 0x87, 0x00,
WRITE_C8_D8, 0x88, 0x38,
WRITE_C8_D8, 0x88, 0x48,
WRITE_C8_D8, 0x89, 0x00,
WRITE_C8_D8, 0x8A, 0x06,
WRITE_C8_D8, 0x8A, 0x07,
WRITE_C8_D8, 0x8B, 0x02,
WRITE_C8_D8, 0x8C, 0xDE,
WRITE_C8_D8, 0x8C, 0xDF,
WRITE_C8_D8, 0x8D, 0x00,
WRITE_C8_D8, 0x8E, 0x00,
WRITE_C8_D8, 0x8F, 0x00,
WRITE_C8_D8, 0x90, 0x38,
WRITE_C8_D8, 0x90, 0x48,
WRITE_C8_D8, 0x91, 0x00,
WRITE_C8_D8, 0x92, 0x08,
WRITE_C8_D8, 0x92, 0x09,
WRITE_C8_D8, 0x93, 0x02,
WRITE_C8_D8, 0x94, 0xE0,
WRITE_C8_D8, 0x94, 0xE1,
WRITE_C8_D8, 0x95, 0x00,
WRITE_C8_D8, 0x96, 0x00,
WRITE_C8_D8, 0x97, 0x00,
WRITE_C8_D8, 0x98, 0x38,
WRITE_C8_D8, 0x98, 0x48,
WRITE_C8_D8, 0x99, 0x00,
WRITE_C8_D8, 0x9A, 0x0A,
WRITE_C8_D8, 0x9A, 0x0B,
WRITE_C8_D8, 0x9B, 0x02,
WRITE_C8_D8, 0x9C, 0xE2,
WRITE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_D8, 0xBC, 0xE2,
WRITE_C8_D8, 0xBD, 0x00,
WRITE_C8_D8, 0xBE, 0x00,
WRITE_C8_D8, 0xBF, 0x00,
WRITE_C8_D8, 0xC0, 0x22,
WRITE_C8_D8, 0xC0, 0x12,
WRITE_C8_D8, 0xC1, 0xAA,
WRITE_C8_D8, 0xC2, 0x65,
WRITE_C8_D8, 0xC3, 0x74,
Expand All @@ -226,7 +226,7 @@ static const uint8_t st77916_init_operations[] = {
WRITE_C8_D8, 0xC7, 0x88,
WRITE_C8_D8, 0xC8, 0x99,
WRITE_C8_D8, 0xC9, 0x33,
WRITE_C8_D8, 0xD0, 0x11,
WRITE_C8_D8, 0xD0, 0x21,
WRITE_C8_D8, 0xD1, 0xAA,
WRITE_C8_D8, 0xD2, 0x65,
WRITE_C8_D8, 0xD3, 0x74,
Expand All @@ -238,6 +238,83 @@ static const uint8_t st77916_init_operations[] = {
WRITE_C8_D8, 0xD9, 0x33,
WRITE_C8_D8, 0xF3, 0x01,
WRITE_C8_D8, 0xF0, 0x00,
WRITE_C8_D8, 0xF0, 0x01,
WRITE_C8_D8, 0xF1, 0x01,
WRITE_C8_D8, 0xA0, 0x0B,
WRITE_C8_D8, 0xA3, 0x2A,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x2B,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x2C,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x2D,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x2E,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x2F,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x30,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x31,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x32,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA3, 0x33,
WRITE_C8_D8, 0xA5, 0xC3,
END_WRITE,
DELAY, 1,
BEGIN_WRITE,
WRITE_C8_D8, 0xA0, 0x09,
WRITE_C8_D8, 0xF1, 0x10,
WRITE_C8_D8, 0xF0, 0x00,
WRITE_COMMAND_8, 0x2A,
WRITE_BYTES, 4,
0x00, 0x00, 0x01, 0x67,
WRITE_COMMAND_8, 0x2B,
WRITE_BYTES, 4,
0x01, 0x68, 0x01, 0x68,
WRITE_C8_D8, 0x4D, 0x00,
WRITE_C8_D8, 0x4E, 0x00,
WRITE_C8_D8, 0x4F, 0x00,
WRITE_C8_D8, 0x4C, 0x01,
END_WRITE,
DELAY, 10,
BEGIN_WRITE,
WRITE_C8_D8, 0x4C, 0x00,
WRITE_COMMAND_8, 0x2A,
WRITE_BYTES, 4,
0x00, 0x00, 0x01, 0x67,
WRITE_C8_D8, 0x4C, 0x00,
WRITE_COMMAND_8, 0x2B,
WRITE_BYTES, 4,
0x00, 0x00, 0x01, 0x67,
WRITE_C8_D8, 0x21, 0x00,
WRITE_C8_D8, 0x3A, 0x55, // color=16
WRITE_C8_D8, 0x11, 0x00,
Expand Down

0 comments on commit b3d1908

Please sign in to comment.