5-LCD1602液晶驱动程序

5-LCD1602液晶驱动程序

ID:43050249

大小:157.29 KB

页数:16页

时间:2019-09-24

5-LCD1602液晶驱动程序_第1页
5-LCD1602液晶驱动程序_第2页
5-LCD1602液晶驱动程序_第3页
5-LCD1602液晶驱动程序_第4页
5-LCD1602液晶驱动程序_第5页
资源描述:

《5-LCD1602液晶驱动程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、5-LCD1602液晶驱动程序kIzx£^six>1^^lxsl^>lxkIzX7XZTSXTX^TxXTSz?sz

2、s^Tx^Txxfs^TsZ7SzTs^Txx

3、s^7xzlsZTXZT^z?szTs^TxXTSX7XzlsXTXZT^^Tszls>lz>lz>lz>lx>lx>lxXT^XTXXTS^TXXT^X

4、s✓JxXT^#7S^

5、SXlXXjX^J>XTSX

6、X^TXXjX//LCD1602drivermoduleprogram,whichcanbedisplayednormally,

7、STC89C52singlechip,11.0592MHZvibrationfrequency//itsdefinitionisasfollows://sbitRS=P20;//registerselection,whichdefinestheRSbitasP2・0pins//sbitRW=P21;//readandwriteselectbits,whichdefinetheRWbitasP2.1//sbitE二P2八2;//enablethesignalbitanddefineEbitasP2.2

8、//sbitBF=P07;//busymarker,whichdefinestheBFbitasP0.7wlz>lzxjs✓TxXT^XTXxjsXjs

9、xXTXXJXXTSX

10、Sx

11、xXTXXJXx

12、sxjxs^K^s^^>✓Tx^x^>^x^x^>^>^ix#include//containingtheheaderfileofthesingle-chipregister#include//containstheheaderfiledefinedb

13、ythe_nop_()function#defineucharunsignedchar#defineuintunsignedintSbitRS二P2八0;//registerselection,whichdefinestheRSbitasP2.0pinsSbitRW二P2八1;//readandwriteselectbits,whichdefinetheRWbitasP2.1SbitE二P2八2;//enablethesignalbitanddefineEbitasP2.2SbitBF=P07;//

14、busymarker,whichdefinestheBFbitasP0.7Unsignedcharcodestring[]二{〃1602让-codeTEST〃};Unsignedcharcodestringl[]二{〃testBEHAPPY〃};"二二二LCD1602functiondefinitionssection==========>1^sl^>1^>1^#T^#Tx#TxFunction:delayIms*>£^>1^>1^>1^>1^>1^#Tx#Tx#Tx✓Jx#Tx#T^#T^Void

15、delay1ms(void)UnsignedcharI,J;For(I=0;I<10;I+)For(j0;j<33;j+)sl^slz#rsr^^Tx>r^^7%>r^^Tx#rxi>k{>k{>k{xv]>k{>#T^#TxFunction:adelayofseveralmillisecondsEntranceparameters:n*^X^^lz>1^/^7^/Voiddelay(unsignedcharn){UnsignedcharI;For(I=0;I

16、lay1ms();}/>lz>1^>£^>1^>1^>1^>1^>1^>1^>1^>£^>lz>1^>1^%£^>lz>1^>1^^7%^T>#T^#T^#Tx#Tx#r^#T^#Tx#T^#7%#T^k{>k{xv]>k{>#T^#TxFunction:todeterminethebusystateoftheliquidcrystalmoduleThereturnvalue:theresult・Result二1,busy;Result二0,notbusy<

17、r^r^>r^>T^>T^^r<#r^>Tx^7%r^>Tx^r

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。