Controller Area Network is a field bus that effectively supports distributed control or real-time control. It has the characteristics of high performance and high reliability. With the development of modern automotive technology, technology is increasingly used in the field of automotive electronics.
Automotive Electronics and Bus
With the continuous development of automotive electronics technology, the number of various electronic control units in automobiles continues to increase, and the number of connecting wires increases significantly, thus improving the reliability of communication between control units and reducing wire costs. has become an urgent problem that needs to be solved. For this reason, German company B, which is famous for its R&D and production of automotive electronics, developed the bus protocol and made it an international standard. In the year, the company took the lead in developing a bus protocol controller chip. So far, there are many bus controller chip
manufacturers in the world, a variety of bus protocol controller chips and microprocessor chips integrating bus protocol controllers. In North America and Western Europe, the bus protocol has become the standard bus for automotive computer control systems and embedded industrial control LANs, and has a bottom-level protocol designed specifically for large trucks and heavy industrial machinery vehicles. my country's automotive bus technology started late, but with the continuous progress and development of modern automotive electronics, its research and application are in full swing. The bus is a serial multi-master controller LAN bus, which is a serial communication network that effectively supports distributed control or real-time control. The communication medium of the bus can be twisted pair, coaxial cable or optical fiber. The communication rate can reach b/ and the communication distance can reach /b. Due to its high communication speed, good reliability and low price, it is particularly suitable for the interconnection of small and medium-sized industrial process monitoring equipment and transportation vehicle electrical systems.
The bus has the following basic characteristics
Abolition of the traditional station address encoding, replaced by encoding communication data blocks, and can work in multi-master mode
Using non-destructive arbitration technology, when two nodes When transmitting data to the network at the same time, nodes with low priority actively stop sending data, while nodes with high priority can continue to transmit data without being affected, effectively avoiding bus conflicts
Adopting a short frame structure, each frame is effective The number of bytes is one, the data transmission time is short, the probability of interference is low, and the retransmission time is short
Each frame of data has R check and other error detection measures to ensure high reliability of data transmission and is suitable for Suitable for use in high-interference environments
In the case of serious errors, the node has the function of automatically shutting down the bus and cutting off its connection with the bus so that other operations on the bus are not affected
Node hardware architecture< br/>Core chip
Select the company's high-performance microprocessor. Its outstanding features are as follows
Central processing unit
Built-in memory that can be programmed in the system and in the application, BR can be accessed through the serial port to upgrade and download user programs
Operating standards of clock cycles per machine cycle , optional clock cycle operation per machine cycle, speed up to
Byte R and Byte
interrupt priority, interrupt source
Comes with serial interface at clock cycle Sequence
Three working modes: programmable counter array output, capture/compare, and high-speed output.
Regardless of evaluation in terms of processing power, storage capacity, peripheral resources and network scalability, it is an excellent microprocessor suitable for various fields such as industrial control electronics. In particular, its R-byte massive memory makes it the first choice for many high-speed storage applications.
Interface circuit
The interface circuit is composed of a controller with mature technology and widely used, photoelectric isolation, and transceiver. It should be pointed out that both ends of the bus must be connected with ohm terminal resistors. The interrupt pin is connected to the external interrupt pin
In application/system programming circuit
/ technology has been applied in many high-performance microcontrollers, and its outstanding feature is the convenient and fast implementation of program downloading and updating. The space
~
burns the BR program written into bytes. After powering on, the BR program can be entered through software and hardware setting methods. The program can be implemented through serial port communication through the provided programming software. Online upgrade. Of course, users can also write their own BR programs according to the protocol as needed. By setting the DIP switch hardware, it is forced to enter the BR program after powering on. After the programming program is completed, it is returned to the original state and the user program is entered after powering on again. The serial port level conversion chip is used instead, and its matching capacitor only requires ceramic capacitors. The serial data communication baud rate can reach b.
Crystal oscillator and reset circuit
Connect an external industrial-grade oscillation chip as a clock signal. The reset circuit uses chips for intelligent control. The chip combines the watchdog timer, power monitoring circuit and R function into one. The watchdog timer function sets the R signal after a settable time interval during a system error. The power monitoring circuit detects an undervoltage condition and resets the system when it falls below the threshold. And the R signal remains valid until it is restored and stable. The memory function is word-based and supports protocol-based three-wire access. The first two functions used in this node form a reliable reset circuit.
Switch/Digital, Analog Detection Circuit
The switching devices of automobile nodes such as signal lights, wipers, panels, window glass, electric rearview mirrors, etc. are particularly complex and numerous, and current detection, The water temperature and oil level sensor signals are all nonlinear analog signals, so detecting these switches/analog quantities reliably and in real time has become a problem that automotive electronic hardware must solve. The traditional discrete component holding circuit has poor reliability, especially the serious oxidation of the switch contacts and the waste of a large amount of microprocessors/ports. It is recommended to use R Company's multi-channel switch detection chip. Its outstanding advantages are as follows
Sequence reading and writing,,
One programmable switch input detects grounding or power supply, one ground switch input detects, each switch status change can generate an interrupt
Switch input Voltage from ~ r operating power supply, r up to a maximum of
Selectable wake-up on switch state change
Selectable wet current or
Analog output of pair
Low power of r The current consumption b is less than, the low power consumption current b is less than.
It can be seen that only four port line sequence lines and chip select are needed to complete the detection of switching values, one of which is programmable for docking power switches, and serial and parallel multi-chip level connections can also be performed. The so-called wet current refers to the pull-up and pull-down constant current sources of the input port provided internally. It can be programmed to select or, which has a good effect on ensuring the reliable closing of the switch and removing oxides from the metal contacts. The constant current source of the input port can be driven directly as well. Each input port can be programmed to an analog output state, thereby outputting the voltage of the selected input port on the pin. A linear sensor detection circuit can be formed by using a constant current source and analog output. The chip uses the parallel data sampling integrated chip produced by the company. It is fully compatible with /from pins to functions, but a sample/hold circuit is added internally, the sampling frequency is , and it has full control mode and single working mode. Its sampling accuracy is up to high and meets the requirements of high-speed data collection.
Power device drive circuit
Automobile body control systems need to drive high-power electrical devices, such as lighting signals, front and rear wiper motors, electric windows, electric rearview mirrors, etc. For power drive devices, consider using R company’s automotive-specific power devices. It is an intelligent dual-channel control driver chip dedicated to automotive electrical appliances. Compared with traditional mechanical relays, it provides overcurrent and overheating protection, shorter response time and higher stability. There are two drive channels, each with a maximum operating current. The pin level signals are introduced through the two input ports and converted into level changes of the output channels through the internal logic processing module. Especially suitable for driving signal lights and resistive loads. It is a bridge-type driver chip with feedback, specially designed to drive motor loads that require forward and reverse rotation. It is similar to the one, but only the half-bridge inside must be added with an external tube to form a full-bridge drive circuit. The stable output can be achieved. It is especially suitable for the forward and reverse phase control requirements of high power and inrush current such as electric window motors.
Software structure
The program structure of the system is divided into four parts. The communication program includes the communication of the application layer protocol, the peripheral interface program drives all detection chips and driver chips, and the interrupt service program handles switch signals and fault alarms, etc. message, the main program completes system initialization and task scheduling, feeding the dog, etc. Due to space limitations, the following focuses on the application layer protocol.
This system uses B protocol mode for communication, and the communication bit rate adopts a double acceptance filter mechanism. For convenience of use and modification, the identification code in the communication protocol is designed to be compatible with point-to-point one-to-many and broadcast communication modes. A master-slave structure is used between each node when communicating switching messages. Only the master node receives the message of the sub-node in point-to-point mode, and all the sub-nodes of the master node receive the broadcast mode. Analog message communication uses point-to-point mode between nodes.
Chengdu Panfeng Technology Co., Ltd. is located in the Longquan International Automobile City in Chengdu, Sichuan, the hinterland of the Western Silicon Valley. It is a high-tech enterprise jointly founded by doctors who returned from studying abroad and domestic first-class technical talents, integrating R&D, production, sales and service. The company is committed to providing professional R&D training experimental teaching equipment and technical consulting services for automotive electronics R&D education and vocational training in China's automotive industry.
Chengdu Panfeng Technology is committed to automotive electronics and bus network experimental development and training teaching equipment. It independently develops and provides product schematics and source programs for secondary development. Simulation recording of communication information can be simulated and sent! For more details, please consult
[Business Contact] Cai Peiying Xiao Cai
[Business Telephone] [ ] [WeChat]