📄 mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.htm
字号:
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">PORTB</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">等)</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt 115.5pt; TEXT-INDENT: -115.5pt; mso-char-indent-count: -11.0"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">PINX:</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">输入引脚寄存器</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><SPAN
style="mso-spacerun: yes"><FONT
face="Times New Roman">
</FONT></SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">无论</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">DDRX:</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的设置如何,此寄存器都反应外部</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">IO</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">上的实际电平的高低(这个是大部分单片机没有的,有了这个寄存器可以实现真正的读</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">--</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">修改</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">--</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">写)</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt 115.5pt; TEXT-INDENT: -115.5pt; mso-char-indent-count: -11.0"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">DDRX:</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">方向寄存器</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><SPAN
style="mso-spacerun: yes"><FONT
face="Times New Roman">
</FONT></SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">为</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">1</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">时输出</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><SPAN
style="mso-spacerun: yes"><FONT
face="Times New Roman"> </FONT></SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">为</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">0</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">是输入(和</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">PIC</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">正好相反)</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">其中</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">X</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">为(</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">A B C D</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">)</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">在注意一下</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">IO</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">状态的设置,见</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">P68 </FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的表格;在读取</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">PINX</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的时候必要的时候要有一点延时后在读,参见</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">P69 </FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的图</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">从</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">P64 </FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">看到</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">P70 </FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">就行了,其它的暂时不看</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">看完了,</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">OK</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">,现在就用</SPAN><SPAN
lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman">CVAVR</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">来编写最小系统、流水灯、按键检测</SPAN><SPAN
style="mso-bidi-font-size: 10.5pt"><FONT
face="Times New Roman"> </FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的程序吧!要多动手哦!</SPAN><SPAN
lang=EN-US
style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt"></SPAN> </P></SPAN></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=3> </TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY class=seyle99>
<TR>
<TD>
<DIV align=right><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/archives/2008/28221.html#">阅读全文<SPAN
id=ob_logreaded></SPAN></A> | <A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/archives/2008/28221.html#cmt">回复(0)</A>
<SPAN id=ob_logm28221></SPAN>| <A
href="http://www.mcublog.com/blog/showtb.asp?id=28221"
target=_blank>引用通告<SPAN id=ob_tbnum></SPAN></A> | <A
href="http://www.mcublog.com/blog/user_post.asp?logid=28221"
target=_blank>编辑</A></DIV></TD></TR></TBODY></TABLE>
<TABLE height=14 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD
class=content5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<DIV id=blogaddon>
<LI>标签:<SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=33">AVR</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=485">mega8</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=80">单片机</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=5592">IO口</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=684">入门</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=5591">自学</A></SPAN> <SPAN><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/cmd.html?uid=16550&do=tag_blogs&id=5559">CVAVR</A></SPAN> </LI></DIV>
<DIV id=morelog>
<UL>
<LI>上一篇:<A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/archives/2008/28220.html">Mega8学习笔记(1)-------cocoguojia 原创</A>
<LI>下一篇:<A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/archives/2008/28222.html">Mega8学习笔记(3)-------cocoguojia 原创</A>
</LI></UL></DIV>
<DIV id=form_comment>
<DIV id=gg_usercomment></DIV><A name=cmt></A>
<DIV class=title>发表评论:</DIV>
<FORM id=commentform name=commentform
onsubmit="return Verifycomment()"
action=/blog/savecomment.asp?logid=28221 method=post>
<DIV class=d1><LABEL>昵称:<INPUT id=UserName maxLength=20
name=UserName></LABEL></DIV>
<DIV class=d2><LABEL>密码:<INPUT id=Password type=password
maxLength=20 name=Password> (游客无须输入密码)</LABEL></DIV>
<DIV class=d3><LABEL>主页:<INPUT id=homepage maxLength=50 size=42
value=http:// name=homepage></LABEL></DIV>
<DIV class=d4><LABEL>标题:<INPUT id=commenttopic maxLength=50 size=42
value=Re:Mega8学习笔记(2)-------cocoguojia 原创
name=commenttopic></LABEL></DIV>
<DIV class=d5><INPUT id=edit type=hidden name=edit>
<DIV id=oblog_edit>数据载入中...</DIV></DIV>
<DIV class=d6><SPAN id=ob_code></SPAN><INPUT onclick='oblog_edittext.createTextRange().execCommand("Copy");' type=submit value= 提 交 ></DIV></FORM></DIV></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top align=right width=205><IMG height=425 alt=""
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/index_04.jpg"
width=150></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=1004 border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#f4f4f4><IMG height=18 alt=""
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/index_16.jpg"
width=1004> </TD></TR></TBODY></TABLE><SPAN id=gg_userbot></SPAN>
<DIV id=powered><A href="http://www.mcublog.com/" target=_blank><IMG
alt="Powered by McuBLog."
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/mcublog_powered.gif"
border=0></A></DIV>
<SCRIPT
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/200805.htm"></SCRIPT>
<SCRIPT
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/count.htm"></SCRIPT>
<SCRIPT
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/commentedit.htm"></SCRIPT>
<SCRIPT
src="F:\download\mega8学习笔记\Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files\count(1).htm"></SCRIPT>
<SCRIPT src=""></SCRIPT>
<SCRIPT
src="Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files/ShowXml.htm"></SCRIPT>
<SCRIPT
src="F:\download\mega8学习笔记\Mega8学习笔记(2)-------cocoguojia 原创--单片机实验室-----嘉哥.files\count(2).htm"></SCRIPT>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -