单片机双机通信系统设计摘要本单片机系统采用AT89C51控制,LED显示、键盘、串行通信等模块组成。本设计只完成了单片机部分的开发设计,没有设计外部的采集和控制电路。因为没有外部采集电路,所以不能完成具体的测量功能,要完成具体的测量功能(如测量压力、温度、湿度)还要配上外部的各种传感器采集电路和相应的软件。单片机双机通信是指由两台单片机组成的网络结构,可以通过串行通信方式实现对某一过程的最终控制。随着计算机技术的发展,双机通信技术也在不断地发展,现在发展比较成熟的还有光纤通信等。由于计算机的飞速发展和控制系统的复杂化,双机通信已经越来越为人们热门的话题之一。目前,单片机多机通信的形式比较多,但通常可以分为星型、环型、串行总线型和主从式多机型四种。若配上采集电路和相应的软件就能将测量结果用LED数码管十进制显示出来,还可以用按键来控制,进行人机对话;系统中设置了2个按键,1个控制A机,另外一个控制B机,双机之间可以实现简单的通信。之所以没有设计外部采集电路是因为设计了外部采集电路系统的功能就比较单一,不方便系统功能的外部扩展。关键词:单片机AT89C51;串行通信;LED数码管显示SCMDoubleCommunicationSystemDesignAbstractItadoptsAT89C51tocontroltheSingleChipmicrocomputersystem,thewholehardwaresystemiscomposedofLEDdisplay,keyboard,serialcommunication.Thedesignhasonlycompletedpartoftheexploitationdesignandhasnotdesignedthecircuitofexternalcollectionandcontrol.Becauseofhavingnotfinishedtheexternalcollectioncircuit,thematerialfunctionofmeasuringhasnotbeenfinished,inordertofinishthematerialfunctionofmeasuringsuchasmeasuringthepressure,temperatureorthemoisture,anditshouldbeequipedwithexternalsensorcollectioncircuitandtherelevantsoftware.SCMdoublecommunicationreferstothenetworkstructureiscomposedoftwosinglechipmicrocomputer,canrealizeserialcommunicationoftheultimatecontrolofaprocess.Withthedevelopmentofcomputertechnology,communicationtechnologyoftwoisinconstantdevelopment,thedevelopmentofmorematurenowandopticalfibercommunication,etc.Duetotherapiddevelopmentofcomputerandthecomplicatedcontrolsystem,doublemachinecommunicationhasbeenoneofthemoreandmorepopulartopicforpeople.Atpresent,theSCMmultimachinecommunicationintheformofmore,butusuallycanbedividedintoserialmainlinestar,ring,andthemaster-slavemodelfourmore.Ifcollectioncircuitandtherelevantsoftwareareequiped,itcanrealizethatthemetricalresultsaredisplayedbynumeraltubeLEDintermofdecimalsystem,italsocanbecontrolledbykeystroke,makestheman-machineconversation.Thesystemhasbeensetupinthetwobuttons,onetocontrolAmachine,anothercontrolBmachine,doublemachinecanrealizesimplecommunication.Thereasonwhytheexternalcollectioncircuithasnotbeendesignedisbecausethatthefunctionofitwillbesingleifitisdesignedanditwillnotbeconvenienttospreadthefunctionofthesystem.Keywords:MicrocomputerAT89C51;serialcommunication;LEDnumeraltubedisplay目录引言................................................................................................................................................................1第1章绪论................................................................................................................................................21.1系统开发背景和系统设计的意义..................................................................................................21.2设计目标...............................................................................................................................................21.3设计方案的选择......................................