摘 要
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
(优秀毕业设计:)
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
3 单片机 PIC16F877 21
3.1 单片机 PIC16F877芯片介绍 21
3.2 PIC单片机的软件开发环境和硬件开发工具 23
5 系统软件设计 27
结 论 39
参 考 文 献 40
致 谢 41