📄 1602 lcd显示实验.htm
字号:
align=left border=0></A><BR></P>
<P> </P>
<P> </P>
<P> </P>
<P>比如第二行第一个字符的地址是40H,那么是否直接写入40H就可以将光标定位在第二行第一个字符的位置呢?这样不行,因为写入显示地址时要求最高位D7恒定为高电平1所以实际写入的数据应该是01000000B(40H)+10000000B(80H)=11000000B(C0H)
</P>
<P><IMG
src="1602 LCD显示实验.files/200542812711112.gif"
onload=resizepic(this) border=0
onmousewheel="return bbimg(this)"><BR><BR></P></DIV>
<DIV align=left>RS EQU P3.7 <BR>RW EQU P3.6 <BR>E EQU
P3.5<BR>mov p3,#0ffh <BR>MOV P1,#01H ;清除屏幕<BR>ACALL
ENABLE <BR>MOV P1,#38H ;8位点阵<BR>ACALL ENABLE <BR>MOV
P1,#0FH ;开显示<BR>ACALL ENABLE <BR>MOV P1,#06H
;移动光标<BR>ACALL ENABLE <BR>MOV P1,#80H ;显示位置 <BR>ACALL
ENABLE <BR>l3: mov p1,#01h <BR>acall enable<BR>mov
dptr,#table1 ;送第一句话<BR>call write1<BR>call enable<BR>MOV
P1,#0C0H ;写入显示起始地址(第二行第一个位置)<BR>ACALL ENABLE
;调用写入命令子程序<BR>call write1<BR>call enable<BR>mov
p1,#01h<BR>call delay1<BR>call delay1<BR>call
delay1<BR>jmp l3</DIV>
<DIV align=left>ENABLE: ;送命令<BR>CLR RS<BR>CLR RW <BR>CLR
E <BR>ACALL DELAY <BR>SETB E <BR>RET<BR>write1:
;送字符串<BR>mov r1,#00h<BR>a1:mov a,r1<BR>movc
a,@a+dptr<BR>call write2<BR>inc r1<BR>cjne a,#00h,a1
;以00H做字符串结束标志<BR>ret<BR>write2: ;送单个字符<BR>mov
p1,a<BR>setb rs<BR>clr rw<BR>clr e<BR>call delay<BR>setb
e<BR>ret <BR>delay: ;延时子程序<BR>mov r7,#255<BR>d1:mov
r6,#255 <BR>d2:djnz r6,d2<BR>djnz
r7,d1<BR>ret<BR>delay1:<BR>mov r7,#255<BR>delay2:mov
r6,#255<BR> djnz
r6,$<BR> djnz
r7,delay2<BR>ret<BR>;以下每个表格都是一句话,以00H作为每句话的结尾.<BR>table1:
db
20h,20h,20h,57h,45h,4ch,43h,4fh,4dh,45h,20h,54h,4fh,20h,20h,20h,20h,00h<BR>table2:
db
20h,57h,57h,57h,2Eh,4dh,43h,55h,39h,39h,2Eh,43h,4Fh,4Dh,20h,20h,20h,00h
<BR>end</DIV>
<DIV align=center> </DIV>
<DIV align=center> </DIV>
<DIV align=center> </DIV>
<DIV align=center><IMG
style="WIDTH: 360px; HEIGHT: 368px" height=368 alt=""
src="1602 LCD显示实验.files/200542812711784.jpg"
width=700 onload=javascript:resizepic(this)
border=undefined
onmousewheel="return bbimg(this)"></DIV>
<P></P>
<P align=center><FONT
color=red><B>[1]</B></FONT></P></DIV></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#f6f6f6 colSpan=2>
<TABLE
style="BORDER-TOP: #51637b 1px solid; BORDER-BOTTOM: #51637b 1px solid"
height=50 cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff><IMG
src="1602 LCD显示实验.files/aer.gif"> 上一篇文章: <A
title="文章标题:串、并行口针脚的定义 作 者:佚名 更新时间:2005-4-28 1:25:58 点击次数:33"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1279">串、并行口针脚的定义</A>
<BR><IMG
src="1602 LCD显示实验.files/aer.gif"> 下一篇文章: <A
title="文章标题:GMM在机械电子工程中的应用研究现状 作 者:佚名 更新时间:2005-4-28 1:35:39 点击次数:86"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1288">GMM在机械电子工程中的应用研究现状</A>
</TD></TR></TBODY></TABLE></TD></TR>
<TR align=right>
<TD colSpan=2 height=20>【<A
href="http://www.robotsky.com/Article_Comment.asp?ArticleID=1280"
target=_blank>发表评论</A>】【<A
href="http://www.robotsky.com/SendMail.asp?ArticleID=1280"
target=_blank>告诉好友</A>】【<A
href="http://www.robotsky.com/Article_Print.asp?ArticleID=1280">打印此文</A>】【<A
href="javascript:window.close();">关闭窗口</A>】</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD background=1602 LCD显示实验.files/homedhbg.gif
height=34><IMG
src="1602 LCD显示实验.files/xgwz.gif"></TD></TR></TBODY></TABLE></TD>
<SCRIPT language=JavaScript
src="1602 LCD显示实验.files/news.htm"
type=text/JavaScript> </SCRIPT>
<IFRAME name=union163com align=center marginWidth=0
marginHeight=0 src="1602 LCD显示实验.files/CAS5AN8F.aspx"
frameBorder=0 width=760 scrolling=no height=20></IFRAME>
<TR>
<TD vAlign=top height=40>
<TABLE height="100%" cellSpacing=5 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top>
<LI><A
title="文章标题:GMM在机械电子工程中的应用研究现状 作 者:佚名 更新时间:2005-4-28 1:35:39 点击次数:86"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1288">GMM在机械电子工程中的应用研究现状</A>[<FONT
color=red>86</FONT>]<BR>
<LI><A
title="文章标题:生物谷评论:人工生命能否真正实现? 作 者:佚名 更新时间:2005-4-28 1:34:15 点击次数:40"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1286">生物谷评论:人工生命能否真正实现?</A>[<FONT
color=red>40</FONT>]<BR>
<LI><A
title="文章标题:基于计算智能技术的产品敏捷开发系统研究 作 者:佚名 更新时间:2005-4-28 1:31:28 点击次数:59"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1285">基于计算智能技术的产品敏捷开发系统研究</A>[<FONT
color=red>59</FONT>]<BR>
<LI><A
title="文章标题:智能制造系统适应21世纪敏捷制造生产模式 作 者:佚名 更新时间:2005-4-28 1:30:59 点击次数:53"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1284">智能制造系统适应21世纪敏捷制造生产模式</A>[<FONT
color=red>53</FONT>]<BR>
<LI><A
title="文章标题:安全钻探新途径——交流变频调速动力系统应用前景展望 作 者:佚名 更新时间:2005-4-28 1:30:08 点击次数:47"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1283">安全钻探新途径——交流变频调速动力系统应用前景展望…</A>[<FONT
color=red>47</FONT>]<BR></LI></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top colSpan=4>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="23%"
background=1602 LCD显示实验.files/homedhbg.gif><IMG
height=34 src="1602 LCD显示实验.files/wzpl.gif"
width=173></TD>
<TD width="77%"
background=1602 LCD显示实验.files/homedhbg.gif
height=34><STRONG> </STRONG>(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#f6f6f6>
<TABLE height="100%" cellSpacing=6 cellPadding=8 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top
bgColor=#ffffff> 没有任何评论
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER></DIV>
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0>
<TBODY>
<TR>
<TD bgColor=#cccccc height=1></TD></TR>
<TR>
<TD bgColor=#ffffff height=2></TD></TR>
<TR align=middle bgColor=#eeeeee height=22>
<TD>| <A
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.robotsky.com');"
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1280#">设为首页</A> | <A
href="http://www.robotsky.com/adv.asp"
target=_blank>广告服务</A> | <A
href="mailto:webmaster@robotsky.com">联系站长</A> | <A
href="http://www.robotsky.com/Free/DL.asp"
target=_blank>登陆大全</A> | <A
href="http://www.robotsky.com/Copyright.asp"
target=_blank>版权申明</A> | <A
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1280#">站点地图</A> | <A
href="http://www.robotsky.com/FriendSite.asp"
target=_blank>友情链接</A> | </TD></TR>
<TR>
<TD bgColor=#cccccc height=2></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD width="20%" height=70>
<TABLE cellSpacing=0 cellPadding=0 width="94%" border=0>
<TBODY>
<TR>
<TD style="BORDER-RIGHT: #cccccc 1px solid" align=middle
height=60><IMG height=56 src="1602 LCD显示实验.files/Logof.gif"
width=171></TD></TR></TBODY></TABLE></TD>
<TD width="73%">
<TABLE cellSpacing=0 cellPadding=0 width=542 border=0>
<TBODY>
<TR>
<TD vAlign=bottom colSpan=2><FONT color=#333333>版权所有 Copyright©
2004-2008</FONT> <A
href="http://www.robotsky.com/">RobotSky</A> <FONT
color=#333333> 程序核心:</FONT>动力空间</A>
<SCRIPT src="1602 LCD显示实验.files/count.php"></SCRIPT>
<SCRIPT src="1602 LCD显示实验.files/click.aspx"></SCRIPT>
</TD>
<TD width=114 rowSpan=2><IMG height=31
src="E:\Documents and Settings\朱江\桌面\1602\1602 LCD显示实验.files\logo(1).gif"
width=88></TD></TR>
<TR>
<TD vAlign=top align=left width=234>
<TABLE cellSpacing=0 cellPadding=0 width=230 border=0>
<TBODY>
<TR>
<TD width=230><FONT color=#333333>网站名称:<A
href="http://www.robotsky.com/">机器人天空</A></FONT></TD></TR>
<TR>
<TD><FONT color=#333333>网站备案:</FONT><A
href="http://www.miibeian.gov.cn/"
target=_blank>苏ICP备05026131号</A></A></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top width=194>
<TABLE cellSpacing=0 cellPadding=0 width=194 border=0>
<TBODY>
<TR>
<TD><FONT color=#333333> 友情合作:</FONT><A
href="http://www.eyuan.cn/">E园网</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width="7%"><A
href="http://www.robotsky.com/Article_Show.asp?ArticleID=1280#"><IMG
height=48 src="1602 LCD显示实验.files/top.gif" width=37
border=0></A></TD></TR></TBODY></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -