[MODULE]/LCD_TFT2009. 5. 26. 20:10

3.2" TFT LCD모듈 제작

3.2" TFT LCD모듈 제작



Controller
Luminary Cortex-M3 LM3S8962 사용



LCD Driver


드라이버 데이터시트


초기화 코드 ()

void LCDInitialize(void)
{
 Delay(1);
 Reset();
 Delay(10);

 // byte-write synchronization
 LCD_CMD(0x00);                                         
 LCD_CMD(0x00);
 LCD_CMD(0x00);
 LCD_CMD(0x00);

 // calibration control setting
 LCD_CMD(0xA4); LCD_DAT(0x0001);         
 Delay(1);

 // display control setting
 LCD_CMD(0x01); LCD_DAT(0x0100);         
 LCD_CMD(0x02); LCD_DAT(0x0400);
 LCD_CMD(0x03); LCD_DAT(0x1030);
 LCD_CMD(0x08); LCD_DAT(0x0808);
 LCD_CMD(0x09); LCD_DAT(0x0004);
 LCD_CMD(0x50); LCD_DAT(0x0000);
 LCD_CMD(0x51); LCD_DAT(0x00EF);          // x = 0~239
 LCD_CMD(0x52); LCD_DAT(0x0000);
 LCD_CMD(0x53); LCD_DAT(0x013F);          // y = 0~319
 LCD_CMD(0x60); LCD_DAT(0x2700);
 LCD_CMD(0x61); LCD_DAT(0x0001);
 LCD_CMD(0x6A); LCD_DAT(0x0000);

 // gamma setting
 LCD_CMD(0x30); LCD_DAT(0x0703);
 LCD_CMD(0x31); LCD_DAT(0x0001);
 LCD_CMD(0x32); LCD_DAT(0x0104);
 LCD_CMD(0x33); LCD_DAT(0x0102);
 LCD_CMD(0x34); LCD_DAT(0x0300);
 LCD_CMD(0x35); LCD_DAT(0x0103);
 LCD_CMD(0x36); LCD_DAT(0x001F);
 LCD_CMD(0x37); LCD_DAT(0x0703);
 LCD_CMD(0x38); LCD_DAT(0x0001);
 LCD_CMD(0x39); LCD_DAT(0x0104);
 LCD_CMD(0x3A); LCD_DAT(0x0102);
 LCD_CMD(0x3B); LCD_DAT(0x0300);
 LCD_CMD(0x3C); LCD_DAT(0x0103);
 LCD_CMD(0x3D); LCD_DAT(0x001F);

 // power on sequence
 LCD_CMD(0x07); LCD_DAT(0x0001);         
 LCD_CMD(0x17); LCD_DAT(0x0001);
 LCD_CMD(0x19); LCD_DAT(0x0000);
 LCD_CMD(0x10); LCD_DAT(0x1390);
 LCD_CMD(0x11); LCD_DAT(0x0147);
 LCD_CMD(0x12); LCD_DAT(0x011C);
 LCD_CMD(0x13); LCD_DAT(0x3400);
 Delay_ms(10);
 LCD_CMD(0x12); LCD_DAT(0x013C);
 Delay_ms(10);

 // display on sequence   
 LCD_CMD(0x07); LCD_DAT(0x0021);         
 Delay_ms(10);
 LCD_CMD(0x10); LCD_DAT(0x1390);
 LCD_CMD(0x11); LCD_DAT(0x0147);
 LCD_CMD(0x07); LCD_DAT(0x0061);
 Delay_ms(10);
 LCD_CMD(0x07); LCD_DAT(0x0173);
}
















Posted by nexp

댓글을 달아 주세요