CN116303205A - Three-in-one interface circuit for serial port, control method thereof and serial port system chip - Google Patents

Three-in-one interface circuit for serial port, control method thereof and serial port system chip Download PDF

Info

Publication number
CN116303205A
CN116303205A CN202310279674.9A CN202310279674A CN116303205A CN 116303205 A CN116303205 A CN 116303205A CN 202310279674 A CN202310279674 A CN 202310279674A CN 116303205 A CN116303205 A CN 116303205A
Authority
CN
China
Prior art keywords
serial port
control signal
circuit
serial
pin
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
CN202310279674.9A
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.)
3onedata Co ltd
Original Assignee
3onedata 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 3onedata Co ltd filed Critical 3onedata Co ltd
Priority to CN202310279674.9A priority Critical patent/CN116303205A/en
Publication of CN116303205A publication Critical patent/CN116303205A/en
Pending legal-status Critical Current

Links

Images

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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The application relates to the technical field of electronic circuits, and discloses a serial port three-in-one interface circuit, a control method thereof and a serial port system chip, wherein the circuit comprises: the system comprises an RS422 data transmission module, an RS485 transceiver module, an RS232 transceiver module, a level type transmission selection circuit, a first receiving selection circuit, a second receiving selection circuit, a multiplexing receiving signal circuit and a serial port terminal; the circuit is used for realizing serial communication between the serial controller and opposite-end equipment in different communication modes according to different combinations of three control signals configured at the control end of the corresponding module or circuit. And the serial port three-in-one implementation reduces the pin number and volume of the wiring terminal.

Description

Three-in-one interface circuit for serial port, control method thereof and serial port system chip
Technical Field
The application relates to the technical field of electronic circuits, in particular to a serial port three-in-one interface circuit, a control method thereof and a serial port system chip.
Background
The serial bus communication protocol is widely applied to various fields of industrial control, instruments, meters, multimedia networks, electromechanical integration and the like, and at present, the serial bus communication protocol mainly comprises several interface standards such as RS232, RS485, RS422 and the like. The RS232 is the earliest serial interface standard, generally adopts a 3-wire system or an 8-wire system, adopts a full duplex communication mode, and is suitable for a communication scene with a short distance and a low baud rate. In order to overcome the problems of short transmission distance and the like, an RS485/RS422 interface standard is provided on the basis of an RS232 interface standard, wherein the RS485 interface standard adopts a half-duplex communication mode and is a 2-wire differential transmission mode; and the RS422 adopts a full duplex communication mode and adopts a 4-wire differential transmission mode. That is, the several interface standards may use different transmission modes in a wire system.
In practical industrial field application, because the form of the external equipment is not fixed, RS232 mode communication is needed, and RS484/RS422 mode communication is needed. In order to meet the requirement of communication in all modes, common manufacturers individually draw out and connect signal wires in several communication modes to the same connector terminal, and then select different connection pins and cables according to different communication modes of opposite terminal equipment.
However, there are many problems such as (1) the number of pins of the connection terminal is relatively large (at least a connector terminal having 12 pins needs to be selected), and the volume of the connection terminal is relatively large, which is disadvantageous in downsizing and densification of the device. (2) The transmitting signal and the receiving signal are not physically isolated, and when the signal is transmitted, the RS232 and RS485/RS422 level signals can send data to the opposite end at the same time. (3) According to different communication modes, different wiring pins are selected, and the wiring mode is complex. (4) If communication cables with different numbers of wire cores are selected, standardization of the cables is not facilitated, and if cables with uniform wire cores are used, the cables are thick due to the fact that the number of the wire cores is large, on-site wiring is not facilitated.
Disclosure of Invention
In view of this, the embodiments of the present application provide a serial port three-in-one interface circuit, a control method thereof, and a serial port system chip.
In a first aspect, an embodiment of the present application provides a serial port three-in-one interface circuit, including: the system comprises an RS422 data transmission module, an RS485 transceiver module, an RS232 transceiver module, a level type transmission selection circuit, a first receiving selection circuit, a second receiving selection circuit, a multiplexing receiving signal circuit and a serial port terminal;
the level type transmission selection circuit is respectively connected with the RS422 transmission data module and the RS485 transceiver module; the RS422 data sending module is connected with the serial port wiring terminal;
the RS485 transceiver module is respectively connected with the first receiving selection circuit, the second receiving selection circuit and the multiplexing receiving signal circuit; the first receiving selection circuit and the second receiving selection circuit are also respectively connected with the serial port terminal;
the RS232 transceiver module is respectively connected with the first receiving selection circuit, the second receiving selection circuit, the multiplexing receiving signal circuit and the serial port terminal;
the level type sending selection circuit, the multiplexing receiving signal circuit and the RS232 transceiver module are respectively used for being connected with the same serial port controller, and the serial port wiring terminal is used for being connected with opposite terminal equipment;
the RS422 transmit data module, the RS232 transceiver module, the first receive selection circuit, and the second receive selection circuit are configured to input a first control signal, the level transmit selection circuit is configured to input a second control signal, and the RS485 transceiver module is configured to input a third control signal;
the serial port three-in-one interface circuit is used for realizing serial port communication between the serial port controller and the opposite terminal equipment in different communication modes according to different combinations of the first control signal, the second control signal and the third control signal.
In a second aspect, an embodiment of the present application provides a control method of a serial port three-in-one interface circuit, which is applied to the serial port three-in-one interface circuit, where the method includes:
when the serial three-in-one interface circuit is required to be configured to work in an RS232 communication mode, the first control signal, the second control signal and the third control signal are controlled to be respectively high-level, low-level and low-level;
when the serial three-in-one interface circuit is required to be configured to work in an RS422 communication mode, the first control signal, the second control signal and the third control signal are controlled to be low level, low level and low level respectively;
when the serial three-in-one interface circuit is required to be configured to work in an RS485 communication mode, the first control signal and the second control signal are controlled to be respectively in a low level and a high level, when data are required to be sent, the third control signal is controlled to be in a high level, and when data are required to be received, the third control signal is controlled to be switched to be in a low level.
In a third aspect, an embodiment of the present application provides a serial port system chip, including: the serial port controller is connected with the processor through the serial port three-in-one interface circuit;
the processor and the serial port controller are connected with the serial port three-in-one interface circuit;
the processor is used for generating first to third control signals so that the serial port three-in-one interface circuit can realize serial port communication between the serial port controller and the opposite terminal equipment in different communication modes according to different combinations of the first to third control signals.
In a fourth aspect, an embodiment of the present application provides a terminal device, where the terminal device includes the serial port system chip.
The embodiment of the application has the following beneficial effects:
according to the serial port three-in-one interface circuit, on the basis of an RS422 sending data module, an RS485 transceiver module and an RS232 transceiver module, a level type sending selection circuit, a first receiving selection circuit, a second receiving selection circuit and a multiplexing receiving signal circuit are added, a shared serial port wiring terminal is designed, and serial port communication between a serial port controller and opposite-end equipment in different communication modes is realized by combining three control signals. Aiming at the serial three-in-one interface circuit, under the condition of meeting three communication working modes, compared with the existing scheme that all signals are led out independently in various serial modes, the serial three-in-one interface circuit can effectively reduce the pin number of the wiring terminal and the volume of the wiring terminal, thereby being convenient for improving the miniaturization and high-density degree of equipment; moreover, the same cable is used, the on-site signal wiring is simple, and the mode can be switched on the software according to the mode of the on-site signal. In addition, the signal selection circuit is used for switching, so that physical isolation of signals can be well ensured, and stability of signal transmission and the like are further ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic structural diagram of a serial port three-in-one interface circuit according to an embodiment of the present application;
FIG. 2 shows a circuit design of a serial port three-in-one interface circuit according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a control method of a serial three-in-one interface circuit according to an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of a serial port system chip according to an embodiment of the present application.
Description of main reference numerals:
100-serial three-in-one interface circuit; 110-RS422 sends data modules; a 120-RS485 transceiver module; a 130-RS232 transceiver module; 140-level type transmission selection circuit; 150-a first reception selection circuit; 160-a second reception selection circuit; 170-multiplexing the received signal circuit; 180-serial port wiring terminal; 200-serial port controller; 300-a processor; 10-serial port system chip.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In the following, the terms "comprises", "comprising", "having" and their cognate terms may be used in various embodiments of the present application are intended only to refer to a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be interpreted as first excluding the existence of or increasing the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is identical to the meaning of the context in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below and features of the embodiments may be combined with each other without conflict.
Considering that an actual field device may support different serial communication modes, and the existing scheme mainly leads out all signals in various possible serial communication modes independently, the size of a formed wiring terminal is very large, and reliability and the like of signal transmission are easily affected due to the fact that physical isolation of a sending signal and a receiving signal cannot be achieved.
The serial port three-in-one interface circuit 100 and the control method thereof are described in detail below.
Fig. 1 shows a schematic structural diagram of a serial three-in-one interface circuit 100 according to an embodiment of the present application. Illustratively, the serial port three-in-one interface circuit 100 includes an RS422 transmit data module 110, an RS485 transceiver module 120, an RS232 transceiver module 130, a level transmit select circuit 140, a first receive select circuit 150, a second receive select circuit 160, a multiplexed receive signal circuit 170, and a serial port terminal 180.
Specifically, the level type transmission selection circuit 140 is respectively connected to the RS422 transmission data module 110 and the RS485 transceiver module 120; RS422 transmit data module 110 is connected to serial port terminal 180; the RS485 transceiver module 120 is connected to the first reception selection circuit 150, the second reception selection circuit 160, and the multiplexed reception signal circuit 170, respectively; the first receiving selection circuit 150 and the second receiving selection circuit 160 are also connected to the serial port terminal 180, respectively; the RS232 transceiver module 130 is connected to the first receiving selection circuit 150, the second receiving selection circuit 160, the multiplexing receiving signal circuit 170, and the serial port terminal 180, respectively; the level type transmission selection circuit 140, the multiplexing receiving signal circuit 170 and the RS232 transceiver module 130 are respectively connected to the same serial port controller 200, and the serial port terminal 180 is connected to the opposite terminal device.
It can be understood that the serial three-in-one interface circuit 100 formed by the above modules or circuits is mainly used for implementing serial communication between the serial controller 200 and the connected opposite-end device. The opposite terminal device can be any one or more of devices supporting serial communication such as RS422, RS232, RS485 and the like.
In this embodiment, on the basis of the RS422 transmitting data module 110, the RS485 transceiver module 120, and the RS232 transceiver module 130, by adding corresponding transmitting signal and receiving signal selection circuits and combining with software signal control, switching between different serial communication modes can be achieved, and the same wiring terminal and the cable with a unified wire core are shared. It is understood that the serial communication modes that can be implemented herein include an RS232 communication mode, an RS422 communication mode, and an RS485 communication mode.
Illustratively, as shown in fig. 1, the RS422 transmit data module 110, the RS232 transceiver module 130, the first receive selection circuit 150, and the second receive selection circuit 160 are each configured to input a first control signal CN0, the level transmit selection circuit 140 is configured to input a second control signal CN1, and the RS485 transceiver module 120 is configured to input a third control signal CN2. The serial port three-in-one interface circuit 100 is configured to implement serial port communication between the serial port controller 200 and different opposite terminal devices according to different combinations of the first control signal CN0, the second control signal CN1 and the third control signal CN2. Wherein, the three control signals are all level type signals, namely, a high level state and a low level state exist. The serial three-in-one interface circuit 100 can be in different communication modes by using three control signals in combination.
It is understood that the RS422 transmitting data module 110, the RS485 transceiver module 120, and the RS232 transceiver module 130 may be implemented by using chip modules already available in the market, which will not be described herein. Optionally, the RS422 interface standard adopts a full duplex communication mode, and utilizes a 4-wire differential transmission mode, which specifically includes 2 differential wires, 1 transmission wire and 1 receiving wire; the RS485 interface standard adopts a 2-wire differential transmission mode, so that the RS422 transmitting data module 110 and the RS485 transceiver module 120 can also be realized by adopting the same chip module in design, such as an SP485 series chip.
In this embodiment, the level type transmission selection circuit 140, the first reception selection circuit 150, and the second reception selection circuit 160 are mainly used as switching circuits, and thus can be implemented by digital switches or analog switches. For example, the digital switch may employ a diode, a triode, a MOS transistor, or the like having a switching characteristic, and the analog switch may be a device such as a single pole double throw switch. It will be appreciated that the level type transmission selection circuit 140, the first reception selection circuit 150, and the second reception selection circuit 160 may be implemented using different switching circuits, for example, some using digital switches, some using analog switches, etc., and are not limited herein.
In one embodiment, as shown in fig. 2, the level type transmission selection circuit 140, the first reception selection circuit 150, and the second reception selection circuit 160 may be implemented by using one integrated chip of a single pole double throw switch. The primary difference between the first and second receive selection circuits 150 and 160 is the different functional configurations of the respective pins.
The level in the level-type transmission selection circuit 140 is referred to as TTL level. The level type transmission selection circuit 140 is mainly used for realizing switching between the transmission signal of the RS485 mode and the transmission signal of the RS422 mode according to the state of the first control signal. It can be appreciated that by time-division multiplexing the RS422 transmitting data module 110 and the RS485 transceiver module 120, physical isolation of signals can be ensured, and it is ensured that RS485 and RS422 level signals cannot exist on the cable at the same time.
The multiplexing reception signal circuit 170 is mainly used for inputting data received from a serial port reception end to the serial port controller 200 in any one mode of RS232/RS485/RS 422. In one embodiment, as shown in fig. 2, the multiplexing reception signal circuit 170 includes two diodes, wherein anodes of the two diodes are connected to connect to the serial port controller 200, and cathodes of the two diodes are respectively connected to respective data receiving ends of the RS485 transceiver module 120 and the RS232 transceiver module 130. It will be appreciated that isolation of the received signal in the RS232 mode from the received signal in the RS484/422 mode is achieved by utilizing the unidirectional conduction characteristics of the diode.
The serial port terminal 180 is a common terminal of the three communication modes, and the number of PINs designed in the embodiment is 8PIN, so that compared with the 12PIN of the existing scheme, the volume of the terminal is effectively reduced, the miniaturization and high-density degree of the equipment are improved, correspondingly, the weight of the cable is reduced, the cost of the cable is reduced, the wiring installation of the cable is facilitated, and the unified and standardized use of the cable is facilitated.
In one embodiment, serial port terminal 180 includes eight pins, one for each: first to fourth multiplexing pins, fifth to seventh pins, and power ground pin; the first multiplexing pin and the second multiplexing pin can be used in combination under a differential transmission mechanism, and the third multiplexing pin and the fourth multiplexing pin can also be used in combination under a differential transmission mechanism. Since there is a functional multiplexing of these four pins, it is referred to herein as a multiplexed pin.
As shown in fig. 2, the RS422 transmit data module 110 is connected to the first multiplexing pin (t+/RTS) and the second multiplexing pin (T-/232 TX) of the serial port terminal 180 by differential signaling, and the first multiplexing pin (t+/RTS) and the second multiplexing pin (T-/232 TX) also respectively correspond to a transmit data (TXD) pin and a request to transmit (RTS) pin connected to the RS232 transceiver module 130. The 485 transceiver module is connected to the first receiving selection circuit 150 and the second receiving selection circuit 160 in a differential signal manner, the first receiving selection circuit 150 and the second receiving selection circuit 160 are respectively corresponding to a third multiplexing pin (data+/r+/232 RX) and a fourth multiplexing pin (Data-/R-/DCD) which are connected to the serial port terminal 180, and the third multiplexing pin (data+/r+/232 RX) and the fourth multiplexing pin (Data-/R-/DCD) are also respectively corresponding to a received Data (RXD) pin and a carrier detection (DCD) pin which are connected to the RS232 transceiver module 130. The fifth to seventh pins (corresponding to DSR, CTS, DTR and GND, respectively, in fig. 2) of the serial port terminal 180 correspond to a data ready (DSR), clear To Send (CTS) and Data Terminal Ready (DTR) pin, respectively, to which the RS232 transceiver module 130 is connected, and a power Ground (GND) pin is grounded.
It will be appreciated that serial controller 200 includes a plurality of pins that will interface with corresponding circuits or modules in the serial tri-interface circuit to enable communication from serial controller 200 to the end device. In one embodiment, as shown in fig. 2, the level type transmission selection circuit 140, the multiplexing reception signal circuit 170 and the RS232 transceiver module 130 are respectively used to connect to the same serial port controller 200, and include:
the data input end of the level type transmission selection circuit 140 is used for connecting a data Transmission (TX) pin of the serial port controller 200; the data output end of the multiplexing receiving signal circuit 170 is used for connecting with a data Receiving (RX) pin of the serial port controller 200; the DCD pin, RTS pin, DSR pin, CTS pin, and DTR pin of the RS232 transceiver module 130 are used in sequence to connect corresponding functional pins of the serial controller 200.
Based on the above structure, how the serial three-in-one interface circuit 100 implements three communication modes will be specifically described. It will be appreciated that the first to third control signals may be output by the processor 300 coupled to the circuit and that by employing a combination of different level signals, the circuit may be switched to different modes of operation.
In this embodiment, the correspondence between the combination states of the first control signal, the second control signal and the third control signal and the three communication modes is as follows:
(1) When the first control signal, the second control signal and the third control signal are sequentially high level, low level and low level, the serial three-in-one interface circuit 100 is configured in an RS232 communication mode.
(2) When the first control signal, the second control signal and the third control signal are low level, low level and low level in sequence, the serial three-in-one interface circuit 100 is configured in the RS422 communication mode.
(3) When the first control signal and the second control signal are low level and high level in sequence, the serial three-in-one interface circuit 100 is configured into an RS485 communication mode, on the basis, when the third control signal is high level, the serial three-in-one interface circuit 100 is used for transmitting data, and when the third control signal is low level, the serial three-in-one interface circuit 100 is used for receiving data.
Specifically, when the RS232 mode is selected to operate, the mode is a full duplex mode, that is, the data is transmitted and received, and at this time, the first control signal CON0 is at a high level, and the second control signal CON1 and the third control signal CON2 are at a low level. Then, the RS422 transmission data module 110 is disabled, and the first reception selection circuit 150 switches to the RS232 mode for receiving the RS232 signal of the counterpart device; and the second reception selection circuit 160 switches to the RS232 mode for receiving the DCD signal of the counterpart device. The RS232 transceiver module 130 is enabled to transmit and receive data; the multiplexing receiving signal circuit 170 further receives the serial TTL level signal and transmits the serial TTL level signal to the serial controller 200, so as to realize serial communication in the RS232 signal mode.
When the operation is selected in the RS422 mode, the mode is a full duplex mode, that is, the data is received while the data is transmitted, at this time, the first control signal CON0, the second control signal CON1 are at low level, and the third control signal CON2 is at low level. Then, the RS232 transceiver module 130 is disabled, the level transmission selection circuit 140 (TTL level) transmission signal is switched to the RS422 mode, the RS422 transmission data module 110 is enabled, and transmission of data is started. Meanwhile, the first receiving selection circuit 150 and the second receiving selection circuit 160 are switched to the receiving mode of the RS422, start to receive data, and the data will pass through the RS485 transceiver (when CON2 is at a low level, the default state is the receiving mode), so that the multiplexing receiving signal circuit 170 receives the serial port TTL level signal and transmits the serial port TTL level signal to the serial port controller 200, thereby realizing serial port communication in the RS422 signal mode.
When the operation is selected in the RS485 mode, the mode is a half duplex mode, namely, data can not be simultaneously transmitted and received on a bus, and the data transmission and the data reception need to be switched. At this time, the first control signal CON0 is at a low level, the second control signal CON1 is at a high level, the RS232 transceiver module 130 is disabled, the level type transmission selection circuit 140 (TTL level) switches the transmission signal to the RS S485 mode, and the first reception selection circuit 150 and the second reception selection circuit 160 switch to the RS485 data transmission/reception mode, and start to prepare data transmission/reception. Further, when the third control signal CON2 is at a high level, the transmitting end of the RS485 transceiver module 120 is enabled to start transmitting data; when CON2 is at low level, the receiving end of the RS485 transceiver module 120 is enabled to start receiving data, and the multiplexing receiving signal circuit 170 receives the serial TTL level signal to the serial controller 200. And serial communication under an RS485 signal mode is realized.
The serial port three-in-one interface circuit 100 realizes collinear transmission of serial port signals in three different modes through switching of a control circuit, and ensures physical isolation of transmitting signals and physical isolation of receiving signals through setting a selection circuit. It can be understood that when the working mode is fixed, the transmitting signal can only be transmitted from the fixed signal line, and the receiving signal can only be received from the fixed signal line, so that the real separation of the transmitting signal and the receiving signal is realized, the mutual influence is avoided, and the stability of signal transmission is ensured. In practical application, based on the serial three-in-one interface circuit 100, the on-site signal wiring of the equipment is simple, a unified cable can be used, and the mode switching can be performed on software according to on-site requirements. Compared with the prior scheme that all signals are led out independently in various serial port modes, the number of pins of the wiring terminal can be effectively reduced, and the volume of the wiring terminal is reduced, so that the miniaturization, the high-density degree and the like of equipment are improved conveniently.
Fig. 3 shows a flowchart of a control method of the serial three-in-one interface circuit 100 according to the embodiment of the present application. The control method is applied to the serial three-in-one interface circuit 100 of the above embodiment, and specifically includes the following steps:
s110, when the serial three-in-one interface circuit 100 is required to be configured to operate in the RS232 communication mode, the first control signal, the second control signal and the third control signal are respectively high level, low level and low level.
S120, when the serial three-in-one interface circuit 100 is required to be configured to work in the RS422 communication mode, the first control signal, the second control signal and the third control signal are respectively controlled to be low level, low level and low level.
S130, when the serial three-in-one interface circuit 100 is required to be configured to work in the RS485 communication mode, the first control signal and the second control signal are controlled to be low level and high level respectively, when data is required to be sent, the third control signal is controlled to be high level, and when data is required to be received, the third control signal is controlled to be switched to be low level.
It can be understood that the above steps may be executed in parallel, and no sequence exists, that is, the first to third control signals of the serial three-in-one interface circuit 100 may be controlled according to the actual configuration instruction, so as to switch to any one of the RS232, RS422 and RS485 communication modes.
Fig. 4 shows a schematic structural diagram of a serial port system chip 10 according to an embodiment of the present application. Illustratively, the serial system chip 10 includes: the processor 300, the serial port controller 200 and the serial port three-in-one interface circuit 100 of the above embodiment, specifically, the processor 300 and the serial port controller 200 are all connected with the serial port three-in-one interface circuit 100. The processor 300 is configured to generate first to third control signals, so that the serial three-in-one interface circuit 100 can implement serial communication between the serial controller 200 in the serial system chip 10 and the opposite devices in different communication modes according to different combinations of the configured first to third control signals.
It is understood that, regarding the correspondence between the combination states of the first control signal to the third control signal and the several communication modes supported by the serial three-in-one interface circuit 100, reference is made to the above description, and thus the description thereof is not repeated here.
In addition, the application further provides a terminal device, which can be, for example, but not limited to, a router, a gateway, a communication detection device and other devices supporting serial communication. The terminal device illustratively includes the serial system chip 10 of the above-described embodiment.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application.

Claims (10)

1. A serial three-in-one interface circuit, comprising: the system comprises an RS422 data transmission module, an RS485 transceiver module, an RS232 transceiver module, a level type transmission selection circuit, a first receiving selection circuit, a second receiving selection circuit, a multiplexing receiving signal circuit and a serial port terminal;
the level type transmission selection circuit is respectively connected with the RS422 transmission data module and the RS485 transceiver module; the RS422 data sending module is connected with the serial port wiring terminal;
the RS485 transceiver module is respectively connected with the first receiving selection circuit, the second receiving selection circuit and the multiplexing receiving signal circuit; the first receiving selection circuit and the second receiving selection circuit are also respectively connected with the serial port terminal;
the RS232 transceiver module is respectively connected with the first receiving selection circuit, the second receiving selection circuit, the multiplexing receiving signal circuit and the serial port terminal;
the level type sending selection circuit, the multiplexing receiving signal circuit and the RS232 transceiver module are respectively used for being connected with the same serial port controller, and the serial port wiring terminal is used for being connected with opposite terminal equipment;
the RS422 transmit data module, the RS232 transceiver module, the first receive selection circuit, and the second receive selection circuit are configured to input a first control signal, the level transmit selection circuit is configured to input a second control signal, and the RS485 transceiver module is configured to input a third control signal;
the serial port three-in-one interface circuit is used for realizing serial port communication between the serial port controller and the opposite terminal equipment in different communication modes according to different combinations of the first control signal, the second control signal and the third control signal.
2. The serial port three-in-one interface circuit according to claim 1, wherein the serial port three-in-one interface circuit supports three communication modes, and the correspondence between the combined states of the first control signal, the second control signal and the third control signal and the three communication modes is as follows:
when the first control signal, the second control signal and the third control signal are in high level, low level and low level in sequence, the serial three-in-one interface circuit is configured into an RS232 communication mode;
when the first control signal, the second control signal and the third control signal are in low level, low level and low level in sequence, the serial three-in-one interface circuit is configured into an RS422 communication mode;
when the first control signal and the second control signal are in sequence of low level and high level, the serial port three-in-one interface circuit is configured into an RS485 communication mode, and when the third control signal is in high level, the serial port three-in-one interface circuit is used for sending data, and when the third control signal is in low level, the serial port three-in-one interface circuit is used for receiving data.
3. The serial port three-in-one interface circuit of claim 1, wherein the serial port terminal comprises eight pins, respectively: first to fourth multiplexing pins, fifth to seventh pins, and power ground pin;
the RS422 data transmission module is connected with a first multiplexing pin and a second multiplexing pin in a differential signal mode, and the first multiplexing pin and the second multiplexing pin are also correspondingly connected with a TXD pin and an RTS pin of the RS232 transceiver module respectively;
the 485 transceiver module is connected with the first receiving selection circuit and the second receiving selection circuit in a differential signal mode, the first receiving selection circuit and the second receiving selection circuit are respectively and correspondingly connected with a third multiplexing pin and a fourth multiplexing pin, and the third multiplexing pin and the fourth multiplexing pin are also respectively and correspondingly connected with a RXD pin and a DCD pin of the RS232 transceiver module;
and the fifth pin to the seventh pin are respectively and correspondingly connected with a DSR pin, a CTS pin and a DTR pin of the RS232 transceiver module, and the power supply ground pin is grounded.
4. The serial port three-in-one interface circuit of claim 3, wherein the serial port controller comprises a plurality of pins, and the level type transmission selection circuit, the multiplexing reception signal circuit and the RS232 transceiver module are respectively used for connecting the same serial port controller, comprising:
the data input end of the level type transmission selection circuit is used for being connected with a data transmission pin of the serial port controller;
the data output end of the multiplexing receiving signal circuit is used for being connected with a data receiving pin of the serial port controller;
the DCD pin, the RTS pin, the DSR pin, the CTS pin and the DTR pin of the RS232 transceiver module are sequentially used for connecting corresponding function pins of the serial port controller.
5. The serial port three-in-one interface circuit of any one of claims 1 to 4, wherein the level-type transmit select circuit, the first receive select circuit, and the second receive select circuit are each implemented with a digital switch or an analog switch.
6. The serial three-in-one interface circuit of claim 5, wherein the digital switch is any one of a triode and a MOS tube.
7. The serial port three-in-one interface circuit according to any one of claims 1 to 4, wherein the multiplexing reception signal circuit comprises two diodes, anodes of the two diodes are connected for connecting the serial port controller, and cathodes of the two diodes are respectively connected with the RS485 transceiver module and the RS232 transceiver module.
8. A method for controlling a serial three-in-one interface circuit, applied to the serial three-in-one interface circuit according to any one of claims 1 to 7, comprising:
when the serial three-in-one interface circuit is required to be configured to work in an RS232 communication mode, the first control signal, the second control signal and the third control signal are controlled to be respectively high-level, low-level and low-level;
when the serial three-in-one interface circuit is required to be configured to work in an RS422 communication mode, the first control signal, the second control signal and the third control signal are controlled to be low level, low level and low level respectively;
when the serial three-in-one interface circuit is required to be configured to work in an RS485 communication mode, the first control signal and the second control signal are controlled to be respectively in a low level and a high level, when data are required to be sent, the third control signal is controlled to be in a high level, and when data are required to be received, the third control signal is controlled to be switched to be in a low level.
9. A serial port system chip, comprising: a processor, a serial controller and a serial three-in-one interface circuit as claimed in any one of claims 1 to 7;
the processor and the serial port controller are connected with the serial port three-in-one interface circuit;
the processor is used for generating first to third control signals so that the serial port three-in-one interface circuit can realize serial port communication between the serial port controller and the opposite terminal equipment in different communication modes according to different combinations of the first to third control signals.
10. A terminal device, characterized in that it comprises a serial system chip according to claim 9.
CN202310279674.9A 2023-03-14 2023-03-14 Three-in-one interface circuit for serial port, control method thereof and serial port system chip Pending CN116303205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310279674.9A CN116303205A (en) 2023-03-14 2023-03-14 Three-in-one interface circuit for serial port, control method thereof and serial port system chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310279674.9A CN116303205A (en) 2023-03-14 2023-03-14 Three-in-one interface circuit for serial port, control method thereof and serial port system chip

Publications (1)

Publication Number Publication Date
CN116303205A true CN116303205A (en) 2023-06-23

Family

ID=86781273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310279674.9A Pending CN116303205A (en) 2023-03-14 2023-03-14 Three-in-one interface circuit for serial port, control method thereof and serial port system chip

Country Status (1)

Country Link
CN (1) CN116303205A (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

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
US8558573B2 (en) System for transmission line termination by signal cancellation
US8829738B2 (en) Connecting apparatus with a combo port
US20070239919A1 (en) Communication control semiconductor device and interface system
US7334068B2 (en) Physical layer device having a SERDES pass through mode
CN116303205A (en) Three-in-one interface circuit for serial port, control method thereof and serial port system chip
CN105141491A (en) RS485 communication circuit capable of achieving self-sending and self-receiving and method
CN1333560C (en) High-performance optical fibre CAN communication system for strong electromagnetism interference environment
CN101520763A (en) Method for switching serial ports and sharing device of serial ports
CN115053495A (en) SPE-based device adapter for connecting non-Ethernet enabled field devices to an Ethernet-based process control system
US20110307572A1 (en) Wireless network system
CN110323644B (en) Adapter and signal transmission method thereof
CN213042273U (en) Circuit for converting two-wire system serial bus interface into single-wire half-duplex bus interface
CN201114493Y (en) Interface circuit and TV set with this circuit
US6744779B1 (en) Data processing system
US20070115136A1 (en) Contact signal transmission and reception apparatus
CN201689889U (en) Cascade circuit for physical layer of Ethernet
CN221378221U (en) Multi-device connection detection circuit
CN215113291U (en) Water heater and water heater control system
CN216751748U (en) Terminal resistor access control circuit, communication circuit and communication equipment
CN114142885B (en) Asynchronous receiving and transmitting system
CN212727055U (en) DMX equipment networking and configuration system
CN217509042U (en) Wireless transmission system
KR100945106B1 (en) Home network common apparatus
KR100942108B1 (en) Apparatus for Processing RS-422 Communication using RS-485 Communication Interface
US6268745B1 (en) Wired-and bus interface circuit for galvanically isolating nodes

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