1 Introduction
CAN bus is a serial communication network that effectively supports distributed control or real-time control. It can realize a fully distributed multi-machine system without the distinction between master and slave. It has the characteristics of fast transmission speed, automatic resolution of bus competition, good real-time performance, high reliability, and strong error correction ability. It has become an international bus standard. Due to the many advantages of CAN bus, its application range ranges from high-speed networks to low-cost multi-line networks. It has been widely used in the fields of automotive engine control components, sensors, anti-skid systems, industrial automation, building environmental control, machine tools, elevator control, medical equipment, etc. in the field of automation electronics.
SJA1000 is an independent CAN controller, mainly used for mobile targets and local area network control in general industrial environments. It is a replacement for the PCA82C200 CAN controller (BasicCAN) of Philips Semiconductor, and it adds a new operating mode - Pelican, which supports the CAN2.0B protocol with many new features. The basic characteristics and electrical parameters of SJA1000 are compatible with the PCA82C200 independent CAN controller, with PCA82C200 mode (the default BasicCAN mode), an extended receive buffer of 64 bytes, first-in-first-out (FIFO), support for CAN2.0A and CAN2.0B protocols, support for 11-bit and 29-bit identification codes, and a communication bit rate of up to 1 Mbps.
Independent CAN controller chip needs an external processor to accept the control of external CPU to run. If the processor has a CAN controller, it will undoubtedly greatly simplify the hardware design of the application system and greatly improve the reliability of the system. Therefore, many processors with CAN controllers have appeared. Philips' P8XC591 microcontroller is one of them. It fully implements the CAN2.0b specification and provides a software migration path directly from the SJA1000 independent CAN controller.
2 Introduction to two communication methods
2.1 Independent CAN controller SJA1000 communication method
SJA1000 is an independent CAN controller, mainly used for local area network control in mobile targets and general industrial environments. It is a replacement for Philips PCA82C200 CAN controller (BasicCAN). On the basis of full compatibility with PCA82C200, it adds a new working mode, Pelican. SJA1000 fully supports CAN2.0B protocol with many new features. The working mode of SJA1000 is selected by the CAN mode bit in its internal clock divider register (CDR). The default mode at hardware reset is BasicCAN working mode [1].
SJA1000 can support the timing characteristics of multiple microprocessors, such as Intel mode or Motorola mode. The interface between SJA1000 and microprocessor is very simple. Microprocessor accesses SJA1000 in the same way as external memory. When designing the interface circuit, the chip select address of SJA1000 should not conflict with the chip select address of other external memory in logic.
SJA1000 has two modes for the microprocessor to access its internal registers. The access in the two modes is different. These two modes are reset mode and working mode. When the hardware is reset, the controller is offline, or the request bit is set, SJA1000 enters reset mode. When the reset request bit in its internal control register (CR) is cleared, SJA1000 enters working mode. Some internal registers can only be accessed in reset mode, some registers can only be accessed in working mode, and some registers can be accessed in both modes.
2.2 Communication method of Philips microcontroller p8xc591
The P8XC591 from Philips Semiconductor is a high-performance 8-bit microcontroller manufactured using an advanced COMs process with an on-chip CAN controller. It is derived from the MCS-51 microcontroller family, uses the powerful 80C51 instruction set, and successfully includes the Pelican function of the Philips Semiconductor SJA1000 CAN controller, providing dedicated hardware, and its block diagram is shown in Figure 1. The fully static core provides extended power saving. The oscillator can be stopped and resumed without data loss. The improved 1:1 internal clock divider achieves a 500ns instruction cycle at a 12MHz external clock rate [1].
Figure 1 Block diagram of P8XC591
The P8XC591 is a high-performance microcontroller. Its dedicated hardware architecture and enhanced Philips "RX+ core" make it widely used in industrial control and automotive fields. The on-chip CAN controller provides many dedicated hardware functions for CAN applications. The P8XC591 fully implements the CAN2.0b specification and provides a software migration path directly from the SJA1000 stand-alone CAN controller. The P8XC591 has CAN expansion features, including enhanced receive filters, support for system maintenance, diagnosis, system optimization, and receive FIFO features, making the P8XC591 have a very wide range of applications.
The embedded CAN controller included in the P8XC591 has the following functional modules: the CAN core module, which controls the transmission and reception of CAN frames according to the CAN2.0B specification; the CAN interface module, which contains 5 special function registers that realize the connection between the CPU and the CAN controller. The access to important CAN registers is realized through the fast automatic increase addressing feature and the bit addressing of the special function registers; the transmit buffer module of the CAN controller, which can save a complete CAN information extension or standard frame format. As long as the transmission information is started by the CPU, the bytes are transferred from the transmit buffer to the CAN core module. When receiving a message, the CAN core module converts the serial bit stream into parallel data input to the receiving filter. Through this programmable filter, the P8XC591 determines the actual received information. All data received by the receiving filter are stored in the receiving FIFO (64 bytes). Depending on the operating mode and data length, the receiving buffer can save up to 21 CAN messages. This gives users more flexibility in specifying the interrupt service and interrupt priority of the system, because the possibility of data overflow is greatly reduced.
In addition to the common CAN features, the P8XC-591 also provides enhanced Pelican. Pelican has four independently configurable receive filter groups, each with four selectable receive filter configurations; each receive filter has a 32-bit specifier, a 32-bit code, and a 32-bit mask; all filter configurations can be changed during operation; support for higher-layer protocol receive filters; receive FIFO features; listen-only mode and self-test mode; receive interrupts can only be generated when the FIFO receive interrupt level is reached; receive interrupts are generated immediately when a high-priority data frame is received; support for system maintenance, diagnosis, and optimization features [2].
3 Comparison of two communication methods
When an independent CAN controller receives and sends data, when designing the interface circuit between the microprocessor and SJA1000, the interface mode between the microprocessor and SJA1000 must be selected first, and then the chip select address of SJA1000 should not conflict with other external memories, and the reset circuit of SJA1000 should be low level effective. The design of the hardware circuit is relatively complex. If you don't pay attention to any problem, it may cause the data to be unable to be sent and received.
The internal registers of SJA1000 are distributed in the continuous address space of 0 to 31, including the control segment and the information buffer. The control segment can be programmed to configure the communication parameters (such as baud rate, bit timing, etc.) during initialization loading. The microcontroller also controls the communication status on the CAN bus through this segment. The information buffer is divided into a send buffer and a receive buffer. The microprocessor writes the information to be sent into the send buffer, and then starts the send command to send the message. The received information that meets the receiving conditions is placed in the receive buffer, and the microprocessor can read the information and process it.
If the hardware circuit design uses the philips company's built-in CAN controller microcontroller p8xc591, the above problems will not exist. Since the p8xc591 contains an on-chip CAN controller, the p8xc591 can directly exchange data with external CAN nodes through the two pins txdc and rxdc. The CAN controller built into the p8xc591 is upwardly compatible with sja1000 in software. The external components required for the CAN node circuit connected to the p8xc591 are only a crystal oscillator plus two capacitors to drive the on-chip oscillator, a resistor and capacitor connected to the reset pin. The on-chip power-on reset circuit and a transceiver pca82c250 are used to connect the p8xc591 to the CAN bus. Therefore, we can use it very conveniently, and we don't have to consider the connection of many external circuits, so that we can avoid many easy errors.
P8XC591 completes data exchange with other CAN nodes by setting CAN's special function registers such as the address register (CANADR), data register (CANDAT), mode register (CANMOD), control register (CANCON), status register (CANSTA), bus timing register (BTR0, BTR1), etc., as well as reading and writing the send and receive buffers.
4 Conclusion
Through the introduction of this article, we have a better understanding of the independent CAN controller SJA1000 and the Philips P8XC591 microcontroller. Through the latter, we can simplify the task of connecting two processors to a single microcontroller. This greatly simplifies the hardware connection of the circuit and improves the reliability of the system.
Previous article:A brief discussion on the control system technology of subway platform screen doors
Next article:Superconducting energy-saving technology that can be used from maglev trains to railways (Part 1)
- Popular Resources
- Popular amplifiers
- Mir T527 series core board, high-performance vehicle video surveillance, departmental standard all-in-one solution
- Akamai Expands Control Over Media Platforms with New Video Workflow Capabilities
- Tsinghua Unigroup launches the world's first open architecture security chip E450R, which has obtained the National Security Level 2 Certification
- Pickering exhibits a variety of modular signal switches and simulation solutions at the Defense Electronics Show
- Parker Hannifin Launches Service Master COMPACT Measuring Device for Field Monitoring and Diagnostics
- Connection and distance: A new trend in security cameras - Wi-Fi HaLow brings longer transmission distance and lower power consumption
- Smartway made a strong appearance at the 2023 CPSE Expo with a number of blockbuster products
- Dual-wheel drive, Intellifusion launches 12TOPS edge vision SoC
- Toyota receives Japanese administrative guidance due to information leakage case involving 2.41 million pieces of user data
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Smart Wardrobe] Material Unboxing ESP32-S3-BOX
- A valve is used in the water supply of the product. The valve is opened when water is used and closed when water is not used. How to measure the force of the opening and closing valve?
- Taiwan Sun Yat-sen University ASIC Laboratory Comprehensive Script Tutorial
- MSP430 Program Library--Digital Tube Display
- How to add hard interrupt to DSP/BIO in DM6437
- Six sharings of power supply design experience
- DSP28335 pwm program dead zone experiment
- Connecting a TVS in parallel to the input of the DCDC chip as protection will limit the power input range. Is there any good solution?
- [Me and Yatli] + From nothing to something, from something to big, I hope to develop better!
- EEWORLD University Hall----mmWave sensors improve artificial intelligence algorithms to use elevators more efficiently