家电维修论坛

 找回密码
 请使用中文注册

QQ登录

只需一步,快速开始

搜索
新手快速入门新手学发贴无法收到EMAIL邮件禁发广告贴
旧版论坛老用户无法登录版主申请维修联盟网站大事记 
查看: 3962|回复: 2
收起左侧

PIC16f877中文资料

[复制链接]
  • TA的每日心情
    擦汗
    2018-10-1 15:35
  • 签到天数: 2 天

    [LV.1]初来乍到

    发表于 2010-1-25 20:08:04 | 显示全部楼层 |阅读模式
    分享到:

    马上登录【中国家电维修联盟论坛】获取更多更全面的信息!

    您需要 登录 才可以下载或查看,没有帐号?请使用中文注册

    x
     
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><b><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">IC16F877原理简介</span></b><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <br/>1.1 PIC16F877特性 <br/>IC16F877是由Microchip公司所生产开发的新产品,属于PICmicro系列单片微机,具有Flash program程序内存功能,可以重复烧录程序,适合教学、开发新产品等用途;而其内建ICD(In Circuit Debug)功能,可以让使用者直接在单片机电路或产品上,进行如暂停微处理器执行、观看缓存器内容等,让使用者能快速地进行程序除错与开发。 <br/>如图1为PIC16F877的40根接脚图,PDIP是指一般最常见的DIP(Dual In Line Package)包装,而PIC单片机也有PLCC(Plastic Leaded Chip Carrier)与QFP(Quad Flat Package)两种形式的包装,依照不同的需求,寻找不同的包装形式。如图所示,每根接脚都有其特定功能,例如Pin11与Pin32(VDD)为正电源接脚,Pin12与Pin31(VSS)为地线接脚;而有些接脚有两种甚至三种以上功能,例如Pin2(RA0/AN0)代表PORTA的第一支接脚,在系统重置(Reset)后,可自动成为模拟输入接脚,接收模拟讯号,也可经由程序规划为数字输出输入接脚。</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <span lang="EN-US"><o:p></o:p></span></span></p>
    <div align="center">
    <table class="MsoNormalTable" style="WIDTH: 100%; mso-cellspacing: .7pt; mso-padding-alt: 2.25pt 2.25pt 2.25pt 2.25pt" cellspacing="1" cellpadding="0" width="100%" border="0">
    <tbody>
    <tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes">
    <td style="ADDING-RIGHT: 2.25pt; PADDING-LEFT: 2.25pt; PADDING-BOTTOM: 2.25pt; PADDING-TOP: 2.25pt">
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/b88fdbb10e8a94145d6d9543eb662abf.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="390" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image001.jpg" width="420" border="0" v:shapes="_x0000_i1025"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 图1. 40<a href="http://www.838dz.com/" target="_blank"><span style="LINE-HEIGHT: 150%; mso-bidi-font-size: 12.0pt">引脚</span></a>IC16F877接脚说明</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p></td></tr></tbody></table></div>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&nbsp;</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <span lang="EN-US"><o:p></o:p></span></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <span lang="EN-US"><o:p></o:p></span></span></p>
    <div align="center">
    <table class="MsoNormalTable" style="WIDTH: 100%; mso-cellspacing: .7pt; mso-padding-alt: 2.25pt 2.25pt 2.25pt 2.25pt" cellspacing="1" cellpadding="0" width="100%" border="0">
    <tbody>
    <tr style="mso-yfti-irow: 0">
    <td style="ADDING-RIGHT: 2.25pt; PADDING-LEFT: 2.25pt; PADDING-BOTTOM: 2.25pt; PADDING-TOP: 2.25pt">
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/6f5152b6d19b0798c6815d9f3607af57.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="275" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image002.jpg" width="497" border="0" v:shapes="_x0000_i1026"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 图2. 28<a href="http://www.838dz.com/" target="_blank"><span style="LINE-HEIGHT: 150%; mso-bidi-font-size: 12.0pt">引脚</span></a>IC16F877接脚图说明</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p></td></tr>
    <tr style="mso-yfti-irow: 1">
    <td style="ADDING-RIGHT: 2.25pt; PADDING-LEFT: 2.25pt; PADDING-BOTTOM: 2.25pt; PADDING-TOP: 2.25pt">
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/c8d1a61033ac2efcdc3d066bdd4c4c2f.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="512" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image003.jpg" width="521" border="0" v:shapes="_x0000_i1027"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 图3. 44<a href="http://www.838dz.com/" target="_blank"><span style="LINE-HEIGHT: 150%; mso-bidi-font-size: 12.0pt">引脚</span></a>IC16F877脚位图说明</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p></td></tr>
    <tr style="mso-yfti-irow: 2">
    <td style="ADDING-RIGHT: 2.25pt; PADDING-LEFT: 2.25pt; PADDING-BOTTOM: 2.25pt; PADDING-TOP: 2.25pt">
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/d05a5b22b1b717b831dd963eab2927a2.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="490" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image004.jpg" width="474" border="0" v:shapes="_x0000_i1028"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 图4. 44<a href="http://www.838dz.com/" target="_blank"><span style="LINE-HEIGHT: 150%; mso-bidi-font-size: 12.0pt">引脚</span></a>IC16F877<a href="http://www.838dz.com/" target="_blank"><span style="LINE-HEIGHT: 150%; mso-bidi-font-size: 12.0pt">引脚</span></a>图说明</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p></td></tr>
    <tr style="mso-yfti-irow: 3; mso-yfti-lastrow: yes">
    <td style="PADDING-RIGHT: 2.25pt; PADDING-LEFT: 2.25pt; PADDING-BOTTOM: 2.25pt; PADDING-TOP: 2.25pt">
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="center"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <span lang="EN-US"><o:p></o:p></span></span></p></td></tr></tbody></table></div>
  • TA的每日心情
    擦汗
    2018-10-1 15:35
  • 签到天数: 2 天

    [LV.1]初来乍到

     楼主| 发表于 2010-1-25 20:09:00 | 显示全部楼层

    续集

    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">IC16F877属于闪控式(Flash)单片机,可以重复烧录,其ROM的容量总共是8K words,以2K为一个page,区分为4个pages;内部RAM总共有512个字节(00f~1FFh),以128个字节为一个Bank,共区分为4个Bank,如图5所示,每个Bank的前半段都有其特殊用途,分别连接到其特殊功能模块,例如I/O、CCP、Timer、USART、MSSP等。&nbsp;<br/> </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <span lang="EN-US"><o:p></o:p></span></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/0c5a071a4eea46b15899f3b8d909c884.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="877" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image005.jpg" width="635" border="0" v:shapes="_x0000_i1029"/></span></span></a></span><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br/>图5. PIC16F877的RAM配置图(图片来源:Microchip PIC16F87X Data Sheet) <br/> </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">1.2 特殊内嵌功能 <br/>IC16F877属于内嵌功能较多的单片机,除了CPU、POM、RAM、I/O等基本构造外,还包括以下各种功能,简介如下: <br/>A/D converter:模拟数字转换器,最多可以读取8组模拟输入讯号。 </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">CCP:Capture、Compare、PWM,用于控制直流马达。&nbsp;<br/><br/>Timer,内部定时器,有Timer0、Timer1、Timer2等。 </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">USART:Universal Synchronous Asynchronous Receiver Transmitter,同步/异步串行传输,如RS232、RS485等。 </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">MSSP;Master Synchronous Serial Port,两线式(I2C)与三线式(SPI)标准同步串行传输协定,常用于EEPROM内存资料的烧录与读取,或是与其它集成电路沟通与联系,形成多芯片网络。 <br/>2. PIC16F877基本电路 <br/>2.1 PIC振荡频率电路 <br/>单片机振荡电路与整体系统工作速度有直接的关系,例如同步∕异步串行传输、定时器等,都与振荡频率有关,不同系列单片机有不同振荡频率,根据产品资料手册,PIC16F877振荡频率最高可到20MHz;在图1中,振荡电路接于Pin13(OSC1/CLKIN)与Pin14(OSC2/CLKOUT),而振荡电路有以下四种形式: <br/>LP:使用低功率振荡晶体(Low Power Crystal) </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">XT:使用振荡器∕谐振器(Crystal/Resonator) </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">HS:使用高速振荡器(High Speed Crystal/Resonator) </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">RC:使用电阻∕电容(Resister/Capacitor) <br/>一般常用振荡晶体或是谐振器作为单片机振荡源,外接电路及PIC内部电路说明如图6所示。图中电容C1与C2规格大小是根据Crystal或Resonator而有所不同,表1列出电容建议值,使用其它振荡源的电路说明请参考产品资料手册。 <br/></span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/50d4ccabe8db26ee4d6fbf3edbdbfbe3.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="290" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image006.jpg" width="654" border="0" v:shapes="_x0000_i1030"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">图<span lang="EN-US">6. 振荡源电路图(图片来源:Microchip PIC16F87X Data Sheet) <br/></span></span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/ad02a8511203bcf3ae8f443b746bc619.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="496" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image007.jpg" width="405" border="0" v:shapes="_x0000_i1031"/></span></span></a><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">表<span lang="EN-US">1. 建议电容值(图片来源:Microchip PIC16F87X Data Sheet)&nbsp;<br/><br/>2.2 外加电源与重置电路 <br/>IC16F877的工作电压为5V,连接Pin11与Pin32,Pin12与Pin31为地线接脚;重置电路连接Pin1,按下Reset后,内部指令重头开始执行,系统重新运作。 </span></span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.hbdzc.cn/page/zlzx/PIC16F877/d3a7089166193766b659e0271c8f7acd.jpg" target="_blank"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none; text-underline: none"><span style="mso-ignore: vglayout"><img height="440" src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/03/clip_image008.jpg" width="485" border="0" v:shapes="_x0000_i1032"/></span></span></a></span><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 图7. 电源与重置电路 <br/> </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">2.3 输入输出接口 <br/>IC16F877除了上述基本电路所占用的7支接脚外,其余的33支接脚都可当成输出、输入接脚,输入输出端口是单片机基本界面,可以与周边电路进行电路控制和信号传输与检测。PIC是8位的单片机,以接脚特性分组,每组尽量凑满8支接脚,并将I/O命名为PORTA(RA0~RA5)、PORTB(RB0~RB7)、PORTC(RC0~RC7)、PORTD(RD0~RD7)和PORTE(RE0~RE2)等,各分组接口特性说明如下: <br/>&nbsp;<br/>ORTA <br/>IC16F877的PORTA总共有6个位(RA0~RA5),PORTA的接脚可作为数字输出输入端口,而系统重置后,PORTA自动成为模拟输入状态,可读取模拟输入讯号。 <br/>ORTB <br/>ORTB总共有8个位(RB0~RB7),可以撰写程序规划输入输出方向、状态,其中,要进行烧录时,使用到三支接脚,分别是Pin36(RB3/PGM)、Pin39(RB6/PGC)与Pin40(RB7/PGD)。 <br/>ORTC <br/>ORTC总共有8个位(RC0~RC7),除了可作为数位I/O外,还和一些特殊功能的周边电路共享接脚,例如CCP(直流马达控制)、I2C、SPI(同步串行通讯电路)、UART(异步串行传输电路)等等。 <br/>PORTD <br/>PORTD总共有8个位(RD0~RD7),可作一般数字I/O,并与PSP(Parallel Slave Port)并列传输接口共享。当整体系统需要多单片机时,彼此可以经由并列传输接口来快速传输资料。 <br/>PORTE <br/>PORTE总共有3个位(RE0~RE2),PORTE的Pin8、9、10有三种功能,除了基本I/O功能,也有模拟输入功能,而上述PORTD的并列传输接口设定所需的控制接脚,如/RD、/WR、/CS等,也是属于PORTE接脚。 <br/>3. PIC16F877指令简介 <br/>PIC16F877常用的语言有汇编语言与C语言两种,汇编语言是将每一个机器码使用一个文字代号代表,比较接近处理器真正动作模式;而C语言是比较符合人们的 </span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal" style="MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; MARGIN-RIGHT: 30pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">使用习惯,事先将汇编语言组合成<span lang="EN-US">C语言形式,使用较为方便,但是C语言所组译的机器码程序通常比较大,且组译软件通常需要额外购买。以下简介汇编语言相关指令与一套C语言组译软件。 <br/>3.1 PIC16F877指令摘要 <br/>PIC是采用RISC(Reduced Instruction Set Computing,精简指令集),与8051系列采用的CISC(Complicated Instruction Set Computing,复杂指令集)不同,PIC16F877所有指令指有35个,8051高达111个指令,详细指令说明请参阅产品资料手册。&nbsp;</span></span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></span></p>
    <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2010-4-1 12:57:18 | 显示全部楼层
    顶一下!!!
    回复 支持 反对

    使用道具 举报

    本网淘宝零售店http://shop36180724.taobao.com/  (全部原装电子元器件批发价零售)
    您需要登录后才可以回帖 登录 | 请使用中文注册

    本版积分规则

    QQ|Archiver|手机版|网站地图|论坛列表|论坛XML|板块XML|大众电子网 ( 粤ICP备09021106号  
    深圳市深威志电子有限公司 版权所有 站长QQ:17158联系站长请点这里
    ----------*******---------

    GMT+8, 2018-12-16 06:37 , Processed in 0.175195 second(s), 30 queries .

    Powered by Discuz! X3.2

    © 2001-2013 Comsenz Inc.

    快速回复 返回顶部 返回列表