专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
STM32 用FSMC驱动ILI9320 问题
2019-03-23 20:10
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
STM32/STM8
15302
2
1280
液晶驱起来了 但是在送单 {MOD}的测试数据时候 有明显的亮纹 怎么办 此帖出自
小平头技术问答
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
angoodcat
1楼-- · 2019-03-23 23:39
精彩回答 2 元偷偷看……
加载中...
hl449006540
2楼-- · 2019-03-24 05:15
void STM3210E_LCD_Init(void){
#if ISRST == 0 GPIOB->ODR |= 0x02; _delay_ms(1);
GPIOB->ODR &= ~(0x02); _delay_ms(1); GPIOB->ODR |= 0x02;#endif _delay_ms(50); /* delay 50 ms */
#ifdef ILI9325 LCD_WriteReg(0x00e3,0x3008); LCD_WriteReg(0x00e7,0x0012); LCD_WriteReg(0x00ef,0x1231);//Set the internal vcore voltage LCD_WriteReg(0x0001,0x0100);//S#endif #ifdef ILI9320 LCD_WriteReg(0x00e5,0x8000); LCD_WriteReg(0x0000,0x0001); LCD_WriteReg(0x0001,0x0100);//S#endif LCD_WriteReg(0x0002,0x0700);//Line inversion #if ID_AM==000 LCD_WriteReg(0x0003,0x0000);//屏幕旋转控制 TFM=0,TRI=0,SWAP=1,16 bits system interface swap RGB to BRG,此处ORG和HWM 为0#elif ID_AM==001 LCD_WriteReg(0x0003,0x0008); #elif ID_AM==010 LCD_WriteReg(0x0003,0x0010); #elif ID_AM==011 LCD_WriteReg(0x0003,0x0018);#elif ID_AM==100 LCD_WriteReg(0x0003,0x0020); #elif ID_AM==101 LCD_WriteReg(0x0003,0x0028); #elif ID_AM==110 LCD_WriteReg(0x0003,0x0030); #elif ID_AM==111 LCD_WriteReg(0x0003,0x0038);#endif LCD_WriteReg(0x0004,0x0000); LCD_WriteReg(0x0008,0x0207); LCD_WriteReg(0x0009,0x0000); LCD_WriteReg(0x000a,0x0000); LCD_WriteReg(0x000c,0x0001);//此处配置接口类型 16位 system接口 LCD_WriteReg(0x000d,0x0000); LCD_WriteReg(0x000f,0x0000); //电源配置 LCD_WriteReg(0x0010,0x0000); LCD_WriteReg(0x0011,0x0000); LCD_WriteReg(0x0012,0x0000); LCD_WriteReg(0x0013,0x0000);
LCD_WriteReg(0x0010,0x17b0); LCD_WriteReg(0x0011,0x0137);
LCD_WriteReg(0x0012,0x0139); LCD_WriteReg(0x0013,0x1700); LCD_WriteReg(0x0029,0x000c); //LCD_WriteReg(0x002b,0x000d); #if ID_AM==000 LCD_WriteReg(0x0020,0x00ef);//GRAM水平起始位置 LCD_WriteReg(0x0021,0x013f); #elif ID_AM==001 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==010 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==011 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==100 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==101 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==110 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==111 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x0000); #endif LCD_WriteReg(0x0030,0x0000); LCD_WriteReg(0x0031,0x0507); LCD_WriteReg(0x0032,0x0104); LCD_WriteReg(0x0035,0x0105); LCD_WriteReg(0x0036,0x0404); LCD_WriteReg(0x0037,0x0603); LCD_WriteReg(0x0038,0x0004); LCD_WriteReg(0x0039,0x0007); LCD_WriteReg(0x003c,0x0501); LCD_WriteReg(0x003d,0x0404); LCD_WriteReg(0x0050,0x0000);//水平 GRAM起始位置 LCD_WriteReg(0x0051,0x00ef);//水平GRAM终止位置 LCD_WriteReg(0x0052,0x0000);//垂直GRAM起始位置 LCD_WriteReg(0x0053,0x013f);//垂直GRAM终止位置#ifdef ILI9325 LCD_WriteReg(0x0060,0xa700);//G#endif#ifdef ILI9320 LCD_WriteReg(0x0060,0x2700);//G #endif LCD_WriteReg(0x0061,0x0001);//Enables the grayscale inversion of the image by setting REV=1.?????????????????????????????? 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); //显示画面写入 0x0130是不显示当前画面 //0x0173是显示当前画面 LCD_WriteReg(0x0007,0x0130);#ifdef Immediately LCD_WriteReg(0x0007,0x0173); #endif
}
加载中...
一周热门
更多
>
相关问题
相关文章
嵌入式编译生成的HEX文件和BIN文件内容详解
0个评论
ST公司第一款无线低功耗单片机模块有效提高物联网设计生产效率
0个评论
单片机中把部分Flash虚拟成Eeprom使用时,如何延长使用寿命
0个评论
如何实现对单片机寄存器的访问
0个评论
通过USB用STM32片内自带Bootloader下载程序及注意事项
0个评论
欲练此功必先自宫之STM32汇编启动,放慢是为了更好的前行
0个评论
敢问路在何方,STM32迈出的第一步,却注定了它非凡的一生
0个评论
年工作时间真的就等于3年工作经验?也许你就不配
0个评论
×
关闭
采纳回答
向帮助了您的网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
关闭
您已邀请
15
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
#if ISRST == 0 GPIOB->ODR |= 0x02; _delay_ms(1);
GPIOB->ODR &= ~(0x02); _delay_ms(1); GPIOB->ODR |= 0x02;#endif _delay_ms(50); /* delay 50 ms */
#ifdef ILI9325 LCD_WriteReg(0x00e3,0x3008); LCD_WriteReg(0x00e7,0x0012); LCD_WriteReg(0x00ef,0x1231);//Set the internal vcore voltage LCD_WriteReg(0x0001,0x0100);//S#endif #ifdef ILI9320 LCD_WriteReg(0x00e5,0x8000); LCD_WriteReg(0x0000,0x0001); LCD_WriteReg(0x0001,0x0100);//S#endif LCD_WriteReg(0x0002,0x0700);//Line inversion #if ID_AM==000 LCD_WriteReg(0x0003,0x0000);//屏幕旋转控制 TFM=0,TRI=0,SWAP=1,16 bits system interface swap RGB to BRG,此处ORG和HWM 为0#elif ID_AM==001 LCD_WriteReg(0x0003,0x0008); #elif ID_AM==010 LCD_WriteReg(0x0003,0x0010); #elif ID_AM==011 LCD_WriteReg(0x0003,0x0018);#elif ID_AM==100 LCD_WriteReg(0x0003,0x0020); #elif ID_AM==101 LCD_WriteReg(0x0003,0x0028); #elif ID_AM==110 LCD_WriteReg(0x0003,0x0030); #elif ID_AM==111 LCD_WriteReg(0x0003,0x0038);#endif LCD_WriteReg(0x0004,0x0000); LCD_WriteReg(0x0008,0x0207); LCD_WriteReg(0x0009,0x0000); LCD_WriteReg(0x000a,0x0000); LCD_WriteReg(0x000c,0x0001);//此处配置接口类型 16位 system接口 LCD_WriteReg(0x000d,0x0000); LCD_WriteReg(0x000f,0x0000); //电源配置 LCD_WriteReg(0x0010,0x0000); LCD_WriteReg(0x0011,0x0000); LCD_WriteReg(0x0012,0x0000); LCD_WriteReg(0x0013,0x0000);
LCD_WriteReg(0x0010,0x17b0); LCD_WriteReg(0x0011,0x0137);
LCD_WriteReg(0x0012,0x0139); LCD_WriteReg(0x0013,0x1700); LCD_WriteReg(0x0029,0x000c); //LCD_WriteReg(0x002b,0x000d); #if ID_AM==000 LCD_WriteReg(0x0020,0x00ef);//GRAM水平起始位置 LCD_WriteReg(0x0021,0x013f); #elif ID_AM==001 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==010 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==011 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x013f); #elif ID_AM==100 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==101 LCD_WriteReg(0x0020,0x00ef); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==110 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x0000); #elif ID_AM==111 LCD_WriteReg(0x0020,0x0000); LCD_WriteReg(0x0021,0x0000); #endif LCD_WriteReg(0x0030,0x0000); LCD_WriteReg(0x0031,0x0507); LCD_WriteReg(0x0032,0x0104); LCD_WriteReg(0x0035,0x0105); LCD_WriteReg(0x0036,0x0404); LCD_WriteReg(0x0037,0x0603); LCD_WriteReg(0x0038,0x0004); LCD_WriteReg(0x0039,0x0007); LCD_WriteReg(0x003c,0x0501); LCD_WriteReg(0x003d,0x0404); LCD_WriteReg(0x0050,0x0000);//水平 GRAM起始位置 LCD_WriteReg(0x0051,0x00ef);//水平GRAM终止位置 LCD_WriteReg(0x0052,0x0000);//垂直GRAM起始位置 LCD_WriteReg(0x0053,0x013f);//垂直GRAM终止位置#ifdef ILI9325 LCD_WriteReg(0x0060,0xa700);//G#endif#ifdef ILI9320 LCD_WriteReg(0x0060,0x2700);//G #endif LCD_WriteReg(0x0061,0x0001);//Enables the grayscale inversion of the image by setting REV=1.?????????????????????????????? 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); //显示画面写入 0x0130是不显示当前画面 //0x0173是显示当前画面 LCD_WriteReg(0x0007,0x0130);#ifdef Immediately LCD_WriteReg(0x0007,0x0173); #endif
}
一周热门 更多>