CAN总线通信研究与软件设计
摘要
现场总线,又称现场网络,是一种工业数据通信总线。在当今时代,现场总线的发展速度非常之快,它的出现为工业的发展提供了非常好的技术保障,为分布式控制系统中的各个节点之间的数据通信提供了非常好的技术保障。CAN总线是一种半双工通信的串行通信网络,属于现场总线的一种,它的数据通信功能强大,能够有效的支持分布式控制或实时控制系统。相比与其它现场总线,CAN总线具有通信快、效率高、易实现、可靠性高等优势,现在已经在很多领域中都得到了应用。
本文主要研究CAN总线通信技术的原理及其技术特点,研究了CAN通信的具体流程,包括初始化流程以及发送接收数据流程。运用C语言编写相关单片机程序以及CAN的通信程序实现通信。
本次软件设计是在keil4开发环境下进行的,主要编写了串口程序,SPI接口程序以及CAN的初始化、发送和接收数据程序,并与相关硬件设计结合,实现两个CAN节点之间的相互的数据通信。
关键词:现场总线;CAN总线;软件设计;通信
CAN munication research and software design
Abstract
Field bus, also called work, is a kind of industrial munication bus. In today's era, the development of field bus speed is very fast, it provides a very good technical support for the development of industry, for munication between each node in distributed control system provides a very good technical support. CAN bus is a half-munication work, belongs to a kind of fieldbus, it has powerful munication function, CAN effectively support distributed control or real-time control system. Compared with other field bus, CAN munication is fast, high efficiency, easy realize and high reliability advantages, now has been applied in many fields.
In this paper, the principle of the CAN munication technology and its technical characteristics, research the munication process, including the initialization process and the process to send and receive data. Using C language to write the microcontroller program, and munication program to munication.
The software design is under the environment of keil4 development, mainly to write a serial program, SPI interface program and CAN the initialization, send and receive data, bined with relevant hardware design, the two CAN achieve munication between nodes.
Key words: The fieldbus;CAN bus; The software munication;
目录
摘要 i
Abstract ii
1 绪论 1
课题背景 1
选题目的 1
选题意义 1
本文结构 2
2 相关技术介绍 3
CAN总线介绍 3
CAN总线技术简介 3
CAN总线的发展概况 4
CAN总线的特点 4
CAN总线协议介绍 5
单片机介绍 6
单片机硬件特性 7
单片机发展状况 7
单片机设计
can总线通信研究与软件设计 来自淘豆网m.daumloan.com转载请标明出处.