首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > 单片机 >

ILI9320 TFT液晶初始化 生手 程序 求注释一下

2013-07-16 
ILI9320 TFT液晶初始化 新手 程序 求注释一下else if(DeviceIdCode0x9320||DeviceIdCode0x9300){//pri

ILI9320 TFT液晶初始化 新手 程序 求注释一下

else if(DeviceIdCode==0x9320||DeviceIdCode==0x9300)
{
//      printf("\n\r This LCD is ili%x.", DeviceIdCode);
        LCD_WriteReg(0x00,0x0001);
LCD_WriteReg(0x01,0x0100);//Driver Output Contral. 0x0100
LCD_WriteReg(0x02,0x0700);//LCD Driver Waveform Contral.
LCD_WriteReg(0x03,0x1018);//Entry Mode Set. 0x1018 0x1030
//LCD_WriteReg(0x03,0x1018);//Entry Mode Set.

LCD_WriteReg(0x04,0x0000);//Scalling Contral.
LCD_WriteReg(0x08,0x0202);//Display Contral 2.(0x0207)
LCD_WriteReg(0x09,0x0000);//Display Contral 3.(0x0000)
LCD_WriteReg(0x0a,0x0000);//Frame Cycle Contal.(0x0000)
LCD_WriteReg(0x0c,(1<<0));//Extern Display Interface Contral 1.(0x0000)
LCD_WriteReg(0x0d,0x0000);//Frame Maker Position.
LCD_WriteReg(0x0f,0x0000);//Extern Display Interface Contral 2.

delay(5);
LCD_WriteReg(0x07,0x0101);//Display Contral.
delay(5);

LCD_WriteReg(0x10,(1<<12)|(0<<8)|(1<<7)|(1<<6)|(0<<4));//Power Control 1.(0x16b0)
LCD_WriteReg(0x11,0x0007);//Power Control 2.(0x0001)
LCD_WriteReg(0x12,(1<<8)|(1<<4)|(0<<0));//Power Control 3.(0x0138)
LCD_WriteReg(0x13,0x0b00);//Power Control 4.
LCD_WriteReg(0x29,0x0000);//Power Control 7.
LCD_WriteReg(0x2b,(1<<14)|(1<<4));

LCD_WriteReg(0x50,0);//Set X Start.
LCD_WriteReg(0x51,239);//Set X End.
LCD_WriteReg(0x52,0);//Set Y Start.
LCD_WriteReg(0x53,319);//Set Y End.

LCD_WriteReg(0x60,0x2700);//Driver Output Control.
LCD_WriteReg(0x61,0x0001);//Driver Output Control.
LCD_WriteReg(0x6a,0x0000);//Vertical Srcoll Control.

LCD_WriteReg(0x80,0x0000);//Display Position? Partial Display 1.
LCD_WriteReg(0x81,0x0000);//RAM Address Start? Partial Display 1.
LCD_WriteReg(0x82,0x0000);//RAM Address End-Partial Display 1.
LCD_WriteReg(0x83,0x0000);//Displsy Position? Partial Display 2.
LCD_WriteReg(0x84,0x0000);//RAM Address Start? Partial Display 2.
LCD_WriteReg(0x85,0x0000);//RAM Address End? Partial Display 2.

LCD_WriteReg(0x90,(0<<7)|(16<<0));//Frame Cycle Contral.(0x0013)
LCD_WriteReg(0x92,0x0000);//Panel Interface Contral 2.(0x0000)
LCD_WriteReg(0x93,0x0001);//Panel Interface Contral 3.


LCD_WriteReg(0x95,0x0110);//Frame Cycle Contral.(0x0110)
LCD_WriteReg(0x97,(0<<8));//
LCD_WriteReg(0x98,0x0000);//Frame Cycle Contral.
        delay(5);
LCD_WriteReg(0x07,0x0173);//(0x0173)
delay(5);
}

谁还把他整成了 excel 啊! 对着 datasheet 看,这种代码我是拿来能用就不管他干什么,不能用再去对datasheet

热点排行