⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dpjjx20.htm

📁 本单片机教程是平凡老师花了大量时间
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">EX1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">ET0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">EX0</FONT></TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">0</FONT></TD>
</TR>
</TABLE>

<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2" FACE="宋体" LANG="ZH-CN">即</font><FONT FACE="System" LANG="ZH-CN" size="2">8CH</FONT><font size="2" FACE="宋体" LANG="ZH-CN">,当然,我们也可以用位操作指令</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2" FACE="System" LANG="ZH-CN">SETB&#9;EA</font><FONT FACE="宋体" LANG="ZH-CN" size="2"><BR>
</FONT><font size="2" FACE="System" LANG="ZH-CN">SETB&#9;ET1</font></P>
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">SETB&#9;EX1</P>
</FONT><FONT FACE="宋体" LANG="ZH-CN" size="2">
<P ALIGN="JUSTIFY" 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="System" LANG="ZH-CN">3</font><font size="2" FACE="宋体" LANG="ZH-CN">、五个中断源的自然优先级与中断服务入口地址</font></P><DIR>
  <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">0</FONT><FONT FACE="宋体" LANG="ZH-CN">:</FONT></font><font size="2" FACE="System" LANG="ZH-CN">0003H</font></P>
<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">0</FONT><FONT FACE="宋体" LANG="ZH-CN">:</FONT></font><font size="2" FACE="System" LANG="ZH-CN">000BH</font></P>
<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">1</FONT><FONT FACE="宋体" LANG="ZH-CN">:</FONT></font><font size="2" FACE="System" LANG="ZH-CN">0013H</font></P>
<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">1</FONT><FONT FACE="宋体" LANG="ZH-CN">:</FONT></font><font size="2" FACE="System" LANG="ZH-CN">001BH</font></P>
<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="宋体" LANG="ZH-CN">:</FONT></font><font size="2" FACE="System" LANG="ZH-CN">0023H</font></P>
<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><FONT FACE="System" LANG="ZH-CN">
  <P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
  <font size="2">ORG&#9;0000H</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">LJMP&#9;START</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">ORG&#9;0030H</font></P>
</FONT>
  <P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
  <font size="2" FACE="System" LANG="ZH-CN">START</font><font size="2" FACE="宋体" LANG="ZH-CN">:</font></P>
<FONT FACE="System" LANG="ZH-CN" size="2">
  <P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">。</P>
</FONT><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 FACE="System" LANG="ZH-CN" size="2">0000H</FONT><font size="2" FACE="宋体" LANG="ZH-CN">开始写程序,在原理上并没有错,但在实际工作中最好不这样做。</font></P>
  <FONT FACE="宋体" LANG="ZH-CN" size="2">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">优先级:单片机采用了自然优先级和人工设置高、低优先级的策略,即可以由程序员设定那些中断是高优先级、哪些中断是低优先级,由于只有两级,必有一些中断处于同一级别,处于同一级别的,就由自然优先级确定。</P></font></DIR>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">

<font size="2" FACE="宋体" LANG="ZH-CN">开机时,每个中断都处于低优先级,我们可以用指令对优先级进行设置。看表</font><font size="2" FACE="System" LANG="ZH-CN">2</font></P>
<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">IP</FONT><FONT FACE="宋体" LANG="ZH-CN">来高置的,</FONT><FONT FACE="System" LANG="ZH-CN">IP</FONT><FONT FACE="宋体" LANG="ZH-CN">中某位设为</FONT><FONT FACE="System" LANG="ZH-CN">1</FONT></font><font size="2" FACE="宋体" LANG="ZH-CN">,相应的中断就是高优先级,否则就是低优先级。</font></P>
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><CENTER><TABLE BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=607>
<TR><TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">X</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">X</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">X</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PS</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PT1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PX1</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PT0</FONT></TD>
<TD WIDTH="13%" VALIGN="TOP">
<FONT FACE="System" LANG="ZH-CN" size="2">
<P ALIGN="CENTER" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PX0</FONT></TD>
</TR>
</TABLE>
</CENTER><p style="line-height: 150%; margin-top: 0; margin-bottom: 0"></P>
<DIR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -