STM32F103,驱动ILI9325的屏幕,可以显示但是不能反复显示???

2019-10-14 20:42发布

有哪位大哥给分析下会是什么原因? 驱动ILI9325的屏幕,初始化后,可以正常显示一个字符串,一个图片等,但是不能在while中反复显示不同内容,比如1秒钟刷新个新的显示内容,只要刷新显示不同内容,过一会屏幕就白屏了。。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
15条回答
唯一的苗
2019-10-15 09:04
回复【2楼】吴工wyy:
---------------------------------
ILI9325 初始化程序:

               LCD_delay_ms(50); // delay 50 ms 
LCD_WriteReg(0x00e7,0x0010);      
LCD_WriteReg(0x0000,0x0001);   /* start internal osc */
LCD_WriteReg(0x0001,0x0100);     
LCD_WriteReg(0x0002,0x0700);  /* power on sequence */
LCD_WriteReg(0x0003,(1<<12)|(1<<5)|(1<<4)|(0<<3) );  /* importance */
LCD_WriteReg(0x0004,0x0000);                                   
LCD_WriteReg(0x0008,0x0207);            
LCD_WriteReg(0x0009,0x0000);         
LCD_WriteReg(0x000a,0x0000);  /* display setting */        
LCD_WriteReg(0x000c,0x0001); /* display setting */        
LCD_WriteReg(0x000d,0x0000);          
LCD_WriteReg(0x000f,0x0000);
/* ower On sequence */
LCD_WriteReg(0x0010,0x0000);   
LCD_WriteReg(0x0011,0x0007);
LCD_WriteReg(0x0012,0x0000);                                                                 
LCD_WriteReg(0x0013,0x0000);                 
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0010,0x1590);   
LCD_WriteReg(0x0011,0x0227);
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0012,0x009c);                  
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0013,0x1900);   
LCD_WriteReg(0x0029,0x0023);
LCD_WriteReg(0x002b,0x000e);
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0020,0x0000);                                                            
LCD_WriteReg(0x0021,0x0000);           
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0030,0x0007); 
LCD_WriteReg(0x0031,0x0707);   
LCD_WriteReg(0x0032,0x0006);
LCD_WriteReg(0x0035,0x0704);
LCD_WriteReg(0x0036,0x1f04); 
LCD_WriteReg(0x0037,0x0004);
LCD_WriteReg(0x0038,0x0000);        
LCD_WriteReg(0x0039,0x0706);     
LCD_WriteReg(0x003c,0x0701);
LCD_WriteReg(0x003d,0x000f);
LCD_delay_ms(50);  /* delay 50 ms */
LCD_WriteReg(0x0050,0x0000);        
LCD_WriteReg(0x0051,0x00ef);   
LCD_WriteReg(0x0052,0x0000);     
LCD_WriteReg(0x0053,0x013f);
LCD_WriteReg(0x0060,0xa700);        
LCD_WriteReg(0x0061,0x0001); 
LCD_WriteReg(0x006a,0x0000);
LCD_WriteReg(0x0080,0x0000);
LCD_WriteReg(0x0081,0x0000);
LCD_WriteReg(0x0082,0x0000);
LCD_WriteReg(0x0083,0x0000);
LCD_WriteReg(0x0084,0x0000);
LCD_WriteReg(0x0085,0x0000);
  
LCD_WriteReg(0x0090,0x0010);     
LCD_WriteReg(0x0092,0x0000);  
LCD_WriteReg(0x0093,0x0003);
LCD_WriteReg(0x0095,0x0110);
LCD_WriteReg(0x0097,0x0000);        
LCD_WriteReg(0x0098,0x0000);  
/* display on sequence */    
LCD_WriteReg(0x0007,0x0133);

LCD_WriteReg(0x0020,0x0000);
LCD_WriteReg(0x0021,0x0000);



在主程序中:
       LCD_delay_ms(10);
STM3210B_LCD_Init();
LCD_delay_ms(50);
LCD_SetTextColor(Red);
LCD_SetBackColor(White);
LCD_Clear(Red);
RTC_Configuration();
NVIC_Configuration();
    while(1)
{

       LCD_delay_ms(100);
//LCD_DisplayStringLine(Line5,"Time:");
         //LCD_Clear(Red);

}


在while中如果打开显示 或清屏,程序运行一会就屏幕变白。 如果不打开,因为在进入while之前有个清屏红 {MOD},则不会白屏。这个会是神马原因??

一周热门 更多>