基于单片机的温度控制系统(完整资料)_第1页
基于单片机的温度控制系统(完整资料)_第2页
基于单片机的温度控制系统(完整资料)_第3页
基于单片机的温度控制系统(完整资料)_第4页
基于单片机的温度控制系统(完整资料)_第5页
已阅读5页,还剩133页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

基于单片机的温度控制系统(完整资料)(可以直接使用,可编辑优秀版资料,欢迎下载)

基于单片机的温度控制系统(完整资料)(可以直接使用,可编辑优秀版资料,欢迎下载)毕业论文设计基于51单片机的温度控制系统摘要在日常生活中温度在我们身边无时不在,温度的控制和应用在各个领域都有重要的作用。很多行业中都有大量的用电加热设备,和温度控制设备,如用于报警的温度自动报警系统,热处理的加热炉,用于融化金属的坩锅电阻炉及各种不同用途的温度箱等,这些都采用单片机技术,利用单片机语言程序对它们进行控制。而单片机技术具有控制和操作使用方便、结构简单便于修改和维护、灵活性大且具有一定的智能性等特点,可以精确的控制技术标准,提高了温控指标,也大大的提高了产品的质量和性能。由于单片机技术的优点突出,智能化温度控制技术正被广泛地采用。本文介绍了基于单片机AT89C51的温度控制系统的设计方案与软硬件实现。采用温度传感器DS18B20采集温度数据,7段数码管显示温度数据,按键设置温度上下限,当温度低于设定的下限时,点亮绿色发光二极管,当温度高于设定的上限时,点亮红色发光二极管。给出了系统总体框架、程序流程图和Protel原理图,并在硬件平台上实现了所设计功能。关键词:单片机温度控制系统温度传感器AbstractIndailylife,thetemperatureinoursidetheever-present,thecontrolofthetemperatureandtheapplicationinvariousfieldsallhaveimportantrole。Manyindustrytherearealargenumberofelectricheatingequipment,andthetemperaturecontrolequipment,suchasusedforalarmautomatictemperaturealarmsystems,heattreatmentfurnace,usedtomeltmetalcrucibleresistancefurnace,andallkindsofdifferentUSESoftemperatureboxandsoon,theseusingsinglechipmicrocomputer,usingsinglechipcomputerlanguageprogramtocontrolthem.Andsingle-chipmicrocomputertechnologyhascontrolandconvenientinoperation,easytomodifyandmaintenanceofsimplestructure,flexibilityislargeandhassomeoftheintelligenceandothercharacteristics,wecanaccuratelycontroltechnologystandardtoimprovethetemperaturecontrolindex,alsogreatlyimprovethequalityoftheproductsandperformance.Becauseoftheadvantagesofthesinglechipmicrocomputerintelligenttemperaturecontroltechnologyoutstanding,isbeingwidelyadopted。ThispaperintroducesthetemperaturecontrolbasedonsinglechipmicrocomputerAT89C51designschemeofthesystemandthehardwareandsoftwareimplementation。ThetemperaturesensorDS18B20collectiontemperaturedata,7periodofdigitalpipedisplay,theupperandlowerlimitsoftemperaturebuttonwhentemperaturebelowthesettingofthelowerlimit,lightgreenleds,whenthetemperatureishigherthanthesetonthelimit,lightredleds.Giventhesystemframeworkandprogramflowchartandprinciplechart,andinProtelhardwareplatformtorealizethefunctionofthedesign.Keywords:SCMTemperaturecontrolsystemTemperaturesensors目录TOC\o”1—3"\h\z\uHYPERLINK\l”_Toc295836733"摘要I第一章前言1HYPERLINK\l”_Toc295836736”1。1温度控制系统设计发展历史及意义1HYPERLINK\l”_Toc295836737”1.2温度控制系统的目的11。3温度控制系统完成的功能1第二章总体设计方案2HYPERLINK\l”_Toc295836740”2。1方案一2_Toc295836742"3.1DS18B20简介5HYPERLINK\l”_Toc295836743"3。1。1DS18B20封装与引脚5HYPERLINK\l”_Toc295836744”3.1.2DS18B20的简单性能53.3DS18B20的测温原理6HYPERLINK\l”_Toc295836747”3。3.1测温原理:63.3.2DS18B20的温度采集过程9HYPERLINK\l”_Toc295836749”第四章单片机接口设计10HYPERLINK\l”_Toc295836750"4。1设计原则104。2单片机引脚连接10HYPERLINK\l”_Toc295836752"4。2。1单片机引脚图10HYPERLINK\l”_Toc295836753"4.2。2串口引脚11第五章硬件电路设计12_Toc295836758"5。2.2程序组成16HYPERLINK\l”_Toc295836759”结束语20HYPERLINK\l”_Toc295836760"致谢21,外接电源供电DS18B20发送“1”计数器计数器斜率累加器减到0减法计数器预置低温度系数振荡器高温度系数振荡器计数比较器预置温度寄存器减到0图3。2测温原理内部装置3。3。2DS18B20的温度采集过程由于DS18B20单线通信功能是分时完成的,他有严格的时隙概念,因此读写时序很重要,系统对DS18B20的各种操作必须按协议进行。操作协议为:初始化DS18B20(发复位脉冲)→发ROM功能命令→发存储器操作命令→处理数据.温度的采集流程如图3。3所示.初始化初始化DS18B20跳过ROM匹配温度变换延时1S跳过ROM匹配读暂存器转换成显示码数码管显示图3.3DS18B20测温流程第四章单片机接口设计4。1设计原则DS18B20有2种供电方式,一种是直流电源,还有一种是寄生虫方式供电。采用电源供电方式,此时DS18B20的1脚接地,2脚作为信号线,3脚接电源。电源是利用直流稳压电源。当DS18B20处于写存储器操作和温度A/D变换操作时,总线上必须有强的上拉,上拉开启时间最大为10μs。采用寄生电源供电方式是VDD和GND端均接地。由于单线制只有一根线,因此发送接收口必须是三状态的。主机控制DS18B20完成温度转换必须经过3个步骤:初始化;ROM操作指令;存储器操作指令。4.2单片机引脚连接4。2。1单片机引脚图单片机引脚如图4。1所示。图4.1单片机引脚4。2.2串口引脚串口引脚的连接图如附录1.第五章硬件电路设计5。1主要硬件电路设计硬件电路主要包括:显示电路,DS18B20温度传感器检测电路,按键电路,晶振电路,二极管显示报警电路,电源电路。(1)显示电路显示电路采用了7段共阴数码管扫描电路,通过单片机的P0.0到P0.7八个端口接数码管的八个引脚,数码管的9号引脚接地.用来显示当前检测的温度值,精确度为0。1。如图5.1所示。节约了单片机的输出端口,便于程序的编写。本设计中还有一组数码管由P2.0到P2。7连接,除接口不同外其他一样,如图5.2。图5.1显示测量结果电路图图5.2显示限定温度电路(2)DS18B20温度传感器检测电路温度采集通过数字化的温度传感器DS18B20,通过QD接向单片机的P3。0口.DS18B20温度传感器电路如图5。3所示。图5。3温度传感器电路引脚图(3)按键电路按键电路如图5.4所示.由K2、K3、K4三个按键控制上、下限温度值。P3.1接口接K4按键.P3.2接口接入K3按键.P3.3接口接K2按键。1。K2温度上下限减少键:减少温度上下限的值。

2。K3温度上下限增加键:增加温度上下限的值.

3.K4温控开关键:进入温控的切换键.图5.4按键电路图(4)晶振控制电路晶振采用的是12MHZ的标准晶振。接入单片机的XTAL1、XTAL2.晶振控制电路如图5.5所示。图5.5晶振控制电路图(5)复位电路复位电路采用了人工复位的方式,按下按键K1使单片机复位。直接接到单片机的RESET引脚。复位电路如图5.6所示图5。6复位电路图(6)二极管显示报警电路二极管显示报警电路如图5.7所示.通过单片机的P3。4和P3.5两个端口送出,采用的是高电平驱动,使其发光发出警告。图5.7二极管显示电路(8)电源部分电源部分才用的是直流稳压电源,产生5V的稳定直流电压。电源设计部分如图5.8所示。图5。8电源部分电路5.2软件系统设计5。2.1软件系统设计一个应用系统要完成各项功能,首先必须有较完善的硬件作保证。同时还必须得到相应设计合理的软件的支持,尤其是微机应用高速发展的今天,许多由硬件完成的工作,都可通过软件编程而代替.甚至有些必须采用很复杂的硬件电路才能完成的工作,用软件编程有时会变得很简单,如数字滤波,信号处理等.因此充分利用其内部丰富的硬件资源和软件资源,采用与C51系列单片机相对应的51汇编语言和结构化程序设计方法进行软件编程.程序设计语言有三种:机器语言、汇编语言和高级语言。机器语言是机器唯一能“懂”的语言,用汇编语言或高级语言编写的程序(称为源程序)最终都必须翻译成机器语言的程序(成为目标程序),计算机才能“看懂",然后逐一执行。高级语言是面向问题和计算过程的语言,它可通过于各种不同的计算机,用户编程时不必仔细了解所用的计算机的具体性能与指令系统,而且语句的功能强,常常一个语句已相当于很多条计算机指令,于是用高级语言编制程序的速度比较快,也便于学习和交流,但是本系统却选用了汇编语言。原因在于,本系统是编制程序工作量不大、规模较小的单片机微控制系统,使用汇编语言可以不用像高级语言那样占用较多的存储空间,适合于存储容量较小的系统.同时,本系统对位处理要求很高,需要解决大量的逻辑控制问题。51指令系统的指令长度较短,它在存储空间和执行时间方面具有较高的效率,编成的程序占用内存单元少,执行也非常的快捷,与本系统的应用要求很适合。而且AT89C-51指令系统有丰富的位操作(或称位处理)指令,可以形成一个相当完整的位操作指令子集,这是AT89C-51指令系统主要的优点之一。对于要求反应灵敏与控制及时的工控、检测等实时控制系统以及要求体积小、系统小的许多“电脑化”产品,可以充分体现出汇编语言简明、整齐、执行时间短和易于使用的特点.本装置的软件包括主程序、读出温度子程序、复位应答子程序、写入子程序、以及有关DS18B20的程序(初始化子程序、写程序和读程序)。5.2.2程序组成系统程序主要包括主程序,读出温度子程序,写入子程序,门限调节子程序等。1)主程序主程序的主要功能是负责温度的实时显示、读出并处理DS18B20的测量的当前温度值,温度测量每1s进行一次。这样可以在一秒之内测量一次被测温度,其程序流程见图5.9所示.通过调用读温度子程序把存入内存储中的整数部分与小数部分分开存放在不同的两个单元中,然后通过调用显示子程序显示出来。图5.9主程序流程图2)读出温度子程序读出温度子程序的主要功能是读出RAM中的9字节,在读出时需进行CRC校验,校验有错时不进行温度数据的改写,程序流程图如图5。10所示。DS18B20的各个命令对时序的要求特别严格,所以必须按照所要求的时序才能达到预期的目的,同时,要注意读进来的是高位在后低位在前,共有12位数,小数4位,整数7位,还有一位符号位。DS18B20复位、应答子程序DS18B20复位、应答子程序跳过ROM匹配命令跳过ROM匹配命令写入子程序写入子程序温度转换命令温度转换命令写入子程序写入子程序显示子程序(延时)显示子程序(延时)DS18B20复位、应答子程序DS18B20复位、应答子程序跳过ROM匹配命令跳过ROM匹配命令写入子程序写入子程序读温度命令子程序读温度命令子程序终终止图5。10读出温度子程序3)写入子程序写入子程序的流程图如5.11所示。开始开始进位C清0进位C清0终止R2是否为0P3.0置0延时46US带进位右移延时12USP3.0清0终止R2是否为0P3.0置0延时46US带进位右移延时12USP3.0清0图5.11写入子程序4)门限调节子程序门限调节子程序流程如图5。12所示。图5。12门限调节电路结束语本文详细讲述了系统设计方案,并给出了相关程序流程。本设计应用性比较强,可以应用在仓库温度、大棚温度、机房温度、水池等的监控。另外,如果把本设计方案扩展为多点温度控制,加上上位机,则可以实现远程温度监控系统,将具有更大的应用价值。本文的创新点在于详细设计了基于单片机AT89C51的温度监控系统,设计程序已经。此系统可广泛用于温度在DS18B20测温范围之内的场合,有良好的应用前景。由于单片机的各种优越的特性,使得它的经济效益显的更加突出,有很好的实用性。附录附录1原理电路总设计图附录2源程序: FK1EQU24H;F(k)实测温度FKEQU25H;F(k)实测温度暂存RKEQU26H;R(k)给定温度SHI1EQU30H;实测温度十位SHI2EQU31H;实测温度个位SHI3EQU32H;实测温度小数位GAOEQU33H;给定温度十位ZHOEQU34H;给定温度个位DIEQU35H;给定温度小数位CNTEQU37H;按键消抖计数器LSBEQU50H;检测温度低8位MSBEQU51H;检测温度高8位K_INMBITP3.1;DI位设定温度按键K_INHBITP3。2;ZHO位设定温度按键KIBITP3.3;GAO位设定温度按键DQBITP3.0;DS18B20的温度输入口ORG0000H;主程序入口地址AJMPMAIN;跳转到主程序ORG000BH;T0中断入口地址ORG001BH;T1中断入口地址ORG0050HMAIN:MOVSP,#60H;堆栈指针初始化MOVGAO,#0;置设定值显示十位初值MOVZHO,#0;置设定值显示个位初值MOVDI,#0;置设定值显示小数位初值MOVCNT,#10;MOVTMOD,#11H;定时器T0、T1初始化(方式1)MOVTH0,#3CH;T0定时器定时常数MOVTL0,#0B0H;MOVTH1,#0FCH;T1定时器定时常数MOVTL1,#18H;SETBPT1;T1优先中断MOVIE,#8AH;中断使能SETBTR0;启动定时器T0SETBTR1;启动定时器T1LOOP:ACALLGETTMP;调用测温子程序ACALLBBLD;调用二十进制子程序ACALLTER;调用拆字子程序ACALLXIAOSHU;调用小数处理子程序ACALLDISP1;调用测得温度显示程序ACALLKEY;调用按键处理子程序ACALLIDTB;调用十二进制转换子程序ACALLCHK1;调用报警子程序ACALLDISP2;调用设定温度显示子程序AJMPLOOP;循环;*******测温子程序******GETTMP:ACALLRESET_PULSEACALLPRESENCEMOVA,#0CCHACALLWRITE_BYTE;发跳过ROM命令MOVA,#44HACALLWRITE_BYTE;发出温度转换命令JNBDQ,$ACALLRESET_PULSEACALLPRESENCEMOVA,#0CCH;发跳过ROM命令ACALLWRITE_BYTEMOVA,#0BEH;发读存储器命令ACALLWRITE_BYTEACALLREAD_BYTEMOVLSB,A;温度值低位字节送LSBACALLREAD_BYTEMOVMSB,A;温度值高位字节送MSBACALLRESET_PULSEACALLPRESENCEMOVA,MSBSWAPAANLA,#70HMOVFK,AMOVA,LSBSWAPAANLA,#0FHORLFK,AMOVFK1,FKRET;*****读DS18B20的程序*******READ_BYTE:MOVR6,#8READ1:CLRDQNOPNOPSETBDQNOPNOPNOPMOVR5,AMOVC,DQMOVA,R5MOVR7,#30DJNZR7,$RRCADJNZR6,READ1RETPRESENCE:JBDQ,$JNBDQ,$RETRESET_PULSE:CLRDQMOVR7,#250DJNZR7,$SETBDQMOVR7,#10DJNZR7,$RET;**********写DS18B20的程序*******WRITE_BYTE:MOVR6,#8WRITE:RRCAJCWRITE1CLRDQMOVR7,#30DJNZR7,$SETBDQNOPNOPNOPNOPDJNZR6,WRITERETWRITE1:CLRDQNOPNOPNOPNOPSETBDQMOVR7,#30DJNZR7,$DJNZR6,WRITERET;******二十进制转换子程序*****BBLD:CLRAMOVR2,AMOVR7,#8BBCD1:CLRCMOVA,FKRLCAMOVFK,AMOVA,R2ADDCA,R2DAAMOVR2,ADJNZR7,BBCD1RET;******拆字子程序*******TER:MOVA,R2ANLA,#0FHMOVSHI2,AMOVA,R2SWAPAANLA,#0FHMOVSHI1,ARET;*******小数部分处理子程序******XIAOSHU:CLRCMOVR3,#3MOVA,50HLOOP2:RRCADJNZR3,LOOP2ANLA,#01HCJNEA,#01H,XIAOSHU2MOVSHI3,#5RETXIAOSHU2:MOVSHI3,#0RET;******按键部分处理子程序*******KEY:MOVCNT,#80JBK_INM,KEY1ACALLDISP1ACALLDISP2ACALLDISP1ACALLDISP2JBK_INM,KEY1WAIT0:JBK_INM,KEY2ACALLDISP1ACALLDISP2DJNZCNT,WAIT0KEY2:MOVA,DIADDA,#5DAAMOVDI,ASUBBA,#09HJCKEY1MOVDI,#0KEY1:MOVCNT,#80JBK_INH,KEY4ACALLDISP1ACALLDISP2ACALLDISP1ACALLDISP2JBK_INH,KEY4WAIT1:JBK_INH,KEY3ACALLDISP1ACALLDISP2DJNZCNT,WAIT1KEY3:MOVA,ZHOADDA,#1DAAMOVZHO,ACJNEA,#10H,KEY4MOVZHO,#0KEY4:MOVCNT,#80JBKI,KEY_BACKACALLDISP1ACALLDISP2ACALLDISP1ACALLDISP2JBKI,KEY_BACKWAIT2:JBKI,KEY5ACALLDISP1ACALLDISP2DJNZCNT,WAIT2KEY5:MOVA,GAOADDA,#1DAAMOVGAO,ACJNEA,#10H,KEY_BACKMOVGAO,#0KEY_BACK:RET;******延时程序1******D0.6S:MOVR3,#64HDEL3:MOVR4,#384HDEL4:NOPNOPNOPDJNZR4,DEL4DJNZR3,DEL3RET;******实测温度显示部分子程序*******DISP1:MOVDPTR,#TABMOVA,SHI1MOVCA,@A+DPTRMOVP0,AMOVP1,#3FHCLRP1。0ACALLTMMOVA,SHI2MOVCA,@A+DPTRMOVP0,AMOVP1,#3FHSETBP0。7CLRP1。1ACALLTMMOVA,SHI3MOVCA,@A+DPTRMOVP0,AMOVP1,#3FHCLRP1。2ACALLTM;******实测温度显示部分子程序*******DISP2:MOVDPTR,#TABMOVA,GAOMOVCA,@A+DPTRMOVP2,AMOVP1,#3FHCLRP1.3ACALLTMMOVA,ZHOMOVCA,@A+DPTRMOVP2,AMOVP1,#3FHSETBP2.7CLRP1。4ACALLTMMOVA,DIMOVCA,@A+DPTRMOVP2,AMOVP1,#3FHCLRP1。5ACALLTMRETTAB:DB3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH;****显示延时子程序*******TM:MOVR1,#30TM1:MOVR2,#25TM2:DJNZR2,TM2DJNZR1,TM1RET;*******十二进制转换子程序*******IDTB:MOVR0,#33HMOVR2,#1MOVA,@R0MOV52H,ADITB1:MOVA,52HMOVB,#10MULABMOV52H,AMOVA,BINCR0MOVA,52HADDA,@R0MOV52H,AMOVRK,52HRET;*******设定温度越线报警子程序*****CHK1:MOVA,DICLRCSUBBA,#0MOVA,ZHOSUBBA,#0MOVA,GAOSUBBA,#4JCOUTBMOVA,DICLRCSUBBA,#5MOVA,ZHOSUBBA,#0MOVA,GAOSUBBA,#9JNCOUTAMOVA,#00HRETOUTA:MOVGAO,#9MOVZHO,#0MOVDI,#0CLRP3.4ACALLD0。6SSETBP3。4RETOUTB:MOVGAO,#4MOVZHO,#0MOVDI,#0CLRP3。4ACALLD0.6SSETBP3。4RETEND参考文献1.张友德主编《单片微型机原理,应用与实验》复旦大学出版社出版19932.何立民主编《单片机应用技术选编(1)》北京航空航天大学出版社20003.韦珑珅;杨荣松;基于DS18B20的单片机多点温度测量系统机械与电子4.赵娜;赵刚;于珍珠;郭守清;基于51单片机的温度测量系统,2007,(02)5.StevenF。Barrett,DanielJ。Pack。EmbeddedSystem[M].北京:电子工业出版社,20066.陈跃东.DS18B20集成温度传感器原理与应用[J]。安徽机电学院学报,20027.阎石.数字电子技术基础(第三版)[M].北京:高等教育出版社,19898.李朝青,单片机原理及接口技术(简明修订版)[M]。北京:北京航空航天大学出版社,19989.李广弟。单片机基础[M]。北京:北京航空航天大学出版社,199410.金伟正。单线数字温度传感器的原理与应用[J]。电子技术与应用,200011.李钢.1—Wire总线数字温度传感器DS18B20原理及应用.现代电子技术[J]南昌工程学院毕业设计(论文)成绩评定和评语姓名班级学号Ⅰ.毕业设计(论文)题目:Ⅱ。指导教师评语及评分评语:评分:指导教师:年月日Ⅲ。答辩委员会(小组)评语及评分评语:评分:总评成绩:答辩委员会(小组)负责人:年月

外文原文:

Design

of

the

Temperature

Control

System

Based

on

AT89C51

ABSTRACT

The

principle

and

functions

of

the

temperature

control

system

based

on

micro

controller

AT89C51

are

studied,

and

the

temperature

measurement

unit

consists

of

the

1—Wire

bus

digital

temperature

sensor

DS18B20。

The

system

can

be

expected

to

detect

the

preset

temperature,

display

time

and

save

monitoring

data。

An

alarm

will

be

given

by

system

if

the

temperature

exceeds

the

upper

and

lower

limit

value

of

the

temperature

which

can

be

set

discretionarily

and

then

automatic

control

is

achieved,

thus

the

temperature

is

achieved

monitoring

intelligently

within

a

certain

range.

Basing

on

principle

of

the

system,

it

is

easy

to

make

a

variety

of

other

non—linear

control

systems

so

long

as

the

software

design

is

reasonably

changed.

The

system

has

been

proved

to

be

accurate,

reliable

and

satisfied

through

field

practice.

KEYWORDS:

AT89C51;

micro

controller;

DS18B20;

temperature

1

INTRODUCTION

Temperature

is

a

very

important

parameter

in

human

life.

In

the

modern

society,

temperature

control

(TC)

is

not

only

used

in

industrial

production,

but

also

widely

used

in

other

fields.

With

the

improvement

of

the

life

quality,

we

can

find

the

TC

appliance

in

hotels,

factories

and

home

as

well.

And

the

trend

that

TC

will

better

serve

the

whole

society,

so

it

is

of

great

significance

to

measure

and

control

the

temperature.

Based

on

the

AT89C51

and

temperature

sensor

DS18B20,

this

system

controls

the

condition

temperature

intelligently。

The

temperature

can

be

set

discretionarily

within

a

certain

range。

The

system

can

show

the

time

on

LCD,

and

save

monitoring

data;

and

automatically

control

the

temperature

when

the

condition

temperature

exceeds

the

upper

and

lower

limit

value.

By

doing

so

it

is

to

keep

the

temperature

unchanged.

The

system

is

of

high

anti-jamming,

high

control

precision

and

flexible

design;

it

also

fits

the

rugged

environment。

It

is

mainly

used

in

people's

life

to

improve

the

quality

of

the

work

and

life。

It

is

also

versatile,

so

that

it

can

be

convenient

to

extend

the

use

of

the

system。

So

the

design

is

of

profound

importance.

The

general

design,

hardware

design

and

software

design

of

the

system

are

covered。

1.1

Introduction

The

8—bit

AT89C51

CHMOS

microcontrollers

are

designed

to

handle

high-speed

calculations

and

fast

input/output

operations.

MCS

51

microcontrollers

are

typically

used

for

high-speed

event

control

systems。

Commercial

applications

include

modems,

motor—control

systems,

printers,

photocopiers,

air

conditioner

control

systems,

disk

drives,

and

medical

instruments.

The

automotive

industry

use

MCS

51

microcontrollers

in

engine-control

systems,

airbags,

suspension

systems,

and

antilock

braking

systems

(ABS)。

The

AT89C51

is

especially

well

suited

to

applications

that

benefit

from

its

processing

speed

and

enhanced

on—chip

peripheral

functions

set,

such

as

automotive

power-train

control,

vehicle

dynamic

suspension,

antilock

braking,

and

stability

control

applications。

Because

of

these

critical

applications,

the

market

requires

a

reliable

cost-effective

controller

with

a

low

interrupt

latency

response,

ability

to

service

the

high

number

of

time

and

event

driven

integrated

peripherals

needed

in

real

time

applications,

and

CPU

with

above

average

processing

power

in

a

single

package。

The

financial

and

legal

risk

of

having

devices

that

operate

unpredictably

is

very

high.

Once

in

the

market,

particularly

in

mission

critical

applications

such

as

an

autopilot

or

anti-lock

braking

system,

mistakes

are

financially

prohibitive。

Redesign

costs

can

run

as

high

as

a

$500K,

much

more

if

the

fix

means

2

back

annotating

it

across

a

product

family

that

share

the

same

core

and/or

peripheral

design

flaw。

In

addition,

field

replacements

of

components

is

extremely

expensive,

as

the

devices

are

typically

sealed

in

modules

with

total

value

several

times

that

of

the

component。

To

mitigate

these

problems,

it

is

essential

that

comprehensive

testing

of

the

controllers

be

carried

out

at

both

the

component

level

and

system

level

under

worst

case

environmental

and

voltage

conditions.

This

complete

and

thorough

validation

necessitates

not

only

well—defined

process

but

also

a

proper

environment

and

tools

to

facilitate

and

execute

the

mission

successfully.

Intel

Chandler

Platform

Engineering

group

provides

post

silicon

system

validation

(SV)

of

various

micro-controllers

and

processors.

The

system

validation

process

can

be

broken

into

three

major

parts.

The

type

of

the

device

and

its

application

requirements

determine

which

types

of

testing

are

performed

on

the

device.

1.2

The

AT89C51

provides

the

following

standard

features

4Kbytes

of

Flash,

128

bytes

of

RAM,

32

I/O

lines,

two

16—bittimer/counters,

a

five

vector

two-level

interrupt

architecture,

a

full

duple

ser—ial

port,

on-chip

oscillator

and

clock

circuitry。

In

addition,

the

AT89C51

is

designed

with

static

logic

for

operation

down

to

zero

frequency

and

supports

two

software

selectable

power

saving

modes。

The

Idle

Mode

stops

the

CPU

while

allowing

the

RAM,

timer/counters,

serial

port

and

interrupt

sys

—tem

to

continue

functioning。

The

Power—down

Mode

savesthe

RAM

contents

but

freezes

the

oscil–lator

disabling

all

other

chip

functions

until

the

next

hardware

reset.

1.3Pin

Description

VCC

Supply

voltage。

GND

Ground。

Port

0:Port

0

is

an

8-bit

open—drain

bi-directional

I/O

port。

As

an

output

port,

each

pin

can

sink

eight

TTL

inputs.

When

1s

are

written

to

port

0

pins,

the

pins

can

be

used

as

high

impedance

inputs.

Port

0

may

also

be

configured

to

be

the

multiplexed

low

order

address/data

bus

during

accesses

to

external

program

and

data

memory.

In

this

mode

P0

has

internal

pull

ups。

Port

0

also

receives

the

code

bytes

during

Flash

programming,

and

outputs

the

code

bytes

during

program

verification.

External

pull

ups

are

required

during

program

verification.

Port

1:Port

1

is

an

8-bit

bi—directional

I/O

port

with

internal

pull

ups。

The

Port

1

output

buffers

can

sink/so

-urce

four

TTL

inputs。

When

1s

are

written

to

Port

1

pins

they

are

pulled

high

by

the

internal

pull

ups

and

can

be

used

as

inputs。

As

inputs,

Port

pins

that

are

externally

being

pulled

low

will

source

current

(IIL)

because

of

the

internal

pullups.

Port

1

also

receives

the

low—order

address

bytes

during

Flash

programming

and

verification。

Port

2:Port

2

is

an

8—bit

bi-directional

I/O

port

with

internal

pull

ups。

The

Port

2

output

buffers

can

sink/source

four

TTL

inputs.

When

1s

are

written

to

Port

2

pins

they

are

pulled

high

by

the

internal

pull

ups

and

can

be

used

as

inputs.

As

inputs,

Port

pins

that

are

externally

being

pulled

low

will

source

current

(IIL)

because

of

the

internal

pull

ups.

Port

emits

the

high-order

address

byte

during

fetches

from

external

program

memory

and

during

accesses

to

Port

2

pins

that

are

externally

being

pulled

low

will

source

current

(IIL)

because

of

the

internal

pull

ups。

Port

2

emits

the

high—order

address

byte

during

fetches

from

external

program

memory

and

during

accesses

to

external

data

memory

that

use

16-bit

addresses

(MOVX@DPTR)。

In

this

application,

it

uses

strong

internal

pull—ups

when

emitting

1s.

During

accesses

to

external

data

memory

that

use

8—bit

addresses

(MOVX

RI),

Port

2

emits

the

contents

of

the

P2

S

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论