《液晶驱动心得【ili9325】.docx》由会员分享,可在线阅读,更多相关《液晶驱动心得【ili9325】.docx(3页珍藏版)》请在第一文库网上搜索。
1、几点说明:1、本文所用液晶控制器为I1I9325320*2402、理解水平有限,如有误,请指正3、驱动原理,每个点用2个字节表示颜色,按设定的方向刷新320*240个点,就可以显示一张图片。一、坐标原点位置的确定首先,你买回来的液晶屏,有一个位置,就是G1和S1开始的位置,我们暂且把它称为物理地址。(这个是没有办法改变的,所以我称之为物理地址,不过坐标原点还是可以改的)TFTG320一二、屏上的每一点与显示RAM的对应关系。从下图可以看出:1、每一行的每一个点地址2.5个字节,所以用三个S表示一个点,720/3=2402、纵向是320行,所以是G1到G320,所以正好是320*240320*2
2、40G320GRAMaddressmaptab1eofSS=1,BGR=1SS=O.BGRM)S720.S718S717.S715S714.S712S711.S709S12.S1OS9.S7S6.S4S3.S1GS=OGS1DB17.0DB17.0DB17.0DB17.ODB17.0DB17.0DB17.0DB17.0G1G32C0XXX)h00001h0(XM2h*0XX)3hOOOECh,000EDOOOEEh,OOOEFhG2G31900100h*OO1O1h00102h*OO1O3h001EOOO1ED,001EEh001EFh,G3G310OCSOOh-*00201h,00202M-
3、00203h,002ECh,*002ED*002EE002EFzG4G317*00300h*00301h400302h400303h-003ECh003ED003EEh003EFhG5G31600400h,*00401h,00402hw00403hQ04EChPaEDh”-004EEh*0O4EF,G6G315*00500h,*00501h*502h*00503h*005ECh,005ED*005EE,*005EFh,G7G31400600h,*00601h-OO6C2h*00603h006ECh,*006ED006EEh*00EFh,GeG31300700h,-00701h,00702h*,
4、00703007EC007ED007EEh007EFh-G9G312*00800h*00801h,“008%*0003h008EO,OO0EDh008EE*008EFhG10G311XX)900h*00901h*009C2h-00903*009ECh-009ED-0O9EEh-0O9EFG311G101300h,I31h,I32h1303h,136EO136ED136EEh136EFG312G913700h,-13701h-13702h*13703h,137ECh,*137EDh,-137EEF37EFZG313G813800hM3801h*13802h,-13803h*138ECh138ED
5、-138EEh138EFhG314G7*13900h,“139O1h-T39C2h13903h*139EC,13SED139EEh4139EFhG315G613AOOh*13A01h*T3A02h,T3A03h13AEC,13AED,M3AEE13AEF,G316G513B00h,*13B01h,T3B02h*13B03.13BECh,13BEDh-13BEE*13BEFh,G317G413Coar*13CO1h,13C02h13C03h,13CEO13CEDT3CEEM13CEFhG31G313DOOM3DO1h413D02h*-13D03h*13DEO13DD13DEEh*13DEFG31
6、9G2*13EOoM*13E01h,-13E02413E03h13EECh,-13EEDh13EEEM*13EEFhG320三、S8.2/R/WG1凝命1DrhRS,13F00h令。erOutputD15D1*13FO1h,Contro1(F4D13D1*13F02h,W1h)2D11D*13F03h10D9DiC*13FECh,)7D613FEDh,)5D413FEEh,D3D2*13FEFh,D1DOW100000SMOSS0000000SS:Se1ecttheshiftdirectionofoutputsfromthesourcedriver.WhenSS=0.theshiftdirec
7、tiofoutputsisfromS1toS720WhenSS=1.theshiftdirectionofoutputsisfromS720toS1.从源驱动器选择输出的转变方向WhenSS=0,输出转变方向是从S1至IJS720WhenSS=1,输出转变方向是从S720到S18.2.6.EntryMode(R03h)W1TRIDFM0BGR00HWM0ORG01D11/DOAM000RTWRSD15D14D13D12D11D1oD9D8D7D6D5D4D3D2D1DoAMContro1theGRAMupdatedirecti.WhenAM=0.theaddressisupdatedinhor
8、izonta1writingdirection.WhenAM=,theaddressisupdatedinvertica1writingdirecti.进入模式WhenAM=U0”,地址在水平写入方向得以更新。WhenAM=力”,地址在垂直写入方向得以更新。1D19控制地址计数器(AC)将自动增加或减少I.AM=0Horizonta1ID1rOOOHorizonta1:decrementVertica1:deaement1/D1:001Horizonta1:incrementVertica1:decrement1/D1:010Horizonta1:decrementVertica1:ineme
9、nt1/D1:011Horizonta1:incrementVertica1:inementORG=0”:如果原始地址是不能被移动的。ORG=1”:原始地址“00000H”根据设置移动。编号指令各位雌命令HEXD15D14D13D12D11D1OD9D8D7D6D5D4D3D2D1DORO0X001*OSC打开振荡器/谀取拄制100,1001-10101001000器型号R30X03TRIDFJI0BGR00HWIf-0ORG10I/D1I/D0AM1000入口模式R70X0700PTDE1PTDEO0100BASEE1010GONDTEC10D1DO显示管制蹈2OXZo00000010,0A
10、DTAD6AD5AD4AD?AD2AD1ADO行地址(X)设置R330X210000000AD16AD15ADHD1AD12AD11AD1QD9AD8列地址G)设置R340X22NCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNC写数据到GRAMR800X5000000000HSA7HSA6HSA5HSA4HSA3HSA2HSA1HSAO行起始地址(X)设省R810X5100000000HEA7HEA6HEA5HEA4HEA3HEA2HEA1HEAO行结束地址(X)设置R820X520000000VSA8VSA7VSA6VSA5VSA4VSA3VSA2VSA1VSAO列起始地址(Y)设置R830X530000000VEA8VEA7VEA6VEA5VEA4VEA3VEA2VEA1VEAO列结束地址(Y)设置四、有关原点位置的确定(实测我自己的液晶)GS=ISS=OGS=OSS=O