CN101882124B - RS422/485 double-use signal converter capable of automatically judging connector - Google Patents
RS422/485 double-use signal converter capable of automatically judging connector Download PDFInfo
- Publication number
- CN101882124B CN101882124B CN201010201191XA CN201010201191A CN101882124B CN 101882124 B CN101882124 B CN 101882124B CN 201010201191X A CN201010201191X A CN 201010201191XA CN 201010201191 A CN201010201191 A CN 201010201191A CN 101882124 B CN101882124 B CN 101882124B
- Authority
- CN
- China
- Prior art keywords
- unit
- data
- output terminal
- interface
- serial
- 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.)
- Active
Links
Images
Landscapes
- Communication Control (AREA)
- Bidirectional Digital Transmission (AREA)
Abstract
The invention relates to an RS422/485 double-use signal converter capable of automatically judging connector, comprising a serial interface, a transmitting and receiving control unit, an AND gate and a logic controller, wherein, the AND gate is connected with the two output ends of the serial interface, and then connected with the receiving control unit; and the logic controller is connected with the receiving control unit and one receiving end of the serial interface; the receiving control unit acquires receiving data of the serial interface through the AND gate to reflect the current receiving state to the logic controller; and the logic controller can judge the communication status of a single serial interface of RS422 or RS485 according to the potential height of the receiving end connected with the logic controller.
Description
Technical field
The invention relates to the dual-purpose signal converter of a kind of RS422/485, refer to that especially a kind of tool judges the dual-purpose signal converter of RS422/485 of interface form automatically.
Background technology
U.S.'s electronic industries alliance (EIA) formulation EIA-RS-232 (RS232), EIA-RS-422 (to call RS422 in the following text), EIA-RS-485 (to call RS458 in the following text) are common serial communication standard; RS422, RS485 that its middle and later periods formulates establish in order to improve RS232 communication distance short (15 meters of maximum communication distances) and the low shortcoming of transfer rate; Promptly have maximum 1219 meters communication distance and the highest 10Mb/s transfer rate; Therefore RS422, RS485 converter are applicable to that the Computer I/O of distance connects usefulness; As shown in Figure 3; When if two computing machine 40 distances surpass 20 meters, then adopt RS422 or RS485 transmission line 20 to connect its I/O interface mostly to carry out communication.
Because RS422 is a full duplex communication and RS485 is a half duplex communication, its institute's transmission line that uses is also inequality, like Fig. 4 and shown in Figure 5; RS422 and RS485 serial line interface 56; 55 all include one transmits a logic module D and a RL assembly R, because RS422 adopts the full duplex communication pattern, so its RS422 transmission line 30 includes two groups of twisted-pair feeders; To be connected with transmission logic module D and RL assembly R respectively; Be with, when two groups of RS422 serial line interfaces 56 carry out serial data transmission, can receive and dispatch the other side's serial data simultaneously.Comprise single group twisted-pair feeder as for RS485 transmission line 20; So transmit and RL assembly D with this RS485; Be connected to this twisted-pair feeder again after the common connection of R; Owing to share a twisted-pair feeder, one group of RS485 serial line interface 55 is delivery status so must only set wherein at one time, and another group RS485 serial line interface 55 is an accepting state.
Support on the market at present the signal converter of RS422/485 double nip common be a kind of universal asynchronous receiving-transmitting transmitter Universal Asynchronous Receiver/Transmitter (hereinafter to be referred as UART) 50 that is installed in the computing machine 40; Like Fig. 6 and shown in Figure 7, it includes:
One control circuit 51 sees through bus 42 and is connected with the central processing unit 41 of computing machine 40;
One baud rate generator 52 is connected to this control circuit 51;
One data transfer unit 53; Be connected to data bus 42; And include one and transmit with buffering working area 531 and and transmit with shift unit 532, this transmits with buffering working area 531 parallel data of computing machine 40 data buss 42 is temporary, again by transmitting shift unit 531 with the parallel data of keeping in; Height order in position outwards transmits in regular turn, reaches parallel data and converts the serial data function into;
One Data Receiving unit 54; Be connected to data bus 42; And comprise a reception with cushioning a working area 541 and a reception with shift unit 542; The serial data that this reception sends the outside with shift unit 542 deposits this reception in regular turn with in the buffering working area 541, by receiving with buffering working area 541 parallel data is exported in this data bus 42, converts the parallel data function into to reach serial data;
One RS458/RS422 serial line interface 55; Include a receiving end DI, a transmission end RO, an Enable Pin EN, a transmitting-receiving port TX/RX and a reception port RX; Wherein this receiving end DI is connected to the output terminal of this data transfer unit 53; Whether its transmission end RO then is the input end that is connected to this Data Receiving unit 54, and the Enable Pin EN of this RS458/422 serial line interface 55 then is connected to this data transfer unit 53 again, enabled by these data transfer unit 53 decisions; This transmitting-receiving port TX/RX supplies outside RS485 transmission line to connect, and this transmitting-receiving port TX/RX and reception port supply outside RS422 transmission line to connect again; And
One switches switch 56, is connected between RS485/RS422 serial line interface 55 transmitting-receiving port TX/RX and the reception port RX, whether is connected to transmitting-receiving port TX/RX with decision this reception port TX.
Can know by above-mentioned explanation; This UART includes a RS485/422 serial interface 55, thus can provide the user to select to use the full duplex communication of RS422 or the half duplex communication of RS485, when the user selects the half duplex communication of RS485; Promptly set this change-over switch 56 for opening conducting; Order transmitting-receiving port TX/RX is connected to this reception port TX, to be connected with RS485 transmission line double cut line, carries out half duplex communication; If user's desire is selected the RS422 communication; Then make change-over switch 56 for closing not conducting, order transmitting-receiving port TX/RX and RS422 wherein a twisted-pair feeder are connected, and use as the serial data transmission port; Receive port RX and then be connected, receive as serial data and use with another twisted-pair feeder of RS422.
Can know that by above-mentioned explanation though UART uses single RS485 serial interface fit change-over switch at present, provide the user to switch RS422 or RS485 communication, manually control its switch still causes the trouble in the use, is necessary further improvement.
Summary of the invention
Because the disappearance of above-mentioned existing RS422 and the dual-purpose signal converter of RS485, fundamental purpose of the present invention provides the dual-purpose signal converter of RS422/485 that a kind of tool is judged the interface form automatically.
Desire to reach the employed major technique means of above-mentioned purpose, make this tool judge the dual-purpose signal converter of RS422/485 of interface form automatically, it includes:
One serial line interface includes one and transmits logical block and first and second RL unit, and wherein the input end of the output terminal of this transmission logical block and the first RL unit connects jointly, supplies the RS485 transmission line to connect; Should transmit logical block again supplies the RS422 transmission line to be connected with the second RL unit;
One transmit control unit is connected to the input end and the Enable Pin of the transmission logical block of this serial line interface, and includes a transmission Enable Pin and a data receiver; Wherein this data receiver receives serial or parallel data;
One with the door, its two input end is connected to the output terminal of first and second RL unit of this serial line interface respectively, is single output terminal to integrate two output terminals;
One receives control module, is connected to this and gate output terminal, obtaining the reception data of the first or second RL unit, and includes a data output end and an Interface status output terminal; When this receive control module receive from gated data, then export an accepting state signal from this Interface status output terminal; And data output end is output serial or parallel data; And
One logic controller; Be connected to the transmission Enable Pin of this transmit control unit, the Interface status output terminal of this reception control module; And the output terminal of the first RL unit of this serial line interface; According to the Interface status output terminal that receives control module and the output end signal of the first RL unit, judge that this serial line interface is RS422 or 485 communication states.
Can know by above-mentioned explanation; This reception control module sees through with door and obtains the data that the first or second RL unit of this serial line interface is received; And when receiving with the door forward data; The accepting state signal being returned to this logic controller, judge further by this logic controller whether the connected first RL unit output terminal is receiving data, is the RS485 communication if then judge at present; Otherwise then be judged as the RS422 communication.Be with, signal converter of the present invention only provides one group of serial line interface, reaches the half-or full-duplex communication that can supply the user to select RS485 or RS422 serial equally.
Description of drawings
Figure 1A is applied to the calcspar of RS485 communication for the present invention's first preferred embodiment;
Figure 1B is applied to the calcspar into the RS422 communication for the present invention's first preferred embodiment;
Fig. 1 C is the present invention's second preferred embodiment calcspar;
Fig. 2 is the present invention's the 3rd preferred embodiment calcspar;
The system architecture synoptic diagram of Fig. 3 for using the RS485 transmission line to carry out communication;
The calcspar that Fig. 4 connects for existing two groups of RS422;
The calcspar that Fig. 5 connects for existing two groups of RS485;
Fig. 6 is the UART calcspar of existing RS422/485; And
Fig. 7 is the part circuit diagram of Fig. 6.
Embodiment
At first see also shown in Figure 1A, judge the first preferable enforcement of the dual-purpose signal converter 10 of RS422/485 of interface form automatically for tool of the present invention, it includes:
One serial line interface 11; Include one and transmit logical block 111 and first and second RL unit 112; 112a, wherein the input end of the output terminal of this transmission logical block 111 and the first RL unit 112 connects jointly, for twisted-pair feeder 21 connections of a RS485 transmission line 20; This transmission logical block 111 and RL unit 112a are that two groups of twisted-pair feeders of RS422 transmission line are connected again, shown in Figure 1B; For another example shown in Fig. 1 C; This serial line interface includes a RS485 serial line interface and a RS422 serial line interface; Wherein this transmission logical block 111 of this case and the first RL unit 112 are transmission and the RL unit 111 of a RS485 serial line interface 11a; 112, and this second RL unit 112a is the RL unit of this RS422 serial line interface, wherein the transmission logical block sky of RS422 serial line interface meets NC;
One transmit control unit 12 is connected to the input end DI and the Enable Pin DE of the transmission logical block 111 of this RS485 serial line interface, and includes a transmission Enable Pin EN and a data receiver Din, and wherein this data receiver Din supplies to receive local data; In present embodiment, this data receiver Din is in order to transmit serial data;
One with the door 133, its two input end is connected to first and second RL unit 112 of this serial line interface 11 respectively, the output terminal RO1 of 112a, RO2, to integrate two output terminal RO1, RO2 is single output terminal;
One receives control module 13, is connected to this and the output terminal of door 133, obtaining the reception data of the first or second RL unit, and includes a data output end Dout and an Interface status output terminal Sr; When this receive control module receive from gated data, then export an accepting state signal from this Interface status output terminal Sr; In present embodiment, this data output end Dout is in order to transmit serial data; And
One logic controller 14; Be connected to the transmission Enable Pin EN of this transmit control unit 12, the Interface status output terminal Sr of this reception control module 13; And the output terminal RO1 of the first RL unit 112 of this serial line interface 11; According to the Interface status output terminal Sr and the first RL unit, 112 output end signals that receive control module R02, judge that this serial line interface 11 is RS422 or 485 communication states; This logic controller 14 can further be connected to the transmission Enable Pin EN of transmit control unit 12 again; And in judging that serial line interface 11 is the RS485 communication state; And be data receiving state for serial line interface at present; Then do not enable the transmission Enable Pin EN of transmit control unit 12, and this transmission logical block 111 transmission Enable Pin DE do not enable, transmit and suspend data.
Please consult shown in Figure 1A and Figure 1B simultaneously; The present invention is applied to RS422 and RS485 serial communication respectively; With Figure 1A, the present invention is used for the RS485 serial communication, and the user is connected to RS485 transmission line 20 in the serial line interface 11; The meaning i.e. input end of output terminal and the first RL unit 112 of this transmission logical block 111 is connected to the twisted-pair feeder 21 of RS485 transmission line 20 jointly, to carry out the half-duplex serial communication.For another example shown in Figure 1B; User such as desire use the present invention in the full duplex serial communication; One RS422 transmission line 20 is connected to serial line interface 11; Promptly the input end of the output terminal of this transmission logical block 111 and the second RL unit 112 is connected to two groups of twisted- pair feeders 31,32 of RS422 transmission line 30 respectively.Because this reception control module 13 of the present invention sees through and is connected to first and second RL unit 112 with door 133; The output terminal RO1 of 112a; RO2; So can be with two output terminal RO1, RO2 is integrated into single output terminal, therefore should receive control module and can see through the data that receive the first or second RL unit with door.
Below further specify this logic controller 14 and judge that serial line interface is the method for RS485 or RS422 communication state.This logic controller 14 is if receive the high potential signal that receives the accepting state output terminal of control module 13 from this; I.e. representative receives control module 13 at present and is receiving the first or second RL unit 112; The data of 112a therefore can the further output terminal RO1 signal of judging the connected first RL unit 112.
1. judge that on behalf of present serial line interface 11, receiving data at present comes from the first RL unit 112 (i.e. the existing serial data input of first receiving element), then be RS485 communication state (accepting state); Be with, this logic controller 14 can see through transmit control unit 12 no longer enables this transmissions logical block 111, guarantees that serial line interface 11 only is used for the reception usefulness of serial data.
2. judge that receiving data at present meets logical block 112a (promptly first receiving element does not have the serial data input) from second; Then representative is the RS422 communication state at present; So make serial line interface 11 carry out the bidirectional linked list data transmit-receive; In case therefore this logic controller 14 is judged as RS422 then sees through transmit control unit 12 this transmission logical block 111 is enabled, and carries out full duplex communication.
Consult shown in Figure 2; Automatically judge second preferred embodiment of the dual-purpose signal converter 10 of RS422/485 of interface form for tool of the present invention; Its most structure and first preferred embodiment are roughly the same; Above-mentioned transmit control unit can be the data transfer unit 12 ' of UART, and above-mentioned reception control module then can be the Data Receiving unit 13 ' of UART, and further includes a control circuit 15 and a baud rate generator 16; Wherein this control circuit 15 is connected with central processing unit (CPU) through bus, with 16 runnings of control baud rate generator.
Above-mentioned data transfer unit 12 ' is connected with this baud rate generator 16, and includes a transmission with cushioning a working area 121 and a transmission with shift unit 122; Therefore, in present embodiment, the data receiver Din of this transmit control unit is an input port arranged side by side, to be connected with computer data bus, receives the sequence data of data bus.
Above-mentioned Data Receiving unit 13 ' is connected with this baud rate generator 16, and includes a reception with cushioning a working area 131 and a reception with shift unit 132; Therefore, in present embodiment, the data output end Dout of this reception control module is an output port arranged side by side, to be connected with computer data bus, will to receive with buffering working area 131 and read and export on the computer data bus.
Can know that by above-mentioned explanation when a computing machine is connected to the present invention, can be learnt the serial communication interface of present use by the Interface status output terminal, the user needn't extra more manual setting change-over switch.Then can only transmit or receive serial data the single time if be judged as RS485; If be judged as RS422, then can receive and dispatch serial data simultaneously; Therefore, because the dual-purpose signal converter of RS422/RS485 of the present invention provides more convenient use.
Claims (5)
1. the dual-purpose signal converter of RS422/485 that tool is judged the interface form automatically is characterized in that, includes:
One serial line interface includes one and transmits logical block and first and second RL unit, and wherein the input end of the output terminal of this transmission logical block and the first RL unit connects jointly, supplies the RS485 transmission line to connect; This transmits logical block and supplies the RS422 transmission line to be connected with the second RL unit;
One transmit control unit is connected to the input end and the Enable Pin of the transmission logical block of this serial line interface, and includes a transmission Enable Pin and a data receiver; Wherein this transmit control unit is exported the Enable Pin of an enable signal to this transmission logical block after Enable Pin receives enable signal;
One with the door, its two input end is connected to the output terminal of first and second RL unit of this serial line interface respectively, is single output terminal to integrate two output terminals;
One receives control module, is connected to this and gate output terminal, obtaining the reception data of the first or second RL unit, and includes a data output end and an Interface status output terminal; When this receive control module receive from gated data, then export an accepting state signal from this Interface status output terminal; And
One logic controller; Be connected to the Interface status output terminal of this reception control module; And the output terminal of the first RL unit of this serial line interface; According to the Interface status output terminal that receives control module and the output end signal of the first RL unit, judge that this serial line interface is RS422 or 485 communication states.
2. the dual-purpose signal converter of RS422/485 that tool according to claim 1 is judged the interface form automatically is characterized in that, the data receiver of this transmit control unit and this receive the data output end of control module in order to transmit serial data.
3. the dual-purpose signal converter of RS422/485 that tool according to claim 1 is judged the interface form automatically; It is characterized in that; Further include a control circuit and a baud rate generator; Wherein this control circuit is connected with central processing unit (CPU) through bus, with control baud rate generator; Wherein:
Above-mentioned transmit control unit is connected with this baud rate generator, and includes one and transmit to transmit with buffering working area and and use shift unit, and this data receiver is an input port arranged side by side, with the receiving sequence data; And
Above-mentioned reception control module is connected with this baud rate generator, and includes one and receive to receive with buffering working area and and use shift unit, and this data output end is an output port arranged side by side, reads and externally exports will receive with the buffering working area.
4. the dual-purpose signal converter of RS422/485 of judging the interface form automatically according to each described tool in the claim 1 to 3; It is characterized in that; Receive the serial data of importing with door when this reception control module; A high potential signal that is about to its accepting state output terminal is sent to this logic controller, and wherein this logic controller judgment mode includes:
Reception receives the high potential signal of the accepting state output terminal of control module from this;
Judge whether the first RL unit has received serial data, if when receiving for serial data at present, promptly representing serial line interface is the RS485 communication state, if nothing reception serial data then is the RS422 communication state.
5. the dual-purpose signal converter of RS422/485 that tool according to claim 4 is judged the interface form automatically; It is characterized in that; The transmission logical block of this serial line interface and the said first RL unit are a RS485 serial line interface, and the second RL unit then is the RL unit of a RS422 serial line interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010201191XA CN101882124B (en) | 2010-06-13 | 2010-06-13 | RS422/485 double-use signal converter capable of automatically judging connector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010201191XA CN101882124B (en) | 2010-06-13 | 2010-06-13 | RS422/485 double-use signal converter capable of automatically judging connector |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101882124A CN101882124A (en) | 2010-11-10 |
CN101882124B true CN101882124B (en) | 2012-06-27 |
Family
ID=43054140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010201191XA Active CN101882124B (en) | 2010-06-13 | 2010-06-13 | RS422/485 double-use signal converter capable of automatically judging connector |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101882124B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034604A (en) * | 2011-10-06 | 2013-04-10 | 朱正兴 | Conversion equipment of universal serial bus (USB) and various serial ports and realization method thereof |
CN106708769B (en) * | 2015-07-16 | 2019-08-06 | 北京谊安医疗系统股份有限公司 | A kind of adaptive serial interface circuit |
CN110838850B (en) * | 2019-11-14 | 2021-04-02 | 中国电子科技集团公司第五十四研究所 | Group-path interface conversion device |
CN113609058A (en) * | 2021-07-30 | 2021-11-05 | 许昌智能继电器股份有限公司 | Serial port circuit |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI237477B (en) * | 2002-09-18 | 2005-08-01 | Icp Electronics Inc | Gateway control apparatus and method for controlling digital asynchronous half-duplex serial signal transmission |
CN2583898Y (en) * | 2002-10-11 | 2003-10-29 | 孙益新 | Matrix RS-422A programing control interface expander |
CN201174706Y (en) * | 2007-11-26 | 2008-12-31 | 重庆大学 | Ethernet serial power converter based on FPGA technique |
CN201498829U (en) * | 2009-07-17 | 2010-06-02 | 昆山三泰新电子科技有限公司 | Connector with serial port power output function |
-
2010
- 2010-06-13 CN CN201010201191XA patent/CN101882124B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN101882124A (en) | 2010-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106453383B (en) | UART-based master-slave multi-machine communication system and method | |
CN101038577B (en) | Communication interface for an electric device | |
AU2008309376B2 (en) | Data diode | |
CN101527735B (en) | Multi-serial port data communication card equipment based on CPCI bus and method thereof | |
CN216596246U (en) | Self-adaptive circuit compatible with multi-serial port protocol and communication equipment | |
CN101882124B (en) | RS422/485 double-use signal converter capable of automatically judging connector | |
CN106130856A (en) | A kind of self adaptation baud rate RS485 communications protocol | |
CN101894090B (en) | RS-485 signal converter capable of automatically adjusting transmitting-receiving order | |
US20040001471A1 (en) | Card device for wireless data communication | |
CN102929830A (en) | Software simulation rapid communication protocol | |
CN103034604A (en) | Conversion equipment of universal serial bus (USB) and various serial ports and realization method thereof | |
CN105703935A (en) | Server system with function of automatic switching of shared network | |
CN205005065U (en) | RS485 communication circuit | |
CN201820120U (en) | Self-adapting multibus execution mechanism controller | |
CN101686083A (en) | Data optical receiver | |
CN204442400U (en) | A kind of mining RS-485 isolates repeater | |
CN101674074A (en) | Monobus interface conversion circuit of self-adaptive level | |
CN221631961U (en) | Intelligent switching circuit and industrial control equipment | |
CN101031899A (en) | Device for transmiting signal | |
CN217767222U (en) | CAN and 485 communication conversion circuit for coal mining machine | |
CN207601789U (en) | A kind of antitransmitter receiver and transmitting-receiving converting system based on RS485 | |
CN216794991U (en) | Communication module transmit-receive switching circuit and communication device | |
CN102904789A (en) | RS485 isolated communication circuit and control method thereof | |
CN205427840U (en) | Long distance transmission's I2C bus communication interface circuit | |
CN203057168U (en) | Remote terminal unit (RTU) based on full-duplex communication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |