CN101894086A - Serial hub and multi-serial high-speed communication method - Google Patents
Serial hub and multi-serial high-speed communication method Download PDFInfo
- Publication number
- CN101894086A CN101894086A CN 201010195654 CN201010195654A CN101894086A CN 101894086 A CN101894086 A CN 101894086A CN 201010195654 CN201010195654 CN 201010195654 CN 201010195654 A CN201010195654 A CN 201010195654A CN 101894086 A CN101894086 A CN 101894086A
- Authority
- CN
- China
- Prior art keywords
- serial
- processing unit
- main frame
- hub
- communication
- 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
- Information Transfer Systems (AREA)
- Communication Control (AREA)
Abstract
The invention provides a serial hub and a multi-serial high-speed communication method. The serial hub comprises a processing unit and a serial data switching unit, wherein the processing unit is connected with a host and is used for processing data and command signals transmitted from the host; the serial data switching unit is connected with the processing unit and a plurality of serial ports and is used for switching communication links or setting communication interface parameters according to control signals of the processing unit to ensure that a host port is connected with the corresponding serial port; the processing unit further comprises a universal asynchronous transceiver, a software buffer and a hardware buffer, wherein the universal asynchronous transceiver is connected with the host and is used for realizing the communication with the host, the software buffer is connected with the universal asynchronous transceiver and is used for storing overflow data, and the hardware buffer is connected with the software buffer and is used for overcoming time delay caused by the hardware buffer. The serial hub has the advantages of high communication speed, low error rate and wide application range.
Description
Technical field
The present invention relates to communication technique field, the particularly a kind of serial hub and the means of communication thereof.
Background technology
Because the exploitation of computer is maked rapid progress, the variation of the interface of computer rear end is also more and more faster at present.The computer of a new generation, only there is a serial ports rear end.But in a lot of industries, only there is a serial ports can't satisfy the demands far away.
In this case, can connect more serial equipment, usually use hub to transfer, so just can make a serial ports connect a plurality of serial equipments with a plurality of output terminals in order to make a serial ports.But existing hub but can't solve some problems of ubiquity in the serial communication:
1, because being transmitted in former and later two equipment and can having subtle difference of data, thereby the generation error code, when equipment transmitted at full speed, the bit error rate can be very high especially, thereby cause the existing serial ports can't full speed running, cause like this can't using in the industry of some high reliability.
2, serial ports is only supported single baud rate, so just makes some specific equipment to be suitable for, and has limited application greatly.
And in some industries,, can only eliminate computer so if serial ports quantity is not enough, the computer with a plurality of serial ports of particular purchased appointment makes each equipment independent of a serial ports, but has just increased the acquisition cost of computer like this.
In sum, there is the problem that communication speed is low, the bit error rate is high, the scope of application is little in existing serial hub.
Summary of the invention
The purpose of this invention is to provide a kind of serial hub, have the problem that communication speed is low, the bit error rate is high, the scope of application is little to solve existing serial hub.
Another object of the present invention provides a kind of multi-serial high-speed communication method, to solve existing serial hub when the communication, the problem that speed is low, the bit error rate is high.
The present invention proposes a kind of serial hub, is used to make main frame and external unit to carry out the full speed communication, and it comprises processing unit and serial data switch unit.The processing unit main frame links to each other, and is used to handle data and the command signal that sends over from main frame.The serial data switch unit links to each other with processing unit, and links to each other with some serial ports, is used for switching communication link or communication interface parameters being set according to the control signal of processing unit, and host port is connected with corresponding serial port.Wherein, processing unit further comprises UART Universal Asynchronous Receiver Transmitter, software cache and hardware register again.UART Universal Asynchronous Receiver Transmitter links to each other with main frame, be used to realize with main frame between communicate by letter.Software cache links to each other with UART Universal Asynchronous Receiver Transmitter, is used to store the data of overflowing.Hardware register links to each other with software cache, is used to overcome the time-delay of software cache to causing.
Preferably, processing unit also comprises Clock dividers, is used to obtain different sample frequency, to satisfy the demand of different baud rates.
Preferably, processing unit is the AVR single-chip microcomputer.
Preferably, processing unit is the Atmega48 single-chip microcomputer.
Preferably, described serial hub also comprises four serial ports, all links to each other with the serial data switch unit.
The present invention proposes a kind of multi-serial high-speed communication method in addition, is used to make main frame and external unit to carry out the full speed communication, and may further comprise the steps: (1) receives corresponding serial port with external unit.(2) receive the command signal that main frame is exported.(3) switch communication link or communication interface parameters is set according to command signal, host port is connected with corresponding serial port.(4) carry out communication, and the data of utilizing software cache storage to overflow.(5) utilize a hardware register to overcome the time-delay that this software cache causes.
Preferably, after the command signal that receives main frame output, also comprise step: divide the different sample frequency that occurs frequently, with the baud rate that obtains and external equipment is complementary.
With respect to prior art, the invention has the beneficial effects as follows:
1, the present invention makes host computer can connect a plurality of different serial equipments simultaneously, can come the conversion baud rate according to the equipment needs, and compatible nearly all serial equipment, has the very wide scope of application.
2, the present invention has adopted the technology that the hardware cache technology combines with the software caching technology, the bit error rate in the time of can greatly reducing communication at full speed, thereby can guarantee the full speed transmission of entire equipment, improved the communication speed of equipment greatly, and it can be applied on the industry of high reliability request fully.
3, the present invention can adopt high speed devices such as AVR single-chip microcomputer, can improve the communication speed of equipment further.
Description of drawings
Fig. 1 is a kind of embodiment Organization Chart of serial hub of the present invention;
Fig. 2 is a kind of embodiment circuit diagram of processing unit 11 of the present invention;
Fig. 3 is a kind of embodiment circuit diagram of serial data switch unit of the present invention;
Fig. 4 is a kind of embodiment process flow diagram of multi-serial high-speed communication method of the present invention.
Embodiment
See also Fig. 1, it is for a kind of embodiment Organization Chart of serial hub of the present invention.This serial hub comprises processing unit 11, serial data switch unit 12 and four serial ports (port A, port B, port C, port K).Processing unit 11 connects main frame 10 and serial data switch unit 12 respectively, is used to handle data and the command signal that sends over from main frame, and serial data switch unit 12 is controlled.Serial data switch unit 12 is matrixes of a communication link, and it links to each other with four serial ports respectively, is used for switching communication link or communication interface parameters being set according to the control signal of processing unit 11, and main frame 10 ports are connected with corresponding serial port.
Wherein, processing unit 11 further comprises UART Universal Asynchronous Receiver Transmitter 13, software cache 14 hardware register 15 and Clock dividers 16 again.UART Universal Asynchronous Receiver Transmitter 13 (UniversalAsynchronous Receiver Transmitter UART) links to each other with serial data switch unit 12 with main frame 10 respectively, its realized and main frame between communication.Software cache 14 links to each other with UART Universal Asynchronous Receiver Transmitter 13, is used to store the data of overflowing.Hardware register 15 links to each other with software cache 14 and UART Universal Asynchronous Receiver Transmitter 13 respectively, is used to overcome the time-delay of software cache to causing.Clock dividers 16 is used to obtain different sample frequency, to satisfy the demand of different baud rates.
When main frame 10 will be read and write at certain external unit, earlier external unit is connected to corresponding serial port, and send instruction by software main frame 10 ports are connected together with corresponding serial port, set up communication link, then just can normal communication.And processing unit 11 is command control center of entire equipment, and it is at the data that send over from main frame 10, and analyzing is to instruct or data, if instruction is then operated accordingly, switch communication link or communication interface parameters is set, will instruct deletion simultaneously, guarantee that data are clean.Serial data switch unit 12 then is the matrix of a communication link, is controlled the switching of communication link by processing unit 11.
It should be noted that in order to improve the transmission speed of data, the technology that the present invention has adopted the hardware cache technology to combine with the software caching technology.Because data are in transmission course, can there be trickle speed difference in former and later two equipment, and the difference here just may be accumulated, and causes overflowing of data.Therefore serial hub of the present invention is when transmitting data stream, and through software cache 14, the data that will overflow temporarily exist in the software cache 14, so just can guarantee the not packet loss of data at first earlier.And since software the processing speed of data and the hardware processing speed to data be there are differences, the difference of this part, the present invention solves by hardware register 15, because this speed difference can not add up, so adopt a hardware register 15 just can overcome middle speed difference.The technology that combines with the software caching technology by the hardware cache technology, can greatly reduce the bit error rate of serial hub of the present invention when the full speed communication, thereby can guarantee the full speed transmission of entire equipment, it can be applied on the industry of high reliability request fully.
In addition, because serial ports is only supported single baud rate, so the present invention can obtain different sample frequency by processing unit 11 clock internal frequency dividers 16.When the external unit of different baud rates is connected on the serial hub, can be by the Clock dividers different baud rate that occured frequently in 16 minutes, thus the baud rate of itself and external unit is complementary, carry out sampled data then or send data.
Especially, processing unit 11 of the present invention can adopt the AVR single-chip microcomputer.Because the AVR single-chip microcomputer adopts RISC (the Reduced Instruction Set Computing that strengthens, reduced instruction set computer) structure, make it have the high speed processing ability, in a clock period, can carry out complicated instruction, every MHz can realize the processing power of 1MIPS, makes serial hub of the present invention that very high communication speed can be arranged.See also Fig. 2, it is for a kind of embodiment circuit diagram of processing unit 11 of the present invention.What this handled unit 11 employings is the Atmega48 single-chip microcomputer of AVR series, and wherein PD5 pin and PD6 pin are connected to serial data switch unit 12, are used for exporting control signal.
See also Fig. 3, it is for a kind of embodiment circuit diagram of serial data switch unit 12 of the present invention.What this serial data switch unit 12 adopted is analog switch CD4052B chip, and its A pin and B pin be connection processing unit 11 respectively, is used to receive control signal and switches communication link.Its RX1~Rx4 pin connects external unit as signal input part by serial port.TX1~TX4 pin connects external unit as signal output part.Signal P3.1 then is connected to processing unit 11.Signal TX1 connects main frame.
Certainly, above-mentioned is the preferable implementation of serial hub of the present invention only, but does not limit the present invention with this, and each several part can be adjusted according to the actual requirements.For example the quantity of serial port also can increase or reduce except four according to actual needs.The size of baud rate can be carried out flexible transformation according to the needs of external unit.
Corresponding to above-mentioned serial hub, the present invention has proposed a kind of multi-serial high-speed communication method in addition, sees also Fig. 4, and it may further comprise the steps:
S401 receives corresponding serial port with external unit.
S402 receives the command signal that main frame is exported.
S403 switches communication link or communication interface parameters is set according to command signal, and host port is connected with corresponding serial port.
S404 divides the different sample frequency that occurs frequently, with the baud rate that obtains and external equipment is complementary.
S405 carries out communication, and the data of utilizing software cache storage to overflow.
S406 utilizes a hardware register to overcome the time-delay that this software cache causes.
The present invention has the following advantages:
1, the present invention makes host computer can connect a plurality of different serial equipments simultaneously, can come the conversion baud rate according to the equipment needs, and compatible nearly all serial equipment, has the very wide scope of application.
2, the present invention has adopted the technology that the hardware cache technology combines with the software caching technology, the bit error rate in the time of can greatly reducing communication at full speed, thereby can guarantee the full speed transmission of entire equipment, improved the communication speed of equipment greatly, and it can be applied on the industry of high reliability request fully.
3, the present invention can adopt high speed devices such as AVR single-chip microcomputer, can improve the communication speed of equipment further.
More than disclosed only be several specific embodiments of the application, but the application is not limited thereto, any those skilled in the art can think variation, all should drop in the application's the protection domain.
Claims (7)
1. a serial hub is used to make main frame and external unit to carry out the full speed communication, it is characterized in that, comprising:
One processing unit links to each other with main frame, is used to handle data and the command signal that sends over from main frame, and it further comprises again:
One UART Universal Asynchronous Receiver Transmitter, it links to each other with main frame, be used to realize with main frame between communicate by letter;
One software cache links to each other with this UART Universal Asynchronous Receiver Transmitter, is used to store the data of overflowing;
One hardware register links to each other with this software cache, is used to overcome the time-delay of this software cache to causing.
One serial ports data switch unit links to each other with this processing unit, and links to each other with some serial ports, is used for switching communication link or communication interface parameters being set according to the control signal of this processing unit, and host port is connected with corresponding serial port.
2. serial hub as claimed in claim 1 is characterized in that, this processing unit also comprises a clock frequency divider, is used to obtain different sample frequency, to satisfy the demand of different baud rates.
3. serial hub as claimed in claim 1 is characterized in that, this processing unit is the AVR single-chip microcomputer.
4. serial hub as claimed in claim 1 is characterized in that, this processing unit is the Atmega48 single-chip microcomputer.
5. serial hub as claimed in claim 1 is characterized in that, it comprises four serial ports, all links to each other with this serial data switch unit.
6. a multi-serial high-speed communication method is used to make main frame and external unit to carry out the full speed communication, it is characterized in that, may further comprise the steps:
External unit is received corresponding serial port;
Receive the command signal of main frame output;
Switch communication link or communication interface parameters is set according to command signal, host port is connected with corresponding serial port;
Carry out communication, and the data of utilizing software cache storage to overflow;
Utilize a hardware register to overcome the time-delay that this software cache causes.
7. multi-serial high-speed communication method as claimed in claim 6 is characterized in that, also comprises step after the command signal that receives main frame output:
Divide the different sample frequency that occurs frequently, with the baud rate that obtains and external equipment is complementary.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010195654 CN101894086A (en) | 2010-06-08 | 2010-06-08 | Serial hub and multi-serial high-speed communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010195654 CN101894086A (en) | 2010-06-08 | 2010-06-08 | Serial hub and multi-serial high-speed communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101894086A true CN101894086A (en) | 2010-11-24 |
Family
ID=43103277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010195654 Pending CN101894086A (en) | 2010-06-08 | 2010-06-08 | Serial hub and multi-serial high-speed communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101894086A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270168A (en) * | 2011-08-09 | 2011-12-07 | 西安辉炜信息科技有限公司 | Method for automatically detecting serial port information |
CN102694656A (en) * | 2012-05-21 | 2012-09-26 | 苏州汉清投资管理有限公司 | Multifunctional concentrator |
CN105005545A (en) * | 2015-07-28 | 2015-10-28 | 武汉烽火网络有限责任公司 | Line card serial port switching device and line card serial port switching method |
CN105187274A (en) * | 2015-08-27 | 2015-12-23 | 浪潮软件集团有限公司 | Method for judging port state and selecting good port communication |
CN105553617A (en) * | 2015-12-21 | 2016-05-04 | 大连三高集团有限公司 | Serial port communication data analysis method |
CN106845573A (en) * | 2016-12-31 | 2017-06-13 | 广州中大微电子有限公司 | A kind of contact IC card reader-writer of integrated GPRS |
CN108931521A (en) * | 2018-08-23 | 2018-12-04 | 北京航天控制仪器研究所 | A kind of aviation medical treatment integrated form checking system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2640130Y (en) * | 2003-04-14 | 2004-09-08 | 上海先达企业发展有限公司 | Composite communication interface |
CN201303348Y (en) * | 2008-10-29 | 2009-09-02 | 中国海洋大学 | Universal multi-serial bus converter |
CN201345083Y (en) * | 2008-12-05 | 2009-11-11 | 深圳市凯弦电气自动化有限公司 | Integrative communication interface |
-
2010
- 2010-06-08 CN CN 201010195654 patent/CN101894086A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2640130Y (en) * | 2003-04-14 | 2004-09-08 | 上海先达企业发展有限公司 | Composite communication interface |
CN201303348Y (en) * | 2008-10-29 | 2009-09-02 | 中国海洋大学 | Universal multi-serial bus converter |
CN201345083Y (en) * | 2008-12-05 | 2009-11-11 | 深圳市凯弦电气自动化有限公司 | Integrative communication interface |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270168A (en) * | 2011-08-09 | 2011-12-07 | 西安辉炜信息科技有限公司 | Method for automatically detecting serial port information |
CN102694656A (en) * | 2012-05-21 | 2012-09-26 | 苏州汉清投资管理有限公司 | Multifunctional concentrator |
CN105005545A (en) * | 2015-07-28 | 2015-10-28 | 武汉烽火网络有限责任公司 | Line card serial port switching device and line card serial port switching method |
CN105187274A (en) * | 2015-08-27 | 2015-12-23 | 浪潮软件集团有限公司 | Method for judging port state and selecting good port communication |
CN105553617A (en) * | 2015-12-21 | 2016-05-04 | 大连三高集团有限公司 | Serial port communication data analysis method |
CN106845573A (en) * | 2016-12-31 | 2017-06-13 | 广州中大微电子有限公司 | A kind of contact IC card reader-writer of integrated GPRS |
CN108931521A (en) * | 2018-08-23 | 2018-12-04 | 北京航天控制仪器研究所 | A kind of aviation medical treatment integrated form checking system |
CN108931521B (en) * | 2018-08-23 | 2021-06-08 | 中国人民解放军空军特色医学中心 | Integrated type aviation medical inspection system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101894086A (en) | Serial hub and multi-serial high-speed communication method | |
CN101551786B (en) | Manufacturing method of baud rate self-adaptive serial communication repeater | |
CN106095334B (en) | A kind of high-speed data acquisition storage system based on FPGA | |
JP3992100B2 (en) | Network to increase transmission link layer core speed | |
CN110837486B (en) | FlexRay-CPCIe communication system based on FPGA | |
CN110635985A (en) | FlexRay-CPCIe communication module | |
CN105786741B (en) | SOC high-speed low-power-consumption bus and conversion method | |
CN102799558B (en) | RS422 communication module based on CPCI bus | |
CN204925719U (en) | Signal conversion equipment and system | |
CN111666248A (en) | RS422 serial port communication control system and method based on FPGA | |
US20040210687A1 (en) | Network for decreasing transmit link layer core speed | |
CN201796361U (en) | Serial interface hub | |
US20090063736A1 (en) | Low power digital interface | |
CN111130691B (en) | Satellite-borne asynchronous rate communication matching device | |
CN109407574A (en) | Output-controlling device and its method may be selected in a kind of multibus | |
CN108667706A (en) | The adjustable Ethernet serial server of serial ports quantity dynamic and its data transmission method | |
CN112468162B (en) | Dual-generation tera-network intermediate-frequency signal processor, dual-path system and data transmission method | |
CN111522769B (en) | Multithreading SPI communication data transmission method | |
CN110489363B (en) | Sending circuit based on DDR write channel | |
CN110297795B (en) | System and method for realizing single-channel serial data transmission based on Ethernet PHY chip | |
CN203573311U (en) | Digital radio frequency storage module | |
CN113676253A (en) | FlexRay bus optical fiber communication module based on FPGA | |
CN111104353B (en) | Multifunctional aviation bus interface card based on FPGA | |
CN220043437U (en) | Multi-path ARINC-429 bus control system | |
CN114143276B (en) | PCI-e switch and method for configuring branch mode thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20101124 |