Closed jinshsa closed 1 year ago
大佬您好,又来麻烦您了 我想用ESP32S3点亮一块7701s的480*480屏幕,来自鱼鹰光电(osptek), 下面是厂家给的初始化代码: RFF 77 01 00 00 13 REF 08 RFF 77 01 00 00 10 RC0 3B 00 RC1 0B 02 RC2 37 02 RCC 10 RB0 00 0F 16 0E 11 07 09 09 08 23 05 11 0F 28 2D 18 RB1 00 0F 16 0E 11 07 09 08 09 23 05 11 0F 28 2D 18 RFF 77 01 00 00 11 RB0 4D RB1 33 RB2 87 RB5 4B RB7 8C RB8 20 RC1 78 RC2 78 RD0 88 RE0 00 00 02 RE1 02 F0 00 00 03 F0 00 00 00 44 44 RE2 10 10 40 40 F2 F0 00 00 F2 F0 00 00 RE3 00 00 11 11 RE4 44 44 RE5 07 EF F0 F0 09 F1 F0 F0 03 F3 F0 F0 05 ED F0 F0 RE6 00 00 11 11 RE7 44 44 RE8 08 F0 F0 F0 0A F2 F0 F0 04 F4 F0 F0 06 EE F0 F0 REB 00 00 E4 E4 44 88 40 REC 78 00 RED 20 F9 87 76 65 54 4F FF FF F4 45 56 67 78 9F 02 REF 10 0D 04 08 3F 1F 下面是我根据上面代码改的st7701_type9_init_operations: static const uint8_t st7701_type9_init_operations[] = { BEGIN_WRITE,
WRITE_COMMAND_8, 0xFF, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13, WRITE_C8_D8, 0xEF, 0x08, WRITE_COMMAND_8, 0xFF, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x10, WRITE_C8_D16, 0xC0, 0x3B, 0x00, WRITE_C8_D16, 0xC1, 0x0B, 0x02, WRITE_C8_D16, 0xC2, 0x37, 0x02, WRITE_C8_D8, 0xCC, 0x10, WRITE_COMMAND_8, 0xB0, // Positive Voltage Gamma Control WRITE_BYTES, 16, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x09, 0x08, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18, WRITE_COMMAND_8, 0xB1, // Negative Voltage Gamma Control WRITE_BYTES, 16, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x08, 0x09, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18, WRITE_COMMAND_8, 0xFF, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x11, WRITE_C8_D8, 0xB0, 0x4D, WRITE_C8_D8, 0xB1, 0x33, WRITE_C8_D8, 0xB2, 0x87, WRITE_C8_D8, 0xB5, 0x4B, WRITE_C8_D8, 0xB7, 0x8C, WRITE_C8_D8, 0xB8, 0x20, WRITE_C8_D8, 0xC1, 0x78, WRITE_C8_D8, 0xC2, 0x78, WRITE_C8_D8, 0xD0, 0x88, WRITE_COMMAND_8, 0xE0, WRITE_BYTES, 3, 0x00, 0x00, 0x02, WRITE_COMMAND_8, 0xE1, WRITE_BYTES, 11, 0x02, 0xF0, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x44, 0x44, WRITE_COMMAND_8, 0xE2, WRITE_BYTES, 12, 0x10, 0x10, 0x40, 0x40, 0xF2, 0xF0, 0x00, 0x00, 0xF2, 0xF0, 0x00, 0x00, WRITE_COMMAND_8, 0xE3, WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11, WRITE_C8_D16, 0xE4, 0x44, 0x44, WRITE_COMMAND_8, 0xE5, WRITE_BYTES, 16, 0x07, 0xEF, 0xF0, 0xF0, 0x09, 0xF1, 0xF0, 0xF0, 0x03, 0xF3, 0xF0, 0xF0, 0x05, 0xED, 0xF0, 0xF0, WRITE_COMMAND_8, 0xE6, WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11, WRITE_C8_D16, 0xE7, 0x44, 0x44, WRITE_COMMAND_8, 0xE8, WRITE_BYTES, 16, 0x08, 0xF0, 0xF0, 0xF0, 0x0A, 0xF2, 0xF0, 0xF0, 0x04, 0xF4, 0xF0, 0xF0, 0x06, 0xEE, 0xF0, 0xF0, WRITE_COMMAND_8, 0xEB, WRITE_BYTES, 7, 0x00, 0x00, 0xE4, 0xE4, 0x44, 0x88, 0x40, WRITE_C8_D16, 0xEC, 0x78, 0x00, WRITE_COMMAND_8, 0xED, WRITE_BYTES, 16, 0x20, 0xF9, 0x87, 0x76, 0x65, 0x54, 0x4F, 0xFF, 0xFF, 0xF4, 0x45, 0x56, 0x67, 0x78, 0x9F, 0x02, WRITE_COMMAND_8, 0xEF, WRITE_BYTES, 6, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F,
//上面是按照厂家的代码修改的部分,下面部分复制于st7701_type7_init_operations WRITE_COMMAND_8, 0xff, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13, WRITE_C8_D8, 0xef, 0x08, WRITE_COMMAND_8, 0xff, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x00,
WRITE_COMMAND_8, 0x20, // 0x20 normal, 0x21 IPS WRITE_C8_D8, 0x3a, 0x50, WRITE_C8_D8, 0x36, 0x00, WRITE_C8_D8, 0x11, 0x00, WRITE_COMMAND_8, 0x11, // Sleep Out END_WRITE, DELAY, 120, BEGIN_WRITE, WRITE_COMMAND_8, 0x29, // Display On END_WRITE};
下面是我Arduino里的代码:
Arduino_DataBus bus = new Arduino_SWSPI( GFX_NOT_DEFINED / DC /, 16 / CS /, 17 / SCK /, 18 / MOSI /, GFX_NOT_DEFINED / MISO */);
// option 1: // Uncomment for 4" rect display Arduino_ESP32RGBPanel rgbpanel = new Arduino_ESP32RGBPanel( 10 / DE /, 11 / VSYNC /, 12 / HSYNC /, 0 / PCLK /, 39 / R0 /, 7 / R1 /, 4 / R2 /, 1 / R3 /, 13 / R4 /, 48 / G0 /, 21 / G1 /, 8 / G2 /, 5 / G3 /, 2 / G4 /, 14 / G5 /, 47 / B0 /, 9 / B1 /, 6 / B2 /, 3 / B3 /, 15 / B4 /, 1 / hsync_polarity /, 10 / hsync_front_porch /, 8 / hsync_pulse_width /, 50 / hsync_back_porch /, 1 / vsync_polarity /, 10 / vsync_front_porch /, 8 / vsync_pulse_width /, 20 / vsync_back_porch /); Arduino_RGB_Display gfx = new Arduino_RGB_Display( 480 / width /, 480 / height /, rgbpanel, 2 / rotation /, true / auto_flush /, bus, GFX_NOT_DEFINED / RST /, st7701_type9_init_operations, sizeof(st7701_type9_init_operations));
void setup() { // put your setup code here, to run once: Serial.begin(115200); // Serial.setDebugOutput(true); // while(!Serial); Serial.println("Arduino_GFX library Test!"); if (gfx->begin()) Serial.println("gfxbegin");
gfx->fillScreen(RED); gfx->setCursor(0, 0); gfx->setTextSize(4); gfx->setTextColor(WHITE); gfx->print("cloMMMMck"); Serial.println("cloMMMMck"); }
void loop() {
// put your main code here, to run repeatedly: } ESP32S3的引脚是为了接线方便进行了修改,使用之前例程里的引脚设置,屏幕同样没有文字显示
请问鱼鹰光电点屏幕成功点亮了吗?能给我分享吗
大佬您好,又来麻烦您了 我想用ESP32S3点亮一块7701s的480*480屏幕,来自鱼鹰光电(osptek), 下面是厂家给的初始化代码: RFF 77 01 00 00 13 REF 08 RFF 77 01 00 00 10 RC0 3B 00 RC1 0B 02 RC2 37 02 RCC 10
RB0 00 0F 16 0E 11 07 09 09 08 23 05 11 0F 28 2D 18
RB1 00 0F 16 0E 11 07 09 08 09 23 05 11 0F 28 2D 18
RFF 77 01 00 00 11 RB0 4D
RB1 33 RB2 87
RB5 4B
RB7 8C RB8 20 RC1 78
RC2 78 RD0 88
RE0 00 00 02
RE1 02 F0 00 00 03 F0 00 00 00 44 44 RE2 10 10 40 40 F2 F0 00 00 F2 F0 00 00
RE3 00 00 11 11 RE4 44 44 RE5 07 EF F0 F0 09 F1 F0 F0 03 F3 F0 F0 05 ED F0 F0
RE6 00 00 11 11
RE7 44 44 RE8 08 F0 F0 F0 0A F2 F0 F0 04 F4 F0 F0 06 EE F0 F0 REB 00 00 E4 E4 44 88 40 REC 78 00 RED 20 F9 87 76 65 54 4F FF FF F4 45 56 67 78 9F 02 REF 10 0D 04 08 3F 1F 下面是我根据上面代码改的st7701_type9_init_operations: static const uint8_t st7701_type9_init_operations[] = { BEGIN_WRITE,
//上面是按照厂家的代码修改的部分,下面部分复制于st7701_type7_init_operations WRITE_COMMAND_8, 0xff, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13, WRITE_C8_D8, 0xef, 0x08, WRITE_COMMAND_8, 0xff, WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x00,
下面是我Arduino里的代码:
include
Arduino_DataBus bus = new Arduino_SWSPI( GFX_NOT_DEFINED / DC /, 16 / CS /, 17 / SCK /, 18 / MOSI /, GFX_NOT_DEFINED / MISO */);
// option 1: // Uncomment for 4" rect display Arduino_ESP32RGBPanel rgbpanel = new Arduino_ESP32RGBPanel( 10 / DE /, 11 / VSYNC /, 12 / HSYNC /, 0 / PCLK /, 39 / R0 /, 7 / R1 /, 4 / R2 /, 1 / R3 /, 13 / R4 /, 48 / G0 /, 21 / G1 /, 8 / G2 /, 5 / G3 /, 2 / G4 /, 14 / G5 /, 47 / B0 /, 9 / B1 /, 6 / B2 /, 3 / B3 /, 15 / B4 /, 1 / hsync_polarity /, 10 / hsync_front_porch /, 8 / hsync_pulse_width /, 50 / hsync_back_porch /, 1 / vsync_polarity /, 10 / vsync_front_porch /, 8 / vsync_pulse_width /, 20 / vsync_back_porch /); Arduino_RGB_Display gfx = new Arduino_RGB_Display( 480 / width /, 480 / height /, rgbpanel, 2 / rotation /, true / auto_flush /, bus, GFX_NOT_DEFINED / RST /, st7701_type9_init_operations, sizeof(st7701_type9_init_operations));
void setup() { // put your setup code here, to run once: Serial.begin(115200); // Serial.setDebugOutput(true); // while(!Serial); Serial.println("Arduino_GFX library Test!"); if (gfx->begin()) Serial.println("gfxbegin");
gfx->fillScreen(RED); gfx->setCursor(0, 0); gfx->setTextSize(4); gfx->setTextColor(WHITE); gfx->print("cloMMMMck"); Serial.println("cloMMMMck"); }
void loop() {
// put your main code here, to run repeatedly: } ESP32S3的引脚是为了接线方便进行了修改,使用之前例程里的引脚设置,屏幕同样没有文字显示