I基于RS485的变送器通信模块设计摘要:以往的变送器大多是模拟量输出,模拟量因受电源的限制,其数据表达是有限的且抗干扰能力弱。总线技术的发展使得变送器的数字量输出成为一大发展趋势,采用数字量输出的变送器数据表达比模拟量更精确,且抗干扰能力更强。RS485总线支持多点数据通信方式,可对共模干扰进行抑制。总线的信号收发装置具有良好的灵敏度,可检测的电压范围较广,因此传输信号可在较远的距离上得到有效恢复。基于此可知RS485总线在工程现场得到了大量应用。因此研究设计基于RS485的变送器通信模块,使得传统变送器的数字量传输成为可能,具有较强的实用价值。关键词:变送器、RS485总线、通信模块IIDesignoftransmittercommunicationmodulebasedonRS485Abstract:Inthepast,mostofthetransmitterswereanalogoutputs.Theanalogoutputswerelimitedbythepowersupply,sothedataexpressionwaslimitedandtheanti-interferenceabilitywasweak.Thedevelopmentofbustechnologymakesthedigitaloutputofthetransmitterbecomeabigdevelopmenttrend.Thedataexpressionofthetransmitterusingdigitaloutputismoreaccuratethantheanalogone,andtheanti-interferenceabilityisstronger.RS485busUSEShalf-duplexcommunication,supportsmulti-pointdatacommunication,adoptsbalancedtransmissionanddifferentialreception,andcaneffectivelysuppresscommonmodeinterference.Inaddition,thebustransceiverhashighsensitivityandcandetectvoltageaslowas200mv,sothetransmissionsignalcanberecoveredbeyondkilometers.Becauseoftheseadvantages,RS485bushasbeenwidelyusedinengineeringfield.Therefore,theresearchanddesignofthetransmittercommunicationmodulebasedonRS485makesthedigitaltransmissionofthetraditionaltransmitterpossibleandhasstrongpracticalvalue.Keywords:transmitter,RS485bus,communicationmoduleIII目录绪论..................................................................................................................1研究背景及意义.......................................................................................1研究目的...................................................................................................1发展现状...................................................................................................11.方案设计.......................................................................................................21.1RS485介绍...........................................................................................21.2RS232与RS485的比较.......................................................................31.3RS485总线布线规范...........................................................................32.硬件设计.......................................................................................................42.1MAX485芯片及其接口电路...............................................................42.1.1MAX485芯片简介......................................................................42.1.2硬件接口...................................................................................42.1.3工作原理...................................................................................52.2单片机最小系统..................................................................................53.软件设计.......................................................................................................73.1Modbus协议简介................................................................................73.2Modbus帧格式..........................................................................