搜索
bottom↓
回复: 4

ILI9327液晶显示图片颜色不对

[复制链接]

出0入0汤圆

发表于 2014-9-4 16:46:29 | 显示全部楼层 |阅读模式
本帖最后由 xuefen2014 于 2014-9-4 16:46 编辑

   大家好,我用的是单片机是cc2530,液晶用的是ILI9327,存储图片的芯片用的是AT45DB321D.
  以下是在ILI9327上显示图片:
  
  图中红色圈起来的部分的图片是不正常的,显示图片数据时从存储芯片AT45DB321D读出来的。
  绿色圈起来的部分是原来图片,显示是正常的。
  还望各位大神不吝赐教!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2014-9-4 17:08:49 | 显示全部楼层
本帖最后由 xiaodao35 于 2014-9-4 17:10 编辑

驱动改一下RGB顺序,或改一下flash里r和b的数据顺序
,原图中的数据读出后和你取模的数据比较一下塞!

出0入0汤圆

发表于 2014-9-4 17:22:48 | 显示全部楼层
读的数据有问题吧,把读出来的图片数据显示出来看看有啥不正常。我猜是高低位反了

出0入0汤圆

发表于 2014-9-4 20:12:10 | 显示全部楼层
1.rgb数据的问题
2.rgb数据刷新时的顺序或地址不对

出0入0汤圆

 楼主| 发表于 2014-9-5 14:04:16 | 显示全部楼层
    谢谢各位的解答,从flash中读出来的数据跟取模数据时一样的,我用串口监测了一下。由于我对ILI9327不是很熟悉,下面是ILI9327屏初始化。
    ILI9327_RESX = 1;
        ILI9327LCD_delay_ms(6); // Delay 1ms
        ILI9327_RESX = 0;
        ILI9327LCD_delay_ms(10); // Delay 10ms // This delay time is necessary
        ILI9327_RESX = 1;
        ILI9327LCD_delay_ms(100); // Delay 120 ms
        //************* Start Initial Sequence **********//
        ILI9327LCD_Write_Cmd(0xE9);
        ILI9327LCD_Write_Dat (0x20);
        ILI9327LCD_Write_Cmd(0x11); //Exit Sleep
        ILI9327LCD_delay_ms(100);
        ILI9327LCD_Write_Cmd(0x3a);      //set number of colors using set_pixel_format
        ILI9327LCD_Write_Dat(0x55);
        ILI9327LCD_Write_Cmd(0xD1);//VCOM控制,3个参数
        ILI9327LCD_Write_Dat (0x00);//Register D1h for VCM setting
        ILI9327LCD_Write_Dat (0x6b);//设置生成VCOMH参考电压为VREG1OUT x 0.920
        ILI9327LCD_Write_Dat (0x19);//设置VCOM交流振幅为VREG1OUT x 1.20
        ILI9327LCD_Write_Cmd(0xD0);//Power_Setting,3个参数
        ILI9327LCD_Write_Dat (0x07);//设置Vci的比例因子生成参考电压Vci1,1.0 x Vci
        ILI9327LCD_Write_Dat (0x07);//设置加强因素,输出电压与参考电压Vci1水平
        ILI9327LCD_Write_Dat (0x80);//Sets the factor to generate VREG1OUT from VCI
        ILI9327LCD_Write_Cmd(0x36);//Set_address_mode
        ILI9327LCD_Write_Dat (0x28);//Pixels sent in BGR order 设置扫描方式
        
        ILI9327LCD_Write_Cmd(0xC1);//Display_Timing_Setting for Normal/Partial Mode (C1h)
        ILI9327LCD_Write_Dat (0x10);//Line inversion waveform is selected
        ILI9327LCD_Write_Dat (0x10);
        ILI9327LCD_Write_Dat (0x02);
        ILI9327LCD_Write_Dat (0x02);
        ILI9327LCD_Write_Cmd(0xC0); //Set Default Gamma,Panel Driving Setting
        ILI9327LCD_Write_Dat (0x00);
        ILI9327LCD_Write_Dat (0x35);//Sets the number of lines to drive the LCD at an interval of 8 lines.
        ILI9327LCD_Write_Dat (0x00);//Specifies the gate line where the gate driver starts scan
        ILI9327LCD_Write_Dat (0x00);//Sets the scan mode in non-display area. Select frame-inversion when interval-scan is selected
        ILI9327LCD_Write_Dat (0x01);//Set the scan cycle when PTG selects interval scan in non-display area drive period
        ILI9327LCD_Write_Dat (0x02);//Set the source output level in non-display area drive period
        ILI9327LCD_Write_Cmd(0xC5); //Set frame rate,Frame Rate Control (C5h)
        ILI9327LCD_Write_Dat (0x01);//72 (default),HZ
        ILI9327LCD_Write_Cmd(0xD2); //power setting
        ILI9327LCD_Write_Dat (0x01);
        ILI9327LCD_Write_Dat (0x22);
   
        ILI9327LCD_Write_Cmd(0xC8); //Set Gamma,Gamma Setting (C8h)
        ILI9327LCD_Write_Dat (0x01);
        ILI9327LCD_Write_Dat (0x52);
        ILI9327LCD_Write_Dat (0x37);
        ILI9327LCD_Write_Dat (0x10);
        ILI9327LCD_Write_Dat (0x0d);
        ILI9327LCD_Write_Dat (0x01);
        ILI9327LCD_Write_Dat (0x04);
        ILI9327LCD_Write_Dat (0x51);
        ILI9327LCD_Write_Dat (0x77);
        ILI9327LCD_Write_Dat (0x01);
        ILI9327LCD_Write_Dat (0x01);
        ILI9327LCD_Write_Dat (0x0d);
        ILI9327LCD_Write_Dat (0x08);
        ILI9327LCD_Write_Dat (0x80);
        ILI9327LCD_Write_Dat (0x00);
    ////////////////
    ILI9327LCD_Write_Cmd(0xEA);
    ILI9327LCD_Write_Dat (0x80);
   
        ILI9327LCD_Write_Cmd(0x29); //display on,Set_display_on (29h),

   RGB的数据顺序在哪里改呀?
   

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-23 10:43

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表