单位代码:005分类号:TN延安大学西安创新学院本科毕业论文(设计)题目:LED数显电子温度计的设计专业:电子信息工程姓名:惠星星学号:0903024143指导教师:马惠铖职称:讲师毕业时间:二零一三年六月ILED数显电子温度计的设计摘要:本文设计了一种利用单片机实现对温度的智能控制及显示的方案。本毕业设计主要研究的是高精度的数字温度计的设计,继而实现对对象的温度测量。测温系统主要包括供电电源、数字温度传感器的数据采集电路、LED显示电路、按键电路、单片机主板电路,数字温度传感器的数据采集电路与单片机主板电路是整个系统的关键。采用温度传感器DS18B20对温度检测的方法及利用软件实现对温度的智能控制。本系统由液晶显示器LCD1602显示实时温度,具有电路结构简单、操作容易、硬件少、成本低等特点。高精度数字温度计的测温过程,由数字温度传感器采集所测对象的温度,并将温度传输到单片机,最终由液晶显示器显示温度值。该数显温度计要求测温范围为-55℃~+125℃,精度误差在0.1℃以内,LED数码管直读显示。数字式温度计完全可以代替传统的水银温度计,可以在家庭中以及工业中都可以应用,实用价值很高。关键词:单片机;DS18B20;LED显示IIThedesignofLEDdigitaldisplayelectronicthermometerABSTRACTIndailylife,single-chipmicrocomputercontrolhasbroughtpeoplegreatconvenience,thedetectionandcontrolofthetemperatureisalsoextremelyimportant.Therefore,thedesignofthedigitalthermometerhaspracticalsignificanceandawiderangeofapplications.Thisarticledescribesaprogrammerwhichuseamicrocontrollertoachieveanddisplaytherighttemperaturebyintelligentcontrol.Thisprogrammermainlyconsistsbytemperaturecontrolsensors,MCU,LEDdisplaymodulescircuit.Themainaimofthisthesisistodesignhigh-precisiondigitalthermometerandthenrealizetheobjecttemperaturemeasurement.Temperaturemeasurementsystemincludespowersupply,dataacquisitioncircuitofdigitaltemperaturesensor,LEDdisplaycircuit,keypadcircuit,boardwithamicrocontrollercircuit,dataacquisitioncircuitofdigitaltemperaturesensorandboardwithamicrocontrollercircuitisthekeytothewholesystem.Thetemperatureprocessofhigh-precisiondigitalthermometer,fromcollectingthetemperatureoftheobjectbythedigitaltemperaturesensorandthetemperaturetransmittedtothemicrocontroller,andultimatelydisplaytemperaturebytheLED.Thedigitalthermometerrequiresthehighdegreeispositive125andthelowdegreeisnegative55,theerrorislessthan0.1,LEDcanreadthenumber,Thisdigitalthermometercouldreplacethetraditionalmercurialthermometer,canbeusedinfamilyandindustrial,highpracticalvalue.KeyWords:MCU;DS18B20;LEDdisplayIII目录1引言.............................................................................................................................................12设计方案....................................................................................................................................13硬件选择....................................................................................................................................23.1STC89C52简介................................................................................................................23.2DS18B20的选择................................................................................................................33.2.1DS18B20简介........................................................................................................33.2.2主要技术指标.......................................................................................................44硬件设计....................................................................................................................................54.1显示电路............................................................................................................................54.2温度测试...........................................................................................................................54.3最小系统...........................................................................................................................64.3.1复位电路................................................................................................................64.3.2晶振电路...............................................................................................................74.3.3DS18B20的接线说明............................................................................................75.系统程序设计........................................................................................................................95.1编写语言及开发工具的选择...........................................................................................95.2主程序流程图.................................................................................................................105.3温度采集流程图.............................................................................................................115.4显示流程图.....................................................................................................................126原理图......................................................................................................................................137总结...........................................................................................................................................14参考文献......................................................................................................................................15致谢.............................................................................................................................................16延安大学西安创新学院本科毕业论文(设计)11引言温度是日常生活、工业、医学、环境保护、化工、石油等领域最常遇到的一个物理量。测量温度的基本方法是使用温度计直接读取温度。最常见到的测量温度的工具是各种各样的温度计,例如,水银玻璃温度计,酒精温度计,热电偶或热电阻温度计等。它们常常以刻度的形式