本站所列毕业设计(论文)资料均属于原创者所有,初衷是为大家在毕业设计(论文)过程中参考和学习交流之用。

毕业设计我帮你

基于串口和tcp ip的网络通信的研究

基于串口和tcp ip的网络通信的研究

考虑到多协议通信处理机是充分利用以太网技术和嵌入式系统的特点,搭建的应用于工业控制和数据采集领域的数据传输系统。因此论文包括以下几方面内容: (1) 针对RS-232、I2C、TCP/IP协议各自的特点,对多协议通信处理机的可行性和需要达到的要求进行分析和论

如需购买请QQ扫描右边二维码或者加QQ 3449649974 咨询 毕业设计(论文)代做请加QQ 3139476774


  • 详细描述

    基于串口和tcp ip的网络通信研究
    本论文主要研究了以嵌入式系统为核心的多协议通信的实现,利用其串口或I2C总线与底层I/O节点相连,上层则直接联入Internet,解决了不同协议(如RS232、I2C、TCP/IP)之间的数据通信。
    论文介绍了利用AT89C51单片机和RTL8019AS网卡驱动芯片开发的RS-232、I2C转以太网通信协议的嵌入式以太网通信模块,利用该模块可实现将现场设备的RS-232、I2C通信转换为以太网通信,也可以直接将该模块嵌入单片机控制设备使用。然后,论文对嵌入式以太网通信模块的硬件电路设计和驱动程序编写作了详细的介绍,并在不改变以太网TCP/IP协议主体结构的基础上,对TCP/IP协议作了精简处理,以满足现场通信的实时性和可靠性要求。最后论文分析了嵌入式TCP/IP协议的总体框架设计、帧的封装过程及数据包的发送和接收流程。
    本课题完成了对嵌入式以太网通信模块的设计,实现了RS-232、I2C协议和以太网通信协议的相互转换功能,并在利用C语言模块化的编程思想的基础上,用单片机实现了嵌入式TCP/IP协议的设计。测试结果表明该嵌入式以太网通信模块具有可靠性高和成本低等特点,能够充分保证不同协议之间通信的准确性。
    关键词:TCP/IP协议栈;嵌入式Internet;串行通讯;协议转换
    Abstract
    This dissertation mainly research the implementation of a multi-protocol communication with the core of embedded systems, and uses the serial port or the I2C bus connecting the underlying I/O nodes. The upper is directly linked to the Internet,to solve the different protocols(such as RS232, I2C, the TCP/IP) data communications.
    This dissertation reports the design for an embedded Ethernet module for data exchange among RS-232, I2C and Ethernet communication with a micro-controller AT89C51 and a network card driver chip RTL8019AS. This Ethernet module can be directly used to convert the RS-232 or I2C information mode to Ethernet information mode or be embedded in the equipments controlled by microprocessors. Afterwards, this dissertation introduces the designing of hardware circuit and compiling of corresponding driving program in detail. This design simplified the TCP/IP without changing its main structure to meet the demand for real-time and reliability in field communication. In the end of this dissertation, the general frame for embedded TCP/IP, process of frame packing, and the procedure in sending and receiving data are comprehensively analyzed.
    In this project, an embedded Ethernet module was designed and the data exchange among RS-232, I2C protocol and Ethernet protocol was fulfilled with this module. At the same time, based on the modular programming method provided by C language, an embedded TCP/IP was realized with MCU. After debugging, it turns out that the designed embedded Ethernet module is of the high reliability and low cost and can be able to fully assurance the accuracy of communication among different protocols.
    Key words: TCP/IP state; Embedded Internet; Serial Communication; protocol exchange

    目录
    摘要 I
    Abstract II
    第1章 绪论 - 1 -
    1.1 课题背景 - 1 -
    1.2 课题目的和意义 - 1 -
    1.3 主要研究内容 - 2 -
    1.4 本文结构  企鹅182090931 - 2 -
    第2章 系统总体架构 - 4 -
    2.1 硬件方案 - 4 -
    2.2 软件方案 - 5 -
    2.2.1 系统模块划分 - 5 -
    2.2.2 层次协议模型 - 5 -
    2.2.3 TCP/IP协议栈的实现方案 - 6 -
    2.3 开发环境 - 7 -
    第3章 系统硬件实现 - 8 -
    3.1 嵌入式微控制器AT89C51 - 8 -
    3.2 RS-232模块 - 8 -
    3.3 I2C模块 - 9 -
    3.3.1 I2C数据传输 - 9 -
    3.3.2 通用I/O端口作为I2C总线接口 - 9 -
    3.4 以太网模块 - 10 -
    3.4.1 RTL8019AS的寄存器介绍 - 10 -
    3.4.2 RTL8019AS的物理连接 - 13 -
    第4章 系统软件实现 - 15 -
    4.1 数据链路层的实现 - 15 -
    4.1.1 RTL8019AS的初始化 - 15 -
    4.1.2 以太网帧格式 - 16 -
    4.1.3 RTL8019AS的帧接收 - 16 -
    4.1.4 RTL8019AS的帧发送 - 17 -
    4.2 网络层的实现 - 18 -
    4.2.1 地址解析协议ARP - 18 -
    4.2.2 网际协议IP - 19 -
    4.2.3 Internet控制报文协议ICMP - 22 -
    4.3 传输层的实现 - 23 -
    4.4 TCP/IP、RS-232协议、I2C总线协议之间的数据通信 - 29 -
    第5章 系统测试结果 - 32 -
    5.1 PING测试 - 32 -
    5.2 TCP与RS232串口之间的通信 - 32 -
    5.3 TCP与I2C总线之间的通信 - 35 -
    5.4 嵌入式网页 - 36 -
    结论 - 37 -
    致谢 - 38 -
    参考文献 - 39 -
     
    参考文献
    1 沈永春,姜宁.嵌入式多协议网关的设计与实现 自动化仪表. 2007:8-12
    2 Jim Montague. What’s left to say about industrial Ethernet. Control Engineering, 2001:7-17
    3 Ellen Fussel. Striking up communications with factory-floor Ethernet. ISA: InTech, 2001.7-17
    4 Jonas Berge. Using ethernet is no-brainer. ISA. InTech, 2000.7: 12-18
    5 Ken Amold.Embedded Controller Hardware Design[M],LLH Technology Publishing,2000,23-93
    6 卢虎,李勇,李志芳. 嵌入式webserver技术及其实现[J],单片机及嵌入式系统应用,2003,5:71-74
    7 Jonathan W.Valvano, Embedded Microcomputer Systems:Real Time Interfacing[M],Brooks/Cole Publishing Co,2000
    8 黄学雨,成锡岗. 基于AVR单片机的嵌入式“瘦服务器”系统设计思想[J],计算机应用,2003,1: l-2
    9 Andrew S.Tanenbaum. Computer Networks[M], Prentice Hall, 1998, 175-242
    10 曹宇,魏丰,胡士毅. 用51单片机控制RTL8019AS实现以太网通信[J].计算机应用2003年第一期
    11 张伟,徐烁.嵌入式系统前景无限—访美国WindRiVer公司中国区首席代表韩青先生[J].半导体技术,2002年第2期
    12 邓龙军,梁志坤,王泽芳.单片机在以太网卡通信中的应用[M].广东工业大学学报,2001 (4):21-25
    13 胡宾鑫,方方. 一种嵌入式以太网接口的设计与实现[J]. 汕头大学学报, 2003(2):52-56
    14 Postel, J.B. and Reyonld, J.K. Standard for the Transmission of IP Datagrams overIEEE 802 Networks. http://www.IETF.org/ RFC 1042. 199
    15 I-Hai Lin, P.& H. L. Broberg, Internet-Based Monitoring and Controls for HVAC Applications, IEEE Industry Applications Magazine, Jan-Feb 2002, Vol.8, Issue 1, 49-54
    16 RFC-792 ICMP (Internetwork Control Message Protocol),http://www.rfc-editor. org
    17 Labrosse Jean J.“ucos-ii源码公开的实时嵌入式操作系统[M],北京:中国电力出版社,2001,116-163
    18 王金廉,谢剑英,贾青.基于TCP/IP的多线程通信及其在远程监控系统中的应用.电子技术应用,2000.1
    19 陈学泉,关宇东.嵌入式TCP/IP协议单片机技术在网络通信中的应用.电子技术应用,2002.3
    20 吴誉,张卫东等.以太网与现场总线的互连方法.测控技术,2000,19(1):53-56
    http://www.bysj580.com/
    收缩