您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 基于RS485总线的多机通信系统设计
河南理工大学毕业设计(论文)说明书-1-摘要在多机通信领域.由于单片机具有灵活高效的多机通信功能和价格优势,应用越来越广泛,但由于单片机的收发信号都是TTI电平,驱动能力和抗干扰性有限,实用中常配合其它总线实现互联,RS-485总线就是其中之一。RS-485总线是平衡差分传输,抗干扰性好,最远可传输4000m,可互联多达128个单片机,非常适台组成多机通信系统。在多机通信中,最重要的是保证通信有条不紊地进行,因此需要严格的通信协议和完善的通信软件,本文将重点介绍应用于某大型工程的单片机多机通信协议和通信软件的设计方法。本文介绍一种利用单片机本身所提供的串行通讯口,采用自定义串行通信协议,加上总线驱动器如MAX481、MAX483、MAX485、MAX487等组合成简单的RS-485通讯网络,完成单片机间的多机通讯。关键词:单片机;串行通信;RS-485总线:多机通信协议河南理工大学毕业设计(论文)说明书-2-AbstractIncomputercommunicationfield.Becauseofthesinglechipmicrocomputerhasflexibleandefficientcomputercommunicationfunctionandpriceadvantage,usedmoreandmorewidely,butbecauseofthesinglechipmicrocomputertosendandreceivesignalsareTTIlevel,driveandanti-interferenceabilityislimited,practicalcooperationwithotherbusrealizeinInternet,RS-485busisoneofthem.RS-485busisabalanceddifferentialtransmission,anti-jammingofthegoodandasfaras4000mcouldbetransmitted,interconnectedasmanyas128singlechipmicrocomputer,verycomfortableacompositioncomputercommunicationsystem.Incomputercommunication,themostimportantistoensurethatcommunicationsinanorderlyway,andthereforeneedtostrictcommunicationprotocolandperfectcommunicationsoftware,thispaperwillfocusonintroducesappliedinalargeprojectsingle-chipcomputercommunicationassociationPutthecommunicationsoftwaredesignmethod.Thispaperintroducesamicrocontrolleritselfprovidetheserialcommunicationmouth,usecustomserialcommunicationprotocol,plusthebusdrivesasMAX481,MAX483,MAX485,MAX487combinedintosimpleRS-485communicationnetwork,finishbetweenthesinglechipcomputercommunication.Keywords:SCM;Serialcommunication;RS-485bus:computercommunicationagreement河南理工大学毕业设计(论文)说明书-3-目录第1章绪论.......................................................11.1课题研究背景与意义......................................................................................................11.2单片机多机通信发展......................................................................................................1第2章总体介绍....................................................32.1系统组成..........................................................................................................................32.2RS-485.............................................................................................................................32.3多机通信原理..................................................................................................................4第3章硬件设计及原理..............................................63.180C51单片机硬件结构..................................................................................................63.2最小应用系统设计..........................................................................................................73.2.1时钟电路...............................................................................................................73.2.2复位电路...............................................................................................................83.3总线驱动芯片..................................................................................................................9第4章系统问题及其解决...........................................124.1通信规则........................................................................................................................124.2总线匹配........................................................................................................................134.3硬件抗干扰措施............................................................................................................134.3.1RO及DI端配置上拉电阻................................................................................134.3.2地线与接地.........................................................................................................144.3.3电磁干扰(EMI)问题.....................................................................................144.3.4瞬态保护.............................................................................................................154.3.5总线隔离.............................................................................................................164.4软件抗干扰措施............................................................................................................164.4.1指令冗余.............................................................................................................164.4.2拦截技术.............................................................................................................164.4.3软件“看门狗”技术.........................................................................................17第5章软件设计...................................................195.1系统结构........................................................................................................................195.2通信协议........................................................................................................................195.2.1信息格式.............................................................................................................195.2.2定时与重发..............................................................................................
本文标题:基于RS485总线的多机通信系统设计
链接地址:https://www.777doc.com/doc-315414 .html