資源描述:
《12864基本顯示程序》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在工程資料-天天文庫。
1、12864基本顯示程序kIzkIz>1^xl^sl^xl^kIzxlxX7XZlxXTXXTX^¥SZjSXTSXTXZTX^TX^TSZ?S^
2、SZTX^TSX7XZTS^TX^TXX7SXTSZIXXTSX7XZTXXTX^
3、S>£^>2<>lx>lz%lxsixX
4、s^Ts^TS^TS^TSXTXXTXXTXXTXXTXXTXXTXXTXExperimentname:12864baseProgramdescription:displayingChinesecharactersonthe12864LCDpanelAuthor:zhangweiClass:class11mo
5、tivationalclassDate:2013-5-12Thecopyrightofyibincollegeiscopyrighted>lx>lz>lzx
6、xXTXXTX^TSZTXX
7、S^TXxTxx
8、x^Jx^TS>lz>lz>lz>lz%lx^lx>lz>lx>lxxjs^TSX
9、SXT^XTXXTXXTXXTXXTXx
10、x#inelude#clefineucharunsignedchar#clefineuintunsignedint#clefineP0//defineadataport>lz>lx>lz^1<>lzx
11、xXTXXTX^TSZTXX
12、
13、S^Js^TXxTxx
14、x^Jx^TS>lz>lx>lz^1<>lzx
15、xXTXXTX^
16、S^TSZTXX
17、S^Js^J>^Js^TXxTx^J>x
18、x^Jx^TS/**/definestheinterfaceinformation>1^>1^>lz>1^^7%#7^r^lz>1^sl^%lz>1^>1^%£^>1^>1^>1^>lz>1^v]>"卜#r^^T%#T^v]>^J>"卜#r^^T%#T^SbitLCDRS二P20;//command0,data1selectionSbitLCDEN二P22;SbitLCD
19、RW二P21;SbitLCDRSB二P23;//serial0,parallel1selectionSbitRST二P25;//reset#r^^7^r^1^Voiddelay(uintm)UintI,j;For(I二0;I;j--);}/*transferdataorcommand,whenDI二0i
20、s,passthecommand,whenDI=1,transferthedataVoidlcd_wdat(uchardatal,bitDI)LCD_RW二0;LCD_RS二DI;Delay(1);PDIR=datal;LCD_EN二1;Delay(1);LCD_EN二0;}^7%#7^v]>v{>^Tx*****//*LCDinitialization>1^sl^>1^>1^#T%#T^v{>v]>v{>^Tx*****/>lz%£^>lz>1^>lz>1^>lz>1^>1^#T^^7%#7%#Tx^T%#7^#T^yr^#7%>lz%£^>lz>1^>lz>1^>£^>l
21、z>1^>1^#T^^7%>r^#7%#Tx^T%#7^#T^yr^#7%character*/#T^^TX#T%>1^^TX^TS#TS<1^^7%>1^>lz%£^>lz>1^>lz>1^>£^>lz>1^>1^#T^^7%>r^#7%#Tx^rx^T%#7^#T^yr^#7%Voidlcd_init()LCDRSB二1;//choosetoworkinparallelRST二0;//resetDelay(1);//delaywaitingforresetRST二1;Lcd_wdat(0x30,0)theaddresscounterisreturnedtoOOh.Dela
22、y(100);cursor,Lcd_wdat(0x08,0);//fullscreendisplay,Delay(100);Lcd_wdat(0xlO,0);Delay(100);XOclcd_wdat(0,0);//setthefullscreendisplayDelay(100);Lcdwdat(0xOl,0);//clearscreenDelay(100);X06lcdwdat(0,0);Delay(100);>t^>1^>t^>1^#7^^7s^
23、syj%#7^yj^^Tsk^v{>k]>v{>