打印

3.5寸和4.3寸雅视液晶屏的驱动参数

[复制链接]
1841|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
shanqi|  楼主 | 2008-10-22 11:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
3.5寸和4.3寸雅视液晶屏是性价比不错的TFT,目前主要在GPS产品中被广泛采用.以下是3.5调试参数,产品供应和技术咨询请联系:13510611284.
http://www.crest-cn.com

 // modify for Yassy 3.5inch panel. 

#define DCLK_FREQ            6400Khz
#define H_BACKPORCH        38
#define H_FRONTPORCH    50
#define H_TOTALCYCLE    408
#define H_DISPLAYLINE 320
#define V_BACKPORCH        18
#define V_FRONTPORCH    4
#define V_TOTALCYCLE    262
#define V_DISPLAYLINE 240



void LCD_Reg_Set( unsigned int flag, unsigned int data)
{
    unsigned int i;
    
  if(flag)        // 1 for register set
      data=data&0x7F;
    
    LCDCSLow();        //
    DbgDelay(10);
    //
    for(i=0; i<8; i--)
    {
        LCDClockLow();        
        DbgDelay(4);
                
        if( (data&(1<<(7-i))) !=0 ) 
            LCDDataHigh();
        else 
            LCDDataLow();
        DbgDelay(4);
        
        LCDClockHigh();
        DbgDelay(4);
    }
    LCDDataLow();
    LCDClockLow();
    DbgDelay(4);
    
    LCDCSHigh();    //
    DbgDelay(10);
}



void LCD_Reg_Set2( unsigned int reg, unsigned int data)
{
    
    LCD_Reg_Set(1, reg);
    LCD_Reg_Set(0, data);        //0 for data
    DbgDelay(100);
}

void Lcd_SPI_Init(void)
{
     LCD_Reg_Set2(0x06, 0x6F);//insel register.
     LCD_Reg_Set2(0x0A, 0x59);    //rgb mode set

/*
     LCD_Reg_Set2(0x02, 0x36);
     LCD_Reg_Set2(0x02, 0x09);
     LCD_Reg_Set2(0x04, 0x01);
     LCD_Reg_Set2(0x05, 0x22);
     LCD_Reg_Set2(0x06, 0x6F);//insel register.
     LCD_Reg_Set2(0x07, 0xFF);
     LCD_Reg_Set2(0x08, 0x11);
     LCD_Reg_Set2(0x09, 0x80);
     LCD_Reg_Set2(0x0A, 0x59);    //rgb mode set
     LCD_Reg_Set2(0x0B, 0x05);
     LCD_Reg_Set2(0x0C, 0x44);
     LCD_Reg_Set2(0x0D, 0x02);
     LCD_Reg_Set2(0x0E, 0x08); //contrast
     LCD_Reg_Set2(0x0F, 0x80);    //brightness
     LCD_Reg_Set2(0x30, 0x09);
     
     */


}    

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

32

主题

72

帖子

0

粉丝