基于MCP2515的CAN总线接口设计(新)

以下是资料介绍,如需要完整的请充值下载. 本资料已审核过,确保内容和网页里介绍一致.  
无需注册登录,支付后按照提示操作即可获取该资料.
资料介绍:

摘    要
CAN总线上的接口是网络上报文的接收和发送站,一般由单片机和可编程的CAN通信控制器组成。
本文首先较为详细地分析了控制器局域网CAN总线的发展历程及未来的发展,论述了CAN总线的特点和通信协议,并介绍了CAN的高层协议。再次介绍了一种新型的独立CAN通信控制器MCP2515,以及MCP2515的功能,结构和工作原理,最后用单片机中常用的PIC16F877和MCP2515完成硬件接口电路。由于使用了高速SPI接口收发数据,提高了CAN报文的传输能力,同时扩大了CA接口解决方案所采用的单片机的选择范围,而不必强求MCU必须内含CAN总线控制模块。软件设计时,给出了软件流程图和程序。本接口在对软件稍作修改后就可以通过SPI接口和MCP2515交换数据。这样,不需要更换MCU就可以在现有的产品上增加CAN总线的通信功能,从而达到了产品的快速更新。

关键词:CAN总线; MCP2515; PLC16F877
 
Based on the MCP2515 CAN bus interface design
Abstract
CAN Bus interface on the network is reported to receive and send text of the station. General from the CAN microcontroller and programmable communications controller.
    This paper is more detailed analysis of the CAN Bus course of development and the future development of the CAN bus on the characteristics and communication protocol, introduced the CAN and the high-level agreements. Once again introduced a new independent CAN communications controller MCP2515, and the MCP2515 function, structure and working principle, commonly used in the final with the PIC16F877 MCU and MCP2515 complete hardware interface circuit. As the use of high-speed SPI interface send and receive data, to improve the text of the CAN transmission capacity, while expanding the CA interface solutions used by the MCU range of options, rather than be forced MCU embedded CAN bus control module. Software design, is a software flow chart and procedures. The interface in the software can be slightly amended after the SPI interface and MCP2515 exchange of data. In this way, do not need to replace the MCU on the existing products can be added to the CAN bus communication to achieve a rapid product updates.

Key words: CAN bus; MCP2515; PLC16F877

目    录 20800字
摘    要 I
Abstract II
引    言 1
1  控制器局部网CAN 2
1. 1  CAN总线概述 2
1.1.1  CAN总线的形成与发展趋势 2
1.1.2  CAN总线技术特点 3
1.1.3  CAN总线通信方案分析 4
1. 2  CAN总线技术规范 5
1.2.1  层结构及功能 5
1.2.2  帧格式及类型 6
1.2.3  错误处理和故障界定 9
(优秀毕业设计:www.2bysj.cn)
1. 3  基于CAN总线的高层协议 11
1.3.1  Device Net 11
1.3.2  CAN open 12
2  CAN通信控制器MCP2515 14
2.1  MCP2515芯片功能介绍 14
2.1.1  MCP2515的结构及引脚说明 14
2.1.2  MCP2515主要功能参数及电气特性 15
2.2  MCP2515内部结构和工作原理 16
2.3  MCP2515的工作模式和内部寄存器说明 16
2.4  MCP2515的帧选择方式 17
2.5  MCP2515的总线位定时寄存器CNF1、CNF2、CNF3 18
2.6  时钟分频器 CANCTRI 18
2.8  MCP2515的操作时序 19
单片机 PIC16F877 21
3.1  单片机 PIC16F877芯片介绍 21
3.2  PIC单片机的软件开发环境和硬件开发工具 23
5  系统软件设计 27
结    论 39
参 考 文 献 40
致    谢 41