Implementation of CAN bus system node simulation platform based on SJA1000

Publisher:czm721002Latest update time:2011-06-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction

Controller Area Network (CAN) is a bus-type serial communication network designed by Bosch of Germany for automobile monitoring systems. It has good networking flexibility, openness, scalability and compatibility. It has strong anti-interference, self-diagnosis, self-monitoring and error correction capabilities, high reliability, simple protocol model structure, good real-time performance, high cost performance and easy development. It is currently the only field bus with international standards. Its application range has far exceeded automobile monitoring systems. It is suitable for distributed automatic control systems in many fields, such as industrial process control and automation, intelligent structure and distributed management, etc., and has become a field bus with great potential for popularization and application.

In order to facilitate the popularization and application of CAN bus in different fields, a simulation platform of the basic component unit of CAN bus system, the node, is developed. Through simulation, the cost and cycle of research and development of CAN bus system are reduced, which is of great practical application value.

This simulation platform uses Philips' SJA1000 chip as the CAN controller. In addition to all the functions of the basic CANPCA82C200 chip standard mode, it also adds a new working mode - PeliCAN mode. This mode supports the CAN2.0B protocol with many new features, such as: stronger compatibility and scalability, stronger error detection and correction capabilities, support for hot plugging, etc. The design is more convenient and flexible, and the chip is low-priced, which is very suitable for use as a general CAN bus system node simulation platform.

In order to meet the needs of automatic control system simulation in various different fields, ordinary PCs can be used as simulators for sensors, actuators, and human-machine keying and display interfaces of various automatic control systems to form a simulation platform and improve the versatility, flexibility and scalability of the nodes. Various application systems can be simulated by simulating PCs.

Hardware design of simulation platform

The hardware system block diagram of the designed CAN bus system node simulation platform is shown in Figure 1.

Figure 1 CAN bus system node simulation platform

The bus system uses low-cost and easy-to-install twisted pair as the communication medium to connect each node into a network system. Each node consists of four functional modules: CAN controller, CAN transceiver, microprocessor and emulated PC.

CAN controller SJA1000 is the core and executes CAN protocol, including data framing and deframing, frame transmission and reception, etc.

Due to the limited bus driving capability of SJA1000, it is connected to the physical bus through CAN transceiver PCA82C250 chip. CAN transceiver converts the logic level signal from CAN controller into a logic level signal suitable for transmission on CAN bus and can be received by CAN transceiver, which plays the role of resisting instantaneous interference and radio frequency interference, increasing communication distance and protecting bus. In order to further enhance the anti-interference capability, high-speed photocoupler 6N137 can be used between SJA1000 and PCA82C250 to realize the level isolation between CAN nodes on the bus.

CAN controller and transceiver cooperate to complete the communication protocol functions of physical layer and data link layer in CAN protocol. Microprocessor 89C51 controls the functions of SJA1000, including initialization and monitoring management, realizes data transmission and reception communication, and executes application layer functions.

The simulation PC realizes level conversion and communication with the microprocessor through the serial port chip MAX232, thereby realizing communication with the CAN bus. The PC can be used as a simulator for sensors, actuators, and human-machine keying and display interfaces of various automatic control systems to form a simulation platform to improve the versatility, flexibility and scalability of the nodes. Various application systems can be simulated by simulating the PC.

Software design of the simulation platform (Figure 2)

The software design mainly involves application programming of the microprocessor, initialization of SJA1000 (including the setting of initial values ​​such as working mode, filter, interrupt enable register, etc.), monitoring management and keying display. The microprocessor adopts the interrupt working mode to improve the response speed and support the real-time performance of the system. The interrupt flow is shown in Figure 2.

Figure 2 Interrupt flow chart

The core of the software design is the data communication between the microprocessor and the CAN controller. Finally, data communication between CAN network nodes is realized. The programming adopts a modular approach, which is convenient for modification, upgrading and debugging, and supports system flexibility, openness and scalability.

Summary

The CAN bus system node simulation platform based on SJA1000 in this paper has been tested and found to be able to correctly send and receive data between two nodes, and realize the communication between the node and the simulation PC, as well as key input, data display and other functions. Its hardware structure is simple and inexpensive, and its software is flexible, easy to modify, upgrade and further develop networking, etc. Various application systems can be simulated through the simulation PC. Through simulation, the cost and cycle of research and development of CAN bus system are reduced. This simulation platform provides convenient research and development conditions for the promotion and application of CAN bus system in automatic control systems in automobiles and other different fields, and provides a useful reference example for the popularization and improvement of CAN.
Reference address:Implementation of CAN bus system node simulation platform based on SJA1000

Previous article:Research on four-way steering gear controller based on CAN bus
Next article:Design and implementation of DS80C390 dual CAN bus hierarchical distributed monitoring system

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号