Implementation of CAN bus system node simulation platform based on SJA1000

Publisher:dong125612Latest update time:2009-09-22 Source: 电子设计应用Keywords:SJA1000  CAN  node  simulation  automotive 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, 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, and 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 universal simulation platform of the basic component unit of CAN bus system - node is developed. Through simulation, the cost and cycle of research and development of CAN bus system can be 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 CAN PCA82C200 chip standard mode, it 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 inexpensive, making it 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 fields, ordinary PCs can be used as simulators for sensors, actuators, human-machine key controls and display interfaces of various automatic control systems to form a simulation platform and improve the versatility, flexibility and scalability of nodes. Various application systems can be simulated through simulation 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 simulation PC.

The CAN controller SJA1000 is the core and executes the CAN protocol, including data framing and deframing, frame sending and receiving, etc.

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

The CAN controller and transceiver work together to complete the communication protocol functions of the physical layer and data link layer in the CAN protocol. The microprocessor 89C51 controls the functions of the 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 and improve the versatility, flexibility and scalability of the node. Various application systems can be simulated through the simulation PC. [page]

Software design of simulation platform (Figure 2)

The software design mainly involves application programming of the microprocessor, initialization of SJA1000 (including the setting of initial values ​​of working mode, filter, interrupt enable register, etc.), monitoring management and key display. The microprocessor adopts 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 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 modularization, 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 the CAN bus system are reduced. This simulation platform provides convenient research and development conditions for the promotion and application of the CAN bus system in the automatic control system of automobiles and other different fields, and provides a useful reference example for the popularization and improvement of CAN.

Keywords:SJA1000  CAN  node  simulation  automotive Reference address:Implementation of CAN bus system node simulation platform based on SJA1000

Previous article:CDMA mobile phone network access test laboratory test requirements and methods
Next article:Solution of intrusion detection system based on data mining technology

Recommended ReadingLatest update time:2024-11-16 18:07

Distributed Motor Control System Based on DSP and CAN Bus
introduction CAN (Controller Area Network) is a local area network mainly used for monitoring and controlling various devices. It was originally designed by Bosch of Germany for automobile monitoring systems. It has good functional characteristics and high reliability, and has strong anti-interference abili
[Embedded]
Distributed battery management system based on CAN bus
Abstract: This paper mainly discusses the digital technology of automobiles and electric vehicles, the structure of computer control systems, and related issues of field communication. Taking the battery energy system as the application background, a management system with dual CAN buses as internal and external com
[Power Management]
Distributed battery management system based on CAN bus
Research on motion control system of humanoid robot based on CAN bus
I. Introduction Robotics research is the most complex and challenging subject in the field of automation. It integrates multiple disciplines such as mechanics, electronics, computers, materials, sensors, and control technology, and is a concentrated embodiment of multidisciplinary high-tech achievements. Th
[Embedded]
Research on GaAs photocathode preparation and control system based on CAN bus
  GaAs photocathode is a negative electron affinity photocathode with the advantages of high quantum efficiency, concentrated energy and angle distribution of emitted electrons. Therefore, it has been widely used in many fields such as low-light image intensifiers, semiconductor sensitive devices, and spin-polarized el
[Microcontroller]
Research on GaAs photocathode preparation and control system based on CAN bus
How to connect and use CAN bus devices
The Ethernet to CAN module enables devices on the Ethernet bus to send information to devices on the CAN bus and work together. It is a commonly used CAN data converter. So, how should it be connected and used? Let's talk briefly. Since it is a CAN to Ethernet device, it must have integrated CAN port and
[Embedded]
CAN bus data acquisition system solution based on DSPIC30F3013
  introduction   In industrial control, in order to ensure the reliable operation of the system, it is necessary to detect the surrounding environmental variables (such as temperature, air pressure, humidity, etc.). The usual practice is to connect the signals collected by sensors distributed in various places to the
[Embedded]
CAN bus data acquisition system solution based on DSPIC30F3013
Development and application of a vehicle CAN bus test platform
introduction With the development of automotive electronic technology and the continuous improvement of automotive performance requirements, there are more and more electronic devices in cars. In a high-end car designed with traditional wiring methods, the length of its wires can reach 2km, the number of el
[Automotive Electronics]
Development and application of a vehicle CAN bus test platform
Design of CAN to Ethernet interconnection communication scheme for intelligent devices
Design of CAN to Ethernet interconnection communication scheme for intelligent devices At present, since the advantages of Ethernet are still difficult to fully play out in industrial control sites, and the real-time and anti-interference capabilities cannot meet all the requirements in the scope of indust
[Analog Electronics]
Design of CAN to Ethernet interconnection communication scheme for intelligent devices
Latest Test Measurement 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号