专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
STM32
STM32F103,驱动ILI9325的屏幕,可以显示但是不能反复显示???
2019-10-14 20:42
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
STM32/STM8
5346
15
1114
有哪位大哥给分析下会是什么原因? 驱动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},则不会白屏。这个会是神马原因??
加载中...
查看其它15个回答
一周热门
更多
>
相关问题
STM32F4上I2C(在PROTEUS中模拟)调试不通的问题
6 个回答
芯片供应紧张,准备换个MCU,MM32L系列替换STM32L系列的怎么样?
7 个回答
STM32同时使用两个串口进行数据收发时数据丢包的问题
5 个回答
STM32F103串口通信死机问题
4 个回答
STM32WLE5CC连接SX1268在LoRa模式下能与 SX1278互通吗?
2 个回答
相关文章
ST公司第一款无线低功耗单片机模块有效提高物联网设计生产效率
0个评论
如何实现对单片机寄存器的访问
0个评论
通过USB用STM32片内自带Bootloader下载程序及注意事项
0个评论
欲练此功必先自宫之STM32汇编启动,放慢是为了更好的前行
0个评论
×
关闭
采纳回答
向帮助了您的知道网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
STM32
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
×
付费偷看金额在0.1-10元之间
确定
×
关闭
您已邀请
0
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
---------------------------------
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},则不会白屏。这个会是神马原因??
一周热门 更多>