CN118113651A - Communication serial port expansion circuit and concentrator debugging system - Google Patents

Communication serial port expansion circuit and concentrator debugging system Download PDF

Info

Publication number
CN118113651A
CN118113651A CN202311742505.0A CN202311742505A CN118113651A CN 118113651 A CN118113651 A CN 118113651A CN 202311742505 A CN202311742505 A CN 202311742505A CN 118113651 A CN118113651 A CN 118113651A
Authority
CN
China
Prior art keywords
serial port
circuit
main control
control processor
interface circuit
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
CN202311742505.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.)
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangzhou Power Supply Bureau of Guangdong Power Grid 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 Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN202311742505.0A priority Critical patent/CN118113651A/en
Publication of CN118113651A publication Critical patent/CN118113651A/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
    • 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/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • G06F13/124Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
    • G06F13/126Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine and has means for transferring I/O instructions and statuses between control unit and main processor
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/0175Coupling arrangements; Interface arrangements
    • H03K19/017509Interface arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Information Transfer Systems (AREA)

Abstract

The application relates to a communication serial port expansion circuit and a concentrator debugging system. The communication serial port expansion circuit comprises a serial port switching circuit, a first interface circuit and a second interface circuit; the serial port switching circuit comprises a switch unit and an interface selection unit, wherein the interface selection unit is respectively connected with the switch unit, the first interface circuit and the main control processor; the interface selection unit is used for selecting and conducting the passage between the main control processor and the first interface circuit or the passage between the main control processor and the second interface circuit according to the switching signal output by the switching unit. The communication serial port expansion circuit can effectively relieve the problem of serial port resource shortage of the main control processor.

Description

Communication serial port expansion circuit and concentrator debugging system
Technical Field
The present application relates to the field of serial port communications technologies, and in particular, to a communications serial port expansion circuit and a concentrator debugging system.
Background
The local debugging port of the concentrator configured by the distribution transformer area is generally provided with two types of RS232 and RS 485. The low-voltage station lean management and control instrument is in local data communication with the concentrator, generally occupies two universal asynchronous serial interface UART resources of a main control processor of the lean management and control instrument, and is provided with two sets of RS232 and RS485 socket circuits. However, the number of serial ports of the main control processor of the lean management and control instrument is limited, and serial port remote communication, wireless serial port communication, serial port display and other functions are required to be configured, so that serial port resources of the main control processor are tense.
Disclosure of Invention
Based on this, it is necessary to provide a communication serial port expansion circuit and a concentrator debugging system capable of alleviating the serial port resource shortage of the main control processor.
In a first aspect, a communication serial port expansion circuit is provided, where the communication serial port expansion circuit includes a serial port switching circuit, a first interface circuit, and a second interface circuit;
The serial port switching circuit comprises a switch unit and an interface selection unit, wherein the interface selection unit is respectively connected with the switch unit, the first interface circuit and the main control processor;
The interface selection unit is used for selecting and conducting the passage between the main control processor and the first interface circuit or the passage between the main control processor and the second interface circuit according to the switching signal output by the switching unit.
In one embodiment, the interface selection circuit selects to conduct a path between the main control processor and the first interface circuit when the switch signal is a high level signal;
And under the condition that the switch signal is a low-level signal, the interface selection circuit selects and conducts a passage between the main control processor and the second interface circuit.
In one embodiment, the switch unit comprises a push button switch; wherein, in the case that the push button switch is pressed, the switch signal is a high level signal; in the case where the push button switch is sprung, the switch signal is a low level signal.
In one embodiment, the interface selection unit includes:
The first selector comprises a first input end, a second input end, a first control input end and a first output end, wherein the first input end is connected with the first interface circuit, the second input end is connected with the second interface circuit, the first control input end is connected with the switch unit, and the first output end is connected with a serial port receiving end of the main control processor;
The first selector is used for selecting and conducting a passage between a serial port receiving end of the main control processor and the first interface circuit according to the switch signal so as to send first serial port receiving data to the main control processor; or a path between a serial port receiving end of the main control processor and the second interface circuit is conducted so as to send second serial port receiving data to the main control processor; one of the first serial port receiving data and the second serial port receiving data is RS232 serial port receiving data, and the other of the first serial port receiving data and the second serial port receiving data is RS485 serial port receiving data.
In one embodiment, the interface selection unit further includes:
the second selector comprises a third input end, a fourth input end, a second control input end and a second output end, wherein the third input end is connected with a serial port transmitting end of the main control processor, the fourth input end is connected with a power supply, the second control input end is connected with the switch unit, and the second output end is connected with the first interface circuit; the second selector is used for selecting and conducting a passage between the serial port transmitting end of the main control processor and the first interface circuit according to the switch signal so as to transmit first serial port transmitting data to the concentrator;
The third selector comprises a fifth input end, a sixth input end, a third control input end and a third output end, wherein the fifth input end is connected with a power supply, the sixth input end is connected with a serial port transmitting end of the main control processor, the third control input end is connected with the switch unit, and the third output end is connected with the second interface circuit; the third selector is used for selecting and conducting a passage between the serial port transmitting end of the main control processor and the second interface circuit according to the switch signal so as to transmit second serial port transmitting data to the concentrator; wherein; one of the first serial port sending data and the second serial port sending data is RS232 serial port sending data, and the other of the first serial port sending data and the second serial port sending data is RS485 serial port sending data.
In one embodiment, the serial port switching circuit further includes:
And the logic conversion unit is respectively connected with the third output end of the third selector and the second interface circuit and is used for realizing logic level conversion between the serial port switching circuit and the second interface circuit.
In one embodiment, the logic conversion unit comprises a first resistor, a triode and a second resistor;
The first end of the first resistor is connected with the third output end of the third selector, the second end of the first resistor is connected with the base electrode of the triode, the emitting electrode of the triode is grounded, the collecting electrode of the triode is connected with the second electric group, and the triode is connected with the midpoint of the second resistor and the second interface circuit.
In one embodiment, the communication serial port expansion circuit further includes:
The first serial port isolation circuit is respectively connected with the serial port transmitting end of the main control processor and the serial port switching circuit and is used for isolating the serial port transmitting end of the main control processor and the serial port switching circuit;
The second serial port isolation circuit is respectively connected with the serial port receiving end of the main control processor and the serial port switching circuit and is used for isolating the serial port receiving end of the main control processor and the serial port switching circuit.
In one embodiment, one of the first interface circuit and the second interface circuit is an RS485 interface circuit, and the other of the first interface circuit and the second interface circuit is an RS232 interface circuit.
In a second aspect, a concentrator debugging system is provided, including a main control processor, a concentrator, and a communication serial port expansion circuit described in any of the foregoing embodiments;
An RS232 serial port or an RS485 serial port is arranged on the concentrator;
one end of the communication serial port expansion circuit is connected with the main control processor, and the other end of the communication serial port expansion circuit is connected with the concentrator;
and the main control processor performs serial data interaction with the concentrator through the communication serial port expansion circuit.
In the communication serial port expansion circuit and the concentrator debugging system, the communication serial port expansion circuit comprises a serial port switching circuit, a first interface circuit and a second interface circuit. The serial port switching circuit comprises a switch unit and an interface selection unit. The interface selection unit is respectively connected with the switch unit, the first interface circuit and the main control processor. The switch unit can output corresponding switch signals to the interface selection unit according to the serial port type of the concentrator, so that the interface selection unit can selectively conduct the passage between the main control processor and the first interface circuit or the passage between the main control processor and the second interface circuit according to the switch signals, and therefore communication between the main control processor and the concentrators with different serial port types can be achieved only by using a group of serial port resources of the main control processor, and the problem of serial port resource shortage of the main control processor is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments or the conventional techniques of the present application, the drawings required for the descriptions of the embodiments or the conventional techniques will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a circuit structure of a signal serial port expansion circuit according to an embodiment;
FIG. 2 is a circuit structure of a switch unit according to an embodiment;
FIG. 3 is a circuit structure of an interface selecting unit according to an embodiment;
FIG. 4 is a diagram illustrating an interface selection unit according to an embodiment;
FIG. 5 is a circuit structure of a logic conversion unit according to an embodiment;
FIG. 6 is a first interface circuit according to an embodiment;
FIG. 7 is a second interface circuit according to an embodiment;
FIG. 8 is a first serial port isolation circuit according to an embodiment;
FIG. 9 is a schematic diagram of a second serial port isolation circuit according to an embodiment;
FIG. 10 is a block diagram of a concentrator debugging system in accordance with one embodiment.
Reference numerals illustrate:
100-serial port switching circuit, 110-switching unit, 120-interface selection unit, 200-first interface circuit, 300-second interface circuit, 400-main control processor, 500-concentrator, 600-communication serial port expansion circuit.
Detailed Description
In order that the application may be readily understood, a more complete description of the application will be rendered by reference to the appended drawings. Embodiments of the application are illustrated in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
It will be understood that the terms first, second, etc. as used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first resistance may be referred to as a second resistance, and similarly, a second resistance may be referred to as a first resistance, without departing from the scope of the application. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
It is to be understood that in the following embodiments, "connected" is understood to mean "electrically connected", "communicatively connected", etc., if the connected circuits, modules, units, etc., have electrical or data transfer between them.
It is understood that "at least one" means one or more and "a plurality" means two or more. "at least part of an element" means part or all of the element.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," and/or the like, specify the presence of stated features, integers, steps, operations, elements, components, or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items.
The low-voltage station area lean management and control instrument locally debugs the low-voltage station area concentrator through the serial port, and the concentrator usually supports an RS232 serial port or an RS485 serial port. Two groups of asynchronous serial port resources of the lean management and control instrument are occupied generally, and corresponding RS232 interface circuits and RS485 interface circuits are configured, so that the lean management and control instrument can be matched with a concentrator of an RS232 serial port or an RS485 interface. But the serial port resources of the lean management and control instrument are limited, the serial port of the lean management and control instrument realizes the necessary functions of wireless communication, remote communication, serial port display and the like, and when the concentrator is debugged, two groups of asynchronous serial port resources of the lean management and control instrument are occupied, so that the serial port resources of the lean management and control instrument are tense.
Based on this, in one embodiment, as shown in fig. 1, a communication serial port expansion circuit is provided, which includes a serial port switching circuit 100, a first interface circuit 200, and a second interface circuit 300. The serial port switching circuit 100 includes a switching unit 110 and an interface selecting unit 120. The interface selecting unit 120 is connected to the switching unit 110, the first interface circuit 200, the second interface circuit 300, and the main control processor 400, respectively. The main control processor 400 is the CPU of the lean management and control instrument.
The interface selecting unit 120 is configured to select to conduct a path between the main control processor 400 and the first interface circuit 200 or conduct a path between the main control processor 400 and the second interface circuit 300 according to the switching signal output by the switching unit 110.
It can be understood that, when a local debug is performed on a certain concentrator, the switch unit 110 can be controlled to output a corresponding switch signal according to the serial port type of the local debug port of the concentrator. Illustratively, when the local debug port of the concentrator is an RS485 serial port, the first interface circuit 200 is connected to the RS485 serial port of the concentrator, and the switch unit 110 is controlled to output a corresponding switch signal, so that the interface selecting unit 120 conducts the path between the main control processor 400 and the first interface circuit 200. The main control processor 400 may sequentially interact with serial data through the interface selection unit 120, the first interface circuit 200, and the concentrator. Optionally, when the local debug port of the concentrator is an RS232 serial port, the second interface circuit 300 is connected to the RS232 serial port of the concentrator, and the switch unit 110 is controlled to output a corresponding switch signal, so that the interface selecting unit 120 conducts the path between the main control processor 400 and the second interface circuit 300. The main control processor 400 can interact serial data with the concentrator sequentially through the interface selection unit 120 and the second interface circuit 300.
In the embodiment of the application, the communication serial port expansion circuit comprises a serial port switching circuit, a first interface circuit and a second interface circuit. The serial port switching circuit comprises a switch unit and an interface selection unit. The interface selection unit is respectively connected with the switch unit, the first interface circuit and the main control processor. The switch unit can output corresponding switch signals to the interface selection unit according to the serial port type of the concentrator, so that the interface selection unit can selectively conduct the passage between the main control processor and the first interface circuit or the passage between the main control processor and the second interface circuit according to the switch signals, and therefore communication between the main control processor and the concentrators with different serial port types can be achieved only by using a group of serial port resources of the main control processor, and the problem of serial port resource shortage of the main control processor is solved.
In one embodiment, as shown in fig. 2, the switching unit may include a switch SW1 and a resistor R1. The first end of the switch SW1 is connected with the communication special power supply 485_5V through the resistor R1, the second end of the switch SW1 is grounded, and the third end of the switch SW1 is connected with the interface selection unit.
Illustratively, the switch unit includes a push button switch. I.e. switch SW1 may be a push button switch. In the case where the push button switch is pressed, the switch signal is a high level signal; when the push button switch is sprung, the switch signal is a low level signal.
Alternatively, the switching unit may also comprise a single pole double throw switch, i.e. the switch SW1 may also be a single pole double throw switch. The switching unit outputs a high level signal when the single pole double throw switch is thrown to the first end, and outputs a low level signal when the single pole double throw switch is thrown to the second end.
Further, in the case that the switching signal is a high level signal, the interface selection circuit selects to turn on a path between the main control processor and the first interface circuit.
Optionally, in the case that the switching signal is a low level signal, the interface selection circuit selects to conduct a path between the master control processor and the second interface circuit.
In the embodiment of the application, the switch unit may include a button switch, and the switch signal is a high level signal when the button switch is pressed, and the interface selection circuit selects to conduct a path between the main control processor and the first interface circuit; under the condition that the button switch is sprung, the switch signal is a low-level signal, and the interface selection circuit selects and conducts a passage between the main control processor and the second interface circuit. The button switch is arranged, so that related personnel can more simply and directly control the interface selection unit to conduct the passage between the main control processor and the corresponding interface circuit.
In one embodiment, as shown in fig. 3, the interface selection unit 120 includes a first selector MUX1. The first selector MUX1 includes a first input, a second input, a first control input, and a first output. The first input terminal is connected to the first interface circuit 200, the second input terminal is connected to the second interface circuit 300, the first control input terminal is connected to the switch unit 110, and the first output terminal is connected to the serial port receiving terminal of the main control processor 400.
The first selector MUX1 is configured to selectively switch on a path between the serial port receiving end of the main control processor 400 and the first interface circuit 200 according to the switching signal, so as to send the first serial port receiving data to the main control processor 400; or a path between the serial port receiving end of the main control processor 400 and the second interface circuit 300 is conducted to send the second serial port receiving data to the main control processor 400. One of the first serial port receiving data and the second serial port receiving data is RS232 serial port receiving data, and the other of the first serial port receiving data and the second serial port receiving data is RS485 serial port receiving data.
It will be appreciated that in the case where the switching signal is a high level signal, the control input terminal of the first selector MUX1 inputs a high level, and the first selector MUX1 selects to conduct a path between the serial port receiving terminal of the main control processor 400 and the first interface circuit 200. The first serial port receiving data sent by the concentrator sequentially passes through the first interface circuit 200 and the first selector MUX1 to reach the serial port receiving end of the main control processor 400.
In the case that the switching signal is a low level signal, the control input terminal of the first selector MUX1 inputs the low level signal, and the first selector MUX1 selects the input data of the second input terminal as the output data, that is, the first selector MUX1 selects the path between the serial port receiving terminal of the main control processor 400 and the second interface circuit 300 to be turned on. The second serial port receiving data sent by the concentrator sequentially passes through the second interface circuit 300 and the first selector NUX1 to the serial port receiving end of the main control processor 400.
In the embodiment of the application, the first selector can select to output the first serial port receiving data or the second serial port receiving data to the serial port receiving end of the main control processor according to the switch signal, and only one serial port receiving end of the main control processor is used to receive serial port data from the concentrator of the RS232 serial port or the concentrator of the RS485 serial port, so that the problem of serial port resource shortage of the main control processor is effectively relieved.
In one embodiment, please continue with reference to fig. 3, the interface selection unit 120 further includes a second selector MUX2 and a third selector MUX3.
The second selector MUX2 includes a third input terminal, a fourth input terminal, a second control input terminal, and a second output terminal, wherein the third input terminal is connected to the serial port transmission terminal of the main control processor 400, the fourth input terminal is connected to a power source (power source is not shown), the second control input terminal is connected to the switching unit 110, and the second output terminal is connected to the first interface circuit 200.
The third selector MUX3 includes a fifth input terminal, a sixth input terminal, a third control input terminal, and a third output terminal, where the fifth input terminal is connected to the power supply, the sixth input terminal is connected to the serial port transmitting terminal of the main control processor 400, the third control input terminal is connected to the switching unit 110, and the third output terminal is connected to the second interface circuit 300.
The second selector MUX2 is configured to selectively switch on a path between the serial port transmitting end of the master control processor 400 and the first interface circuit 200 according to the switching signal, so as to transmit the first serial port transmission data to the concentrator.
The third selector is configured to selectively switch on a path between the serial port transmitting end of the master control processor 400 and the second interface circuit 300 according to the switching signal, so as to transmit the second serial port transmitting data to the concentrator.
One of the first serial port sending data and the second serial port sending data is RS232 serial port sending data, and the other of the first serial port sending data and the second serial port sending data is RS485 serial port sending data.
In the case that the switching signal is a high level signal, the second control input terminal of the second selector NUX2 and the third control input terminal of the third selector MUX3 are both high level, and the second selector MUX2 selects the input data of the third input terminal as the first serial port transmission data, and transmits the first serial port transmission data to the concentrator via the first interface circuit 200. At the same time, the third selector MUX3 selects the power input of the fifth input terminal as the output, and the output terminal thereof will be in a high-resistance state, which will not affect the circuit.
In the case that the switching signal is a low level signal, both the second control input terminal of the second selector MUX2 and the third control input terminal of the third selector MUX3 are low level, and the third selector MUX3 selects the input data of the sixth input terminal as the second serial port transmission data, and transmits the second serial port transmission data to the concentrator via the second interface circuit 300. At the same time, the second selector MUX2 selects the power input of the fourth input terminal as the output, and the second output terminal of the second selector MUX2 will be in a high-resistance state, so that no influence is exerted on the circuit.
In the embodiment of the application, the second selector can conduct the path between the serial port transmitting end of the main control processor and the first interface circuit under the condition that the switch signal is a high-level signal so as to transmit the first serial port transmitting data to the concentrator. The third selector may switch on a path between the serial port transmitting end of the main control processor and the second interface circuit to transmit the second serial port transmission data to the concentrator when the switching signal is a low level signal. By arranging the second selector and the third selector, data can be sent to the concentrator of the RS232 serial port type or the RS485 serial port type only by using one serial port sending end of the main control processor, and the problem of serial port resource shortage of the main control processor is effectively relieved.
In one embodiment, as shown in fig. 4, the interface switching unit may comprise a CD4053 chip. CD4053 is a 3-way alternative analog switch circuit. X0, X1, Y0, Y1, Z0 and Z1 are the data input end of the CD4053 chip, X, Y, Z is the data output end of the CD4053 chip, A, B, C is the control input end of the CD4053 chip, and the control input end is connected with the switch SW1 of the switch unit.
Illustratively, the first interface circuit is referred to as an RS485 interface circuit and the second interface circuit is referred to as an RS232 interface circuit. The first serial port received data is denoted by RXDg as RS485 serial port received data, and the second serial port received data is denoted by RXDs as RS232 serial port received data. RXD represents serial port received data received by the serial port receiving end of the master control processor, and RXD is one of RXDg and RXDs. The first serial port transmission data is denoted by TXDg as RS485 serial port transmission data, and the second serial port transmission data is denoted by TXDs as RS232 serial port transmission data. TXD is serial port transmission data transmitted by a serial port transmission end of the main control processor, and TXD is one of TXDg and TXDs.
The end X0 and the end Y of the CD4053 are connected with a first interface circuit, the end X1 and the end Z are connected with a second interface circuit, the end A, the end B and the end C are connected with a switch SW1 of a switch unit, the end Y0 and the end Z0 are connected with a serial port transmitting end of a main control processor, and the end X is connected with a serial port receiving end of the main control processor.
When the serial port type of the concentrator is RS485 serial port, the switch SW1 is pressed, a high-level signal is input to the control input end of the CD4053, and the RS485 serial port receiving data RXDg sent by the concentrator flows from the X0 end of the CD4053 to the X end and is received by the main control processor. Further, serial port transmission data TXD sent by the main control processor flows from the Y0 end to the Y end of the CD4053, and is received by the concentrator after being subjected to level conversion as RS485 serial port transmission data TXDg through the first interface circuit.
When the serial port type of the concentrator is an RS232 serial port, the switch SW1 is sprung, a low-level signal is input into the control input end of the CD4053, and RS232 serial port receiving data RXDs sent by the concentrator flows from the X1 end of the CD4053 to the X end and is received by the main control processor. Further, serial port transmission data TXD sent by the main control processor flows from the Z1 end to the Z end, and is received by the concentrator after being subjected to level conversion as RS232 serial port transmission data TXDs through the second interface circuit.
In the embodiment of the application, the CD4053 is controlled by the switch SW1 to select the channel, so that a group of serial port resources of the main control processor can be matched with the concentrator of the RS232 serial port and the concentrator of the RS485 serial port, the operation is simple and easy, and the problem of shortage of serial port resources of the main control processor is effectively solved.
In one embodiment, the serial port switching circuit further includes a logic conversion unit. The logic conversion unit is respectively connected with the third output end of the third selector and the second interface circuit and is used for realizing logic level conversion between the serial port switching circuit and the second interface circuit.
Further, as shown in fig. 5, the logic conversion unit includes a first resistor R2, a transistor Q1, and a second resistor R3.
The first end of the first resistor R2 is connected with the third output end of the third selector, the second end of the first resistor R2 is connected with the base electrode of the triode Q1, the emitting electrode of the triode Q1 is grounded, the collecting electrode of the triode Q1 is connected with the second electric group R3, and the midpoint of the triode Q1 and the second resistor R3 is connected with the second interface circuit. The second resistor R2 is a pull-up resistor.
Under the condition that a passage between a serial port transmitting end of the main control processor and the second interface circuit is conducted, a third output end of the third selector outputs second serial port transmitting data, and a voltage waveform at the joint of the triode Q1 and the second resistor R3 is consistent with a waveform of the second serial port transmitting data, but the voltage value is close to a voltage value of a special power supply for communication, so that a voltage of the second serial port transmitting data output to the second interface circuit can meet a standard voltage of a logic level of the logic second interface circuit.
In the embodiment of the application, the second interface circuit is an RS232 interface circuit. Because the RS232 interface circuit is a digital circuit, the signal voltage of the data transmitted by the second serial port needs to be ensured to meet the standard voltage of the logic level of the RS232 interface circuit, and the data transmission error is avoided.
In one embodiment, one of the first interface circuit and the second interface circuit is an RS485 interface circuit and the other of the first interface circuit and the second interface circuit is an RS232 interface circuit. The RS232 interface circuit can realize 232 level conversion with an RS232 serial port of the concentrator. The RS485 interface circuit can realize 485 level conversion with an RS485 serial port of the concentrator.
As shown in fig. 6, the RS485 interface circuit may include an RS485 level conversion chip and a first protection circuit. The first protection circuit is composed of anti-surge current elements TVS1, TVS2, TVS3, BS1, BS2, BS3, RV1 and RV2, and can prevent surge current and static electricity. The RS485 level conversion chip may be an ISL3152 chip, for example. The RS485 serial port sent by the main control processor sends data TXDg to flow in through the pin 2 of the ISL3152 chip, flows out from the pin 6 and the pin 7 after differential processing, and is further sent to the concentrator through the first protection circuit. The RS485 received data RXDg sent by the concentrator is differentially input from pin 6 and pin 7 of the ISL3152 chip, and flows out from pin 1 to the serial port switching circuit.
As shown in fig. 7, the RS232 interface circuit may include an RS232 level shift chip and a second protection circuit. The second protection circuit is composed of anti-surge elements TVS4, TVS5, GDT1, GDT2, RV3 and RV4, and has anti-surge current and anti-static capabilities. The RS232 level shift chip may be a MAX3232E chip, for example. The RS232 serial port transmission data TXDs sent by the main control processor flows in through the pin 11 of the RS232 level conversion chip, flows out from the pin 14 to the second protection circuit, and is sent to the concentrator through the second protection circuit. The RS232 reception data RXDs sent from the concentrator flows into the RS232 level conversion chip from the pin 13, and flows out to the serial port switching circuit from the pin 12.
In the embodiment of the application, the level conversion is carried out on the serial port receiving and transmitting data by arranging the first interface circuit and the second interface circuit, so that the accuracy of the serial port receiving and transmitting data transmission can be ensured.
In one embodiment, the communication serial port expansion circuit further comprises a first serial port isolation circuit and a second serial port isolation circuit. The first serial port isolation circuit is respectively connected with the serial port transmitting end of the main control processor and the serial port switching circuit. The second serial port isolation circuit is respectively connected with the serial port receiving end of the main control processor and the serial port switching circuit.
The first serial port isolation circuit can be used for isolating a serial port transmitting end of the main control processor and the serial port switching circuit.
The second serial port isolation circuit can be used for isolating the serial port receiving end of the main control processor and the serial port switching circuit.
The first serial port isolation circuit and the second serial port isolation circuit may be, for example, an optical isolation chip. As shown in fig. 8, the first serial port isolation circuit may be a HCPL0600 chip, where the vf+ end of the first serial port isolation circuit is connected to the serial port transmitting end of the main control processor, and the Vo end of the first serial port isolation circuit is connected to the serial port switching circuit, so that serial port transmission data TXD sent by the main control processor can be output to the serial port switching circuit after being optically and electrically isolated.
The second serial port isolation circuit may also be a HCPL0600 chip, as shown in fig. 9, where the Vf-end of the second serial port isolation circuit is connected to the serial port switching circuit, and the Vo end of the second serial port isolation circuit is connected to the serial port receiving end of the main control processor, so that serial port receiving data RXD transmitted by the serial port switching circuit can be output to the main controller after being optically isolated and electrically isolated.
In the embodiment of the application, the first serial port isolation circuit and the second serial port isolation circuit are arranged to realize the electric isolation and the optical isolation of the main control processor and the concentrator, so that common ground interference, electric interference, electromagnetic interference and the like between the lean management and control instrument and the concentrator can be avoided.
In one embodiment, as shown in fig. 10, there is further provided a concentrator debugging system, including a master processor 400, a concentrator 500, and the communication serial port expansion circuit 600 described in any of the above embodiments. One end of the communication serial port expansion circuit 600 is connected with the main control processor 400, and the other end is connected with the concentrator 500.
The concentrator 500 is provided with an RS232 serial port or an RS485 serial port. The main control processor 400 performs serial data interaction with the concentrator 500 through the communication serial port expansion circuit 600.
In the embodiment of the application, the concentrator debugging system realizes the interaction of communication data of the concentrator supporting the RS232 serial port or the concentrator supporting the RS485 serial port by using only one group of serial port resources of the main control processor, thereby effectively relieving the problem of shortage of serial port resources of the main control processor.
In the description of the present specification, reference to the term "some embodiments," "other embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. The communication serial port expansion circuit is characterized by comprising a serial port switching circuit, a first interface circuit and a second interface circuit;
The serial port switching circuit comprises a switch unit and an interface selection unit, wherein the interface selection unit is respectively connected with the switch unit, the first interface circuit and the main control processor;
The interface selection unit is used for selecting and conducting the passage between the main control processor and the first interface circuit or the passage between the main control processor and the second interface circuit according to the switching signal output by the switching unit.
2. The communication serial port expansion circuit of claim 1, wherein,
The interface selection circuit selects and conducts a passage between the main control processor and the first interface circuit under the condition that the switch signal is a high-level signal;
And under the condition that the switch signal is a low-level signal, the interface selection circuit selects and conducts a passage between the main control processor and the second interface circuit.
3. The communication serial port expansion circuit of claim 2, wherein said switch unit comprises a push button switch; wherein, in the case that the push button switch is pressed, the switch signal is a high level signal; in the case where the push button switch is sprung, the switch signal is a low level signal.
4. The communication serial port expansion circuit of claim 2, wherein said interface selection unit comprises:
The first selector comprises a first input end, a second input end, a first control input end and a first output end, wherein the first input end is connected with the first interface circuit, the second input end is connected with the second interface circuit, the first control input end is connected with the switch unit, and the first output end is connected with a serial port receiving end of the main control processor;
The first selector is used for selecting and conducting a passage between a serial port receiving end of the main control processor and the first interface circuit according to the switch signal so as to send first serial port receiving data to the main control processor; or a path between a serial port receiving end of the main control processor and the second interface circuit is conducted so as to send second serial port receiving data to the main control processor; one of the first serial port receiving data and the second serial port receiving data is RS232 serial port receiving data, and the other of the first serial port receiving data and the second serial port receiving data is RS485 serial port receiving data.
5. The communication serial port expansion circuit of claim 2, wherein said interface selection unit further comprises:
the second selector comprises a third input end, a fourth input end, a second control input end and a second output end, wherein the third input end is connected with a serial port transmitting end of the main control processor, the fourth input end is connected with a power supply, the second control input end is connected with the switch unit, and the second output end is connected with the first interface circuit; the second selector is used for selecting and conducting a passage between the serial port transmitting end of the main control processor and the first interface circuit according to the switch signal so as to transmit first serial port transmitting data to the concentrator;
The third selector comprises a fifth input end, a sixth input end, a third control input end and a third output end, wherein the fifth input end is connected with a power supply, the sixth input end is connected with a serial port transmitting end of the main control processor, the third control input end is connected with the switch unit, and the third output end is connected with the second interface circuit; the third selector is used for selecting and conducting a passage between the serial port transmitting end of the main control processor and the second interface circuit according to the switch signal so as to transmit second serial port transmitting data to the concentrator; wherein; one of the first serial port sending data and the second serial port sending data is RS232 serial port sending data, and the other of the first serial port sending data and the second serial port sending data is RS485 serial port sending data.
6. The communication serial port expansion circuit of claim 5, wherein said serial port switching circuit further comprises:
And the logic conversion unit is respectively connected with the third output end of the third selector and the second interface circuit and is used for realizing logic level conversion between the serial port switching circuit and the second interface circuit.
7. The communication serial port expansion circuit of claim 6, wherein said logic conversion unit comprises a first resistor, a triode and a second resistor;
The first end of the first resistor is connected with the third output end of the third selector, the second end of the first resistor is connected with the base electrode of the triode, the emitting electrode of the triode is grounded, the collecting electrode of the triode is connected with the second electric group, and the triode is connected with the midpoint of the second resistor and the second interface circuit.
8. The communication serial port expansion circuit of claim 1, further comprising:
The first serial port isolation circuit is respectively connected with the serial port transmitting end of the main control processor and the serial port switching circuit and is used for isolating the serial port transmitting end of the main control processor and the serial port switching circuit;
The second serial port isolation circuit is respectively connected with the serial port receiving end of the main control processor and the serial port switching circuit and is used for isolating the serial port receiving end of the main control processor and the serial port switching circuit.
9. The communication serial port expansion circuit of claim 1, wherein one of said first interface circuit and said second interface circuit is an RS485 interface circuit and the other of said first interface circuit and said second interface circuit is an RS232 interface circuit.
10. A concentrator debugging system, comprising a main control processor, a concentrator and a communication serial port expansion circuit according to any one of claims 1-9;
An RS232 serial port or an RS485 serial port is arranged on the concentrator;
one end of the communication serial port expansion circuit is connected with the main control processor, and the other end of the communication serial port expansion circuit is connected with the concentrator;
and the main control processor performs serial data interaction with the concentrator through the communication serial port expansion circuit.
CN202311742505.0A 2023-12-18 2023-12-18 Communication serial port expansion circuit and concentrator debugging system Pending CN118113651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311742505.0A CN118113651A (en) 2023-12-18 2023-12-18 Communication serial port expansion circuit and concentrator debugging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311742505.0A CN118113651A (en) 2023-12-18 2023-12-18 Communication serial port expansion circuit and concentrator debugging system

Publications (1)

Publication Number Publication Date
CN118113651A true CN118113651A (en) 2024-05-31

Family

ID=91209501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311742505.0A Pending CN118113651A (en) 2023-12-18 2023-12-18 Communication serial port expansion circuit and concentrator debugging system

Country Status (1)

Country Link
CN (1) CN118113651A (en)

Similar Documents

Publication Publication Date Title
CN104009516B (en) Control method and the device of power supply assembly
CN209692733U (en) A kind of radio-frequency devices automatic debugging device based on RF switch matrix
CN105005545A (en) Line card serial port switching device and line card serial port switching method
CN104583791A (en) Interface circuitry for a test apparatus
CN203466798U (en) Serial-port switching device based on electronic switch
CN107908584B (en) Multi-path RS-485 communication network
CN106095708A (en) The electric current loop means of communication of two-wire system half-duplex one master and multiple slaves multi computer communication and system
CN104158670A (en) Gigabit Ethernet bypass device
CN114050879A (en) Radio frequency high-speed switching control circuit and device
CN118113651A (en) Communication serial port expansion circuit and concentrator debugging system
CN113206660A (en) Circuit and method for switching circuit channel
CN117271416A (en) Interface circuit of self-adaptation RS232 and RS485
CN205091732U (en) Automatic switching device for USB interface
CN209267572U (en) Electric power wireless communication multichannel device
CN207571730U (en) A kind of debugging switching circuit and debugging circuit board
CN116318442A (en) Automatic test system of communication radio station equipment
CN216901647U (en) Signal multiplexing and automatic switching circuit
CN207882893U (en) A kind of TTL turns MBUS communicating terminals
CN103118143B (en) Multiplex circuit of serial interface and Ethernet interface
CN214540463U (en) Relay board for switching and detecting multiple paths of signals
CN110209621A (en) A kind of data transfer control circuit
CN106803776B (en) Radio frequency front end testing device and radio frequency front end testing method
CN201571151U (en) Multiway voltage switching circuit and television set test circuit
CN101127642A (en) Serial interface management device and method for communication system devices
CN205318374U (en) Redundant circuit of RS -232 serial ports

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