基于rs485总线的远程测量系统(终稿).doc
上传人:天马****23 上传时间:2024-09-12 格式:DOC 页数:29 大小:123KB 金币:10 举报 版权申诉
预览加载中,请您耐心等待几秒...

基于rs485总线的远程测量系统(终稿).doc

基于rs485总线的远程测量系统(终稿).doc

预览

免费试读已结束,剩余 19 页请下载文档后查看

10 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

摘要RS-485总线由于采用平衡发送、差分接收的方式,以共模抑制能力强,灵敏度高,传输距离远,传输速率高的特点在远程通讯、远程测量中已得到广泛应用,尤其是在控制领域,将各种控制信息通过RS-485总线实现远距离的监测和控制。本文主要介绍单片机与微机通过RS-485串行总线进行远程通信的测量系统的设计,包括一台PC作为主机进行数据的处理和多个AT82S52单片机作为从机进行实时的温度测量,从机是由DS18B20温度传感器与AT89S52单片机组成一个简单、实用的实时温度测量系统,从机可以进行独立测量,并且将实时测量的温度信息通过具有485总线接口的MAX485芯片将数据传送给主机PC机处理,以实现远距离的实时监控和数据的远距离传输。整个系统设计简单、使用灵活方便、价格低廉,且能够直接输出数字量、因此具有很强的实用性。关键词:远程测量;RS-485;单片机;异步通讯;DS18B20AbstractRS485busduetothesendingandreceivingbalancewaytodifferenceofcommonmoderejectioncapabilityisstrong,highsensitivity,thetransmissiondistance,thecharacteristicsofhightransmissionrateinremotecommunication,remotemeasurementhasbeenwidelyused,especiallyinthecontrolfield,willallkindsofcontrolinformationthroughtheRS485busrealizingremotemonitoringandcontrol.Thispapermainlyintroducesthesingle-chipmicrocomputerandcomputerthroughtheRS485serialbusforremotecommunicationmeasurementsystemdesign,includingaPCashostdataprocessingandmulti-AT82S52singlechipmicrocomputerasfromreal-timetemperaturemeasurementmachine,fromthemachineisthetemperaturesensorDS18B20AT89S52MCMandformasimpleandpracticalreal-timetemperaturemeasurementsystem,fromthemachinemayconductindependentmeasurement,andthetemperatureoftherealtimemeasurementinformationthrougha485businterfaceoftheMAX485chipswilldatatothehostPCmachineprocessing,inordertorealizetheremotereal-timemonitoranddatatransmittedoveralongdistance.Thewholesystemdesignissimple,flexibleandconvenientuse,thepriceislow,andcanoutputthedigitalquantitydirectly,thereforehastheverystrongpracticability.Keywords:Remotemeasurement;RS-485;MCU;Asynchronouscommunication;DS18B20目录摘要iAbstractii第一章绪论11.1选题背景11.2选题意义1第二章系统设计的整体规划32.1RS-485系统设计的要求32.2系统主要技术参数32.3系统方案的确定42.3.1温度传感器的选择42.3.2单片机控制器的选择62.3.3RS485总线接口芯片选择7第三章远程测量系统硬件设计93.1基于RS-485总线的硬件设计93.2RS-232C/RS-485转换电路113.3温度测量系统硬件设计123.3.1单片机控制器AT89S52123.3.2数字温度传感器DS18B20173.4温度测量系统整体电路图18第四章系统的软件设计194.1基于RS-485总线的PC机与单片机通信的软件设计194.1.1AT89S52串行口控制寄存器SCON和PCON