基于arm的以太网与can总线协议转换网关的设计 - 图文 下载本文

内容发布更新时间 : 2024/5/18 15:35:36星期一 下面是文章的全部内容请认真阅读。

本 科 毕 业 设 计(论文)

arm的以太网与can总线协议转换网关

学生姓名:刘 欢 学 号:08082323

专业班级:通信工程2008级3班 指导教师:王风华

2012年6月15日

目:基于的设计中国石油大学(华东)本科毕业设计(论文)

摘 要

工业的发展迫切需求工业网络与信息网络融合,以实现信息的通讯和共享,满足对管理和控制的一体化要求。因此,实现控制网络与信息网络的融合成为当今的热点问题。

本文探讨了CAN总线与以太网互联的方法,利用ARM9 S3C2410为主控制器,设计嵌入式网关转换器,实现了在Linux环境下CAN总线与以太网的互联和通信。

本文对系统进行了硬件设计,采用微控制器+以太网接口芯片+CAN总线接口芯片实现互联网关,主控制器选用三星半导体公司的ARM9 S3C2410,以太网控制器选用AX88796,CAN控制器选用MCP2510。最后,本文对系统进行了软件设计,完成Linux操作系统在目标机上的安装、下载和移植等工作编写Linux环境下CAN总线的应用程序,完成在Linux操作系统下的CAN-TCP/IP协议转换程序设计,实现CAN总线与以太网这两种不同网络的互联和通信。

关键词:以太网;CAN总线;Linux;网关;协议

中国石油大学(华东)本科毕业设计(论文)

ABSTRACT

The industrial development of the network with top urgent needs information network integration so as to realize the communication and information sharing, meet the management and control of integration .Therefore, to control the network and information network integration has become one of the hot issue.

This paper discuss connection method between the CAN bus and Ethernet, using ARM9 S3C2410 as primarily controller , design the embedded gateway converter ,realized in Linux environment CAN bus and Ethernet connection and communications.

Since then , on the system hardware design , adopting micro controller + Ethernet interface chip + CAN bus interface chip implemented Internet shut. The Lord controller chooses the S3C2410 semiconductor company Samsung ARM9, choose AX88796 as Ethernet controller , choose MCP2510 as CAN controller. Finally on the system software design , complete the Linux operating system in your target machine installation , download , and transplantation , write down the applications of Linux CAN ,complete in the Linux operating system CAN-TCP/IP protocol conversion program design , realization CAN bus and Ethernet the two different network interconnection and communication.

Keywords: Ethernent; CAN bus ;Linux; Gateway; Protocol

中国石油大学(华东)本科毕业设计(论文)

目 录

第1章 前 言 ...................................................................................................................... 1

1.1 课题内容及意义 ............................................................................................................. 1 1.2 论文组织结构 ................................................................................................................. 1 第2章 嵌入式网关技术背景 ................................................................................................ 3 2.1 现场总线 ......................................................................................................................... 3 2.1.1 CAN总线的特点 ...................................................................................................... 3 2.1.2 CAN总线通信协议 .................................................................................................. 4 2.2 以太网技术 ..................................................................................................................... 4 2.2.1 以太网发展情况简介 ............................................................................................... 5 2.2.2 TCP/IP协议 ............................................................................................................... 5 2.3 嵌入式操作系统 ............................................................................................................. 7 2.3.1 Linux操作系统概述 ................................................................................................. 7 2.3.2 嵌入式Linux系统的开发流程 ............................................................................... 8 第3章 系统设计 .................................................................................................................. 10 3.1 整体方案 ....................................................................................................................... 10 3.2 网关设计的硬件和软件方案 ....................................................................................... 10 3.3 网关的总体设计方案 ................................................................................................... 10 第4章 系统硬件电路设计 .................................................................................................. 12 4.1 S3C2410最小系统相关硬件电路设计 ........................................................................ 12 4.1.1 电源电路的设计 ..................................................................................................... 12 4.1.2 复位电路设计 ......................................................................................................... 13 4.1.3 时钟电路设计 ......................................................................................................... 13 4.2 CAN接口电路设计 ....................................................................................................... 13 4.3 以太网接口电路设计 ................................................................................................... 14 第5章 系统软件设计 .......................................................................................................... 16 5.1 软件开发系统的搭建 ................................................................................................... 16 5.1.1 Linux 交叉开发模式 .............................................................................................. 16 5.1.2 Linux 宿主机环境的建立与安装 .......................................................................... 17

中国石油大学(华东)本科毕业设计(论文)

5.1.3 ARM下Linux内核的配置和移植 ........................................................................ 18 5.2 CAN模块软件设计 ....................................................................................................... 19 5.2.1 CAN的驱动程序 .................................................................................................... 19 5.2.2 CAN应用程序设计 ................................................................................................ 20 5.3 以太网模块的软件设计 ............................................................................................... 20 5.4 协议转换模块 ............................................................................................................... 22 第6章 总结与展望 .............................................................................................................. 26 6.1 总结 ............................................................................................................................... 26 6.2 展望 ............................................................................................................................... 26 致 谢 ...................................................................................................................................... 28 参考文献 .................................................................................................................................. 29