📄 dpjjx17.htm
字号:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb_2312-80">
<META NAME="Generator" CONTENT="Microsoft FrontPage 5.0">
<TITLE>单片机第十五课</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY LINK="#0000ff" VLINK="#800080" background="../back.jpg">
<FONT FACE="宋体" LANG="ZH-CN">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">单片机第十七课</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">位及位操作指令</font></P>
</FONT>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2" FACE="宋体" LANG="ZH-CN">通过前面那些流水灯的例子,我们已经习惯了“位”一位就是一盏灯的亮和灭,而我们学的指令却全都是用“字节”来介绍的:字节的移动、加法、减法、逻辑运算、移位等等。用字节来处理一些数学问题,比如说:控制冰箱的温度、电视的音量等等很直观,可以直接用数值来表在。可是如果用它来控制一些开关的打开和合上,灯的亮和灭,就有些不直接了,记得我们上次课上的流水灯的例子吗?我们知道送往</font><font size="2"><FONT FACE="System" LANG="ZH-CN">P1</FONT><FONT FACE="宋体" LANG="ZH-CN">口的数值后并不能马上知道哪个灯亮和来灭,而是要化成二进制才知道。工业中有很多场合需要处理这类开关输出,继电器吸合,用字节来处理就显示有些麻烦,所以在</FONT><FONT FACE="System" LANG="ZH-CN">8031</FONT></font><font size="2" FACE="宋体" LANG="ZH-CN">单片机中特意引入一个位处理机制。</font></P><OL>
<FONT FACE="宋体" LANG="ZH-CN">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><LI>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">位寻址区</LI></font></p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"></P>
</font>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2" FACE="宋体" LANG="ZH-CN">在</font><font size="2"><FONT FACE="System" LANG="ZH-CN">8031</FONT><FONT FACE="宋体" LANG="ZH-CN">中,有一部份</FONT><FONT FACE="System" LANG="ZH-CN">RAM</FONT><FONT FACE="宋体" LANG="ZH-CN">和一部份</FONT><FONT FACE="System" LANG="ZH-CN">SFR</FONT><FONT FACE="宋体" LANG="ZH-CN">是具有位寻址功能的,也就是说这些</FONT><FONT FACE="System" LANG="ZH-CN">RAM</FONT></font><font size="2" FACE="宋体" LANG="ZH-CN">的每一个位都有自已的地址,可以直接用这个地址来对此进行操作。</font></P>
<TABLE BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=512 height="580">
<TR><TD WIDTH="11%" VALIGN="TOP" height="44">
<FONT FACE="System" LANG="ZH-CN" size="2"><CODE>
<P style="line-height: 150%; margin-top: 0; margin-bottom: 0">字节地址</code></FONT></TD>
<TD WIDTH="89%" VALIGN="TOP" COLSPAN=8 height="44">
<FONT FACE="System" LANG="ZH-CN" size="2"><CODE>
<P style="line-height: 150%; margin-top: 0; margin-bottom: 0">位地址</code></FONT></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2FH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">7FH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">78H</font></CODE></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2EH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">77H</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">70</font></CODE></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2DH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">6FH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">68H</font></CODE></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2CH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">67H</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">60H</font></CODE></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2BH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">5FH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">58H</font></CODE></TD>
</TR>
<TR><TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">2AH</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<CODE><P style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">57H</font></CODE></TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </TD>
<TD WIDTH="11%" VALIGN="TOP" height="25">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -