欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

mtk lcd驱动解决思路

更新时间: 2014-01-05 02:49:07 责任编辑: Author_N1

 

MTK LCD驱动
我想学调试MTK驱动,但不知道该从何开始分析代码,有哪位前辈指点一下,在下感觉不尽!!!
就拿下面的代码说一下,该这么看才能看懂这些代码都初始化了些什么???
虽然我有查指令的文档,但不知道LCD_MainLCD_CtrlWrite(0x2c)这里面的参数当命令还是当要设置的参数???


void LCD_Init_S6B33BF(kal_uint32 bkground, void **buf_addr)
{
volatile kal_uint32 i;
kal_uint16 background = (kal_uint16)bkground;
kal_uint16 read_data;

CLEAR_LCD_CTRL_RESET_PIN; //REG_LCD_CTRL = 0
Delayms(50);
SET_LCD_CTRL_RESET_PIN; //REG_LCD_CTRL = 1
Delayms(50);
LCD_MainLCD_CtrlWrite(0x2c);//standby mode off;
Delayms(20);
LCD_MainLCD_CtrlWrite(0xEB);//MTP mode on
Delayms(20);
LCD_MainLCD_CtrlWrite(0x02);
LCD_MainLCD_CtrlWrite(0x01) ;//osc on,internal
Delayms(20);

LCD_MainLCD_CtrlWrite(0x20);
LCD_MainLCD_CtrlWrite(0x0a);
Delayms(20);
LCD_MainLCD_CtrlWrite(0x26);
LCD_MainLCD_CtrlWrite(0x01);
Delayms(20);
LCD_MainLCD_CtrlWrite(0x26);
LCD_MainLCD_CtrlWrite(0x09);
Delayms(20);
LCD_MainLCD_CtrlWrite(0x26);
LCD_MainLCD_CtrlWrite(0x0b);
Delayms(20);
LCD_MainLCD_CtrlWrite(0x26);
LCD_MainLCD_CtrlWrite(0x0f);//Power supply setting
Delayms(20);
LCD_MainLCD_CtrlWrite(0x28);
LCD_MainLCD_CtrlWrite(0x01);//temperature compensation
Delayms(20);
  LCD_MainLCD_CtrlWrite(0x45);
LCD_MainLCD_CtrlWrite(0x00);//RAM skip area set:no skip
LCD_MainLCD_CtrlWrite(0x53);
LCD_MainLCD_CtrlWrite(0x00);//diplay pattern:normal display
LCD_MainLCD_CtrlWrite(0x10);
LCD_MainLCD_CtrlWrite(0x25);//driver outmode set:162,sdir=1,swap=0,cdr=1
LCD_MainLCD_CtrlWrite(0x22);
LCD_MainLCD_CtrlWrite(0x11);//bias set:1/5
LCD_MainLCD_CtrlWrite(0x24);
LCD_MainLCD_CtrlWrite(0x11);//dcdc clock division:
LCD_MainLCD_CtrlWrite(0x2A);
LCD_MainLCD_CtrlWrite(0xbF);//contrast
LCD_MainLCD_CtrlWrite(0x2B);
LCD_MainLCD_CtrlWrite(0x54);//contrast
LCD_MainLCD_CtrlWrite(0x30);
LCD_MainLCD_CtrlWrite(0x05);//address mode set:65535 ,0X02 070703
LCD_MainLCD_CtrlWrite(0x32);
LCD_MainLCD_CtrlWrite(0x0E);//row vector mode set
LCD_MainLCD_CtrlWrite(0x34);
LCD_MainLCD_CtrlWrite(0x92);//n-block inversion set------------------------------------------www debug 92 to 0xca
LCD_MainLCD_CtrlWrite(0x36);
LCD_MainLCD_CtrlWrite(0x00);//internal frame frequency:off
LCD_MainLCD_CtrlWrite(0x40);
LCD_MainLCD_CtrlWrite(0x00);//entry mode set:
LCD_MainLCD_CtrlWrite(0x42);
LCD_MainLCD_CtrlWrite(0x00);
LCD_MainLCD_CtrlWrite(0x9F);//X Address area set:0-159
LCD_MainLCD_CtrlWrite(0x43);
LCD_MainLCD_CtrlWrite(0x04);
LCD_MainLCD_CtrlWrite(0x83);//y address area set:0-131
LCD_MainLCD_CtrlWrite(0x55);
LCD_MainLCD_CtrlWrite(0x01);//partial display mode set:on,mode0
LCD_MainLCD_CtrlWrite(0x5A);
LCD_MainLCD_CtrlWrite(0x00);//scroll start address:0x00
LCD_MainLCD_CtrlWrite(0x51); //display on

LCD_ClearAll_S6B33BF(0xffff);
}

--参考方法--
呵呵,两个建议LCD_MainLCD_CtrlWrite你看看这个宏是怎么映射的,还用你得看电路图,看看那个0X的地址对应的是哪些IO口。
--参考方法--
看看S6B33BF的IC规格书就清楚了
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 02:49:07
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/14841/
本文WWW.DOC100.NET DOC100.NET版权所有。