您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 能源与动力工程 > RS232-485-CAN与CAN接口转换器的设计
西北师范大学物理与电子工程学院电子信息专业2010届毕业论文1/30RS-232/RS-485/CAN与CAN接口转换器设计作者:严复平指导老师:裴东王全州张津京届别:2010专业:电子信息工程班级:(1)班学号:200672020149摘要:现场总线(Fieldbus)是一种应用于生产现场,在现场设备与控制之间实行双向、串行、多节点数字通信的技术。但现场总线在协议标准上存在的差异给实践带来了影响,也影响了总线之间的开放性和互操作性。这种情况下,就需要利用接口转换器使不同总线之间互联。因此,本文针对传统的RS-485网络、RS-232网络与CAN总线网络之间的互联设计出RS-232/485/CAN与CAN接口转换器。论文介绍了CAN总线与RS-232、RS-485和CAN接口转换器的设计与实现。主要从硬件设计和软件设计两个方面进行了论述。首先,对现场总线技术和所要做到工作进行了简要的介绍,并介绍了CAN总线技术的基本原理和相关概念。在硬件设计中,采用德国英飞凌公司的XC858作为微处理器,CAN总线通信接口采用英飞凌公司的芯片TLE6250作为CAN收发器。通过外围电路的设计实现了RS-232电平、RS-485电平和CAN总线电平信号的转换,单片机内集成的CAN控制器与CAN收发器TLE6250的互联。软件设计包括:单片机程序的编写,上位机CAN通信测试软件的编写。关键字:CAN总线,RS-232,RS-485,协议转换,VC西北师范大学物理与电子工程学院电子信息专业2010届毕业论文2/30ResearchanddesignofprotocolconverterbaseonRS-232/RS-485/CANandCANbusAbstract:Fieldbusisthetechnologywhichisusedtorealizebidirectional,serial,multi-nodedigitalcommunicationbetweenfielddeviceandfielddevice,orcontrolroom.Fieldbusisusedinmanufacturefield.Thedifferenceoffieldbusinprotocolstandardbringscomplexitytopracticeandinfluencetheopeningandinteroperabilityofbus.Inthiscase,itneedprotocoltointerconnecttraditionalRS-485networkandCANbus.Itisusedtodatacollectingsystem,throughRS-232interfaceitconnectstocomputerandconfiguresdynamicallyparameteroftwobuses.Firstly,itgivesbriefintroductiontothefieldbustechnologyanditsrelatedwork.Secondly,itdiscoursesonthebasicprincipleandconcept,theframestructureandanti-jamminganalysisandmeasuresoftheCANbushardware.Onthisbasis,itproposestheoveralldesignofthesystem.Inhardwaredesign,semiconductorcompanyInfineonXC858withamicroprocessor,CANbuscommunicationinterface,usingInfineon’sTLE6250asCANtransceiver,throughtheexternalcircuitdesigntoachievetheRS-232levelstoTTLlevelofconversion,theintegratedsinglechipCANcontrollerconnectwithCANtransceiverTLE6250.SoftwaredesignincludesthepreparationofmicrocontrollerCprogramminglanguage,andtheprogrammingofPCCANcommunicationtestsoftware.Keywords:CANbus,RS-232,RS-485,Protocoltransformer,VC西北师范大学物理与电子工程学院电子信息专业2010届毕业论文3/30目录第一章绪论-------------------------------------------------------------------------------------------------------51.1引言---------------------------------------------------------------------------------------------------------51.2现场总线的概述-----------------------------------------------------------------------------------------51.2.1现场总线的特点-----------------------------------------------------------------------------------61.2.2现场总线的现状-----------------------------------------------------------------------------------61.3接口转化研究现状的分析----------------------------------------------------------------------------61.4本文所作的工作-----------------------------------------------------------------------------------------7第二章CAN总线及串口概述--------------------------------------------------------------------------------82.1CAN总线的特点------------------------------------------------------------------------------------------82.2串口协议标准及应用概述---------------------------------------------------------------------------82.3RS-232概述------------------------------------------------------------------------------------------------82.4RS-485概述------------------------------------------------------------------------------------------------92.5串口数据收发原理------------------------------------------------------------------------------------102.6本章小结-------------------------------------------------------------------------------------------------11第三章接口转换器的硬件设计---------------------------------------------------------------------------123.1接口转换器硬件设计的系统架构----------------------------------------------------------------123.2核心控制模块设计-----------------------------------------------------------------------------------123.3CAN总线接口模块------------------------------------------------------------------------------------153.3.1带CAN控制器的单片机XC858-------------------------------------------------------------153.3.2CAN收发器TLE6250----------------------------------------------------------------------------163.3.3CAN接口电路设计-------------------------------------------------------------------------------163.4RS-485接口电路设计---------------------------------------------------------------------------------163.5RS-232接口电路设计---------------------------------------------------------------------------------173.6系统供电电路设计-----------------------------------------------------------------------------------17第四章接口转换器软件设计------------------------------------------------------------------------------194.1软件组成及架构---------------------------------------------------------------------------------------194.2主程序模块---------------------------------------------------------------------------------------------194.3CAN总线通信模块------------------------------------------------------------------------------------20西北师范大学物理与电子工程学院电子信息专业2010届毕业论文4/304.4RS-485通信模块---------------------------------------------------------------------------------------204.5RS-232接口模块---------------------------------------------------------------------------------------21第五章Xcan测试软件设计-------------------------------------------------------------
本文标题:RS232-485-CAN与CAN接口转换器的设计
链接地址:https://www.777doc.com/doc-2848644 .html