Void ILI9881C-03_ BOE_B3_ BV050HDE-N47-3Q00_Initial Code(Void) {// IOVCC=1.8V //VSP=5.5 VSN=-5.5 External //************* Reset LCD Driver ****************// LCD_nRESET = 1; Delayms(1); // Delay 1ms LCD_nRESET = 0; Delayms(1); // Delay 1ms // This Delay time is necessary LCD_nRESET = 1; Delayms(10); // Delay 120 ms //************* Start Initial Sequence **********// SSD_SEND(0x01,0xFF,0x98,0x81,0x03); SSD_SEND(0x01,0x01,0x00); SSD_SEND(0x01,0x02,0x00); SSD_SEND(0x01,0x03,0x73); SSD_SEND(0x01,0x04,0x00); SSD_SEND(0x01,0x05,0x00); SSD_SEND(0x01,0x06,0x08); SSD_SEND(0x01,0x07,0x00); SSD_SEND(0x01,0x15,0x00); SSD_SEND(0x01,0x16,0x00); SSD_SEND(0x01,0x17,0x00); SSD_SEND(0x01,0x18,0x00); SSD_SEND(0x01,0x19,0x00); SSD_SEND(0x01,0x1a,0x00); SSD_SEND(0x01,0x1b,0x00); SSD_SEND(0x01,0x1c,0x00); SSD_SEND(0x01,0x1d,0x00); SSD_SEND(0x01,0x1e,0x40); SSD_SEND(0x01,0x1f,0x00); SSD_SEND(0x01,0x20,0x06); SSD_SEND(0x01,0x21,0x01); SSD_SEND(0x01,0x22,0x00); SSD_SEND(0x01,0x23,0x00); SSD_SEND(0x01,0x24,0x00); SSD_SEND(0x01,0x25,0x00); SSD_SEND(0x01,0x26,0x00); SSD_SEND(0x01,0x27,0x00); SSD_SEND(0x01,0x28,0x33); SSD_SEND(0x01,0x29,0x03); SSD_SEND(0x01,0x2a,0x00); SSD_SEND(0x01,0x2b,0x00); SSD_SEND(0x01,0x2c,0x00); SSD_SEND(0x01,0x2d,0x00); SSD_SEND(0x01,0x2e,0x00); SSD_SEND(0x01,0x2f,0x00); SSD_SEND(0x01,0x30,0x00); SSD_SEND(0x01,0x31,0x00); SSD_SEND(0x01,0x32,0x00); SSD_SEND(0x01,0x33,0x00); SSD_SEND(0x01,0x34,0x00); SSD_SEND(0x01,0x35,0x00); SSD_SEND(0x01,0x36,0x00); SSD_SEND(0x01,0x37,0x00); SSD_SEND(0x01,0x38,0x00); SSD_SEND(0x01,0x39,0x00); SSD_SEND(0x01,0x3a,0x00); SSD_SEND(0x01,0x3b,0x00); SSD_SEND(0x01,0x3c,0x00); SSD_SEND(0x01,0x3d,0x00); SSD_SEND(0x01,0x3e,0x00); SSD_SEND(0x01,0x3f,0x00); SSD_SEND(0x01,0x40,0x00); SSD_SEND(0x01,0x41,0x00); SSD_SEND(0x01,0x42,0x00); SSD_SEND(0x01,0x43,0x00); SSD_SEND(0x01,0x44,0x00); SSD_SEND(0x01,0x50,0x01); SSD_SEND(0x01,0x51,0x23); SSD_SEND(0x01,0x52,0x45); SSD_SEND(0x01,0x53,0x67); SSD_SEND(0x01,0x54,0x89); SSD_SEND(0x01,0x55,0xab); SSD_SEND(0x01,0x56,0x01); SSD_SEND(0x01,0x57,0x23); SSD_SEND(0x01,0x58,0x45); SSD_SEND(0x01,0x59,0x67); SSD_SEND(0x01,0x5a,0x89); SSD_SEND(0x01,0x5b,0xab); SSD_SEND(0x01,0x5c,0xcd); SSD_SEND(0x01,0x5d,0xef); SSD_SEND(0x01,0x5e,0x11); SSD_SEND(0x01,0x5f,0x02); SSD_SEND(0x01,0x60,0x00); SSD_SEND(0x01,0x61,0x07); SSD_SEND(0x01,0x62,0x06); SSD_SEND(0x01,0x63,0x0E); SSD_SEND(0x01,0x64,0x0F); SSD_SEND(0x01,0x65,0x0C); SSD_SEND(0x01,0x66,0x0D); SSD_SEND(0x01,0x67,0x02); SSD_SEND(0x01,0x68,0x02); SSD_SEND(0x01,0x69,0x02); SSD_SEND(0x01,0x6a,0x02); SSD_SEND(0x01,0x6b,0x02); SSD_SEND(0x01,0x6c,0x02); SSD_SEND(0x01,0x6d,0x02); SSD_SEND(0x01,0x6e,0x02); SSD_SEND(0x01,0x6f,0x02); SSD_SEND(0x01,0x70,0x02); SSD_SEND(0x01,0x71,0x02); SSD_SEND(0x01,0x72,0x02); SSD_SEND(0x01,0x73,0x05); SSD_SEND(0x01,0x74,0x01); SSD_SEND(0x01,0x75,0x02); SSD_SEND(0x01,0x76,0x00); SSD_SEND(0x01,0x77,0x07); SSD_SEND(0x01,0x78,0x06); SSD_SEND(0x01,0x79,0x0E); SSD_SEND(0x01,0x7a,0x0F); SSD_SEND(0x01,0x7b,0x0C); SSD_SEND(0x01,0x7c,0x0D); SSD_SEND(0x01,0x7d,0x02); SSD_SEND(0x01,0x7e,0x02); SSD_SEND(0x01,0x7f,0x02); SSD_SEND(0x01,0x80,0x02); SSD_SEND(0x01,0x81,0x02); SSD_SEND(0x01,0x82,0x02); SSD_SEND(0x01,0x83,0x02); SSD_SEND(0x01,0x84,0x02); SSD_SEND(0x01,0x85,0x02); SSD_SEND(0x01,0x86,0x02); SSD_SEND(0x01,0x87,0x02); SSD_SEND(0x01,0x88,0x02); SSD_SEND(0x01,0x89,0x05); SSD_SEND(0x01,0x8A,0x01); SSD_SEND(0x01,0xFF,0x98,0x81,0x04); SSD_SEND(0x01,0x6C,0x15); SSD_SEND(0x01,0x6E,0x1A); SSD_SEND(0x01,0x6F,0x25); SSD_SEND(0x01,0x3A,0xA4); SSD_SEND(0x01,0x8D,0x20); SSD_SEND(0x01,0x87,0xBA); SSD_SEND(0x01,0xFF,0x98,0x81,0x01); SSD_SEND(0x01,0x22,0x0A); SSD_SEND(0x01,0x31,0x00); SSD_SEND(0x01,0x50,0x75); SSD_SEND(0x01,0x51,0x75); SSD_SEND(0x01,0x53,0x86); SSD_SEND(0x01,0x55,0x90); SSD_SEND(0x01,0x60,0x1B); SSD_SEND(0x01,0x61,0x01); SSD_SEND(0x01,0x62,0x0C); SSD_SEND(0x01,0x63,0x00); SSD_SEND(0x01,0xA0,0x00); SSD_SEND(0x01,0xA1,0x16); SSD_SEND(0x01,0xA2,0x23); SSD_SEND(0x01,0xA3,0x12); SSD_SEND(0x01,0xA4,0x15); SSD_SEND(0x01,0xA5,0x28); SSD_SEND(0x01,0xA6,0x1D); SSD_SEND(0x01,0xA7,0x1E); SSD_SEND(0x01,0xA8,0x80); SSD_SEND(0x01,0xA9,0x1D); SSD_SEND(0x01,0xAA,0x29); SSD_SEND(0x01,0xAB,0x6E); SSD_SEND(0x01,0xAC,0x18); SSD_SEND(0x01,0xAD,0x14); SSD_SEND(0x01,0xAE,0x48); SSD_SEND(0x01,0xAF,0x1E); SSD_SEND(0x01,0xB0,0x26); SSD_SEND(0x01,0xB1,0x4D); SSD_SEND(0x01,0xB2,0x60); SSD_SEND(0x01,0xB3,0x39); SSD_SEND(0x01,0xC0,0x00); SSD_SEND(0x01,0xC1,0x15); SSD_SEND(0x01,0xC2,0x23); SSD_SEND(0x01,0xC3,0x12); SSD_SEND(0x01,0xC4,0x15); SSD_SEND(0x01,0xC5,0x27); SSD_SEND(0x01,0xC6,0x1D); SSD_SEND(0x01,0xC7,0x1F); SSD_SEND(0x01,0xC8,0x7F); SSD_SEND(0x01,0xC9,0x1D); SSD_SEND(0x01,0xCA,0x29); SSD_SEND(0x01,0xCB,0x6F); SSD_SEND(0x01,0xCC,0x19); SSD_SEND(0x01,0xCD,0x16); SSD_SEND(0x01,0xCE,0x49); SSD_SEND(0x01,0xCF,0x1F); SSD_SEND(0x01,0xD0,0x26); SSD_SEND(0x01,0xD1,0x4D); SSD_SEND(0x01,0xD2,0x60); SSD_SEND(0x01,0xD3,0x39); SSD_SEND(0x01,0xFF,0x98,0x81,0x00); SSD_SEND(0x01,(1,0X11);//SPI_WriteData(0X00); //sleep out Delay_ms(120); SSD_SEND(0x01,(1,0X29); SSD_SEND(0x01,(2,0x35,0x00); }