您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 能源与动力工程 > 下载吉林化工学院信控学院专业综合设计说明书
下载吉林化工学院信控学院专业综合设计说明书基于RS-485高速通信系统设计学生学号:06530212学生姓名:孙杰专业班级:电信0602指导教师:郑宝华职称:副教授起止日期:2009.12.21~2010.1.8吉林化工学院JilinInstituteofChemicalTechnology专业综合设计任务书一、设计题目:基于RS-485高速通信系统设计二、设计目的:1.培养学生的科学性,系统性和全面性的设计素质;2.开拓学生的设计思路,增强学生理论知识与实践相结合的能力;3.训练学生的小组组织能力和团队的分工合作精神。三、设计任务及要求1.设计RS-485通信系统的电路原理图,下位机用单片机实现,RS-485协议使用芯片MAX485实现;2.设计系统的上位机程序,在上位机上要求显示时间,即数字钟,并将时、分和秒的数据发送到下位机;3.设计下位机程序,使下位机能接受到上位机发来的数据,并用液晶进行实时显示。四、设计时间及进度安排设计时间共三周(2008.12.21~2009.1.8),具体安排如下表:周安排设计内容设计时间第一周依任务书要求,查阅RS-485协议等相关资料并设计电路图,用Protel画出电路原理图。2009.12.21~2009.12.25第二周按电路原理图连接硬件电路并调试硬件,编写驱动程序并调试程序,完成功能。2009.12.28~2009.12.31第三周完成系统的联调,总结撰写设计报告,准备答辩。2010.1.4~2010.1.8五、指导教师评语及学生成绩指导教师评语:年月日成绩指导教师(签字):目录专业综合设计任务书······································································································I第1章绪论················································································································3第2章RS-485串口通信协议·························································································42.1RS232和RS485的性能比较·················································································42.2常用串行接口标准·····························································································42.2.1RS-232接口标准························································································52.2.2RS-422与RS-485接口标准··········································································52.2.3RS-232与RS-485之间转换原理和接法··························································6第3章系统总体设计···································································································83.1微控制器概述····································································································83.1.1C8051F410单片机概述···············································································83.1.2C8051F410单片机的特性············································································83.2LCD3310液晶显示器概述··················································································103.3C8051F410单片机与RS-485总线接口··································································11第4章软件设计········································································································134.1上位机程序设计······························································································134.1.1VB语言介绍···························································································134.1.2设计窗体及控件说明·················································································134.1.3上位机源程序··························································································144.2下位机程序设计······························································································164.2.1程序设计方法分析····················································································16结论···················································································································17参考文献···················································································································19附页一整机电路图·····································································································20附页二下位机程序·····································································································21第1章绪论随着数字技术的发展和计算机的日益广泛应用,现在一个系统往往由多台计算机组成,需要解决多站、远距离通信的问题。串行通信是主要的通信手段,与并行通信相比,尽管它通信速度较慢,但具有传输线少、传输距离长、连接简单、数据传输可靠性高等特点,因此在通信系统中得到了广泛的应用。目前,有多种接口标准可用于串行通信,其中包括RS-232,RS-422,RS-423和RS-485。RS-232是最早的串行接口标准,在短距离、较低波特率串行通信中得到了广泛应用。其后发展起来的是RS-422和RS-485,RS-485是平衡传送的电气标准,比起RS-232非平衡的传送方式在电气指标上有了大幅度提高。RS-485串行接口的电气标准实际上是RS-422的变型,它属于七层OSI(开放系统互连)模型物理层的协议标准。依赖其性能优异、结构简单、容易组网的优点,RS-485总线标准得到了越来越广泛的应用。RS-485技术(EIA-485过去叫做RS-485或RS485)是隶属于ISO体系物理层的电气规定为2线,全双工,多点通信的标准。当以高数据速率或长距离进行通信时,差分数据传输可在大多数应用中提供优良的性能。差分信号有助于消除在网络中作为共模电压出现的接地偏移和感应噪声信号的影响。RS-485规定符合真正多点通信网络要求,并且该标准规定在一条单总线上支持32个驱动器和32个接收器。本次设计介绍了关于RS-485高速通信系统的原理及设计方法。主要包括RS-485高速通信系统的硬件设计,软件设计及系统的测试。其中硬件设计包括显示电路的设计,主要介绍了上位机计算通过串口采集底层设备的数据,在上位机上要求显示时间,即数字钟,并将时分秒的数据发送到下位机,通信电路的设计主要介绍了下位机通过RS-485的控制端输入,使下位机能接受到上位机发来的数据,并用LCD3310进行显示。第2章RS-485串口通信协议2.1RS232和RS485的性能比较典型的串行通讯标准是RS232和RS485,它们定义了电压、阻抗等,但不对软件协议给予定义。RS485的特性包括:1.RS-485的电气特性:逻辑“1”以两线间的电压差为+(2—6)V表示;逻辑“0”以两线间的电压差为-(2—6)V表示。接口信号电平比RS-232降低了,不易损坏接口电路的芯片,且该电平与TTL电平兼容,可方便与TTL电路连接。2.RS-485的数据最高传输速率为10Mbps。3.RS-485接口采用平衡驱动器和差分接收器的组合,抗共模干扰能力强,即抗噪声干扰性好。4.RS-485接口的最大传输距离标准值为4000英尺,实际上可达3000米,另外RS-232接口在总线上只允许连接1个收发器,即单站能力。而RS-485接口在总线上是允许连接多达128个收发器,即具有多站能力,这样用户可以利用单一的RS-485接口方便地建立起设备网络。因RS-485接口具有良好的抗噪声干扰性,长的传输距离和多站能力等上述优点就使其成为首选的串行接口。因为RS-485接口组成的半双工网络一般只需二根连线,所以RS-485接口均采用屏蔽双绞线传输。RS=485接口连接器采用DB-9的9芯插头座,与智能终端RS-485接口采用DB-9(孔),与键盘连接的键盘接口RS-485采用DB-9(针)。2.2常用串行接口标准RS-232、RS-422与RS-485标准只对接口的电气特性做出规定,而不涉及接插件、电缆或协议,在此基础上用户可以建立自己的高层通信协议。RS-232、RS-422与RS-485都是串行数据接口标准,都是由电子工业协会(EIA)制订并发布的。RS-232在1962年发布,RS-422由RS-232发展而来,为改进RS-232通信距离短、速率低的缺点,RS-422定义了一种平衡通信接口,将传输速率提高到10Mbps,传输距离延长到4000英尺(速率低于100Kbps时),并允许在一条平衡总线上连接最多10个接收器。RS-422是一种单机发送、多机接收的单向、平衡传输规范,被命名为TIA/EIA-422-A标准。为扩展应用范围,E
本文标题:下载吉林化工学院信控学院专业综合设计说明书
链接地址:https://www.777doc.com/doc-3432609 .html