void LCD_Init(void) { //CS0=0; RST=1; Delay(80); RST=0; Delay(80); RST=1; Delay(200); /* WriteComm(0xFE); WriteComm(0xEF); WriteComm(0xB0); WriteData(0xC0); WriteComm(0xB2); WriteData(0x25); WriteComm(0xB3); WriteData(0x03); WriteComm(0xB7); WriteData(0x01); WriteComm(0xB6); WriteData(0x19); WriteComm(0xAC); WriteData(0xCB); WriteComm(0xAB); WriteData(0x0f); WriteComm(0x3A); WriteData(0x05); WriteComm(0xB4); WriteData(0x04); WriteComm(0xA8); WriteData(0x08); WriteComm(0xb8); WriteData(0x08); WriteComm(0xea); WriteData(0x4f); WriteComm(0xe8); WriteData(0x2C); WriteComm(0xc6); WriteData(0x21); WriteComm(0xc7); WriteData(0x12); WriteComm(0xF0); WriteData(0x09); WriteData(0x29); WriteData(0x08); WriteData(0x39); WriteData(0xA4); WriteData(0x1F); WriteData(0x13); WriteData(0x60); WriteData(0x00); WriteData(0x08); WriteData(0x08); WriteData(0x16); WriteData(0x10); WriteData(0x1F); WriteComm(0xF1); WriteData(0x17); WriteData(0x2A); WriteData(0x58); WriteData(0x3E); WriteData(0xd6); WriteData(0x16); WriteData(0x3f); WriteData(0x60); WriteData(0x04); WriteData(0x06); WriteData(0x0D); WriteData(0x1f); WriteData(0x1c); WriteData(0x10); //WriteComm(0x21); WriteComm(0x11); Delay(120); WriteComm(0x29); Delay(120); */ WriteComm(0xFE); WriteComm(0xEF); WriteComm(0xB0); WriteData(0xC0); WriteComm(0xB1); WriteData(0x80); WriteComm(0xB2); WriteData(0x27); WriteComm(0xB3); WriteData(0x13); WriteComm(0xB6); WriteData(0x19); WriteComm(0xB7); WriteData(0x05); WriteComm(0xAC); WriteData(0xC8); WriteComm(0xAB); WriteData(0x0f); WriteComm(0x3A); WriteData(0x05); WriteComm(0xB4); WriteData(0x04); WriteComm(0xA8); WriteData(0x0a); WriteComm(0xB8); WriteData(0x08); WriteComm(0xEA); WriteData(0x02); WriteComm(0xE8); WriteData(0x2A); WriteComm(0xE9); WriteData(0x47); WriteComm(0xE7); WriteData(0x5F); WriteComm(0xC6); WriteData(0x21); WriteComm(0xC7); WriteData(0x13); WriteComm(0xF0); WriteData(0x1D); WriteData(0x38); WriteData(0x09); WriteData(0x4D); WriteData(0x92); WriteData(0x2F); WriteData(0x35); WriteData(0x52); WriteData(0x1E); WriteData(0x0C); WriteData(0x04); WriteData(0x12); WriteData(0x14); WriteData(0x1F); WriteComm(0xF1); WriteData(0x16); WriteData(0x40); WriteData(0x1C); WriteData(0x54); WriteData(0xA9); WriteData(0x2D); WriteData(0x2E); WriteData(0x56); WriteData(0x10); WriteData(0x0D); WriteData(0x0C); WriteData(0x1A); WriteData(0x14); WriteData(0x1E); WriteComm(0xF4); WriteData(0x00); WriteData(0x00); WriteData(0xFF); WriteComm(0xBA); WriteData(0xFF); WriteData(0xFF); WriteComm(0x11); Delay(120); WriteComm(0x29); /* WriteComm(0x11); Delay(480);//Delay 120ms //--------------------------------------Display Setting------------------------------------------// WriteComm(0xfe); WriteComm(0xef); WriteComm(0xb3); WriteData(0x03); WriteComm(0x21); WriteComm(0x36); WriteData(0x08); //06 WriteComm(0x3a); WriteData(0x55); WriteComm(0xb4); WriteData(0x21); WriteComm(0xb6); WriteData(0x11); WriteComm(0xa3); WriteData(0x11); WriteComm(0xac); WriteData(0x0b); WriteComm(0xF0); WriteData(0x31); WriteData(0x4C); WriteData(0x24); WriteData(0x58); WriteData(0xA8); WriteData(0x26); WriteData(0x28); WriteData(0x00); WriteData(0x2C); WriteData(0x0C); WriteData(0x0C); WriteData(0x15); WriteData(0x15); WriteData(0x0f); WriteComm(0xF1); WriteData(0x0E); WriteData(0x2D); WriteData(0x24); WriteData(0x3E); WriteData(0x99); WriteData(0x12); WriteData(0x13); WriteData(0x00); WriteData(0x0A); WriteData(0x0D); WriteData(0x0D); WriteData(0x14); WriteData(0x13); WriteData(0x0f); WriteComm(0xfe); WriteComm(0xff); WriteComm(0x11); Delay(120); WriteComm(0x29); WriteComm(0x3A); //65k mode WriteData(0x05); //05 WriteComm(0x29); //Display on Delay(50); */ /* WriteComm(0xff); WriteData(0xa5); WriteComm(0x3E);//my mx mv ml rgb WriteData(0x09); WriteComm(0x3A); WriteData(0x05); WriteComm(0x82); WriteData(0x00); WriteComm(0x98); WriteData(0x00); WriteComm(0x63); WriteData(0x0f); WriteComm(0x64); WriteData(0x0f); WriteComm(0xB4); WriteData(0x24); WriteComm(0xB5); WriteData(0x30); WriteComm(0x83); WriteData(0x03); WriteComm(0x86);//frc WriteData(0x04); WriteComm(0x87); WriteData(0x13);//16 WriteComm(0x88);//VCOM WriteData(0x38); WriteComm(0x89);// WriteData(0x29);//2F WriteComm(0x93); // WriteData(0x63); WriteComm(0x96); WriteData(0x81); WriteComm(0xC3); WriteData(0x11); WriteComm(0xE6); WriteData(0x00);