下载分类:配套软件
浏览次数:740 次
下载次数:222 次
上传时间:2015-09-11 11:24:13
更新时间:2015-09-11 11:25:00
NT35702初始化代码
Void LCD_Initial(Void)
{
RESET=0;
LCD_Delayms(20);
RESET=1;
LCD_Delayms(120);
LCD_CtrlWrite(0x01);// Software Reset
LCD_Delayms(20);
LCD_CtrlWrite(0x11);//Sleep Out
LCD_Delayms(120);
LCD_CtrlWrite(0xc2);//Power Control 3
LCD_DataWrite(0x05);//APA2 APA1 APA0 Large
LCD_DataWrite(0x00);//Step-up cycle in Booster circuit 1
//Step-up cycle in Booster circuit 2,3
LCD_CtrlWrite(0xc3);//Power Control 4
LCD_DataWrite(0x05);//APA2 APA1 APA0 Large
LCD_DataWrite(0x00);//Step-up cycle in Booster circuit 1
//Step-up cycle in Booster circuit 2,3
LCD_CtrlWrite(0xc4);//Power Control 5
LCD_DataWrite(0x05);//APA2 APA1 APA0 Large
LCD_DataWrite(0x00);//Step-up cycle in Booster circuit 1
//Step-up cycle in Booster circuit 2,3
LCD_CtrlWrite(0x3A);
LCD_DataWrite(0x55);
LCD_CtrlWrite(0xD7);
LCD_DataWrite(0x40);
LCD_DataWrite(0xE0);
LCD_CtrlWrite(0xFD);
LCD_DataWrite(0x06);
LCD_DataWrite(0x11);
LCD_CtrlWrite(0xFA);
LCD_DataWrite(0x38);
LCD_DataWrite(0x20);
LCD_DataWrite(0x1C);
LCD_DataWrite(0x10);
LCD_DataWrite(0x37);
LCD_DataWrite(0x12);
LCD_DataWrite(0x22);
LCD_DataWrite(0x1E);
LCD_CtrlWrite(0xC0);//Set GVDD
LCD_DataWrite(0x05);
LCD_CtrlWrite(0xC5);//Set Vcom
LCD_DataWrite(0x20);
LCD_DataWrite(0x3D);
LCD_CtrlWrite(0xC7);//Set VCOM-OFFSET
LCD_DataWrite(0xA9);// 可以微调改善flicker
LCD_CtrlWrite(0x36);//Memory data access control
LCD_DataWrite(0xC8);//MY MX MV ML RGB MH 0 0
////Gamma//////////////////
LCD_CtrlWrite(0xE0);//E0H Set
LCD_DataWrite(0x23);
LCD_DataWrite(0x23);
LCD_DataWrite(0x24);
LCD_DataWrite(0x02);
LCD_DataWrite(0x08);
LCD_DataWrite(0x0F);
LCD_DataWrite(0x35);
LCD_DataWrite(0x7B);
LCD_DataWrite(0x43);
LCD_DataWrite(0x0E);
LCD_DataWrite(0x1F);
LCD_DataWrite(0x25);
LCD_DataWrite(0x10);
LCD_DataWrite(0x16);
LCD_DataWrite(0x31);
LCD_CtrlWrite(0xE1);//E1H Set
LCD_DataWrite(0x0D);
LCD_DataWrite(0x28);
LCD_DataWrite(0x2E);
LCD_DataWrite(0x0B);
LCD_DataWrite(0x11);
LCD_DataWrite(0x12);
LCD_DataWrite(0x3E);
LCD_DataWrite(0x59);
LCD_DataWrite(0x4C);
LCD_DataWrite(0x10);
LCD_DataWrite(0x26);
LCD_DataWrite(0x2B);
LCD_DataWrite(0x1B);
LCD_DataWrite(0x1B);
LCD_DataWrite(0x1B);
LCD_CtrlWrite(0x29);//display on
LCD_CtrlWrite(0x2c);//Memory Write
}
Void LCD_Enter Sleep(Void)
{
LCD_CtrlWrite(0x10);
LCD_Delayms(10);
}
Void LCD_Exit Sleep(Void)
{
LCD_CtrlWrite(0x11);
LCD_Delayms(120);
}