CN101882124A - 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 PDF

Info

Publication number
CN101882124A
CN101882124A CN 201010201191 CN201010201191A CN101882124A CN 101882124 A CN101882124 A CN 101882124A CN 201010201191 CN201010201191 CN 201010201191 CN 201010201191 A CN201010201191 A CN 201010201191A CN 101882124 A CN101882124 A CN 101882124A
Authority
CN
China
Prior art keywords
data
receive
output terminal
interface
logic unit
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.)
Granted
Application number
CN 201010201191
Other languages
Chinese (zh)
Other versions
CN101882124B (en
Inventor
林明政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunshan Wuchang New Precision Electronic Industry Co Ltd
Original Assignee
Kunshan Wuchang New Precision Electronic Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kunshan Wuchang New Precision Electronic Industry Co Ltd filed Critical Kunshan Wuchang New Precision Electronic Industry Co Ltd
Priority to CN201010201191XA priority Critical patent/CN101882124B/en
Publication of CN101882124A publication Critical patent/CN101882124A/en
Application granted granted Critical
Publication of CN101882124B publication Critical patent/CN101882124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Tool is judged the dual-purpose signal converter of the RS422/485 of interface form automatically
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) is formulated EIA-RS-232 (RS232), EIA-RS-422 (to call RS422 in the following text), EIA-RS-485 (to call RS458 in the following text) is common serial communication standard, the RS422 that its middle and later periods formulates, RS485 establishes 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, so RS422, the RS485 converter is 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 and inequality, as 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 receive logic 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 receive logic 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 receive logic 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 AsynchronousReceiver/Transmitter (hereinafter to be referred as UART) 50 that is installed in the computing machine 40, as Figure 6 and 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 a transmission with cushioning a working area 531 and a transmission 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 temporary parallel data, height order in position outwards transmits in regular turn, reaches parallel data and is converted to the serial data function;
One Data Receiving unit 54, be connected to data bus 42, and comprise a reception with cushioning a working area 541 and a reception 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 parallel data is exported in this data bus 42, be converted to the parallel data function to reach serial data with buffering working area 541;
One RS458/RS422 serial line interface 55, include a receiving end DI, one transmission end RO, one Enable Pin EN, one transmitting-receiving port TX/RX and one receives port RX, wherein this receiving end DI is connected to the output terminal of this data transfer unit 53, its transmission end RO then is the input end that is connected to this Data Receiving unit 54, the Enable Pin EN of this RS458/422 serial line interface 55 then is connected to this data transfer unit 53 again, whether enable by these data transfer unit 53 decisions, this transmitting-receiving port TX/RX connects for outside RS485 transmission line, should receive and dispatch port TX/RX again and receive the port to connect for outside RS422 transmission line; 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 to determine this reception port TX.
As shown in the above description, this UART includes a RS485/422 serial interface 55, so 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.
As shown in the above description, 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 a kind of dual-purpose signal converter of RS422/485 of automatic judgement interface form.
Desire to reach the employed major technique means of above-mentioned purpose, make this 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 receive logic unit, and wherein the input end of the output terminal of this transmission logical block and the first receive logic unit connects jointly, connects for the RS485 transmission line; Should transmit logical block again is connected for the RS422 transmission line with the receive logic 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 receive logic 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 receive logic 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 receive logic 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 receive logic unit, judge that this serial line interface is RS422 or 485 communication states.
As shown in the above description, this reception control module sees through with door and obtains the data that the first or second receive logic unit of this serial line interface is received, and when receiving with the door forward data, the accepting state signal is returned to this logic controller, judging further by this logic controller whether the connected first receive logic 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 equally to select the half-or full-duplex communication of RS485 or RS422 serial for the user.
Description of drawings
Figure 1A is applied to the calcspar of RS485 communication for the present invention's first preferred embodiment;
Figure 1B is that the present invention's first preferred embodiment is applied to the calcspar into the RS422 communication;
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, for the present invention judges the first preferable enforcement of the dual-purpose signal converter 10 of RS422/485 of interface form automatically, it includes:
One serial line interface 11, include one and transmit logical block 111 and first and second receive logic unit 112,112a, wherein the input end of the output terminal of this transmission logical block 111 and the first receive logic unit 112 connects jointly, for twisted-pair feeder 21 connections of a RS485 transmission line 20; This transmission logical block 111 and receive logic 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 receive logic unit 112 are transmission and the receive logic unit 111 of a RS485 serial line interface 11a, 112, and this second receive logic unit 112a is the receive logic unit of this RS422 serial line interface, and 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 is for receiving 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 receive logic 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 receive logic 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 receive logic unit 112 of this serial line interface 11, according to the Interface status output terminal Sr and the first receive logic 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 also do not enable, and 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, the user is connected to RS485 transmission line 20 in the serial line interface 11, the meaning i.e. input end of the output terminal of this transmission logical block 111 and the first receive logic unit 112 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 receive logic 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 receive logic 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 receive logic 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 receive logic unit 112, the data of 112a therefore can the further output terminal RO1 signal of judging the connected first receive logic unit 112.
1. judge that on behalf of present serial line interface 11, receiving data at present comes from the first receive logic 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 there is no 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 the present invention, its the most structure and first preferred embodiment are roughly the same, above-mentioned transmit control unit can be the data transfer unit 12 ' of UART, above-mentioned reception control module then can be the Data Receiving unit 13 ' of UART, and further include 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 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 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.
As shown in the above description, 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 additionally more manually set 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 of judging the interface form automatically is characterized in that, includes:
One serial line interface includes one and transmits logical block and first and second receive logic unit, and wherein the input end of the output terminal of this transmission logical block and the first receive logic unit connects jointly, connects for the RS485 transmission line; Should transmit logical block again is connected for the RS422 transmission line with the receive logic 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 also 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 receive logic 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 receive logic 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 receive logic 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 receive logic 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 controller 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 a parallel input port, 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, this reception control module is in receiving the serial data of importing with door, promptly in a high potential signal of its accepting state output terminal to this logic controller, 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 receive logic 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 one first receive logic unit are a RS485 serial line interface, and the second receive logic unit then is the receive logic unit of a RS422 serial line interface.
CN201010201191XA 2010-06-13 2010-06-13 RS422/485 double-use signal converter capable of automatically judging connector Active CN101882124B (en)

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 true CN101882124A (en) 2010-11-10
CN101882124B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
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
CN106708769A (en) * 2015-07-16 2017-05-24 北京谊安医疗系统股份有限公司 Adaptive serial interface circuit
CN110838850A (en) * 2019-11-14 2020-02-25 中国电子科技集团公司第五十四研究所 Group-path interface conversion device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2583898Y (en) * 2002-10-11 2003-10-29 孙益新 Matrix RS-422A programing control interface expander
US20040052219A1 (en) * 2002-09-18 2004-03-18 Icp Electronics Inc. Gate controller for controlling digital asynchronized half-duplex serial transmission between multi-interfaces and method for controlling the same
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040052219A1 (en) * 2002-09-18 2004-03-18 Icp Electronics Inc. Gate controller for controlling digital asynchronized half-duplex serial transmission between multi-interfaces and method for controlling the same
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

Cited By (5)

* Cited by examiner, † Cited by third party
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
CN106708769A (en) * 2015-07-16 2017-05-24 北京谊安医疗系统股份有限公司 Adaptive serial interface circuit
CN106708769B (en) * 2015-07-16 2019-08-06 北京谊安医疗系统股份有限公司 A kind of adaptive serial interface circuit
CN110838850A (en) * 2019-11-14 2020-02-25 中国电子科技集团公司第五十四研究所 Group-path interface conversion device
CN110838850B (en) * 2019-11-14 2021-04-02 中国电子科技集团公司第五十四研究所 Group-path interface conversion device

Also Published As

Publication number Publication date
CN101882124B (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN106453383B (en) UART-based master-slave multi-machine communication system and method
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
US20040205279A1 (en) Bus communication system by unrestrained connection and a communication control method therefor
CN101977082A (en) Optical receiving and transmitting module, optical transmitting device and optical transmitting method
CN107193697A (en) A kind of method for realizing the nonpolarity connections of RS485
CN101882124B (en) RS422/485 double-use signal converter capable of automatically judging connector
CN101894090B (en) RS-485 signal converter capable of automatically adjusting transmitting-receiving order
CN102929830A (en) Software simulation rapid communication protocol
CN103034604A (en) Conversion equipment of universal serial bus (USB) and various serial ports and realization method thereof
CN102882754A (en) Repeated interrupt mode 485 direction control method
CN204576499U (en) The electronic equipment of a kind of RS485 communicating circuit and application thereof
CN201503585U (en) Multi-serial-port data communication card equipment based on CPCI bus
CN201820120U (en) Self-adapting multibus execution mechanism controller
CN204089768U (en) RS485 automatic reversing circuit
CN101674074B (en) Monobus interface conversion circuit of self-adaptive level
CN202856782U (en) Automatic receiving/transmitting and converting device for HART communication signals
CN102184153A (en) RS-485 transmitting-receiving automatic conversion circuit
CN204442400U (en) A kind of mining RS-485 isolates repeater
CN216794991U (en) Communication module transmit-receive switching circuit and communication device
CN102474437B (en) Signal transmission apparatus and vehicle assembly
CN217767222U (en) CAN and 485 communication conversion circuit for coal mining machine
CN203057168U (en) Remote terminal unit (RTU) based on full-duplex communication
CN102904789A (en) RS485 isolated communication circuit and control method 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
C14 Grant of patent or utility model
GR01 Patent grant