void LCD_Init(void)
{
__delay_cycles(10240) ;
P3OUT |= LCD_NRS + LCD_NRD + LCD_NWR
+LCD_NCS + LCD_NRST ;
P3DIR |= LCD_NRS + LCD_NRD + LCD_NWR
+LCD_NCS + LCD_NRST ;
P1OUT &=~BL_CTR ;
P1DIR |= BL_CTR ;
Reset_LCD() ;
Driver_IC = Read_Reg(0x00) ;
if(Driver_IC==0x4531)
{
LCD_WriteReg(0x00,0x0001);
LCD_WriteReg(0x10,0x0628);
LCD_WriteReg(0x12,0x0006);
LCD_WriteReg(0x13,0x0A32);
LCD_WriteReg(0x11,0x0040);
LCD_WriteReg(0x15,0x0050);
LCD_WriteReg(0x12,0x0016);
Delay(15);
LCD_WriteReg(0x10,0x5660);
Delay(15);
LCD_WriteReg(0x13,0x2A4E);
LCD_WriteReg(0x01,0x0100);
LCD_WriteReg(0x02,0x0300);
LCD_WriteReg(0x03,0x1030);
// LCD_WriteReg(0x03,0x1038);
LCD_WriteReg(0x08,0x0202);
LCD_WriteReg(0x0A,0x0000);
LCD_WriteReg(0x30,0x0000);
LCD_WriteReg(0x31,0x0402);
LCD_WriteReg(0x32,0x0106);
LCD_WriteReg(0x33,0x0700);
LCD_WriteReg(0x34,0x0104);
LCD_WriteReg(0x35,0x0301);
LCD_WriteReg(0x36,0x0707);
LCD_WriteReg(0x37,0x0305);
LCD_WriteReg(0x38,0x0208);
LCD_WriteReg(0x39,0x0F0B);
Delay(15);
LCD_WriteReg(0x41,0x0002);
LCD_WriteReg(0x60,0x2700);
LCD_WriteReg(0x61,0x0001);
LCD_WriteReg(0x90,0x0119);
LCD_WriteReg(0x92,0x010A);
LCD_WriteReg(0x93,0x0004);
LCD_WriteReg(0xA0,0x0100);
// LCD_WriteReg(0x07,0x0001);
Delay(15);
// LCD_WriteReg(0x07,0x0021);
Delay(15);
// LCD_WriteReg(0x07,0x0023);
Delay(15);
// LCD_WriteReg(0x07,0x0033);
Delay(15);
LCD_WriteReg(0x07,0x0133);
Delay(15);
LCD_WriteReg(0xA0,0x0000);
Delay(20);
/* Set GRAM write direction and BGR = 1
I/D=10 (Horizontal : increment, Vertical : increment)
AM=1 (address is updated in vertical writing direction) */
LCD_WriteReg(0x03, 0x1038);
LCD_WriteReg(0x07, 0x0173); /* 262K color and display ON */
//uart0_sendChar('2');
}
这是一个TFT液晶的初始化程序,小弟对液晶不太了解,想看看液晶的驱动过程,Driver_IC = Read_Reg(0x00) ;这句读出来 Driver_IC是液晶的型号?
我怎么通过 Driver_IC这个数值确定是哪一款液晶,或者说怎么 通过 Driver_IC的数值来查找 这块TFT的驱动资料,我想找到datasheet对这个过程的描述,自己写一下TFT的驱动
此帖出自
小平头技术问答
一周热门 更多>