版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
JLX19296G-690-序頁(yè)1概22序頁(yè)1概22字型樣張33外形尺寸及接口引4工作電路65指6字庫(kù)的調(diào)7硬件設(shè)計(jì)及例18~頁(yè)概IC中,以達(dá)到顯示漢字的目的。IC1.外形尺1ROM-IC串行數(shù)據(jù)輸詳見(jiàn)字庫(kù)IC:JLX-GB2312說(shuō)明書:ROM-IN對(duì)應(yīng)IC接口SIROM-OUTSO,ROM-SCKSCLK,ROM-CS2ROM-IC串行數(shù)據(jù)輸3ROM-IC串行時(shí)鐘輸4ROM-IC片選輸5背光電背光電源正極,同VDD6接7電路電供電電源正極(注意:時(shí)須選擇3.3V或者是5V供電8寄存器選擇信H:數(shù)據(jù)寄存器0:指令寄存器(IC資料上所寫為9復(fù)低電平復(fù)位,復(fù)位完成后,回到高電平,液晶模塊開(kāi)片低電平片D7-數(shù)據(jù)總線DB7-E使能信并行時(shí):使并行時(shí):H:讀數(shù) 0:寫數(shù)1ROM-IC串行數(shù)據(jù)輸詳見(jiàn)字庫(kù)IC:JLX-GB2312說(shuō)明書:ROM-IN對(duì)應(yīng)IC接口SIROM-OUTSO,ROM-SCKSCLK,ROM-CS2ROM-IC串行數(shù)據(jù)輸3ROM-IC串行時(shí)鐘輸4ROM-IC片選輸5背光電背光電源正極,同VDD6接7電路電供電電源正極(注意:時(shí)須選擇3.3V或者是5V供電8寄存器選擇信H:數(shù)據(jù)寄存器0:指令寄存器(IC資料上所寫9復(fù)低電平復(fù)位,復(fù)位完成后,回到高電平,液晶模塊開(kāi)片低電平片11-空空15-串行數(shù)串行時(shí)空空空3.2.3I2C總線1ROM-IC串行數(shù)據(jù)輸詳見(jiàn)字庫(kù)IC:JLX-GB2312說(shuō)明ROM-IN應(yīng)字IC口SIROM-OUTSOROM-SCKSCLK,ROM-CS2ROM-IC串行數(shù)據(jù)輸3ROM-字庫(kù)IC接口串行時(shí)鐘輸4ROM-IC片選輸5背光電背光電源正極,同VDD6接7電路電供電電源正極(注意:時(shí)須選擇3.3V或者是5V供電8寄存器選擇IIC接口,此引腳接9復(fù)低電平復(fù)位,復(fù)位完成后,回到高電平,液晶模塊開(kāi)片IIC接口,此引腳接IIC接口,此引腳是從屬地址接IIC接口,此引腳是從屬地址接IIC接口,此引腳不用,建議接IIC接口,此引腳不用,建議接15-D3-串行數(shù)據(jù)(D1、D2、D3接一起作為串行時(shí)使能信IIC接口,此引腳不用,建議接IIC接口,此引腳不用,建議接3:I2C總線工作電路框圖電路框圖2:JLX19296G-690電路框指令ReadDataBytes(一般ReadDataBytesatHigherspeed(快 LCD驅(qū)動(dòng)IC指令表詳見(jiàn)“JLX19296G-690附GB23121(3768×16LCDIC硬件接口:下圖為并行方式的硬件接口程7.2.2例程:以下為并行方式顯示漢字及ASCII字符的 IC:晶聯(lián)訊電子: #include<reg52.H>sbitsbitcs1=P3^4; sbit /*3.3接口定義sbit /*接口定義sbit /*接口定義sbit /*接口定義。另外P1.0~1.7對(duì)應(yīng)sbitRom_IN=P3^1;/*字庫(kù)IC口定義:Rom_IN是字庫(kù)ICSI*/sbitRom_OUT=P3^2*字庫(kù)IC定義:Rom_OUTICSO*/sbitRom_SCK=P3^7;/*ICRom_SCK字庫(kù)ICSCK*/sbitRom_CS=P3^6;/*字庫(kù)IC口Rom_CS是字IC#defineucharunsignedchar#defineuintunsignedint#defineulongunsignedlongucharcodeChinese_text_16x16[];ucharcodeChinese_code_16x16[];ucharcodejing2[];ucharcodelian2[];ucharcodexun2[];ucharcodedian2[];ucharcodezi2[];ucharcodebmp1[];ucharcodeascii_table_8x16[95][16];ucharcodeascii_table_5x8[95][5];voiddelay(inti){intj,k;}voiddelay_us(int{intj,k;}voidwaitkey(){if(key==1)gotorepeat;elsedelay(5000);}//=============transfercommandtoLCM=============== mand(intdata1){} transferdatatoLCMvoidtransfer_data(intdata1){}void{ //EXT1=0,EXT0=0,表示選擇了“擴(kuò)展指令表 //LCD //EXT1=0,EXT0=0,表示選擇了“擴(kuò)展指令表 址設(shè) //結(jié)束頁(yè)地址 每4行為一頁(yè),第0~3行為第0頁(yè),第124~127行為第31頁(yè) //列地址設(shè)置 //起始列地址:XS=0 //數(shù)據(jù)格式選擇,0x0C是低位D0-D7,0x08是D7- //N行反顯:Nline=off //顯示模 //如果設(shè)為0x11:表示選擇4灰度級(jí)模式,如果設(shè)為0x10:表示選擇黑白模 //設(shè)置對(duì)比度,“0x81”不可改動(dòng),緊跟著的2個(gè)數(shù)據(jù)是可改的,但“先微調(diào)后粗調(diào)”這 //對(duì)比度微調(diào),可調(diào)范圍0x00~0x3f,共64{{ //對(duì)比度粗調(diào),可調(diào)范0x00~0x078 //Power //D0=regulator;D1=follower;D3=booste,on:1off:0 //打開(kāi)顯}voidlcd_address(intx,inty,x_total,y_total){x=x-y=y-mand(0x15);//SetColumnmand(0x75);//SetPageAddresstransfer_data(y+y_total-}/*清屏void{inti,j;{{}}}//寫入一組16x16點(diǎn)陣的漢字字符串(字符串表格中需含有此字//括號(hào)里的參數(shù):(頁(yè),列,漢字字符串voiddisplay_string_16x16(ucharcolumn,ucharpage,uchar{uchari,j,k;while(text[j]!=while(Chinese_text_16x16[i]>0x7e){if(Chinese_text_16x16[i]=={if(Chinese_text_16x16[i+1]=={}}i}if(address{{{}}}{
j{{}}}}//顯示8x16的點(diǎn)陣的字符串,括號(hào)里的參數(shù)分別為(頁(yè),列,字符串指針voiddisplay_string_8x16(ucharcolumn,ucharpage,ucharreverse,ucharuchardata1;{{{{elsedata1=ascii_table_8x16[j][k+8*n];}
elsetransfer_data(0xff);}
}}//顯示一5x8的字//括號(hào)里的參數(shù)分別為(頁(yè),列,是否反顯,數(shù)據(jù)指針voiddisplay_string_5x8(uintcolumn,uintpage,ucharreverse,uchar{{{{ elsedata1=ascii_table_5x8[j][k];} elsetransfer_data(0x00);}}}voiddisp_32x32(intx,inty,uchar*dp){inti,j;{{}}}/*顯示196*96點(diǎn)陣的圖像voiddisp_192x96(intx,inty,char{inti,j;{{}}}/****送指令到晶聯(lián)訊字庫(kù) mand_to_ROM(uchardatu{uchari;Rom_IN=}}
Rom_IN=0;datu=datu<<1;staticucharget_data_from_ROM(){uchar{if(Rom_OUT}}//從指定地址讀出數(shù)據(jù)寫到液晶屏指定(page,column)voidget_and_write_16x16(ulongfontaddr,ucharcolumn,uchar{uchari,j,disp_data;Rom_CS=0;mand_to_ROM((fontaddr&0xff0000)>>16);//地址的824 //地址的824 //地址的824for(i=0;i<16;i++{ //寫數(shù)據(jù)LCD1后列}}}//從指定地址讀出數(shù)據(jù)寫到液晶屏指定(page,column)voidget_and_write_8x16(ulongfontaddr,ucharcolumn,uchar{uchari,j,disp_data;Rom_CS=0;mand_to_ROM((fontaddr&0xff0000)>>16);//地址的824 //地址的824 //地址的824{for(i=0;i<8;i++{ //寫數(shù)據(jù)LCD1后列}}}ulongvoiddisplay_GB2312_string(ucharcolumn,ucharpage,uchar{uchari=0,temp1,temp2;{if(((text[i]>=0xb0){//國(guó)標(biāo)簡(jiǎn)體(GB2312)漢字在晶聯(lián)訊字庫(kù)IC中的地址由//Address=((MSB-0xB0)*94+(LSB-0xA1)+846)*32+//由于擔(dān)心8位單片機(jī)有乘法溢出問(wèn)題,所以分三部fontaddr=(text[i]-fontaddr+=(text[i+1]-0xa1)+846;fontaddr=(ulong)(fontaddr*32); if{//自動(dòng)換行,當(dāng)遇到奇數(shù)個(gè)字母或符號(hào)就提前8//設(shè)成符>256時(shí)當(dāng)有奇數(shù)個(gè)字符時(shí)就會(huì)顯半個(gè)漢字,因?yàn)橐粋€(gè)字符只占8個(gè)點(diǎn)(一個(gè)字節(jié)if}}elseif(((text[i]>=0xa1){//國(guó)標(biāo)簡(jiǎn)體(GB2312)15x16點(diǎn)的字符在晶聯(lián)訊字庫(kù)IC中的地址由以//Address=((MSB-0xa1)*94+(LSB-0xA1))*32+//由于擔(dān)心8位單片機(jī)有乘法溢出問(wèn)題,所以分三部fontaddr=(text[i]-0xa1)*94;fontaddr+=(text[i+1]-0xa1);fontaddr=(ulong)(fontaddr*32); if{//自動(dòng)換行,當(dāng)遇到奇數(shù)個(gè)字母或符號(hào)就提前8//設(shè)成符>128時(shí)當(dāng)有奇數(shù)個(gè)字符時(shí)就會(huì)顯半個(gè)漢字,因?yàn)橐粋€(gè)字符只占8個(gè)點(diǎn)(一個(gè)字節(jié)if}}elseif((text[i]>=0x20){fontaddr=(text[i]-fontaddr=(unsignedfontaddr=(unsignedget_and_write_8x16(fontaddr,column,page);//從指定地址讀出數(shù)據(jù)寫到液晶屏指定(page,column)座標(biāo)中if{//自動(dòng)換行,當(dāng)遇到奇數(shù)個(gè)字母或符號(hào)就提前8//設(shè)成符>128時(shí)當(dāng)有奇數(shù)個(gè)字符時(shí)就會(huì)顯半個(gè)漢字,因?yàn)橐粋€(gè)字符只占8個(gè)點(diǎn)(一個(gè)字節(jié)if}}}}
voidmain{ //對(duì)液晶模塊進(jìn){display_GB2312_string(1,5,"GB2312簡(jiǎn)體字庫(kù)及圖型功能");display_GB2312_string(1,7,"16X16體漢8X16display_GB2312_string(1,9,"陣ASCII,或5X7ASCII碼");display_GB2312_string(1,11,"8x16624 //顯示一192*96點(diǎn)陣的 }}ucharcode{"市晶聯(lián)訊電子ucharcode{/*--文字:深--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:圳--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:市--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:晶--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:聯(lián)--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:訊--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:電--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:子--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:有--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:限--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:公--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 /*--文字:司--/*--新宋體12;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高=16x16 ucharcode/*--文字:晶--/*--新宋體23;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高 --/*--高度不是8的倍數(shù),現(xiàn)調(diào)整為:寬度x高度=32x32*/ucharcode/*--文字:聯(lián)--/*--新宋體23;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高 --/*--高度不是8的倍數(shù),現(xiàn)調(diào)整為:寬度x高度=32x32*/ucharcode/*--文字:訊--/*--新宋體23;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高 --/*--高度不是8的倍數(shù),現(xiàn)調(diào)整為:寬度x高度=32x32*/ucharcode/*--文字:電--/*--新宋體23;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高 --/*--高度不是8的倍數(shù),現(xiàn)調(diào)整為:寬度x高度=32x32*/ucharcode/*--文字:子--/*--新宋體23;此字體下對(duì)應(yīng)的點(diǎn)陣為:寬x高 --/*--高度不是8的倍數(shù),現(xiàn)調(diào)整為:寬度x高度=32x32*/ucharcode/*--調(diào)入了一幅圖像:G:\WORK\記錄文檔\\19296點(diǎn)陣\19296G-690.bmp--/*--寬度x高度=192x96--*/ucharcode//粗體8x16ASCII碼的點(diǎn)陣數(shù)據(jù),從"JLX-GB2312"型號(hào)的字庫(kù)IC中讀出來(lái)的國(guó) ASCII//-//-//-//-//-//-//-//-//- ASCII//-//-//--//-//-//- ASCII//-//-//-//-ASCII//-//-//-//-//-//-//-//-//-//-ASCII//-//-//-ASCII//-//-//-//-//-//-//-ASCII//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-ASCII//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-//-0x08,0x0C,0x04,0x0C,0x08,0x0C,0x04,0x00,0x00,0x00,0x00,0x00, //- ASCIIucharcode/*全體ASCII列表:5x8點(diǎn)陣*/0x00,0x00,0x00,0x00,0x00,//-- 0x00,0x00,0x4f,0x00,0x00,//-0x00,0x07,0x00,0x07,0x00,//-0x14,0x7f,0x14,0x7f,0x14,//-0x24,0x2a,0x7f,0x2a,0x12,//-0x23,0x13,0x08,0x64,0x62,//-0x36,0x49,0x55,0x22,0x50,//-0x00,0x05,0x07,0x00,0x00,//-0x00,0x1c,0x22,0x41,0x00,//-0x00,0x41,0x22,0x1c,0x00,//-0x14,0x08,0x3e,0x08,0x14,//-0x08,0x08,0x3e,0x08,0x08,//-0x00,0x50,0x30,0x00,0x00,//-0x08,0x08,0x08,0x08,0x08,//--0x00,0x60,0x60,0x00,0x00,//-0x20,0x10,0x08,0x04,0x02,//-0x3e,0x51,0x49,0x45,0x3e,//-0x00,0x42,0x7f,0x40,0x00,//-0x42,0x61,0x51,0x49,0x46,//-0x21,0x41,0x45,0x4b,0x31,//-0x18,0x14,0x12,0x7f,0x10,//-0x27,0x45,0x45,0x45,0x39,//-0x3c,0x4a,0x49,0x49,0x30,//-0x01,0x71,0x09,0x05,0x03,//-0x36,0x49,0x49,0x49,0x36,//-0x06,0x49,0x49,0x29,0x1e,//-0x00,0x36,0x36,0x00,0x00,//-0x00,0x56,0x36,0x00,0x00,//-0x08,0x14,0x22,0x41,0x00,//-0x14,0x14,0x14,0x14,0x14,//-0x00,0x41,0x22,0x14,0x08,//-0x02,0x01,0x51,0x09,0x06,//-0x32,0x49,0x79,0x41,0x3e,//-0x7e,0x11,0x11,0x11,0x7e,//-0x7f,0x49,0x49,0x49,0x36,//-0x3e,0x41,0x41,0x41,0x22,//-0x7f,0x41,0x41,0x22,0x1c,//-0x7f,0x49,0x49,0x49,0x41,//-0x7f,0x09,0x09,0x09,0x01,//-0x3e,0x41,0x49,0x49,0x7a,//-0x7f,0x08,0x08,0x08,0x7f,//-0x00,0x41,0x7f,0x41,0x00,//-0x20,0x40,0x41,0x3f,0x01,//-0x7f,0x08,0x14,0x22,0x41,//-0x7f,0x40,0x40,0x40,0x40,//-0x7f,0x02,0x0c,0x02,0x7f,//-0x7f,0x04,0x08,0x10,0x7f,//-0x3e,0x41,0x41,0x41,0x3e,//-0x7f,0x09,0x09,0x09,0x06,//-0x3e,0x41,0x51,0x21,0x5e,//-0x7f,0x09,0x19,0x29,0x46,//-0x46,0x49,0x49,0x49,0x31,//-0x01,0x01,0x7f,0x01,0x01,//-0x3f,0x40,0x40,0x40,0x3f,//-0x1f,0x20,0x40,0x20,0x1f,//-0x3f,0x40,0x38,0x40,0x3f,//-0x63,0x14,0x08,0x14,0x63,//-0x07,0x08,0x70,0x08,0x07,//-0x61,0x51,0x49,0x45,0x43,//-0x00,0x7f,0x41,0x41,0x00,//-0x02,0x04,0x08,0x10,0x20,//-0x00,0x41,0x41,0x7f,0x00,//-0x04,0x02,0x01,0x02,0x04,//-0x40,0x40,0x40,0x40,0x40,//-0x01,0x02,0x04,0x00,0x00,//-0x20,0x54,0x54,0x54,0x78,//-0x7f,0x48,0x48,0x48,0x30,//-0x38,0x44,0x44,0x44,0x44,//-0x30,0x48,0x48,0x48,0x7f,//-0x38,0x54,0x54,0x54,0x58,//-0x00,0x08,0x7e,0x09,0x02,//-0x48,0x54,0x54,0x54,0x3c,//-0x7f,0x08,0x08,0x08,0x70,//-0x00,0x00,0x7a,0x00,0x00,//-0x20,0x40,0x40,0x3d,0x00,//-0x7f,0x20,0x28,0x44,0x00,//-0x00,0x41,0x7f,0x40,0x00,//-0x7c,0x04,0x38,0x04,0x7c,//-0x7c,0x08,0x04,0x04,0x78,//-0x38,0x44,0x44,0x44,0x38,//-0x7c,0x14,0x14,0x14,0x08,//-0x08,0x14,0x14,0x14,0x7c,//-0x7c,0x08,0x04,0x04,0x08,//-0x48,0x54,0x54,0x54,0x24,//-0x04,0x04,0x3f,0x44,0x24,//-0x3c,0x40,0x40,0x40,0x3c,//-0x1c,0x20,0x40,0x20,0x1c,//-0x3c,0x40,0x30,0x40,0x3c,//-0x44,0x28,0x10,0x28,0x44,//-0x04,0x48,0x30,0x08,0x04,//-0x44,0x64,0x54,0x4c,0x44,//-0x08,0x36,0x41,0x41,0x00,//-0x00,0x00,0x77,0x00,0x00,//-0x00,0x41,0x41,0x36,0x08,//-0x04,0x02,0x02,0x02,
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 施工企業(yè)2025年春節(jié)節(jié)后復(fù)工復(fù)產(chǎn)工作專項(xiàng)方案 (合計(jì)3份)
- 下午考前囑咐囑咐什么?發(fā)言提綱
- 古詩(shī)文初賽答案(正稿)
- 《電路原理圖繪制》課件
- 傳統(tǒng)服飾設(shè)計(jì)師職責(zé)概述
- 鋼鐵結(jié)構(gòu)設(shè)計(jì)師職責(zé)說(shuō)明
- 煤炭行業(yè)美工工作總結(jié)
- 特需科護(hù)士工作總結(jié)
- 財(cái)務(wù)工作資金管理總結(jié)
- 專業(yè)技能與教研水平
- 人教部編版三年級(jí)語(yǔ)文上冊(cè)古詩(shī)詞日積月累默寫模板
- 高危急性胸痛的快速診斷和誤診病案分析
- (完整版)綜合醫(yī)院康復(fù)醫(yī)學(xué)科建設(shè)與管理指南
- GB/T 41649-2022木制玩具中甲醛釋放量的測(cè)定燒瓶法
- JJF 1384-2012開(kāi)口/閉口閃點(diǎn)測(cè)定儀校準(zhǔn)規(guī)范
- GB/T 33720-2017LED照明產(chǎn)品光通量衰減加速試驗(yàn)方法
- 教師政治紀(jì)律方面存在的問(wèn)題及整改措施集合5篇 教師政治紀(jì)律方面存在的問(wèn)題及整改措施怎么寫
- GB/T 16552-2017珠寶玉石名稱
- GB/T 14982-2008粘土質(zhì)耐火泥漿
- GB 15618-1995土壤環(huán)境質(zhì)量標(biāo)準(zhǔn)
- Unit4 Video time 課件-高中英語(yǔ)人教版(2019)選擇性必修第一冊(cè)
評(píng)論
0/150
提交評(píng)論