#define HDP 400 #define VDP 960 #define HSPW 10 #define HBPD 20 #define HFPD 20 #define VSPW 10 #define VBPD 20 #define VFPD 20 #frame rate=60.14Hz #Pixel Clk=27.33Mhz #MIPI_CLK=328Mbps(MIPI通道速率) SPI_RES=1; Delay(20); //延迟20ms SPI_RES=0; Delay(50); //延迟50ms SPI_RES=1; Delay(120); //延迟120ms WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x13); WriteComm (0xEF); WriteData (0x08); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x10); WriteComm (0xC0); WriteData (0x77); WriteData (0x00); WriteComm (0xC1); WriteData (0x0E); WriteData (0x0C); WriteComm (0xC2); WriteData (0x07); WriteData (0x02); WriteComm (0xCC); WriteData (0x30); WriteComm (0xB0); WriteData (0x00); WriteData (0x17); WriteData (0x1F); WriteData (0x0E); WriteData (0x11); WriteData (0x06); WriteData (0x0D); WriteData (0x08); WriteData (0x07); WriteData (0x26); WriteData (0x03); WriteData (0x11); WriteData (0x0F); WriteData (0x2A); WriteData (0x31); WriteData (0x1C); WriteComm (0xB1); WriteData (0x00); WriteData (0x17); WriteData (0x1F); WriteData (0x0D); WriteData (0x11); WriteData (0x07); WriteData (0x0C); WriteData (0x08); WriteData (0x08); WriteData (0x26); WriteData (0x04); WriteData (0x11); WriteData (0x0F); WriteData (0x2A); WriteData (0x31); WriteData (0x1C); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x11); WriteComm (0xB0); WriteData (0x75); WriteComm (0xB1); WriteData (0x69); WriteComm (0xB2); WriteData (0x85); WriteComm (0xB3); WriteData (0x80); WriteComm (0xB5); WriteData (0x49); WriteComm (0xB7); WriteData (0x87); WriteComm (0xB8); WriteData (0x13); WriteComm (0xB9); WriteData (0x10); WriteData (0x1F); WriteComm (0xBB); WriteData (0x03); WriteComm (0xC0); WriteData (0x01); WriteComm (0xC1); WriteData (0x88); WriteComm (0xC2); WriteData (0x88); WriteComm (0xD0); WriteData (0x88); WriteComm (0xE0); WriteData (0x00); WriteData (0x00); WriteData (0x02); WriteData (0x00); WriteData (0x00); WriteData (0x0C); WriteComm (0xE1); WriteData (0x03); WriteData (0x96); WriteData (0x05); WriteData (0x96); WriteData (0x02); WriteData (0x96); WriteData (0x04); WriteData (0x96); WriteData (0x00); WriteData (0x44); WriteData (0x44); WriteComm (0xE2); WriteData (0x00); WriteData (0x00); WriteData (0x03); WriteData (0x03); WriteData (0x00); WriteData (0x00); WriteData (0x02); WriteData (0x00); WriteData (0x00); WriteData (0x00); WriteData (0x02); WriteData (0x00); WriteComm (0xE3); WriteData (0x00); WriteData (0x00); WriteData (0x33); WriteData (0x33); WriteComm (0xE4); WriteData (0x44); WriteData (0x44); WriteComm (0xE5); WriteData (0x0B); WriteData (0xD4); WriteData (0x28); WriteData (0x9C); WriteData (0x0D); WriteData (0xD6); WriteData (0x28); WriteData (0x9C); WriteData (0x07); WriteData (0xD0); WriteData (0x28); WriteData (0x9C); WriteData (0x09); WriteData (0xD2); WriteData (0x28); WriteData (0x9C); WriteComm (0xE6); WriteData (0x00); WriteData (0x00); WriteData (0x33); WriteData (0x33); WriteComm (0xE7); WriteData (0x44); WriteData (0x44); WriteComm (0xE8); WriteData (0x0A); WriteData (0xD5); WriteData (0x28); WriteData (0x9C); WriteData (0x0C); WriteData (0xD7); WriteData (0x28); WriteData (0x9C); WriteData (0x06); WriteData (0xD1); WriteData (0x28); WriteData (0x9C); WriteData (0x08); WriteData (0xD3); WriteData (0x28); WriteData (0x9C); WriteComm (0xEB); WriteData (0x00); WriteData (0x01); WriteData (0xE4); WriteData (0xE4); WriteData (0x44); WriteData (0x88); WriteData (0x40); WriteComm (0xED); WriteData (0xFF); WriteData (0x45); WriteData (0x67); WriteData (0xFC); WriteData (0x01); WriteData (0x3F); WriteData (0xAB); WriteData (0xFF); WriteData (0xFF); WriteData (0xBA); WriteData (0xF3); WriteData (0x10); WriteData (0xCF); WriteData (0x76); WriteData (0x54); WriteData (0xFF); WriteComm (0xEF); WriteData (0x08); WriteData (0x08); WriteData (0x08); WriteData (0x45); WriteData (0x3F); WriteData (0x54); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x13); WriteComm (0xE8); WriteData (0x00); WriteData (0x0E); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x00); WriteComm (0x3A); WriteData (0x66); WriteComm (0x36); WriteData (0x00); WriteComm (0x11); Delay_ms(120); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x13); WriteComm (0xE8); WriteData (0x00); WriteData (0x0C); Delay_ms(20); WriteComm (0xE8); WriteData (0x40); WriteData (0x00); WriteComm (0xFF); WriteData (0x77); WriteData (0x01); WriteData (0x00); WriteData (0x00); WriteData (0x00); WriteComm (0x29); WriteComm (0x35); WriteData (0x00);