CN109376109A - Multiple serial communication switching device - Google Patents

Multiple serial communication switching device Download PDF

Info

Publication number
CN109376109A
CN109376109A CN201811502996.0A CN201811502996A CN109376109A CN 109376109 A CN109376109 A CN 109376109A CN 201811502996 A CN201811502996 A CN 201811502996A CN 109376109 A CN109376109 A CN 109376109A
Authority
CN
China
Prior art keywords
data
conversion chip
mcu
door
control terminal
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
Application number
CN201811502996.0A
Other languages
Chinese (zh)
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.)
LOOTOM TELCOVIDEO NETWORK WUXI CO Ltd
Original Assignee
LOOTOM TELCOVIDEO NETWORK WUXI 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 LOOTOM TELCOVIDEO NETWORK WUXI CO Ltd filed Critical LOOTOM TELCOVIDEO NETWORK WUXI CO Ltd
Priority to CN201811502996.0A priority Critical patent/CN109376109A/en
Publication of CN109376109A publication Critical patent/CN109376109A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Abstract

The present invention provides a kind of multiple serial communication switching device, including MCU, data input-switching circuit, data transmit-receive control circuit, RS232 conversion chip U5, RS485/422 conversion chip U3 and U4;Each input terminal of data input-switching circuit is separately connected the RXD data output end of the RXD data output end of RS232 conversion chip U5, RS485/422 conversion chip U3;The RXD data port of the output end connection MCU of data input-switching circuit;MCU realizes the received switching of RS232/RS485/RS422 serial port communication data by the control to data input-switching circuit;RS485/422 conversion chip U3 is used for the data transmit-receive of RS485 serial communication, and U3 doubles as the data receiver of RS422 serial communication, and data of the RS485/422 conversion chip U4 for RS422 serial communication are sent;MCU realizes the control to RS485/422 conversion chip U3, U4 by control terminal and data transmit-receive control circuit.The present invention is flexible and convenient to use.

Description

Multiple serial communication switching device
Technical field
The present invention relates to industrial communication technical field, especially a kind of multiple serial communication switching device.
Background technique
In the prior art, multiple serial communication RS232, RS485, RS422 cannot access circuit and the RXD number of MCU simultaneously Mutual serious interference when being communicated, while accessed according to port and TXD data port, data are unable to normal transmission, tradition Method needs manual each serial communication route of off and on, inconvenient for operation and cumbersome.
Summary of the invention
It is an object of the present invention to overcome the shortcomings of the prior art and provide a kind of switchings of multiple serial communication to fill It sets, can be realized the automatic switchover of multiple serial communication, flexible and convenient to use, circuit is simple and practical.The technology that the present invention uses Scheme is:
A kind of multiple serial communication switching device, including MCU, data input-switching circuit, data transmit-receive control circuit, RS232 Conversion chip U5, RS485/422 conversion chip U3 and U4;
Each input terminal of data input-switching circuit is separately connected RXD data output end, the RS485/ of RS232 conversion chip U5 The RXD data output end of 422 conversion chip U3;The RXD data port of the output end connection MCU of data input-switching circuit;MCU By the control to data input-switching circuit, the received switching of RS232/RS485/RS422 serial port communication data is realized;
RS485/422 conversion chip U3 is used for the data transmit-receive of RS485 serial communication, and MCU passes through control terminal and data transmit-receive control Circuit control RS485/422 conversion chip U3 processed carries out the data transmit-receive of RS485 serial communication;The TXD data port of MCU is distinguished Connect the TXD data input pin of RS232 conversion chip U5, TXD data input pin, the RS485/ of RS485/422 conversion chip U3 The TXD data input pin of 422 conversion chip U4;
RS485/422 conversion chip U3 doubles as the data receiver of RS422 serial communication, and RS485/422 conversion chip U4 is used for The data of RS422 serial communication are sent;MCU is realized by control terminal and data transmit-receive control circuit converts core to RS485/422 The control of piece U3, U4.
Specifically, data input-switching circuit includes and door U1A, U1B or door U2A, U2B;
With the RXD data output end of the A input termination RS232 conversion chip U5 of door U1A, the B input with door U1A terminates MCU's RS232 control terminal, with the Y output termination of door U1A or the A input terminal of door U2A;Or A input terminal and B the input terminal difference of door U2B Meet the enable end EN485 of MCU and the A input terminal of RS422 control terminal or Y the output termination and door U1B of door U2B, the B with door U1B The RXD data output end of input termination RS485/422 conversion chip U3 is inputted with the Y output termination of door U1B or the B of door U2A End;Or the RXD data port of the Y output termination MCU of door U2A.
Specifically, data transmit-receive control circuit includes and door U1C;It is controlled with the RS485 of the A input termination MCU of door U1C End, the enable end EN485 with the B input termination MCU of door U1C, with the output termination RS485/422 conversion chip U3's of door U1C It receives control terminal and sends control terminal;
The reception control terminal of RS485/422 conversion chip U4 connects high level, the hair of RS485/422 conversion chip U4 by resistance R2 Send the RS422 control terminal of control termination MCU;
The reception control terminal of RS485/422 conversion chip U3, U4 are all that low level is effective, and sending control terminal is all that high level has Effect.
Further,
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 1,0,0,0 When, it is switched to RS232 serial communication;
When the signal of the RS232 control terminal of MCU, RS422 control terminal, the enable end EN485 is respectively 0,0,1, it is switched to RS485 string Port communications;The data transmit-receive of the signal control RS485 serial communication of the RS485 control terminal of MCU;
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 0,0,1,0 When, it is switched to RS422 serial communication.
The present invention has the advantages that
1) facilitate the intelligence for carrying out tri- kinds of signals of RS232, RS485, RS422 to automatically switch, can also be set as single by MCU Communication pattern, it is flexible and convenient to use.
2) circuit is simple and practical, at low cost.
Detailed description of the invention
Fig. 1 is electrical diagram of the invention.
Fig. 2 is the principle of the present invention figure.
Specific embodiment
Below with reference to specific drawings and examples, the invention will be further described.
As shown in Figure 1, a kind of multiple serial communication switching device proposed by the present invention, including MCU, data input switching electricity Road, data transmit-receive control circuit, RS232 conversion chip U5, RS485/422 conversion chip U3 and U4;
Each input terminal of data input-switching circuit is separately connected RXD data output end, the RS485/ of RS232 conversion chip U5 The RXD data output end of 422 conversion chip U3;The RXD data port of the output end connection MCU of data input-switching circuit;MCU By the control to data input-switching circuit, the received switching of RS232/RS485/RS422 serial port communication data is realized;
RS485/422 conversion chip U3 is used for the data transmit-receive of RS485 serial communication, and MCU passes through control terminal and data transmit-receive control Circuit control RS485/422 conversion chip U3 processed carries out the data transmit-receive of RS485 serial communication;The TXD data port of MCU is distinguished Connect the TXD data input pin of RS232 conversion chip U5, TXD data input pin, the RS485/ of RS485/422 conversion chip U3 The TXD data input pin of 422 conversion chip U4;
RS485/422 conversion chip U3 doubles as the data receiver of RS422 serial communication, and RS485/422 conversion chip U4 is used for The data of RS422 serial communication are sent;MCU is realized by control terminal and data transmit-receive control circuit converts core to RS485/422 The control of piece U3, U4.
As shown in Fig. 2, data input-switching circuit includes and door U1A, U1B or door U2A, U2B;
With the RXD data output end of the A input termination RS232 conversion chip U5 of door U1A, the B input with door U1A terminates MCU's RS232 control terminal, with the Y output termination of door U1A or the A input terminal of door U2A;Or A input terminal and B the input terminal difference of door U2B Meet the enable end EN485 of MCU and the A input terminal of RS422 control terminal or Y the output termination and door U1B of door U2B, the B with door U1B The RXD data output end of input termination RS485/422 conversion chip U3 is inputted with the Y output termination of door U1B or the B of door U2A End;Or the RXD data port of the Y output termination MCU of door U2A;
Data transmit-receive control circuit includes and door U1C;The RS485 control terminal that MCU is terminated with the A input of door U1C, the B with door U1C The enable end EN485 of input termination MCU, reception control terminal and hair with the output termination RS485/422 conversion chip U3 of door U1C Send control terminal;
The reception control terminal of RS485/422 conversion chip U4 connects high level, the hair of RS485/422 conversion chip U4 by resistance R2 Send the RS422 control terminal of control termination MCU;
The reception control terminal (2 feet of U3, U4 in Fig. 2) of RS485/422 conversion chip U3, U4 are all that low level is effective, are sent Control terminal (3 feet of U3, U4 in Fig. 2) is all that high level is effective;The A of RS485/422 conversion chip U3, B interface end can be used as The sending and receiving end of RS485 serial communication also can be used as the receiving end of RS422 serial communication;A, B of RS485/422 conversion chip U4 Transmitting terminal of the interface end as RS422 serial communication;
In foregoing circuit, RS232 conversion chip U5 uses MAX232, and RS485/422 conversion chip U3, U4 are all made of SP485EEN;
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 1,0,0,0 When (1 represents high level, and 0 represents low level), be switched to RS232 serial communication;Or door U2B output 0,0 is also exported with door U1B, At this time or door U2A only receives through the data with the received RXD data output end from RS232 conversion chip U5 of door U1A; The transmission data of the TXD data port of MCU enter the TXD data input pin of RS232 conversion chip U5;
When the signal of the RS232 control terminal of MCU, RS422 control terminal, the enable end EN485 is respectively 0,0,1, it is switched to RS485 string Port communications;The data transmit-receive of the signal control RS485 serial communication of the RS485 control terminal of MCU, when the RS485 control terminal of MCU Signal is 1, then sends for the data of RS485 serial communication, and the signal of the RS485 control terminal of MCU is 0, then logical for RS485 serial ports The data receiver of letter realizes the data transmit-receive of RS485 serial communication by RS485/422 conversion chip U3;RS485/422 conversion The shutdown of high level that the data receiver function of chip U4 is connect by resistance R2, due to 3 feet of U4 at this time connect low level thus its Data sending function is also switched off;The data receiver of RS232 serial communication has also been cut off with the shutdown of door U1A;
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 0,0,1,0 When, it is switched to RS422 serial communication;RS485/422 conversion chip U3 is responsible for data receiver at this time, and RS485/422 converts core Piece U4 is responsible for data transmission.
Multiple serial communication switching device proposed by the present invention facilitates and carries out tri- kinds of signals of RS232, RS485, RS422 Intelligence automatically switches, and single communication mode can also be set as by MCU;Data input-switching circuit, data transmit-receive control electricity The simple common logical AND gate of routing and logic sum gate chip composition, circuit is simple and practical, and wide usage is good, solves multi-channel serial port The problem of communicating while carrying out.
It should be noted last that the above specific embodiment is only used to illustrate the technical scheme of the present invention and not to limit it, Although being described the invention in detail referring to example, those skilled in the art should understand that, it can be to the present invention Technical solution be modified or replaced equivalently, without departing from the spirit and scope of the technical solution of the present invention, should all cover In the scope of the claims of the present invention.

Claims (4)

1. a kind of multiple serial communication switching device, which is characterized in that including MCU, data input-switching circuit, data transmit-receive control Circuit processed, RS232 conversion chip U5, RS485/422 conversion chip U3 and U4;
Each input terminal of data input-switching circuit is separately connected RXD data output end, the RS485/ of RS232 conversion chip U5 The RXD data output end of 422 conversion chip U3;The RXD data port of the output end connection MCU of data input-switching circuit;MCU By the control to data input-switching circuit, the received switching of RS232/RS485/RS422 serial port communication data is realized;
RS485/422 conversion chip U3 is used for the data transmit-receive of RS485 serial communication, and MCU passes through control terminal and data transmit-receive control Circuit control RS485/422 conversion chip U3 processed carries out the data transmit-receive of RS485 serial communication;The TXD data port of MCU is distinguished Connect the TXD data input pin of RS232 conversion chip U5, TXD data input pin, the RS485/ of RS485/422 conversion chip U3 The TXD data input pin of 422 conversion chip U4;
RS485/422 conversion chip U3 doubles as the data receiver of RS422 serial communication, and RS485/422 conversion chip U4 is used for The data of RS422 serial communication are sent;MCU is realized by control terminal and data transmit-receive control circuit converts core to RS485/422 The control of piece U3, U4.
2. multiple serial communication switching device as described in claim 1, which is characterized in that
Data input-switching circuit includes and door U1A, U1B or door U2A, U2B;
With the RXD data output end of the A input termination RS232 conversion chip U5 of door U1A, the B input with door U1A terminates MCU's RS232 control terminal, with the Y output termination of door U1A or the A input terminal of door U2A;Or A input terminal and B the input terminal difference of door U2B Meet the enable end EN485 of MCU and the A input terminal of RS422 control terminal or Y the output termination and door U1B of door U2B, the B with door U1B The RXD data output end of input termination RS485/422 conversion chip U3 is inputted with the Y output termination of door U1B or the B of door U2A End;Or the RXD data port of the Y output termination MCU of door U2A.
3. multiple serial communication switching device as claimed in claim 1 or 2, which is characterized in that
Data transmit-receive control circuit includes and door U1C;The RS485 control terminal that MCU is terminated with the A input of door U1C, the B with door U1C The enable end EN485 of input termination MCU, reception control terminal and hair with the output termination RS485/422 conversion chip U3 of door U1C Send control terminal;
The reception control terminal of RS485/422 conversion chip U4 connects high level, the hair of RS485/422 conversion chip U4 by resistance R2 Send the RS422 control terminal of control termination MCU;
The reception control terminal of RS485/422 conversion chip U3, U4 are all that low level is effective, and sending control terminal is all that high level has Effect.
4. multiple serial communication switching device as claimed in claim 3, which is characterized in that
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 1,0,0,0 When, it is switched to RS232 serial communication;
When the signal of the RS232 control terminal of MCU, RS422 control terminal, the enable end EN485 is respectively 0,0,1, it is switched to RS485 string Port communications;The data transmit-receive of the signal control RS485 serial communication of the RS485 control terminal of MCU;
When the signal of the RS232 control terminal of MCU, RS485 control terminal, RS422 control terminal, the enable end EN485 is respectively 0,0,1,0 When, it is switched to RS422 serial communication.
CN201811502996.0A 2018-12-10 2018-12-10 Multiple serial communication switching device Pending CN109376109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811502996.0A CN109376109A (en) 2018-12-10 2018-12-10 Multiple serial communication switching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811502996.0A CN109376109A (en) 2018-12-10 2018-12-10 Multiple serial communication switching device

Publications (1)

Publication Number Publication Date
CN109376109A true CN109376109A (en) 2019-02-22

Family

ID=65372923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811502996.0A Pending CN109376109A (en) 2018-12-10 2018-12-10 Multiple serial communication switching device

Country Status (1)

Country Link
CN (1) CN109376109A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609144A (en) * 2024-01-23 2024-02-27 深圳市三旺通信股份有限公司 RS485, RS422 and RS232 three-in-one interface multiplexing circuit

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202177898U (en) * 2011-07-27 2012-03-28 上海耀华称重系统有限公司 RS232/RS485 (Recommended Standard 232/Recommended Standard 232) switching circuit of universal asynchronous receiver transmitter (UART)
CN202649998U (en) * 2012-05-17 2013-01-02 北京北变智达科技有限公司 RS232/RS485/RS422 comprehensive test interface circuit
CN203027245U (en) * 2012-11-09 2013-06-26 深圳市祈飞科技有限公司 RS232 and RS485 adaptive interface circuit
CN204044808U (en) * 2014-08-11 2014-12-24 上海艾络格电子技术有限公司 The device that a kind of RS232 of realization, RS485 and USB turn mutually
CN205039834U (en) * 2015-10-15 2016-02-17 江苏天泽环保科技有限公司 Communication device's of many serial portss automatic switch -over circuit
CN209044590U (en) * 2018-12-10 2019-06-28 无锡路通视信网络股份有限公司 Multiple serial communication switching device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202177898U (en) * 2011-07-27 2012-03-28 上海耀华称重系统有限公司 RS232/RS485 (Recommended Standard 232/Recommended Standard 232) switching circuit of universal asynchronous receiver transmitter (UART)
CN202649998U (en) * 2012-05-17 2013-01-02 北京北变智达科技有限公司 RS232/RS485/RS422 comprehensive test interface circuit
CN203027245U (en) * 2012-11-09 2013-06-26 深圳市祈飞科技有限公司 RS232 and RS485 adaptive interface circuit
CN204044808U (en) * 2014-08-11 2014-12-24 上海艾络格电子技术有限公司 The device that a kind of RS232 of realization, RS485 and USB turn mutually
CN205039834U (en) * 2015-10-15 2016-02-17 江苏天泽环保科技有限公司 Communication device's of many serial portss automatic switch -over circuit
CN209044590U (en) * 2018-12-10 2019-06-28 无锡路通视信网络股份有限公司 Multiple serial communication switching device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609144A (en) * 2024-01-23 2024-02-27 深圳市三旺通信股份有限公司 RS485, RS422 and RS232 three-in-one interface multiplexing circuit

Similar Documents

Publication Publication Date Title
CN105786742B (en) Server serial port switching device and method and server
CN201072550Y (en) Selection circuit suitable for duplex data transmission interface
CN202084028U (en) Modularized multi-serial port expanding device
CN206498430U (en) A kind of bridger
CN205038637U (en) RS232 and RS485422 interface converter based on microprocessor
CN106383800A (en) Intelligent serial interface equipment switching device and method
CN216596246U (en) Self-adaptive circuit compatible with multi-serial port protocol and communication equipment
CN209044590U (en) Multiple serial communication switching device
CN212009333U (en) Interface board compatible with multiple interface signals
CN103972909A (en) TSC (thyristor switched capacitor) system and RS485 communication method thereof based on FPGA (Field Programmable Gate Array)
CN109376109A (en) Multiple serial communication switching device
CN210137320U (en) RS485 circuit capable of automatically switching receiving and transmitting states
CN111372257B (en) Remote coverage unit control method and device and remote coverage unit
CN205788168U (en) Master-slave mode serial equipment hub
CN105045740A (en) Conversion method and circuit for communication interfaces
CN101834622B (en) Singlechip control chip, data transceiving method and data transmission device
CN201163783Y (en) Multi-serial port card based on CAN bus
CN101483484B (en) Optical fiber straight-forward station adapter and working method
CN107908584B (en) Multi-path RS-485 communication network
CN205091733U (en) Communication interface conversion device
CN201820120U (en) Self-adapting multibus execution mechanism controller
CN214376432U (en) Terminal RS485 and RS232 switching circuit are fused to platform district intelligence
CN205249496U (en) Wireless communication terminal
CN213042273U (en) Circuit for converting two-wire system serial bus interface into single-wire half-duplex bus interface
CN209170052U (en) A kind of multi-level communication conversion module that 10kV switch controller is embedded

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination