|
Edited by nopnop2002 at 2017-7-22 21:48
It's hard work that you find a correct answer.
1.Search [Driver's name + Arduino].
For exsample i can find this page.
https://github.com/iot-playgroun ... s/ili9486/initlcd.h
2,It's translated into INIT parameter.
[Before]
case ILI9486:
LCD_Write_COM(0x11); // Sleep OUT
delay(50);
LCD_Write_COM(0xF2); // ?????
LCD_Write_DATA(0x1C);
LCD_Write_DATA(0xA3);
LCD_Write_DATA(0x32);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0xb2);
LCD_Write_DATA(0x12);
LCD_Write_DATA(0xFF);
LCD_Write_DATA(0x12);
LCD_Write_DATA(0x00);
LCD_Write_COM(0xF1); // ?????
LCD_Write_DATA(0x36);
LCD_Write_DATA(0xA4);
LCD_Write_COM(0xF8); // ?????
LCD_Write_DATA(0x21);
LCD_Write_DATA(0x04);
LCD_Write_COM(0xF9); // ?????
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x08);
LCD_Write_COM(0xC0); // Power Control 1
LCD_Write_DATA(0x0d);
LCD_Write_DATA(0x0d);
LCD_Write_COM(0xC1); // Power Control 2
LCD_Write_DATA(0x43);
LCD_Write_DATA(0x00);
LCD_Write_COM(0xC2); // Power Control 3
LCD_Write_DATA(0x00);
LCD_Write_COM(0xC5); // VCOM Control
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x48);
LCD_Write_COM(0xB6); // Display Function Control
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x22); // 0x42 = Rotate display 180 deg.
LCD_Write_DATA(0x3B);
LCD_Write_COM(0xE0); // PGAMCTRL (Positive Gamma Control)
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x24);
LCD_Write_DATA(0x1c);
LCD_Write_DATA(0x0a);
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x08);
LCD_Write_DATA(0x43);
LCD_Write_DATA(0x88);
LCD_Write_DATA(0x32);
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x06);
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x07);
LCD_Write_DATA(0x00);
LCD_Write_COM(0xE1); // NGAMCTRL (Negative Gamma Control)
LCD_Write_DATA(0x0F);
LCD_Write_DATA(0x38);
LCD_Write_DATA(0x30);
LCD_Write_DATA(0x09);
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x0f);
LCD_Write_DATA(0x4e);
LCD_Write_DATA(0x77);
LCD_Write_DATA(0x3c);
LCD_Write_DATA(0x07);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x05);
LCD_Write_DATA(0x23);
LCD_Write_DATA(0x1b);
LCD_Write_DATA(0x00);
LCD_Write_COM(0x20); // Display Inversion OFF
LCD_Write_DATA(0x00);//C8
LCD_Write_COM(0x36); // Memory Access Control
LCD_Write_DATA(0x0A);
LCD_Write_COM(0x3A); // Interface Pixel Format
LCD_Write_DATA(0x55);
LCD_Write_COM(0x2A); // Column Addess Set
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0xDF);
LCD_Write_COM(0x002B); // Page Address Set
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0x3f);
delay(50);
LCD_Write_COM(0x0029); // Display ON
LCD_Write_COM(0x002C); // Memory Write
break;
[after]
INIT=\
-1,0x11,\
-2,50,\
-1,0xF2,\
0x1C,\
0xA3,\
0x32,\
0x02,\
0xb2,\
0x12,\
0xFF,\
0x12,\
0x00,\
-1,0xF1,\
0x36,\
0xA4,\
-1,0xF8,\
0x21,\
0x04,\
-1,0xF9,\
0x00,\
0x08,\
-1,0xC0,\
0x0d,\
0x0d,\
-1,0xC1,\
0x43,\
0x00,\
-1,0xC2,\
0x00,\
-1,0xC5,\
0x00,\
0x48,\
-1,0xB6,\
0x00,\
0x22,\
0x3B,\
-1,0xE0,\
0x0f,\
0x24,\
0x1c,\
0x0a,\
0x0f,\
0x08,\
0x43,\
0x88,\
0x32,\
0x0f,\
0x10,\
0x06,\
0x0f,\
0x07,\
0x00,\
-1,0xE1,\
0x0F,\
0x38,\
0x30,\
0x09,\
0x0f,\
0x0f,\
0x4e,\
0x77,\
0x3c,\
0x07,\
0x10,\
0x05,\
0x23,\
0x1b,\
0x00,\
-1,0x20,\
0x00,\
-1,0x36,\
0x0A,\
-1,0x3A,\
0x55,\
-1,0x2A,\
0x00,\
0x00,\
0x01,\
0xDF,\
-1,0x002B,\
0x00,\
0x00,\
0x01,\
0x3f,\
-2,50,\
-1,0x0029,\
-1,0x002C,\
-3
|
|