摘要-I-摘要随着的微控制器技术和通信技术的发展,工业、企业以及交通收费口对信息管理要求不断提高,越来越多的使用自动设备进行控制,但是随着嵌入式技术的发展,各种强电自动设备的管理需要与信息网络相联,原先的人工控制设备已经不能满足要求,需要进一步改进,以适应要求,本课题设计的内容能实现上位机控制强电设备,以及与企业信息化管理网络上位网络的通讯。因此单片机和上位机通信技术的各种应用日益受到人们的重视,特别是在工业控制和交通管理方面得到了巨大的发展。本设计主要应用VisualBasic开发的上位机软件,通过RS232串口通信控制下位机单片机控制板,以实现上位机远程和无按钮化控制情况恶劣复杂的工业现场下位机,并时刻监视下位机的工作端口的状态,应用继电器执行器实现弱电控制强电电路网络的功能。关键词单片机;上位机;串口通信控制;单片机控制板Abstract-II-AbstractThemicrocontrollerwiththedevelopmentoftechnologyandcommunicationtechnology,industry,enterpriseandtrafficinformationmanagementrequirementsoftollhasgreatlyimproved,moreandmoreusedtobeautomaticequipmentcontrol,butwiththedevelopmentoftheembeddedtechnology,allkindsofhighvoltagetobeautomaticequipmentmanagementneedsandinformationnetworkconnected,theoriginalartificialcontrolequipmenthavealreadycan'tmeettherequirements,isaneedtofurtherimprove,inordertoadapttotherequirements,thesubjectofthedesigncontentcanrealizeprincipalcomputercontrolheavyequipment,aswellaswiththeenterpriseinformationmanagementnetworksuperiornetworkcommunication.SoSCMandprincipalcomputercommunicationstechnologyofallkindsofappliedmoreandmoreattentionbypeople,especiallyintheindustrialcontrolandtrafficmanagementgotahugedevelopment.ThisdesignismainlyusedVisualBasicdevelopmentoftheprincipalcomputersoftware,throughRS232serialcommunicationunderthecontrolofamachineMCU,inordertorealizetheprincipalcomputerremoteandnobuttoncomputerizedcontrolconditionscomplexindustrialsiteunderamachine,andthetimewatchingamachineworkportstate,applicationrelayactuatorsweakelectriccontrolinhighvoltagecircuitrealizedthefunctionofnetwork.KeywordsSinglechipmicrocomputer;principalcomputer;Serialinterfacecommunicationcontrol;MCU目录-III-目录摘要............................................................................................................................IABSTRACT..................................................................................................................II第1章绪论.................................................................................................................11.1引言.................................................................................................................11.2课题的来源......................................................................................................11.3课题的意义......................................................................................................1第2章系统设计.........................................................................................................32.1系统总体设计......................................................................................................32.1.1设计框图........................................................................................................32.1.2结构示意图...................................................................................................42.2微控制器介绍.....................................................................................................42.2.1单片机...........................................................................................................42.2.2AT89S51.........................................................................................................82.3串口控制芯片介绍...........................................................................................122.4VB串口通信原理...........................................................................................142.4.1串口通信基本概念......................................................................................142.4.2串口调试......................................................................................................182.4.3VisualBasic串口通信控件..........................................................................18第3章上位机设计...................................................................................................193.1编程软件选择....................................................................................................193.2功能要求及设计原则........................................................................................193.2.1功能要求......................................................................................................193.2.2设计原则......................................................................................................193.3软件系统流程图...............................................................................................213.4软件通信及数据协议.......................................................................................213.5软件界面图和程序...........................................................................................23第4章下位机硬件系统设计...................................................................................244.1单片机硬件系统设计........................................................................................244.1.1电源模块......................................................................................................244.1.2串口通信模块..............................................................................................264.1.3八路开关量输出模块............