Abstract: Uses μPD780822 monolithic integrated circuit’s CAN bussing technique to realize the passenger train headlight control and the active status examination. Introduces the CAN main line and the intelligent switch’s in passenger train headlight control system application. Gives the node the hardware design plan, introduced that the node control software’s design and realizes.
Key word: Monolithic integrated circuit; μPD780822; CAN main line; Intelligent switch; Node
1 introduction
CAN (Controller Area Network) is German Bosch Corporation proposed first, is in the present automobile controller local area network is most popular, the most commonly used main line. Its main feature is: The CAN main line for the multi-master station main line, various nodes may in the random time to the network in other node transmitter data, punish a group indiscriminately on own initiative, the correspondence is flexible; The CAN main line uses the unique non-destructive bus arbitration technology, the priority high node transmits the data first, can satisfy the timely request; The CAN main line has point-to-point, a spot to the multi-spots and the overall situation broadcast transmission data function; On the CAN main line each effective byte count most are many are 8, and has CRC and other verification measure, the data error ratio is extremely low, some node presents the grave mistake, but is separated from the main line automatically, on main line’s other operate not affected; CAN main line when 2 wires, system expansion may hang directly the new node on the main line, therefore walks the line to be few, the system easy to expand, the modification is flexible; The CAN main line transmission speed is quick, when the transmitting range is smaller than 40 m, the maximum transmission speed may reach 1 Mb/s. The CAN main line’s application not can only simplify the group of lines, realizes sensor sharing, reduces the system cost, moreover can cut vehicles’ failure rate greatly. The CAN main line’s on automobile application is the modern automobile technology trend of development.
2 CAN main line’s in automobile application
At present, in automobile’s network connections mainly use 2 CAN main lines, one is driving system’s high speed CAN main line, the speed reaches 500 kb/s, another is the automobile body system’s low speed CAN main line, the speed is 100 kb/s. Driving system’s CAN main connecting object is engine controller (ECU), ASR and the ABS controller, the security aerocyst controller, the combination measuring appliance and so on, its essential feature is the same, is the control and the automobile travel direct correlation system. The automobile body system’s CAN main connecting object is 4 above controls in the door lock, the power window, the rear view mirror and the compartment the flare and so on. Somewhat advanced passenger vehicle besides the above 2 CAN main line, will also have the 3rd CAN main line, its main connecting object will be the satellite navigation and the intelligence communications system.
In overseas in Europe, CAN has become in particularly the modern automobile the essential installment, the CAN bussing technique day by day mature, the application is also getting more and more broad, runs quickly, automobiles and so on BMW, populace, Volve, Reynold to use Can take the controller networking the technology. The home just started to the CAN main line’s research, so far did not have the successful application. But our country takes seriously to the vehicles confined network bussing technique’s research and the development, recently the national Department concerned made explicitly the stipulation to the CAN main line’s on luxurious bus application. Believed that this policy releasing will certainly to promote the related enterprise and the Scientific research Unit greatly to the automobile CAN main line’s research and the development application. This article discusses in the passenger train automobile body CAN bus system’s headlight node design, it belongs to the low speed CAN main line’s node design.
3 monolithic integrated circuits and CAN main line modules
NEC is only inferior to the Freescale world second large cart with the monolithic integrated circuit manufacturer, because it promotes in China is quite late, the Domestic enterprise uses not much. The CAN main line module is μPD780822 a monolithic integrated circuit’s peripheral device, is a complete CAN controller. May satisfy the automobile body CAN main line network the request. Besides has the CAN basic function, but also includes some unique functions, like the time synchronism function, the programmable CAN main line awakens with CPU awakens the function, the programmable main line shut down when transmits the first floor reset function and so on. Divides into the control/condition register’s visit and the transmission visit to CAN main line’s/receives buffer’s visit.
The CAN controller transmits the information frame divides into two kinds: Transmission data frame and transmission long-distance frame. Two transmission buffer, one is 16 bytes, one is 8 bytes. 16 bytes buffers may save the standard frame and the expansion frame two kind of form data frames, 8 bytes buffers may use for the data which saves must transmit. When transmission data frame, after the data writes transmits the buffer, if the corresponding transmission request position enables, then the data is transmitted to the CAN main line on, data frame’s data may use the software to establish 1~8 bytes. Data frame’s form as shown in Figure 1.

When CAN controller receive information must first carries on the receive information identifier and the corresponding buffer’s identifier the comparison, only then the identifier same information can receive. μPD780822 monolithic integrated circuit’s CAN module has 2 independent transmission buffers, 2 buffers use in common 1 16 byte data area to save most 8 byte data the CAN frame. The transmission area and the receive area’s structure is similar, when the flag bit and the control position have not established are CAN special-purpose, CPU may its achievement ordinary data memory block use.
The controller receive buffer has 16, receives when the information frame uses the buffer area decided by information quantity register (MCNT). Information which receives from the main line by direct access in transmission buffer. In the work the use receive buffer has not been possible to take by CPU the ordinary RAM use. Each receive buffer has its programmable interrupt to enable the position.
4 network architectures and node
The passenger train automobile body CAN system including the master control node, the light node, the air conditioning node, the vehicle door node and the measuring appliance node and so on, as shown in Figure 2. And, the first headlight node control left and right shows the gallery lamp before, first left, dextraposition lamp, first left and right is in danger the warning light, first left and right is stationed in the headlight, left and right head lamp headlight high beam, left and right head lamp headlight low beam, first left and right fog lamp and first left, right-turn to lamp and so on 16 Control units. Latter headlight node control after left and right shows the gallery lamp, latter left, the right-turn approaches the lamp, latter left and right brake light, latter left, dextraposition lamp, latter left and right fog lamp and latter left and right reversing light and so on 12 Control units. Master control node main receive from pilot’s some switching input signal. The measuring appliance node mainly controls the direction, the water temperature, the machine oil pressure, the brake, the vehicle door, the headlight, ABS/ARS through the receive main line’s on data and defrosts and so on indicating lamps and the control instrument, demonstrated that the vehicle speed, the engine speed, the water temperature, the fuel oil, the machine oil, the voltage, step-by-step values and so on electrical machinery. In air conditioning node control air conditioning’s switch and vehicle temperature hypothesis and so on. Vehicle door and rear view mirror node control vehicle door solenoid valve switch, rear view mirror adjustment switch and rear view mirror heating switch. The security node monitors ABS and the ECAS power source.

5 hardware circuit design
Light node’s hardware architecture as shown in Figure 3, it including light control module and CAN interface module. The light control module by the TLP521-4 electro-optic disconnector and BTS442, the BTS740 intelligence switch is composed. TLP521-4 is 4 group electro-optical disconnectors, 8 TLP521-4 composes 32 group electro-optical isolation, transmits the switch and the switch feedback signal and the monolithic integrated circuit connects. BTS442 is single-channel output intelligence switch (PROFET) which Infineon Corporation produces, has the permission big transient current (above 140 A) and the broad temperature range (- 55℃~ 150℃) and so on merits, 6 BTS442 composes 6 group controlling switches, controls the head lamp headlamp and the fog lamp and so on 6 big current loadings. BTS740 is 4 group output intelligence switch which lnfineon Corporation produces, and makes 1 group the output 2 groups to use, to enable it to pass the great instantaneous current. 5 BTS740 composes 10 group controlling switches to use to control other undercurrent load. BTS442 and BTS740 have the diagnosis feedback function, if presents the mistake, the BTS442 4th pin and the BTS740 4th pin will present a low level signal with the 8th pin on, through the electro-optical disconnector this signal turning on monolithic integrated circuit, will realize the vertex measuring ability, and will feed back through the CAN information frame to the measuring appliance node. All node’s hardware CAN interface module is the same, including light node. Because this kind of monolithic integrated circuit has the CAN main line module, therefore does not need the special CAN controller, the monolithic integrated circuit does not have the CAN transceiver, needs the external connection 82C250 transceiver, middle is the 6N137 electro-optic disconnector. The monolithic integrated circuit, the electro-optical disconnector and CAN transceiver hardware interface electric circuit as shown in Figure 4.


6 node software design
Node software flow as shown in Figure 5. The procedure selects the inquiry method, after the node initialization and reports the normal work, has been at the inquiry condition, when arrives at the light node until the master control node transmission’s light control command, what the monolithic integrated circuit only then may judge the control is which street light light or which several street light light, and through switch’s diagnosis feedback function examination corresponding switch to be whether normal. If normal, to the corresponding high/low end switch transmission corresponding control command, then returns to inquire the condition. If is not normal, to the measuring appliance node transmission corresponding vertex’s not normal information frame, continues to examine the corresponding vertex.
The node initialization is mainly the monolithic integrated circuit initialization, including port initialization and CAN control module initialization. The monolithic integrated circuit port initialization mainly to the I/O mouth which uses the electricity repositions. The CAN module’s initialization is mainly the special function register which the establishment uses, mainly includes the agreement pattern, the approval filter way, the CAN correspondence speed and interrupt register’s establishment and so on. Will approve the code and the approval shield code reads in the approval code register and the approval shield register.
The CAN main line’s software design mainly includes the CAN node the initialization, the data transmission and the receive procedure, has grasped these 3 module design, basically has completed the CAN correspondence software design.
7 concluding remark
Although this node is to control the passenger train headlight design, but also has to other nodes profits from the function, particularly the CAN main line’s hardware interface part, may use in common to the passenger train other CAN link lights, even may use in other non-automobile domain CAN network, like domains and so on industrial automation.