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

📄 pic16cxxx-6.htm

📁 PIC单片机C语言教程!绝对经典
💻 HTM
字号:
<html>
<head>
<title>PIC16Cxxx单片机应用与设计</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
BODY {font-size:12px;font-family:宋体;}
td {font-size:12px;font-family:宋体;}

A:link {	COLOR: #0000ff; TEXT-DECORATION: underline}
A:visited {	COLOR:#0000ff; TEXT-DECORATION: underline}
A:active {	COLOR:red! important; TEXT-DECORATION: underline}
A:hover {	TEXT-DECORATION: none}
.b24 a:link {	FONT-SIZE: 12px; COLOR:#0000ff; TEXT-DECORATION: underline}
.b24 a:visited {FONT-SIZE: 12px; COLOR:#0000ff; TEXT-DECORATION: underline}
.b24 a:active {	FONT-SIZE: 12px; COLOR:#0000ff; TEXT-DECORATION: underline}
.b24 a:hover {	FONT-SIZE: 12px; COLOR:#990000; TEXT-DECORATION: none}
.lh13 {	LINE-HEIGHT: 130%}
.lh15 {	LINE-HEIGHT: 150%}
.lh17 {	LINE-HEIGHT: 170%}
.lh19 {	LINE-HEIGHT: 190%}
.lh30 {	LINE-HEIGHT: 300%}
-->
</style>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" >

 
<table width="771" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr align="center">
    <td>&nbsp;</td>
  </tr>
  <tr align="center"> 
    <td> <table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="41%" height="46" valign="top"><img src="logo.gif" width="205" height="41"></td>
          <td height="46" width="59%" valign="bottom" align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td align="right"><b><font style="font-size:16px" color="#990000">—— 
                  —— —— 技术资料下载中心</font></b> </td>
              </tr>
              <tr> 
                <td height="8"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="1" colspan="2"></td>
        </tr>
        <tr bgcolor="#990000"> 
          <td height="1" colspan="2"></td>
        </tr>
        <tr> 
          <td colspan="2">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="2"><font style="font-size:16px" color="#000000"><b>>> <a href="index.htm">PIC16CXXX单片机应用与设计</a> 
            \</b></font></td>
        </tr>
        <tr> 
          <td colspan="2">&nbsp;</td>
        </tr>
      </table>
      <table width="700" border="0" cellspacing="0" cellpadding="2"  class="lh15">
        <tr> 
          <td align="center"><b><font size="3">第六章 PIC16C55X单片机</font><font size="3"></font></b></td>
        </tr>
        <tr> 
          <td> <p>&nbsp;</p></td>
        </tr>
        <tr valign="top"> 
          <td height="300"> <p>PIC16C55X目前有如下几种型号:</p>
            <p align="center"><img src="image/a298.gif" width="666" height="94"></p>
            <p align="center">读者可以发现,PIC16C55X和PIC16C16X系列非常相似。的确,把PIC16C62X中的电压比较器去掉即是PIC16C55X系列。</p>
            §6.1 主要功能特点<br> <br>
            一、高性能RISC结构CPU<br> &nbsp;&nbsp;&nbsp;&nbsp;·精简指令集,仅35条单字节指令,易学易用<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·除地址分支跳转指令(GOTO、CALL)为双周期指令,其余皆为单周期指令<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·执行速度:DC~200ns<br> &nbsp;&nbsp;&nbsp;&nbsp;·3种中断功能<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·八级硬件堆栈<br> &nbsp;&nbsp;&nbsp;&nbsp;·直接、间接、相对三种寻址方式<br>
            二、功能部件特性<br> &nbsp;&nbsp;&nbsp;&nbsp;·13根双向可独立编程I/O口线<br> &nbsp;&nbsp;&nbsp;&nbsp;·高驱动电流,I/O脚可直接驱动数码管(LED)显示<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 每个I/O引脚最大拉电流25mA<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 每个I/O引脚最大灌电流20mA<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·8位定时器/计数器,带8位可编程预分频器,具溢出中断功能<br>
            三、微控制器特性<br> &nbsp;&nbsp;&nbsp;&nbsp;·内置上电复位电路(POR)<br> &nbsp;&nbsp;&nbsp;&nbsp;·上电定时器,保障工作电压的稳定建立<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·振荡定时器,保障振荡的稳定建立<br> &nbsp;&nbsp;&nbsp;&nbsp;·自振式看门狗<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·程序保密位,可防程序代码的非法拷贝<br> &nbsp;&nbsp;&nbsp;&nbsp;·四种可选振荡方式<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 低成本阻容:RC<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 
            标准晶体/陶瓷:XT<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 高速晶体:HS<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 低频晶体:LP<br> &nbsp;&nbsp;&nbsp;&nbsp;·ID码<br>
            四、CMOS工艺特性<br> &nbsp;&nbsp;&nbsp;&nbsp;·低功耗<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<2mA 
            @5V,4MHz<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<15μA 
            @3V,32KHz<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<1μA 
            @低功耗Sleep模式下<br> &nbsp;&nbsp;&nbsp;&nbsp;·全静态设计<br> &nbsp;&nbsp;&nbsp;&nbsp;·宽工作电压:2.5V~5.5V<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;·宽工作温度:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-商用级: 
            0℃~+70℃<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-工业级:-40℃~+85℃<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-汽车级:-40℃~+125℃<br> 
            <br> &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X单片机是PIC16C54/56/58的增强型,用户可以看到PIC16C55X比PIC16C54/56/58增加了很多资源如硬件中断、8级硬件堆栈等,但外形引脚保持一致,指令也向下兼容,所以用户很容易从PIC16C5X升级到PIC16C55X上。PIC16C55X在一个18脚的芯片内集成了众多的优秀微处理器的特性,是一种应用广泛的通用型单片机。<br> 
            <br>
            §6.2 引脚介绍<br> <br>
            PIC16C55X的芯片引脚如下图所示:<br> <br> <div align="center"> 
              <p><img src="image/a299.gif" width="567" height="170"></p>
              <p>&nbsp;</p>
              <p><img src="image/a300.gif" width="635" height="398"></p>
            </div>
            <p>§6.3 内部结构<br>
              &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X内部采用独立分离的8位数据总线和14位指令总线的&quot;哈佛&quot;结构,它是一种&quot;精简指令集&quot;(RISC)的CPU设计,所以可以达到很高的运行速度。8 
              位的算术逻辑单元ALU可以完成加减、移位和各种布尔逻辑运算,另外它还集成了众多的功能模块如I/O口、定时器、上电复位电路、看门狗电路、上电/起振延时器等等。<br>
              &nbsp;&nbsp;&nbsp;&nbsp;在PIC16C55X片内带有0.5K~2K的14位宽程序存贮器(ROM)、80~128个8 
              位的数据寄存器(RAM),所有特殊寄存器包括程序计数器、I/O寄存器等都直接映射到RAM单元中,所以程序编码非常简洁高效。</p>
            <p align="center"><img src="image/a301.gif" width="517" height="427"></p>
            <p align="center"> 图6.2 PIC16C55X内部结构</p>
            <p><br>
              §6.4 程序存储器和堆栈<br>
              <br>
              &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X的程序计数器PC是13位长,最大可寻8K的空间,但目前只使用前0.5K~2K的空间,如下图所示:</p>
            <p align="center"><img src="image/a302.gif" width="545" height="416"></p>
            &nbsp;&nbsp;&nbsp;&nbsp; <p>任何超出程序存储器实际空间的寻址都将是物理空间上的回绕而已。<br>
              &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X也有独立8级硬件堆栈,不占用程序存储器空间。<br>
              <br>
              §6.5 数据寄存器<br>
              <br>
              &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X的数据寄存器分为2个体: Bank0和Bank1,如下图:</p>
            <p align="center"><img src="image/a303.gif" width="568" height="814"></p>
            &nbsp;&nbsp;&nbsp;&nbsp; 体(Bank)的选择由STATUS寄存器中的RP0:RP1两位来决定,参阅§1.7.2有关STATUS 
            寄存器的描述。寄存器从功能上分有特殊寄存器和通用寄存器两种,下表是PIC16C55X 的特殊寄存器。<br> <div align="center"> 
              <p><img src="image/a304.gif" width="662" height="853"></p>
            </div>
            <p><br>
              &nbsp;&nbsp;&nbsp;&nbsp; 从本节读者可以看到,PIC16C55X 的寄存器结构上和PIC16C62X 完全一样,只是比PIC16C62X 
              少了几个有关模拟比较器的特殊寄存器而已。还有一点,即PIC16C55X 芯片没有&quot;掉电复位锁定&quot;,所以PIC16C55X的PCON寄存器中没有BO控制位(参阅§5.7),见下图。</p>
            <p align="center"><img src="image/a305.gif" width="520" height="235"></p>
            <br> &nbsp;&nbsp;&nbsp;&nbsp;其他的特殊寄存器和PIC16CXXX相同,不再赘述。<br> <br>
            §6.6 I/O口<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;PIC16C55X有二个I/O口,PORTA和PORTB。<br> 
            &nbsp;&nbsp;&nbsp;&nbsp;PORTA是5位(RA&lt;4:0&gt;)的I/O口,其中RA4具开极输出和斯密特触发输入,并和T0CKI端复用,见下图:<br> 
            <div align="center"> 
              <p><img src="image/a306.gif" width="202" height="271"></p>
              <p>图6.6 RA4结构</p>
              <p align="left">RA&lt;3:0&gt;具斯密特输入和CMOS驱动输出,见下图:</p>
              <p align="center"><img src="image/a307.gif" width="218" height="253"></p>
              <div align="left">至于PORTB,则和其他PIC16CXXX完全一样,请参阅§1.8.2。 </div>
            </div>
            <div align="right"> 
              <p><a href="PIC16Cxxx-6-1.htm">下一页</a> <a href="PIC16Cxxx-3-5.htm"> 
                </a> <a href="PIC16Cxxx-3-5.htm"> </a></p>
            </div>
            <p><a href="PIC16Cxxx-1.htm">第一章</a> <a href="PIC16Cxxx-2.htm">第二章</a> 
              <a href="PIC16Cxxx-3.htm">第三章</a> <a href="PIC16Cxxx-4.htm">第四章</a> 
              <a href="PIC16Cxxx-5.htm">第五章</a> <a href="PIC16Cxxx-6.htm">第六章</a> 
              <a href="PIC16Cxxx-7.htm">第七章</a> <a href="PIC16Cxxx-8.htm">第八章</a> 
              <a href="PIC16Cxxx-9.htm">第九章</a> <a href="PIC16Cxxx-10.htm">第十章</a> 
            </p></td>
        </tr>
      </table>
      <table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="20">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr bgcolor="#990000"> 
          <td height="1" width="634"></td>
        </tr>
        <tr align="right"> 
          <td height="6"></td>
        </tr>
        <tr align="right"> 
          <td><font color="#990000" size="2">[ <a href="index.htm">返回</a> ]</font> 
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table> 
 
</body> 
</html>

⌨️ 快捷键说明

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