日韩免费一级毛片在线观看-中文日韩亚洲综合-欧美系列日韩另类-欧美激情极品日韩-午夜日韩爱爱毛片视频免费看-欧美日韩一区免费观看-欧美日韩欧美黄色三级

CAN Bus-PROFIBUS-DP Bus Gateway Implementation

1 Introduction

In the mid-80s, the field of automation in order to meet different application requirements, emerged with different technical characteristics of the field bus. Each has its own fieldbus applications, and are trying to expand its applications to expand the scope of its technological monopoly. However, each field bus are to one or a few large multinational corporations as the background, the company's development interests and the bus. The result of competing multiple bus co-existence. According to incomplete statistics, there are more than 200 kinds of the international field bus, which occupy the mainstream of the field bus with dozens of [1]. Fieldbus diversity, for the bus device offers users greater selection of products, but also with the bus for the bus users compatibility problems between devices. Plant expansion, renovation and other process and may be left with a very original field device bus, different standards of products, these devices the use of different field bus to each other can not be achieved between the data Gongxiang, so reducing the device between the Gongneng Jiu complementary advantages. Therefore, the objective for the coexistence of multiple bus facts on how to solve the interconnection of different field bus systems have important practical significance. This paper studies PROFIBUS-DP [2] and CAN [3] are two bus protocol conversion principles, and design a gateway to interconnect these two buses.

2 Design

For the two heterogeneous field bus, the data link layer and application layer protocol is very different to the interconnection between them, need to use the gateway to perform the conversion. Protocol conversion within the gateway is carried out by successive stratification. Fieldbus gateway device 1 to send to the data at different levels of unpacking the agreement, end up in the user data packet. Then in accordance with the Fieldbus protocol layer 2 package, and then sent to the field bus 2 device.

Gateway (gateway) is used for data link layer over layer networking devices, it is equivalent to a protocol converter, which can be two-way, it can be one-way, used to connect different network protocols. It is not the same as required bridge data link layer and application layer protocol exactly.

Fieldbus gateway usually see is a single-CPU, in this structure where, CPU bus information to complete the two kinds of transmission and control, but also the completion of two bus protocol conversion work, the heavier the burden of the program CPU control complex, with multiple nested software. Presented here, a gateway based on double-CPU design, the system has two CPU data bus protocol on each of two processing and control, and will need to pass the information on the dual-port RAM, the information sharing and transmission, this program easy to control, the software is simple, while reducing the CPU burden, and enhance reliability.
3 System hardware design

The hardware can be divided into three parts according to function, one CAN bus interface circuit, complete CAN bus data transceiver and control; second PROFIBUS-DP bus interface circuit, complete PROFIBUS bus data transceiver and control; third dual-port RAM interface circuit, the data used to complete the exchange of two buses.

3.1 CAN bus interface hardware

CAN bus interface, the overall hardware architecture shown in Figure 1. Circuit mainly composed of four parts, microcontroller 89C52 (1), independent CAN communication controller SJA1000, CAN bus transceiver 82C250 and high-speed optocoupler 6N137.

CAN Bus-PROFIBUS-DP Bus Gateway Implementation

89C52 (1) is responsible for the initialization of SJA1000, SJA1000 achieved by controlling the receive and transmit data such as communication tasks, but also with PROFIBUS bus interface for data exchange side, select the 89C52 (1) as the CPU, mainly because it not only SJA1000 CAN controller chip is compatible with, and internal integration 8k flash RAM, to meet system storage requirements, no need to expand outside the program memory.

For the CAN bus controller SJA1000. It is a stand-alone CAN controller, is the company's CA82C200 CAN controller PHILIPS alternative, it maintains the software and pin compatible with PCA82C200. It has two working modes BasicCAN and PeliCAN which BasicCAN manner compatible with the PCA82C200; PeliCAN way to expand the features, support has many new features of the CAN 2.0B protocol. SJA1000 major new features are: standard structure and the expansion of the structure to receive and send messages; 64 byte receive FIFO; standard and extended frame format has a single / dual receiver filter mask and receiving yards with receiver registers; can be read / write access to the error counter; Programmable error warning limit; most recent error code register; each CAN bus error interrupt can be generated error; has lost the arbitration arbitration lost interrupt positioning features; single mode when an error or missing arbitration is not re-issued; only heard monitor CAN bus no response means no error flag; support hot swap software driven bit rate without interference detection; hardware ban CLKOUT output.


SJA1000, AD0-AD7 to connect to the 89C52 (1) of the P0 port, CS connected to the 89C52 (1) of P2.7, P2.7 to 0 CPU chip memory address optional in the SJA1000, CPU through these addresses can be on the implementation of the corresponding read and write operations SJA1000 SJA1000, RD, WR, ALE and 89C52 were connected to the corresponding pin.

CAN bus nodes in order to enhance anti-interference ability, SJA1000 of TX0 and RX0 not directly related to the TXD and RXD 82C250 connected, but after high-speed optocoupler 6N137 82C250 connected, so well realized the CAN bus node electrical isolation between which part of the circuit by optocoupler used two completely separate power supply VCC and VDD. Also 82C 250 and CAN bus interface parts of the safety and use of certain anti-interference measures. The CANH and CANL pin 82C250 their resistance through a 5Ω resistor connected with the CAN bus can play a limiting role in protecting the 82C250 from over-current shocks. CANH and CANL and in parallel between the two 30P small capacitance on the bus can play high-frequency interference filter and a certain ability of anti-electromagnetic radiation, while the two CAN bus access between the client and to the respective reverse a protection diode, when the CAN bus has a high negative voltage through diode overvoltage protection circuit may play a role, 82C250 of Rs one foot then the slope of resistance.

3.2 PROFIBUS-DP bus interface circuit

PROFIBUS-DP bus interface hardware also consists of four major components, micro-controller 89C52 (2), PROFIBUS-DP protocol communications controller chip SPC3, Optocoupler HCPL7101 and 6N137, RS485 bus driver circuit. Figure 2 for the PROFIBUS-DP communication controller to the RS485 bus driver of the hardware circuit diagram.

89C52 (2) is mainly responsible for control of SPC3, achieving PROFIBUS-DP bus data transfer and sharing.

SPC3 PROFIBUS-DP has been integrated data transceiver physical layer functions can be independently PROFIBUS DP protocol, while also integrating a 1.5k SPC3 internal dual port RAM, as SPC3 interface between the user program, and AT89C52 (2) can be internal RAM of the SPC3 visit.

Although the SPC3 has integrated physical layer data transfer capabilities, but it does not have the RS-485 driver interface, so adding the RS-485 driver circuit.

Also on the bus to avoid the impact of the signal on the circuit, in SPC3 and RS485 bus driver circuit with optical isolation between. TxD, RxD signal isolation devices used Hewlett Packard's high-speed optocoupler 12M HCPL710, RTS signal isolation devices use a 6N137.

3.3 pairs of port RAM interface circuit

Two bus data sharing and transfer is achieved through the dual port RAM, the system in use the device IDT7130. It is a 1K high-speed dual-port static RAM. The device provides two independent ports, each with separate control, address, and I / O pins, and allow independent asynchronous read and write access to any memory address, the power management features automatically controlled by the CE, allowing each chip a port circuit to enter a very low power modes. IDT7130 chip bus arbitration circuit is BUSY and INT are two bus arbitration. Microcontroller based on the use of models used in the system interrupt arbitration program works this way is a memory address (mail or message center) is assigned to each port. Left port interrupt flag is declared when the right port writes the memory address 3FEH, the left port memory address by visiting the 3FE clear interrupt. Similarly, when the left port write memory address 3FFH flag is declared when the right port, in order to clear the interrupt flag, the right port to access memory address 3FFH, and 3FF 3FE system in two modules of content to give a new meaning, that define two Code 0FFH and 00H. One 0FFH send representatives to send commands to request data, and 00H is sent on behalf of the other required data. System in two CPU and dual-port RAM connection shown in Figure 3. Dual-port RAM, the remaining memory cells are divided into four parts, of which 256 0000H-00FFH the unit used to store the CAN bus to the data uploaded or address, and the adjacent two units used to store a CAN sub-station of data; 0100H-01F9H the 250 units used to store the PROFIBUS bus uploaded to the data or address, the two adjacent sub-unit for storing a PROFIBUS station information, other 03FCH unit for storage of equipment to CAN bus Reading PROFIBUS site ID number, 03FDH unit for the storage of PROFIBUS bus devices to read the CAN site ID.
Can see from the diagram for dual-port RAM in the microprocessor CAN bus communication mapping address 0x7C00H-0x7FFFH, in charge of the microprocessor bus communication PROFIBUS mapping address 0x2C00H-0x2FFFH.

4 Software Design

Gateway software can be divided into two parts, one for the CAN bus for data communication and one for data communication for PROFIBUS bus.

Each side of the process according to function and can be divided into three sub-modules: protocol chip initialization, to accept data received subroutines, data transmission subroutine. Which data to accept external interrupt trigger the execution of test routines. Following the CAN bus interface to the gateway side of the program, for example, lists the program flow chart, PROFIBUS interface program with similar side, it will not go into.

CAN-bus side of the initialization and send the program flow shown in Figure 4:

CAN Bus-PROFIBUS-DP Bus Gateway Implementation

Because SJA1000 initialization reset mode only can be, so programs will first SJA1000 interrupt mask, making it into the reset mode, and then initialize it. Content includes initialization settings for work, accept the filtering mode settings, accept the mask register and accept the code register set, the baud rate parameter is set and the interrupt register settings allow. SJA1000 completion of initialization settings, and then let it return to working condition, normal communication tasks.

In an interview with subroutine, the system queries in a way that sub-stations transmit over CAN data, the gateway to accept the buffer data area by the first byte of the contents of the judge accepted that the real data, or distributed to PROFIBUS-DP Site request to send data. If the first byte data area is 00H, then transmit the data, thus obtained under the ID look-up table corresponding to the station storage unit, and data area of the second and third bytes of the contents of the existence of the unit, ID on 7FFCH in the same time, tell each other to send data, site number; If the byte content is FFH, it indicates that the request to send data, the data area is stored in the second byte of data has been requested, the site number, will He can be placed within 7FFCH.
Send the above procedure is dual-port RAM, interrupt triggered interrupt signal is received, the contents of the first reading 7FFEH unit will interrupt the signal to eliminate, and then the contents of the unit to determine dual-port RAM and storing the data or be required to send data CAN sub-station ID. If 7FFEH content 00H, the instructions to be sent to the CAN sub-station for the normal data, then sends the first byte of the buffer is set to 00H, told the CAN sub-station to send the data, then read 7FFDH unit content, look-up table of data obtained in the dual-port RAM in the address and the address obtained from the deposit to the SJA1000 two bytes of data output buffer zone to the second, three bytes, the same time as sending the ID number 7FFDH. If 7FFDH is FFH, the instructions sent over PROFIBUS-DP have been asked to send data to CAN sub-station site number, so just put it into the send buffer SJA1000 second byte data area, and the first word Festival set to FFH, to inform the CAN site, and send the data for the ID number. Upon completion of the above, the final word by writing the command to send data.

5 Conclusion

Proven, dual-CPU-way gateway can be good Wan Cheng CAN bus and PROFIBUS-DP bus protocol conversion task, and solved the structure of the gateway in a single CPU of the data transfer rate of Di exist, the problem of poor data Kekao Xing, Manzu the CAN Bus and PROFIBUS-DP bus protocol conversion requirements. It CAN bus devices and PROFIBUS bus device connected to two kinds of fieldbus devices can be highly effective communication, data sharing and ultimately the purpose of complementary functions. And staff do not care in the course of two bus physical layer and data link layer of all, to the bus product research and development of a great convenience. Also, such a dual-CPU design programs on the other fieldbus gateway between the reference design is a useful method.

Declined comment

欧美日本免费| 国产伦精品一区二区三区无广告| 久久成人性色生活片| 黄色免费三级| 久久精品大片| 精品视频一区二区| 亚洲第一页色| 国产不卡在线看| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 久久福利影视| 99久久精品国产国产毛片| 一本伊大人香蕉高清在线观看| 亚洲精品影院一区二区| 精品视频一区二区| 欧美日本免费| 国产伦理精品| 一级毛片视频在线观看| 尤物视频网站在线观看| 久久国产影视免费精品| 欧美另类videosbestsex久久| 99久久精品费精品国产一区二区| 国产欧美精品午夜在线播放| 国产成人啪精品视频免费软件| 精品视频一区二区三区| 九九热国产视频| 欧美a级片视频| 尤物视频网站在线观看| a级黄色毛片免费播放视频| 国产伦精品一区二区三区无广告 | 欧美激情一区二区三区在线| 精品在线免费播放| 日韩av成人| 国产成a人片在线观看视频| 国产极品白嫩美女在线观看看| 欧美大片a一级毛片视频| 成人免费福利片在线观看| 成人影院一区二区三区| 日韩欧美一二三区| 国产网站免费视频| 精品久久久久久中文| 欧美日本二区| 国产91丝袜高跟系列| 欧美爱爱网| 成人在免费观看视频国产| 国产一区二区高清视频| 欧美另类videosbestsex高清| 日韩av成人| 国产a视频精品免费观看| 免费国产在线观看不卡| 日韩av片免费播放| 日本伦理片网站| 国产亚洲精品aaa大片| 亚洲www美色| 国产成人精品一区二区视频| 国产高清在线精品一区a| 美国一区二区三区| 日韩中文字幕一区| 国产精品自拍在线| 精品视频一区二区三区| 999久久久免费精品国产牛牛| 精品视频一区二区三区| 毛片高清| 欧美激情一区二区三区视频高清 | 国产成人女人在线视频观看| 99久久精品国产麻豆| 精品视频在线观看一区二区| 亚洲 国产精品 日韩| 日日夜夜婷婷| 高清一级做a爱过程不卡视频| 国产一区二区精品尤物| 国产伦理精品| 欧美a级大片| 九九久久国产精品| 免费国产在线视频| 九九九国产| 91麻豆精品国产自产在线观看一区| 日韩免费在线| 国产精品自拍亚洲| 天天做日日爱| 日本在线不卡视频| 欧美a级v片不卡在线观看| 午夜欧美成人香蕉剧场| 日本免费乱人伦在线观看| 精品国产一区二区三区久| 亚洲精品中文一区不卡| 九九免费精品视频| 国产成a人片在线观看视频| 你懂的日韩| 日韩在线观看视频免费| 香蕉视频久久| 国产a毛片| 国产国产人免费视频成69堂| 精品国产亚洲一区二区三区| 国产亚洲精品成人a在线| 国产不卡精品一区二区三区| 久久99青青久久99久久| 国产一级强片在线观看| 999精品视频在线| 黄视频网站在线免费观看| 日韩专区亚洲综合久久| 高清一级做a爱过程不卡视频| 精品国产一区二区三区国产馆| 国产高清视频免费观看| 一级片免费在线观看视频| 久久国产精品永久免费网站| 香蕉视频久久| 免费国产在线观看不卡| 亚州视频一区二区| 国产网站在线| 欧美大片a一级毛片视频| 免费一级片网站| 免费一级生活片| 香蕉视频一级| 久久福利影视| 国产一区二区精品| 亚飞与亚基在线观看| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 国产一区免费在线观看| 精品久久久久久中文字幕2017| 国产伦精品一区二区三区无广告| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 国产视频一区二区三区四区| 国产视频一区二区三区四区| 国产伦精品一区二区三区无广告 | 欧美一区二区三区性| 久久99中文字幕久久| 成人在激情在线视频| 国产视频久久久| 成人在激情在线视频| 香蕉视频久久| 成人高清免费| 国产网站在线| 你懂的日韩| 青青青草视频在线观看| 日韩中文字幕一区| 国产伦精品一区三区视频| 91麻豆精品国产自产在线| 欧美一级视频高清片| 欧美大片a一级毛片视频| 国产91精品系列在线观看| 九九热国产视频| 欧美电影免费看大全| 韩国三级一区| 国产极品白嫩美女在线观看看| 午夜激情视频在线播放| 成人a级高清视频在线观看| 欧美α片无限看在线观看免费| 你懂的日韩| 国产a视频精品免费观看| 亚洲精品永久一区| 国产一区二区精品久| 欧美国产日韩久久久| 久久精品欧美一区二区| 一级毛片视频免费| 91麻豆tv| 亚欧乱色一区二区三区| 青草国产在线观看| 一级女人毛片人一女人| 青青青草影院| 青青青草视频在线观看| 欧美激情一区二区三区视频高清| 99久久精品费精品国产一区二区| 91麻豆精品国产片在线观看| 91麻豆精品国产自产在线 | 欧美激情在线精品video| 青青久久国产成人免费网站| 欧美一区二区三区性| 国产伦理精品| 成人在激情在线视频| 久久99爰这里有精品国产| 欧美a免费| 麻豆午夜视频| 四虎久久影院| 久久精品免视看国产成人2021| 深夜做爰性大片中文| 国产网站免费在线观看| 精品国产一区二区三区久久久蜜臀 | 日日夜夜婷婷| 亚洲第一视频在线播放| 91麻豆精品国产自产在线 | 日日夜夜婷婷| 日韩一级黄色片| 日本免费区| 久久精品道一区二区三区| 国产激情一区二区三区| 国产精品1024永久免费视频| 亚洲 欧美 成人日韩| 九九热国产视频| 青青久久精品国产免费看| 国产91精品一区| 韩国三级视频网站| 天天色成人网| 国产原创中文字幕| 欧美1区| 一级片免费在线观看视频| 久草免费在线色站| 国产高清在线精品一区a| 国产麻豆精品hdvideoss| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 |