=0=~COM64X1~X64HD612034.Y1~Y128SEG1~SEGl28HD61202U2Y1~Y64HD61202Y65~Y1285./CS1/CS2CS1=1CS2=0U2U3CS1=0CS2=1U3U26.HD61202512ByteU2U31024Byte16.2128x641Vss2Vdd5V±5%3VO~18V19NC20NC16.3128x64128x64LCDLCDLCD16-2ELLED192016-3EL16-1EL/LED16-4128x64LCDMCULCDΩLCD2.64LCD3.5mW4.Vcc=5V±5%5.LCD=8~17V6.100(FP-100)7.HD6120316-6~17V9.100FP-10016.6HD61202=1D/I=1R/W=1E16.6.3=D/I=R/W=1EE16.6.4HD61202409664X6416-9~Y64YY/Y3FH16.6.66RAMLCD16.6.7ZZ6ZCLFRM16.6.8/“”“0”“”“”/16.6.916.6.10HD61202“”HD61202Busy“1”HD61202BusyDB7“0”16.6.11RAM/RAM16.7HD61202HD61202“Busy”“Busy”0HD61202HD61202HD61202HD61202I/O“Busy”1HD61202HD61202D/IHD61202I/O“Busy”HD61202“”HD61202──HD6120216.8~PAGE8Y16.8.1R/WD/IDB7DB6DB5DB4DB3DB2DB1DB0010011111DDD=1D=0DDRAM16.8.2xR/WD/IDB7DB6DB5DB4DB3DB2DB1DB00010111AAARAMXAAAX/XHD612028AAA0~7H1~816.8.3R/WD/IDB7DB6DB5DB4DB3DB2DB1DB010Busy0ON/OFFReset0000BusyHD61202Busy=1HD61202MCUBusy=0HD61202MCUON/OFFON/OFF=1ON/OFFResetReset=1HD61202Reset=0HD6120216.8.4R/WD/IDB7DB6DB5DB4DB3DB2DB1DB00011AAAAAAHD6120264AAAAAA0~3FH1~6416.8.5YR/WD/IDB7DB6DB5DB4DB3DB2DB1DB00001AAAAAAYAAAAAA=0~3FH1~64=-20~+75GND=0VVcc=2.7~5.5VETcyc1000--nsEPweh450--nsEPwel450--25nsETr--25nsETf--nsTas140--nsTah10--nsTdsw200--nsTddr--320nsTdhw10--ns(void)//lcd_busyLCM{//lcd_busyucharval;//RS_0;_NOP();//RW_1;_NOP();//DataPort=0x00;//LCM0while(1){//whileEN_1;_NOP();DDRA=0x00;//val=PINA;//LCMMCUif(val0x80)break;0x800LCMbreakwhileEN_0;_NOP();}//whileDDRA=0xff;EN_0;_NOP();//}//lcd_busy16.10.2LCMvoidwcode(ucharc,ucharsel_l,ucharsel_r)/*wcodeLCM*///csel_lsel_r{//wcodeif(sel_l==1)CS1_1;//sel_l1CS1LCMelseCS1_0;//CS1();if(sel_r==1)CS2_1;//sel_r1CS2LCMelseCS2_0;//CS2_NOP();lcd_busy();//LCMRS_0;_NOP();//RW_0;_NOP();//DataPort=c;//cLCMEN_1;_NOP();//EN_0;_NOP();//}//wcode16.10.3LCMvoidwdata(ucharc,ucharsel_l,ucharsel_r)/*wdataLCM*///csel_lsel_r{//wdataif(sel_l==1)CS1_1;//sel_l1CS1LCMelseCS1_0;//CS1_NOP();if(sel_r==1)CS2_1;//sel_r1CS2LCMelseCS2_0;//CS2_NOP();lcd_busy();//LCMRS_1;_NOP();//RW_0;_NOP();//DataPort=c;//cLCMEN_1;_NOP();//EN_0;_NOP();//}//wdata16.10.4voidset_startline(uchari)//set_startline//i{//set_startlinei=0xc0+i;//wcode(i,1,1);//LCM}//set_startline(ucharx,uchary)//set_xyxy//xy{//set_xyx=x+0x40;//xy=y+0xb8;//ywcode(x,1,1);//xLCMwcode(y,1,1);//yLCM}//set_xy16.10.6voiddison_off(ucharo)//dison_off//o{//dison_offo=o+0x3e;//o1o0wcode(o,1,1);//LCM//}//dison_off16.10.7voidreset()//reset{//resetRST_0;//Delay_nms(10);//RST_1;//Delay_nms(10);//}//reset16.10.8xyLCMvoidlw(ucharx,uchary,uchardd)//lwLCM//xydd{//lwif(x=64)//x64{set_xy(x-64,y);//x64wdata(dd,0,1);}//ddLCMelse//x64{set_xy(x,y);//(dd,1,0);}//ddLCM}//lw16.10.9voiddisplay_hz(ucharxx,ucharyy,ucharn,ucharfb)//display_hz//xxyynfb//xxyynnfb{//dhuchari,dx;//idxfor(i=0;i16;i++)//for{dx=hz[2*i+n*32];//nif(fb)dx=255-dx;//fb0lw(xx*8+i,yy,dx);//LCMdx=hz[(2*i+1)+n*32];//nif(fb)dx=255-dx;//fb0lw(xx*8+i,yy+1,dx);//LCM}//for}//display_hz