msp430f1611驱动正点2.8寸ili9341的屏幕没有找到原函数

2019-07-15 15:17发布

首先,我看初始化那里ili9341有很多初始化程序,有LG 2.8” Initial Code, BOE 2.0” INITIAL CODE ,BOE 2.4” INITIAL CODE ,BOE 2.4” INITIAL CODE。。。。TM2.8INCH INITIAL CODE,正点的到底用那个?还有初始化程序中的
LCD_ILI9341_CMD(0xCB);  LCD_ILI9341_ Parameter (0x39);
这些应该是调用函数,但是我没有找到原函数,
还有是不是不初始化,屏幕及时接上电也不会亮。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
1条回答
qusha5668
2019-07-15 19:50
你直接用我们提供的例程即可啊。
9341初始化代码:
if(lcddev.id==0X9341)//9341初始化

LCD_WR_REG(0xCF);  
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0xC1); 
LCD_WR_DATA(0X30); 
LCD_WR_REG(0xED);  
LCD_WR_DATA(0x64); 
LCD_WR_DATA(0x03); 
LCD_WR_DATA(0X12); 
LCD_WR_DATA(0X81); 
LCD_WR_REG(0xE8);  
LCD_WR_DATA(0x85); 
LCD_WR_DATA(0x10); 
LCD_WR_DATA(0x7A); 
LCD_WR_REG(0xCB);  
LCD_WR_DATA(0x39); 
LCD_WR_DATA(0x2C); 
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x34); 
LCD_WR_DATA(0x02); 
LCD_WR_REG(0xF7);  
LCD_WR_DATA(0x20); 
LCD_WR_REG(0xEA);  
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x00); 
LCD_WR_REG(0xC0);    //Power control 
LCD_WR_DATA(0x1B);   //VRH[5:0] 
LCD_WR_REG(0xC1);    //Power control 
LCD_WR_DATA(0x01);   //SAP[2:0];BT[3:0] 
LCD_WR_REG(0xC5);    //VCM control 
LCD_WR_DATA(0x30);  //3F
LCD_WR_DATA(0x30);  //3C
LCD_WR_REG(0xC7);    //VCM control2 
LCD_WR_DATA(0XB7); 
LCD_WR_REG(0x36);    // Memory Access Control 
LCD_WR_DATA(0x48); 
LCD_WR_REG(0x3A);   
LCD_WR_DATA(0x55); 
LCD_WR_REG(0xB1);   
LCD_WR_DATA(0x00);   
LCD_WR_DATA(0x1A); 
LCD_WR_REG(0xB6);    // Display Function Control 
LCD_WR_DATA(0x0A); 
LCD_WR_DATA(0xA2); 
LCD_WR_REG(0xF2);    // 3Gamma Function Disable 
LCD_WR_DATA(0x00); 
LCD_WR_REG(0x26);    //Gamma curve selected 
LCD_WR_DATA(0x01); 
LCD_WR_REG(0xE0);    //Set Gamma 
LCD_WR_DATA(0x0F); 
LCD_WR_DATA(0x2A); 
LCD_WR_DATA(0x28); 
LCD_WR_DATA(0x08); 
LCD_WR_DATA(0x0E); 
LCD_WR_DATA(0x08); 
LCD_WR_DATA(0x54); 
LCD_WR_DATA(0XA9); 
LCD_WR_DATA(0x43); 
LCD_WR_DATA(0x0A); 
LCD_WR_DATA(0x0F); 
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x00);  
LCD_WR_REG(0XE1);    //Set Gamma 
LCD_WR_DATA(0x00); 
LCD_WR_DATA(0x15); 
LCD_WR_DATA(0x17); 
LCD_WR_DATA(0x07); 
LCD_WR_DATA(0x11); 
LCD_WR_DATA(0x06); 
LCD_WR_DATA(0x2B); 
LCD_WR_DATA(0x56); 
LCD_WR_DATA(0x3C); 
LCD_WR_DATA(0x05); 
LCD_WR_DATA(0x10); 
LCD_WR_DATA(0x0F); 
LCD_WR_DATA(0x3F); 
LCD_WR_DATA(0x3F); 
LCD_WR_DATA(0x0F); 
LCD_WR_REG(0x2B); 
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x01);
LCD_WR_DATA(0x3f);
LCD_WR_REG(0x2A); 
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0xef); 
LCD_WR_REG(0x11); //Exit Sleep
delay_ms(120);
LCD_WR_REG(0x29); //display on
}

一周热门 更多>