CN103905403A - Multi-protocol communication conversion method - Google Patents
Multi-protocol communication conversion method Download PDFInfo
- Publication number
- CN103905403A CN103905403A CN201210581817.3A CN201210581817A CN103905403A CN 103905403 A CN103905403 A CN 103905403A CN 201210581817 A CN201210581817 A CN 201210581817A CN 103905403 A CN103905403 A CN 103905403A
- Authority
- CN
- China
- Prior art keywords
- interface
- protocol
- data
- sent
- cortex
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses a multi-protocol communication conversion method. The method specifically comprises the following steps: 1) after a conversion module based on Cortex-m3 is powered on, determining conversion requirements by reading the gating value of a dial switch, and then, initializing programs of interfaces; 2)after partial programs of the interfaces are initialized, being ready to execute protocol communication at any time; when the data reception interface receives data, the interface sending an interrupt signal, a system being interrupted and responding to an interrupt processing function; the interrupt processing function receiving the data of interfaces and carrying out protocol analysis, and storing the analyzed valid data to the FIFO of an interface to be sent; and 3) the data in the FIFO of the interface to be sent being finally sent out in the form of a communication protocol of the interface to be sent in the major cycle of the program. The multiprotocol conversion function of the Cortex-m3 is developed and utilized, and through the dialing selecting mode, two devices with totally different communication modes are allowed to communicate; and the effect of interconnection between devices with different communication protocols in system integration is very good.
Description
Technical field
The present invention relates to a kind of communication converter, specifically about a kind of transition of communications method of multi-protocols.
Background technology
The protocol conversion that communication converter is on the market single is many, has USB RS 232, has RS232 to turn RS485, also has RS232 to turn RS422.But the network interface agreement as TCP or IP and USB, RS422, RS485, RS232 is little to the conversion of serial port protocol.
In addition, former technology majority is to use special chip to realize the conversion between two kinds of fixing agreements, and modular converter utilance is low, seldom has the module of supporting various protocols conversion, also relatively expensive in cost.Lack a kind of Multi-protocol converter and corresponding conversion method.
Summary of the invention
Therefore, for solving the transfer problem between various protocols communication, the invention provides a kind of multi-protocol communication conversion method, it is the several communication chips based on Cortex-m3 processor and minority, the mode of selecting by dial-up realizes the conversion between variety of protocol, hardware cost is relatively low, has good market value.
For achieving the above object, the present invention takes following technical scheme: a kind of multi-protocol communication conversion method, is characterized in that: using Cortex-m3 as modular converter, the mode of selecting by dial-up realizes the data penetration transmission between variety of protocol, and concrete grammar is:
1) after the modular converter based on Cortex-m3 powers on, by reading the gating value of the toggle switch being connected with Cortex-m3, be confirmed to be the conversion demand between any two kinds of agreements, then initialize routine is with regard to the subprogram of these two protocol interfaces of initialization;
2) after interface section program obtains initialization, prepare to carry on an agreement at any time communication, when data receiver interface receives after data, this interface can send interrupt signal, system just produces interrupts and responds interrupting processing function, interrupt processing the data of function receiving interface and carrying out protocol analysis, the valid data after parsing are deposited in the FIFO of interface to be sent;
3) data in the FIFO of interface to be sent finally in the major cycle of program the communication protocol form with interface to be sent send.
Described data receiver interface is one of USB interface, RS232 interface, RS485 interface, RS422 interface, TCP interface, IP interface.
Described interface to be sent is one of USB interface, RS232 interface, RS485 interface, RS422 interface, TCP interface, IP interface.
The data of described usb protocol and network interface agreement all send or receive with data packet form.
The present invention is owing to taking above technical scheme, it has the following advantages: the present invention has developed the function of Cortex-m3 multiprotocol conversion, the mode of selecting by dial-up, the equipment of two kinds of complete different communication modes is communicated, and the type of this conversion is a lot, there are USB and RS232, RS232 and RS485, conversion between RS232 and RS422, also has the conversion between TCP or IP and USB, RS422, RS485, RS232.And cost is lower, there is good effect for realizing interconnected between the equipment that in the system integration, communication protocol is not identical.
Accompanying drawing explanation
Fig. 1 is the communication board interface schematic diagram take Cortex-m3 as core.
The flow chart of multiprotocol conversion in Fig. 2 the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in detail.
The present invention is a kind of communication Protocol Conversion module based on Cortex-m3 design, because Cortex-m3 has a lot of peripheral hardwares, as shown in Figure 1, RS232, RS485 and RS422 are the UART mouths carrying on Cortex-m3, on Cortex-m3, also there is USB interface and RMII interface, RMII interface is realized ethernet communication by read-write PHY chip, realizes multiprotocol conversion easier by Cortex-m3.
Cortex-m3 can select by dial-up, realizes the data penetration transmission between variety of protocol.As shown in Figure 2, idiographic flow is:
1,, after the modular converter based on Cortex-m3 powers on, first carry out initialization.Initialization refers to the gating value (toggle switch is the gating switch being connected with Cortex-m3) that reads outside toggle switch, what confirm to need between two equipment is the communication of what agreement, and initialize routine is just by the subprogram of these two protocol interfaces of initialization.For example, in the time that outside toggle switch value is 0001, expression be exactly the data transaction between UDP and RS232 agreement, initialize routine is by initialization UDP and RS232 subprogram.
2,, after initialize routine, communication just can carry on an agreement.The large method of communicating by letter is: as shown in Figure 2, suppose that two protocol interfaces that communicate are that interface 1 and mono-of interface 2(are receiving interfaces, one is transmission interface), if when interface 2 is received after data, interface 2 can produce interrupt signal, the program of system is received after interrupt signal, just produce and interrupt and respond interrupting processing function, interrupt processing the data of function receiving interface 2 and carry out protocol analysis that (what network interface walked is ICP/IP protocol, what USB walked is usb protocol, RS232, RS422, these all walk RS485 is serial port protocol), valid data after parsing will deposit in the FIFO to be sent (first in first out first enters to reveal) of interface 1.
3, the data of the FIFO of interface 1 finally in the major cycle of program the communication protocol form with interface 1 send.
If interface 1 is received data, interface 1 can produce interrupt signal, the program of system is received after interrupt signal, just produce and interrupt and respond interrupting processing function, interrupt processing the data of function receiving interface 1 and carrying out protocol analysis, valid data after parsing, by depositing in the FIFO to be sent of interface 2, then send with the communication protocol form of interface 2.
Above-mentioned interface 1 can be USB and RS232 interface with interface 2, or RS232 and RS485 interface, or RS232 and RS422 interface, or TCP and USB interface, or interface between TCP and RS422, RS485, RS232 one, or IP and USB interface, or interface between IP and RS422, RS485, RS232 one, etc. the conversion between dissimilar agreement, can be also the conversion between same protocol interface.
Because usb protocol and network interface agreement are all more complicated, network interface agreement and usb protocol are all with data packet form sending and receiving, in program, these packets are resolved, valid data after resolving are deposited in the FIFO of interface to be converted, by interface to be converted, data in FIFO have been sent.
Claims (5)
1. a multi-protocol communication conversion method, is characterized in that: using Cortex-m3 as modular converter, the mode of selecting by dial-up realizes the data penetration transmission between variety of protocol, and concrete grammar is:
1) after the modular converter based on Cortex-m3 powers on, by reading the gating value of the toggle switch being connected with Cortex-m3, be confirmed to be the conversion demand between any two kinds of agreements, then initialize routine is with regard to the subprogram of these two protocol interfaces of initialization;
2) after interface section program obtains initialization, prepare to carry on an agreement at any time communication, when data receiver interface receives after data, this interface can send interrupt signal, system just produces interrupts and responds interrupting processing function, interrupt processing the data of function receiving interface and carrying out protocol analysis, the valid data after parsing are deposited in the FIFO of interface to be sent;
3) data in the FIFO of interface to be sent finally in the major cycle of program the communication protocol form with interface to be sent send.
2. multi-protocol communication conversion method according to claim 1, is characterized in that: described data receiver interface is one of USB interface, RS232 interface, RS485 interface, RS422 interface, TCP interface, IP interface.
3. multi-protocol communication conversion method according to claim 1 and 2, is characterized in that: described interface to be sent is one of USB interface, RS232 interface, RS485 interface, RS422 interface, TCP interface, IP interface.
4. multi-protocol communication conversion method according to claim 1 and 2, is characterized in that: the data of described usb protocol and network interface agreement all send or receive with data packet form.
5. multi-protocol communication conversion method according to claim 3, is characterized in that: the data of described usb protocol and network interface agreement all send or receive with data packet form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210581817.3A CN103905403A (en) | 2012-12-27 | 2012-12-27 | Multi-protocol communication conversion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210581817.3A CN103905403A (en) | 2012-12-27 | 2012-12-27 | Multi-protocol communication conversion method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103905403A true CN103905403A (en) | 2014-07-02 |
Family
ID=50996558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210581817.3A Pending CN103905403A (en) | 2012-12-27 | 2012-12-27 | Multi-protocol communication conversion method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103905403A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095710A (en) * | 2016-07-26 | 2016-11-09 | 海信(山东)空调有限公司 | A kind of idle call multifunctional signal switching device |
CN107566403A (en) * | 2017-10-16 | 2018-01-09 | 郑州云海信息技术有限公司 | It is a kind of to realize general multi-protocols interconnecting method, system and control chip |
WO2018040016A1 (en) * | 2016-08-31 | 2018-03-08 | 深圳配天智能技术研究院有限公司 | Protocol converter and protocol conversion method |
CN109727436A (en) * | 2018-12-13 | 2019-05-07 | 北京汇能精电科技股份有限公司 | A kind of unloading setter |
CN110032908A (en) * | 2019-04-23 | 2019-07-19 | 福州符号信息科技有限公司 | A kind of bar code processing circuit that supporting various communications protocols and bar code reading module |
CN111474402A (en) * | 2020-05-27 | 2020-07-31 | 华普电力有限公司 | High-voltage live detection device based on wireless communication |
CN112506833A (en) * | 2020-12-15 | 2021-03-16 | 北京无线电测量研究所 | Data conversion transmission device and method |
CN113810402A (en) * | 2021-09-14 | 2021-12-17 | 中国电信集团系统集成有限责任公司 | Multi-protocol adaptation method and system for network resource scheduling |
CN114385532A (en) * | 2021-12-10 | 2022-04-22 | 快意电梯股份有限公司 | Interface protocol adaptation switching device, communication system and switching method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201639589U (en) * | 2009-12-09 | 2010-11-17 | 上海广电通信技术有限公司 | Embedded dual-redundant network card based on ARM |
CN101895534A (en) * | 2010-07-02 | 2010-11-24 | 肖闽进 | Protocol conversion interface device of substation intelligent device |
CN202535394U (en) * | 2012-05-23 | 2012-11-14 | 黑龙江大学 | Embedded IFSF (International Forecourt Standard Forum) protocol conversion module |
-
2012
- 2012-12-27 CN CN201210581817.3A patent/CN103905403A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201639589U (en) * | 2009-12-09 | 2010-11-17 | 上海广电通信技术有限公司 | Embedded dual-redundant network card based on ARM |
CN101895534A (en) * | 2010-07-02 | 2010-11-24 | 肖闽进 | Protocol conversion interface device of substation intelligent device |
CN202535394U (en) * | 2012-05-23 | 2012-11-14 | 黑龙江大学 | Embedded IFSF (International Forecourt Standard Forum) protocol conversion module |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095710A (en) * | 2016-07-26 | 2016-11-09 | 海信(山东)空调有限公司 | A kind of idle call multifunctional signal switching device |
CN106095710B (en) * | 2016-07-26 | 2023-05-12 | 海信空调有限公司 | Multifunctional signal switching device for air conditioner |
WO2018040016A1 (en) * | 2016-08-31 | 2018-03-08 | 深圳配天智能技术研究院有限公司 | Protocol converter and protocol conversion method |
CN107980215A (en) * | 2016-08-31 | 2018-05-01 | 深圳配天智能技术研究院有限公司 | A kind of protocol converter and method for converting protocol |
CN107566403A (en) * | 2017-10-16 | 2018-01-09 | 郑州云海信息技术有限公司 | It is a kind of to realize general multi-protocols interconnecting method, system and control chip |
CN109727436A (en) * | 2018-12-13 | 2019-05-07 | 北京汇能精电科技股份有限公司 | A kind of unloading setter |
CN110032908A (en) * | 2019-04-23 | 2019-07-19 | 福州符号信息科技有限公司 | A kind of bar code processing circuit that supporting various communications protocols and bar code reading module |
CN111474402A (en) * | 2020-05-27 | 2020-07-31 | 华普电力有限公司 | High-voltage live detection device based on wireless communication |
CN112506833A (en) * | 2020-12-15 | 2021-03-16 | 北京无线电测量研究所 | Data conversion transmission device and method |
CN113810402A (en) * | 2021-09-14 | 2021-12-17 | 中国电信集团系统集成有限责任公司 | Multi-protocol adaptation method and system for network resource scheduling |
CN114385532A (en) * | 2021-12-10 | 2022-04-22 | 快意电梯股份有限公司 | Interface protocol adaptation switching device, communication system and switching method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103905403A (en) | Multi-protocol communication conversion method | |
CN201750562U (en) | Device for interconnecting the wireless sensor network with the internet and the mobile communication net | |
CN201821380U (en) | Equipment for conversion among multiple protocols | |
CN101141419B (en) | Heterogeneous network protocol based communication method between digital household appliances | |
CN104142900A (en) | Communication interface converting device | |
CN103095850B (en) | Method and system for sharing network by mobile terminal through computer | |
CN103716217A (en) | Intelligent data repeater based on CAN bus technology | |
CN103401772A (en) | Device for switching from ETHERNET/IP (Internet Protocol) industrial Ethernet to Profibus-DP | |
CN101609427B (en) | Programmable network service automation test system and programmable network service automation method | |
Mahmoodi et al. | Reconfigurable hardware implementation of gigabit UDP/IP stack based on spartan-6 FPGA | |
CN102546542A (en) | Electronic system and embedded device and transit device of electronic system | |
CN109328449A (en) | RTEX-EtherCAT protocol conversion apparatus and industrial control system | |
CN202058139U (en) | Serial port conversion module based on universal asynchronous receiver/transmitter (UART) serial port expansion chip | |
CN110958590B (en) | Heterogeneous equipment integrated system based on multi-protocol edge computing gateway | |
CN202870525U (en) | Networked data acquisition apparatus applied to changing environment | |
CN209044590U (en) | Multiple serial communication switching device | |
CN201057654Y (en) | Universal gateway device with Bluetooth control function | |
CN101834622A (en) | Singlechip control chip, data transceiving method and data transmission device | |
CN102117254B (en) | Embedded-system-based asynchronous data receiving method | |
CN103873391B (en) | A kind of two layers of adapter select system and method | |
CN106027137A (en) | Multi-satellite compatible satellite remote sensing ground receiving and processing system and method thereof | |
KR101168534B1 (en) | Apparatus for converting and controlling data | |
CN110722572A (en) | Data switching device of control system and robot | |
US11334518B2 (en) | Embedded file network server based on seismic data stream | |
CN102368754A (en) | S3C6410-based embedded gateway |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140702 |
|
WD01 | Invention patent application deemed withdrawn after publication |