📄 dpjjx9.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>
</HEAD>
<BODY background="../back.jpg">
<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 FACE="宋体" LANG="ZH-CN" SIZE=2>通过前面的学习,我们已知单片机的内部有</font><FONT SIZE=2>ROM</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>、有</FONT><FONT SIZE=2>RAM</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>、有并行</FONT><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口,那么,除了这些东西之外,单片机内部究竟还有些什么,这些个零碎的东西怎么连在一起的,让我们来对单片机内部作一个完整的分析吧!</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<FONT FACE="宋体" LANG="ZH-CN" SIZE=2>看图(</font><FONT SIZE=2>1</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>)(本图太大,请大家找本书看吧,一般讲单片机的书,随便哪本都有)。从图中我们可以看出,在</FONT><FONT SIZE=2>51</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>单片机内部有<B>一个</b></FONT><B><FONT SIZE=2>CPU</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>用来运算、控制,有<B>四个并行</b></FONT><B><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,分别是</FONT><FONT SIZE=2>P0</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>、</FONT><FONT SIZE=2>P1</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>、</FONT><FONT SIZE=2>P2</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>、</FONT><FONT SIZE=2>P3</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,有</FONT><B><FONT SIZE=2>ROM</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,用来存放程序,有</FONT><B><FONT SIZE=2>RAM</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,用来存放中间结果,此外还有<B>定时</b></FONT><B><FONT SIZE=2>/</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>计数器</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,<B>串行</b></FONT><B><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口</font></B><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>,<B>中断系统</B>,以及一个<B>内部的时钟电路</B>。在一个</FONT><FONT SIZE=2>51</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>单片机的内部包含了这么多的东西。</font></P>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<FONT FACE="宋体" LANG="ZH-CN" SIZE=2>对上面的图进行进一步的分析,我们已知,对并行</font><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口的读写只要将数据送入到相应</FONT><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口的锁存器就可以了,那么对于定时</FONT><FONT SIZE=2>/</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>计数器,串行</FONT><FONT SIZE=2>I/O</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口等怎么用呢?在单片机中有一些独立的存储单元是用来控制这些器件的,被称之为特殊功能寄存器(</FONT><FONT SIZE=2>SFR</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>)。事实上,我们已接触过</FONT><FONT SIZE=2>P1</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>这个特殊功能寄存器了,还有哪些呢?看表</FONT><FONT SIZE=2>1</font></P>
<TABLE BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=602>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">符号
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">地址
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">功能介绍
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">B
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">F0H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<FONT SIZE=2>B</font><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>寄存器</FONT><font size="2">
</font>
</TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">ACC
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">E0H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">累加器
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">PSW
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">D0H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">程序状态字
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">IP
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">B8H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">中断优先级控制寄存器
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">P3
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">B0H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<FONT SIZE=2>P3</font><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口锁存器</FONT><font size="2">
</font>
</TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">IE
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">A8H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">中断允许控制寄存器
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">P2
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">A0H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP">
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<FONT SIZE=2>P2</font><FONT FACE="宋体" LANG="ZH-CN" SIZE=2>口锁存器</FONT><font size="2">
</font>
</TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">SBUF
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">99H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">串行口锁存器
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">SCON
</FONT></TD>
<TD WIDTH="9%" VALIGN="TOP"> <FONT SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">98H
</FONT></TD>
<TD WIDTH="57%" VALIGN="TOP"> <FONT FACE="宋体" LANG="ZH-CN" SIZE=2>
<P ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0">串行口控制寄存器
</FONT></TD>
</TR>
<TR>
<TD WIDTH="0%" VALIGN="TOP"> <FONT SIZE=2>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -