📄 基于arm7的gpio口的使用(lcd1602液晶模块) - 技术文章 - 嵌入式交流网.htm
字号:
<P>void Delayms(unsigned int
count)<BR>{<BR> unsigned int
i;<BR> for(i=0;i<count;i++);<BR>}</P>
<P>void WriteCommand(unsigned char
Com)<BR>{<BR> IO0CLR=E;<BR>
IO0CLR=RS;IO0CLR=RW;IO0SET=E;<BR>
IO0CLR=0x000000ff;IO0SET=Com;<BR>
IO0CLR=E; IO0CLR=RS;IO0CLR=RW;<BR>}</P>
<P>void WriteData(unsigned char
Dat)<BR>{<BR> IO0CLR=E;<BR>
IO0SET=RS; IO0CLR=RW;IO0SET=E;<BR>
IO0CLR=0x000000ff;IO0SET=Dat;<BR>
IO0CLR=E; IO0CLR=RS;IO0CLR=RW;<BR>}</P>
<P>void
Init()<BR>{<BR> Delayms(1000);<BR> WriteCommand(0x38);<BR> Delayms(400);<BR> WriteCommand(0x38);<BR> Delayms(400);<BR> WriteCommand(0x38);<BR> Delayms(2800);<BR> WriteCommand(0x38);<BR> Delayms(2800);<BR> WriteCommand(0x08);<BR> Delayms(2800);<BR> WriteCommand(0x01);<BR> Delayms(2800);<BR> WriteCommand(0x06);<BR> Delayms(2800);<BR> WriteCommand(0x0C);<BR>}</P>
<P>void Show_Text(char *Text,char
row)<BR>{<BR> unsigned char
i;<BR> if(row==0)<BR> {<BR> WriteCommand(0x80);<BR> Delayms(2800);<BR> for(i=0;i<strlen(Text);i++)<BR> {<BR> WriteData(Text[i]);<BR> Delayms(2800);<BR> } <BR> }<BR> else<BR> {<BR>
WriteCommand(0xC0);<BR> Delayms(2800);<BR> for(i=0;i<strlen(Text);i++)<BR> {<BR> WriteData(Text[i]);<BR> Delayms(2800);<BR> }<BR> }<BR>}</P>
<P>void
main()<BR>{<BR>
PINSEL0=0x00000000;<BR>
IO0DIR =0xffffffff;<BR> char
Text1[16]="<NIOS II on
DE2>";<BR> char Text2[16]="Nice to See
You!";<BR> Init();<BR> while(1)<BR> {<BR> Show_Text(Text1,0);<BR> Show_Text(Text2,1);<BR> }<BR>}<BR></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>
<SCRIPT language=javascript id=jsDOC src=""
type=text/javascript></SCRIPT>
<TABLE height=20 cellSpacing=0 cellPadding=0
width="95%">
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#eaeaea
height=1></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><IMG height=78
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/img04.jpg"
width=771></TD></TR></TBODY></TABLE>
<TABLE height=50 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle height=110>
<TABLE class=webpb cellSpacing=0 cellPadding=0 width="100%" align=center
border=0>
<TBODY>
<TR>
<TD height=3></TD></TR>
<TR>
<TD style="LINE-HEIGHT: 180%" align=middle width="100%">
<P><SPAN align="center">版权所有(c) 2008-2018
嵌入式交流网<BR>地址:广东南山区科技园高新公寓1栋 联系人:刘启明</SPAN><SPAN
align="center"><BR>电话: 13662238940 E-mail: phosphor88@yahoo.cn QQ:
57240649</SPAN></P><BR>本站由<<A title=国内优秀在线自助建站系统,让你免费拥有专业网站!
href="http://www.any2000.com/"
target=_blank>无忧建站网</A>>提供技术支持<BR><A
title=如发现非法网站(如色情,六合彩,诈骗,邪教迷信),请举报!
href="http://armembed.any2000.com/perweb/jubao.asp"
target=_blank><IMG
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/jubao.gif"
border=0></A></TD></TR>
<TR>
<TD height=3></TD></TR></TBODY></TABLE>
<DIV style="DISPLAY: none">
<SCRIPT language=JavaScript
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/stat.htm"
charset=gb2312></SCRIPT>
</DIV>
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center border=0>
<TBODY>
<TR>
<TD height=3></TD></TR>
<TR>
<TD bgColor=#cc3300 colSpan=2 height=1></TD></TR>
<TR>
<TD align=middle bgColor=#ffffff>
<P style="MARGIN-TOP: -1px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 0px"
align=center><IFRAME marginWidth=0 marginHeight=0 src="about:blank"
frameBorder=0 width=758 scrolling=no height=73
bordercolor="#000000"></IFRAME></P></TD></TR>
<TR>
<TD bgColor=#cc3300 colSpan=2 height=1></TD></TR></TBODY></TABLE>
<SCRIPT language=JScript
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/adtest.js"></SCRIPT>
<TABLE height=64 cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR height=1>
<TD></TD></TR>
<TR>
<TD id=baiduad align=middle width=128 thisusername="armembed"
thisadSign="xuedeziUnionAd"><A title=无忧企商服务网、企业自助建站、网站建设
href="http://www.5uweb.com.cn/" target=_blank><IMG
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/5uweb.gif"
border=0></A> <IFRAME marginWidth=0 marginHeight=0
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/sogou.htm"
frameBorder=0 width=0 scrolling=no height=0
bordercolor="#000000"></IFRAME></TD>
<TD id=weifang align=middle width=128 thisusername="armembed"
thisadSign="xuedeziUnionAd"><A title=山东潍坊化工信息网
href="http://www.weifangchem.cn/" target=_blank><IMG
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/weifang.jpg"
border=0></A></TD>
<TD id=jx263net align=middle width=128 thisusername="armembed"
thisadSign="xuedeziUnionAd"><A title=南昌装修,南昌装饰,南昌装修公司,南昌装饰公司
href="http://www.bt816.com/" target=_blank><IMG
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/bt816.gif"
border=0></A></TD>
<TD id=tz816 align=middle width=128 thisusername="armembed"
thisadSign="xuedeziUnionAd"><A title=CAD图纸,机械图纸,求购图纸,图纸交易网
href="http://www.tz816.com/" target=_blank><IMG
src="基于ARM7的GPIO口的使用(LCD1602液晶模块) - 技术文章 - 嵌入式交流网.files/tz816.gif"
border=0></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -