立即注册
查看: 5700|回复: 11

MT6250 兼容LCD问题,求救

已绑定手机
已实名认证
发表于 2012-9-17 15:38:13 | 显示全部楼层 |阅读模式 来自 广东省深圳市
MT6250 LCD自适应一直兼容不上,一直都走的是ILI9486,但是catcher LOG抓到的LCD ID是为:0x5420,请高手指点,谢谢,附上lcd.c文件!是否.mak文件需要改动啥开关?
2012-9-17 15:38 上传
文件大小:
9.25 KB
下载次数:
35
lcd.c
本地下载

16RD supports Paypal , Payment is calculated at the exchange rate of the day. Unable to download please contact 18902843661 (WhatsApp OR wechat number)

关于一牛网在微软浏览器(Microsoft Edge、IE浏览器)警报通告&解决方案!(无法下载直接更换浏览器即可)

*附件为作者发布,与本站无关,如有侵权,请联系客服删除


  • 一牛网商城 一牛网直播
已绑定手机
已实名认证
专业2G/3G/4G智能模块核心板,承接方案定制,
手机:18665375912(微信同号)或点下面的黑色字体

深圳市新移科技有限公司
发表于 2012-9-17 15:47:34 | 显示全部楼层 来自 广东省深圳市
你的意思是ID读不对是不是?
发表于 2012-9-17 15:49:43 | 显示全部楼层 来自 上海市徐汇区
自己代码写的有问题吧  你先关注下 LINE:1636
void LCD_FunConfig(void)
{

        //MainLCD = &LCD_func_OTM4001;
        PROF_driver_lcd_init();
        #ifdef DUAL_LCD
                //SubLCD = &LCD_func_HD66791;
        #endif
}
在看  PROF_driver_lcd_init();  在 LINE183

kal_uint16 PROF_driver_lcd_init(void)
{
        extern LCD_Funcs LCD_func_OTM4001;
        extern LCD_Funcs LCD_func_ILI9486;
          prog_check_lcd_id = PROF_LCD_CheckLcdID();
        if(prog_check_lcd_id == 0x5420)
        {
                MainLCD = &LCD_func_OTM4001;
        }
        else
        {
              MainLCD = &LCD_func_ILI9486;
        }       

}       

难道每次不是走的不是 void LCD_Init_OTM4001(kal_uint32 bkground, void **buf_addr)
{
        // Enhance LCD I/F driving current.
#if defined(MT6238)
        *((volatile unsigned short *) 0x80010700) |= 0xE0E0;
#endif
        //Delayms(10);
        SET_LCD_CTRL_RESET_PIN;
        Delayms(10);
        CLEAR_LCD_CTRL_RESET_PIN;
        Delayms(50);
        SET_LCD_CTRL_RESET_PIN;
        Delayms(120);


#if 1 //otm4001 coolsand init //st7793
  LCD_CtrlWrite_OTM4001(0x0001);LCD_DataWrite_OTM4001(0x0100);//0100
LCD_CtrlWrite_OTM4001(0x0003);LCD_DataWrite_OTM4001(0x1000);//1030 9030
LCD_CtrlWrite_OTM4001(0x0008);LCD_DataWrite_OTM4001(0x0808);
LCD_CtrlWrite_OTM4001(0x0090);LCD_DataWrite_OTM4001(0x8000);
LCD_CtrlWrite_OTM4001(0x0400);LCD_DataWrite_OTM4001(0x6200);//6200
LCD_CtrlWrite_OTM4001(0x0401);LCD_DataWrite_OTM4001(0x0001);
//-----------------------------------End Display Control setting-----------------------------------------//
//-------------------------------- Power Control Registers Initial --------------------------------------//
LCD_CtrlWrite_OTM4001(0x00ff);LCD_DataWrite_OTM4001(0x0001);
LCD_CtrlWrite_OTM4001(0x0102);LCD_DataWrite_OTM4001(0x01b0);
LCD_CtrlWrite_OTM4001(0x0710);LCD_DataWrite_OTM4001(0x0016);
LCD_CtrlWrite_OTM4001(0x0712);LCD_DataWrite_OTM4001(0x000f);
LCD_CtrlWrite_OTM4001(0x0752);LCD_DataWrite_OTM4001(0x002f);
LCD_CtrlWrite_OTM4001(0x0724);LCD_DataWrite_OTM4001(0x001a);
LCD_CtrlWrite_OTM4001(0x0754);LCD_DataWrite_OTM4001(0x002a);
//---------------------------------End Power Control Registers Initial -------------------------------//
Delayms(100);
//----------------------------------Display Windows 240 X 400----------------------------------------//
LCD_CtrlWrite_OTM4001(0x0210);LCD_DataWrite_OTM4001(0x0000);
LCD_CtrlWrite_OTM4001(0x0211);LCD_DataWrite_OTM4001(0x00ef);
LCD_CtrlWrite_OTM4001(0x0212);LCD_DataWrite_OTM4001(0x0000);
LCD_CtrlWrite_OTM4001(0x0213);LCD_DataWrite_OTM4001(0x018f);
//----------------------------------End Display Windows 240 X 400----------------------------------//
Delayms(10);
//-------------------------------------Gamma Cluster Setting-------------------------------------------//
LCD_CtrlWrite_OTM4001(0x0380);LCD_DataWrite_OTM4001(0x0000);
LCD_CtrlWrite_OTM4001(0x0381);LCD_DataWrite_OTM4001(0x5f10);
LCD_CtrlWrite_OTM4001(0x0382);LCD_DataWrite_OTM4001(0x0b02);
LCD_CtrlWrite_OTM4001(0x0383);LCD_DataWrite_OTM4001(0x0614);
LCD_CtrlWrite_OTM4001(0x0384);LCD_DataWrite_OTM4001(0x0111);
LCD_CtrlWrite_OTM4001(0x0385);LCD_DataWrite_OTM4001(0x0000);
LCD_CtrlWrite_OTM4001(0x0386);LCD_DataWrite_OTM4001(0xa90b);
LCD_CtrlWrite_OTM4001(0x0387);LCD_DataWrite_OTM4001(0x0606);
LCD_CtrlWrite_OTM4001(0x0388);LCD_DataWrite_OTM4001(0x0612);
LCD_CtrlWrite_OTM4001(0x0389);LCD_DataWrite_OTM4001(0x0111);
//---------------------------------------End Gamma Setting---------------------------------------------//
//---------------------------------------Vcom Setting---------------------------------------------//
LCD_CtrlWrite_OTM4001(0x0702);LCD_DataWrite_OTM4001(0x003b);
LCD_CtrlWrite_OTM4001(0x00ff);LCD_DataWrite_OTM4001(0x0000);
//---------------------------------------End Vcom Setting---------------------------------------------//
LCD_CtrlWrite_OTM4001(0x0007);LCD_DataWrite_OTM4001(0x0100);
Delayms(200); //Delay 200ms
LCD_CtrlWrite_OTM4001(0x0200);LCD_DataWrite_OTM4001(0x0000);
LCD_CtrlWrite_OTM4001(0x0201);LCD_DataWrite_OTM4001(0x0000);
#endif


}
已绑定手机
已实名认证
 楼主| 发表于 2012-9-17 15:52:22 | 显示全部楼层 来自 广东省深圳市
jianghuiyan 发表于 2012-9-17 15:47
你的意思是ID读不对是不是?

ID都能读出来,但是一直走的是ILI9486
已绑定手机
已实名认证
 楼主| 发表于 2012-9-17 15:53:40 | 显示全部楼层 来自 广东省深圳市
倒水 发表于 2012-9-17 15:49
自己代码写的有问题吧  你先关注下 LINE:1636
void LCD_FunConfig(void)
{

此套兼容我在5310上是可以兼容的,现在现象是一直走的 ILI9486
发表于 2012-9-17 15:58:11 | 显示全部楼层 来自 上海市徐汇区
你把lcd。obj 删除在编译下 试试
已绑定手机
已实名认证
 楼主| 发表于 2012-9-17 16:04:10 | 显示全部楼层 来自 广东省深圳市
倒水 发表于 2012-9-17 15:58
你把lcd。obj 删除在编译下 试试

new了也不行
发表于 2012-9-17 19:07:32 | 显示全部楼层 来自 广东省惠州市
void LCD_FunConfig(void)
1.你打印一下这个函数跑了几次。
2.你在你自己加的函数里只读ID,返回后在LCD_FunConfig判断。
已绑定手机
已实名认证
 楼主| 发表于 2012-9-17 19:56:04 | 显示全部楼层 来自 广东省深圳市宝安区
orange_221 发表于 2012-9-17 19:07
void LCD_FunConfig(void)
1.你打印一下这个函数跑了几次。
2.你在你自己加的函数里只读ID,返回后在LCD_ ...

好的,谢谢小哥,我试试
发表于 2013-7-2 16:18:58 | 显示全部楼层 来自 广东省深圳市
huicch 发表于 2012-9-17 19:56
好的,谢谢小哥,我试试

兄弟,你这个改好了么?我现在也是这个情况。能否告诉下怎么改的。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

合作/建议

TEL: 19168984579

工作时间:
周一到周五 9:00-11:30 13:30-19:30
  • 扫一扫关注公众号
  • 扫一扫打开小程序
Copyright © 2013-2024 一牛网 版权所有 All Rights Reserved. 帮助中心|隐私声明|联系我们|手机版|粤ICP备13053961号|营业执照|EDI证
在本版发帖搜索
微信客服扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表