仓库温湿度检测系统设计院系自动化学院专业自动化班级学号姓名指导教师负责教师2009年月摘要本设计使用STC89C52单片机作为主控制模块,利用简单的外围电路来驱动1-Wire总线,利用1-Wire总线协议,实现了多点温度和湿度的精确测量。利用STC89C52单片机本身强大的功能和内部RAM资源,可以很方便的实现单片机与PC机间的数据传输,并能利用软件方便的逻辑判断实现了1-Wire总线的ROM搜索,实现了测温器件18B20的枚举,实现了无人干预的测温点的动态裁剪,所以本设计具有很强的现实应用性。另外,本系统的湿度检测没有完成。本文从1-Wire总线的原理入手,详细阐述了1-Wire总线的ROM搜索过程,以及硬件电路的设计、计算和软件的算法。关键词:DS18B20;单片机MCU;串行传输SerialDataTransfer;单总线1-wireinterfaceAbstractThisdesignasthemainSTC8952ofsingle-chipcontrolmodule,usingasimpleexternalcircuittodrivethe1-Wirebus,theuseof1-Wirebusprotocol,toachieveamoreaccuratemeasurementoftemperature.TheuseofMCSSTC89C52powerfulfeaturesanditsowninternalRAMresources,itiseasytoachievesingle-chipandPCdatatransferbetweenaircraftandtheuseofsoftwaretofacilitatetherealizationofthelogictodeterminethe1-WirebusROMsearch,therealizationofthetemperaturemeasurementdeviceenumeration18B20,nointerventiontoachieveadynamictemperaturemeasurementpointcut,sothedesignofpracticalapplication.Inaddition,thesystemdidnotcompletehumiditytesting.Thisarticlefromthe1-Wirebusstartingwiththeprinciple,describedindetail1-WirebusROMsearchprocess,aswellasthedesignofhardwarecircuits,computingandsoftwarealgorithms.Keywords:DS18B20;Single-chipMCU;SerialtransmissionSerialDataTransfer;monobus1-wireinterface目录摘要........................................................................................................................................IAbstract..................................................................................................................................II目录..................................................................................................................................III第1章绪论......................................................................................................................11.1选题背景.......................................................................................................................11.2设计过程及工艺要求...................................................................................................21.2.1基本功能................................................................................................................21.2.2主要技术参数........................................................................................................2第2章系统总体设计........................................................................................................32.1温度传感器的选择.......................................................................................................32.2信号采集.......................................................................................................................42.2.1DS18B20基本知识...............................................................................................42.2.2DS18B20产品的特点...........................................................................................42.2.3DS18B20的引脚介绍...........................................................................................42.3信号分析与处理.................................