CN107070445A - A kind of serial communication interface function switching circuit and method - Google Patents
A kind of serial communication interface function switching circuit and method Download PDFInfo
- Publication number
- CN107070445A CN107070445A CN201710175335.0A CN201710175335A CN107070445A CN 107070445 A CN107070445 A CN 107070445A CN 201710175335 A CN201710175335 A CN 201710175335A CN 107070445 A CN107070445 A CN 107070445A
- Authority
- CN
- China
- Prior art keywords
- interface
- circuit
- resistance
- signaling interface
- transmitting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K19/00—Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
- H03K19/0175—Coupling arrangements; Interface arrangements
- H03K19/017509—Interface arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0002—Serial port, e.g. RS232C
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a kind of serial communication interface function switching circuit and method, for solving to realize that multi-functional serial communication needs to consume CPU multi-channel serial ports resource or needs manual switching or the technical problem using expensive analog switch.The embodiment of the present invention includes:First receives control circuit, first sending controling circuit, second receives control circuit, second sending controling circuit, mode switching signal interface, first transmitting-receiving control signal interface, first receives enable signaling interface, first sends enable signaling interface, second receives enable signaling interface, second sends enable signaling interface, MCU is allowd to pass through control mode switch signaling interface, the low and high level of first transmitting-receiving control signal interface realizes the power and energy of the first electrical level transferring chip and second electrical level conversion chip, realize the technique effect that a serial line interface possesses multiple functions, need to consume the technical problem of CPU multi-channel serial port resources so as to solve now multi-functional serial communication.
Description
Technical field
The present invention relates to circuit communication field, more particularly to a kind of serial communication interface function switching circuit and method.
Background technology
Data transmission between computer and computer or computer and terminal can use serial communication and parallel communication
Two kinds of modes.Because serial communication mode has using circuit is few, cost is low, particularly in remote transmission, it is to avoid a plurality of
Line characteristic inconsistent and be widely adopted.In serial communication, it is desirable to which communication two party all using a standard interface, makes not
Same equipment, which can be connected easily, to be communicated.
RS-232-C interfaces (also known as EIARS-232-C) are a kind of serial communication interfaces the most frequently used at present.It is
Bell System, modem producer and terminal manufacturer were combined by EIA (EIA) in 1970
The standard for serial communication formulated jointly.Its full name is " data terminal equipment (DTE) and data communications equipment (DCE)
Between SERIAL BINARY DATA Fabric Interface technical standard ".
Because the appearance of RS-232-C interface standards is more early, there is weak point unavoidably, mainly there is at following 4 points:
1) signal level value of interface is higher, the chip of fragile interface circuit, but since with Transistor-Transistor Logic level it is incompatible need
It can be connected using level shifting circuit with TTL circuits.
2) transmission rate is relatively low, in asynchronous transmission, and baud rate is 20kbps.
3) interface constitutes the transmission form on common ground using a signal wire and a signal line of return, this to transmit altogether
Common mode disturbances are easily produced, so noise immunity is weak.
4) transmission range is limited, and maximum transmission distance standard value is 50 feet, actually also can be used only in 50 meters or so.
Due to RS-232-C deficiency, occur in that some new interface standards, RS-485 is exactly one of them, it have with
Lower feature:
1) RS-485 electrical characteristic:Logical one is represented by+(2-6) V of the voltage difference of line-to-line;Logical zero is with two
Voltage difference between line represents for-(2-6) V.Interface signal level is lower than RS-232-C, is just hardly damaged the chip of interface circuit,
And the level is compatible with Transistor-Transistor Logic level, it can facilitate and be connected with TTL circuits.
2) RS-485 data maximum transmission rate is 10Mbps
3) RS-485 interfaces are the combinations using balance driver and differential receiver, and anti-common mode does ability by force, i.e. anti-noise
Acoustic jamming is good
4) the maximum transmission distance standard value of RS-485 interfaces is 4000 feet, actually up to 3000 meters, in addition RS-
232-C interfaces only allow to connect 2 transceivers in bus, i.e., single station ability.And RS-485 interfaces allow connection in bus
Up to 128 transceivers.There is multistation ability, such user can easily be set up using single RS-485 interfaces and be set
Standby network.Because RS-485 interfaces have the advantages that good noise immunity, the transmission range of length and multistation ability make its into
For preferred serial line interface.
RS-422 standard full name are " electrical characteristics of balanced voltage digital interface circuit ", and it defines the spy of interface circuit
Property.Actually there is a signal ground, totally 5 lines.Compare RS- because receiver uses high input impedance and sends driver
232 stronger driving forces, therefore allow to connect multiple receiving nodes in bus, it can at most connect 10 nodes.RS-422 is supported
Point-to-points two-way communication is a main equipment (Master), and remaining is that can not be communicated between slave unit (Salve), slave unit..
Receiver input impedance is 4k, therefore originator maximum load capability is 10 × 4k+100 Ω (terminating resistance).RS-422 four-wire interfaces
Due to using individually sending and receiving passage, thus need not control data direction, any necessary signal is handed between each device
Changing can be by software mode (XON/XOFF shakes hands) or hardware mode (a pair of single twisted-pair feeders).
Existing mode is to be directed to every kind of interface standard, and circuit is out used to communicate all the way for design.If for example, the tunnel of client three
It is likely to use, then the serial port resource on the tunnels of CPU 3 must be consumed, per a serial ports is connect all the way, for communicating.Or
It is to use jumper cap manual switching communication pattern, and is handled using logic gates;Or be using multi-disc simulation
Switch chip switches over communication pattern.
Traditional implementation method is being designed independently by tri- kinds of circuits of RS-232, RS-485, RS-422, so that
Realize the function that user wants, if user want use another function, user must redesign the functional circuit or
Manual switching hardware circuit is realized;Or switched over manually using jumper cap, mode this first is not very intelligent, and switching is held
It is error-prone, waste time and energy, and gate circuit is also utilized, so increase device again, and due to being chip, will certainly increase
Quite a lot of to obtain cost, PCB surface product can also be increased;Or switched over using analog switch, the maximum shortcoming of this mode
It is exactly that analog switch chip is expensive, and needs multi-disc just to fully meet 3 kinds of circuits of switching, likewise, PCB surface is accumulated
It can increase a lot.Therefore, realize that multi-functional serial communication needs consumption CPU multi-channel serial ports resource or needs manual switching or use
Expensive analog switch is those skilled in the art's technical issues that need to address.
The content of the invention
The embodiments of the invention provide a kind of serial communication interface function switching circuit and method, for solving to realize many work(
Energy serial communication is needed to consume CPU multi-channel serial ports resource or needs manual switching or asked using the technology of expensive analog switch
Topic.
A kind of serial communication interface function switching circuit provided in an embodiment of the present invention, it is characterised in that including:First connects
Control circuit, the first sending controling circuit, the second reception control circuit, the second sending controling circuit, mode switching signal is received to connect
Mouth, the first transmitting-receiving control signal interface, the first reception enable signaling interface, the first transmission enable signaling interface, second, which receive, to be made
Can signaling interface, the second transmission enable signaling interface;
Described first input for receiving control circuit connects the mode switching signal interface, and described first receives control
The output end connection described first of circuit, which is received, enables signaling interface;
The input of first sending controling circuit connects the mode switching signal interface, and described first sends control
The output end connection described first of circuit, which is sent, enables signaling interface;
Described second input for receiving control circuit connects the mode switching signal interface and the first transmitting-receiving control
Signaling interface processed, the described second output end connection described second for receiving control circuit, which is received, enables signaling interface;
The input of second sending controling circuit connects the mode switching signal interface and the first transmitting-receiving control
Signaling interface processed, the output end connection described second of second sending controling circuit, which is sent, enables signaling interface;
Described first, which receives control circuit, is used for the mode switching signal according to input, and output first, which is received, enables signal extremely
The reception control signal interface of first electrical level transferring chip so that first electrical level transferring chip is received according to described first to be made
Energy signal is enabled to the receive capabilities of first electrical level transferring chip;
First sending controling circuit is used for the mode switching signal according to input, and output first, which is sent, enables signal extremely
The transmission control signal interface of first electrical level transferring chip so that first electrical level transferring chip is sent according to described first to be made
Energy signal is enabled to the sending function of first electrical level transferring chip;
Described second, which receives control circuit, is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output
Second receives enable signal to the reception control signal interface of second electrical level conversion chip so that the second electrical level conversion chip
The receive capabilities enable for enabling signal to the second electrical level conversion chip is received according to described second;
Second sending controling circuit is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output
Second sends enable signal to the transmission control signal interface of second electrical level conversion chip so that the second electrical level conversion chip
The sending function enable for enabling signal to the second electrical level conversion chip is sent according to described second.
Preferably,
Described first, which receives control circuit, includes the first transistor, first resistor, second resistance, 3rd resistor;
The first end of the first transistor connects the mode switching signal interface by the second resistance and passed through
3rd resistor ground connection, the second end ground connection of the first transistor, the described in the three-terminal link of the first transistor
The first of one electrical level transferring chip, which receives, to be enabled signaling interface and connects power supply by the first resistor;
First sending controling circuit is a wire, and one end of the wire connects the mode switching signal and connect
Mouthful, the other end connection described first of the wire, which is sent, enables signaling interface;
Described second, which receives control circuit, includes the first diode, the second diode, the 7th resistance;
Positive pole connection the first transmitting-receiving control signal interface of first diode, the negative pole of first diode
Connect the second of the second electrical level conversion chip and receive enable signaling interface and by the 7th resistance eutral grounding;
The positive pole of second diode connects the mode switching signal interface, the negative pole connection of second diode
The negative pole of first diode.
Second sending controling circuit includes second transistor, the 4th resistance, the 5th resistance, the 6th resistance;
The first end of the second transistor connects the mode switching signal interface by the 5th resistance and passed through
6th resistance eutral grounding, the second end ground connection of the second transistor, the described in the three-terminal link of the second transistor
The second of two electrical level transferring chips, which sends, to be enabled signaling interface and connects the first transmitting-receiving control letter by the 4th resistance
Number interface.
Preferably,
First sending controling circuit includes third transistor, the 8th resistance, the 9th resistance, the tenth resistance;
The first end of the third transistor connects the mode switching signal interface by the 9th resistance and passed through
Tenth resistance eutral grounding, the second end ground connection of the third transistor, the described in the three-terminal link of the third transistor
The first of one electrical level transferring chip, which sends, to be enabled signaling interface and connects power supply by the 8th resistance;
First reception controls circuit to be a wire, and one end of the wire connects the mode switching signal and connect
Mouthful, the other end connection described first of the wire, which is received, enables signaling interface;
It is described second receive control circuit include the 4th transistor, the 11st resistance, the 12nd resistance, the 13rd resistance,
14th resistance;
The first end of 4th transistor connects the first transmitting-receiving control signal interface by the 13rd resistance
The mode switching signal interface, the 4th transistor are connected by the 13rd resistance and the 12nd resistance simultaneously
First end also by the 14th resistance eutral grounding, the second end of the 4th transistor is grounded, the 4th transistor
Second receives enable signaling interface and connects power supply by the 11st resistance described in three-terminal link;
Second sending controling circuit include the 5th transistor, the 15th resistance, the 16th resistance, the 17th resistance,
18th resistance;
The first end of 5th transistor connects the first transmitting-receiving control signal interface by the 17th resistance
And by the 18th resistance eutral grounding, the second end of the 5th transistor is grounded, and the 3rd end of the 5th transistor connects
The second of the second electrical level conversion chip is connect to send enable signaling interface and connect the pattern by the 15th resistance
Switching signal interface, the 3rd end of the 5th transistor also passes through the 15th resistance and the 16th resistance eutral grounding.
Preferably,
The embodiment of the present invention also includes the 3rd transmitting-receiving and controls circuit, the second transmitting-receiving control signal interface, the 3rd transmission to enable
Signaling interface;
The input of the 3rd transmitting-receiving control circuit connects the mode switching signal interface and the second transmitting-receiving control
Signaling interface processed, the output end connection the described 3rd of the 3rd transmitting-receiving control circuit, which is sent, enables signaling interface;
3rd sending controling circuit is used for according to the mode switching signal of input and the second transmitting-receiving control signal, output
3rd the 3rd transmission for sending enable signal to the 3rd electrical level transferring chip enables signaling interface so that the 3rd level conversion
Chip sends the sending function enable for enabling signal to the 3rd electrical level transferring chip according to the described 3rd.
Preferably,
The 3rd transmitting-receiving control circuit includes the 6th transistor, the 19th resistance, the 20th resistance, the 21st electricity
Resistance;
The first end of 6th transistor connects the mode switching signal interface by the 19th resistance and led to
Cross the 20th resistance connection the second transmitting-receiving control signal interface, the second end connection of the 6th transistor described the
Two transmitting-receiving control signal interfaces, the 3rd transmission described in the three-terminal link of the 6th transistor enables signaling interface and passes through institute
State the 21st resistance eutral grounding.
Preferably,
The transistor is specially triode, and the first end of the transistor is specially the base stage of triode, the crystal
Second end of pipe is specially the emitter stage of triode, and the 3rd end of the transistor is specially the colelctor electrode of triode.
Preferably,
The transistor is specially metal-oxide-semiconductor, and the first end of the transistor is specially the grid of metal-oxide-semiconductor, the transistor
The second end be specially metal-oxide-semiconductor source electrode, the 3rd end of the transistor is specially the drain electrode of metal-oxide-semiconductor.
Preferably,
First reception enables signaling interface and described first and sends enable signaling interface connection first level turn
Chip is changed, described second, which receives enable signaling interface and second, sends enable signaling interface connection second electrical level conversion chip;
The serial communication interface function switching circuit also include serial port insulating circuit, mode switching signal isolation circuit,
First transmitting-receiving control signal isolation circuit, power isolation circuit;
The serial port insulating circuit is electrically connected with corresponding electrical level transferring chip, for being received to the serial port insulating circuit
To signal isolated and be sent to electrical level transferring chip, the signal that electrical level transferring chip is received is sent to serial ports isolation
Circuit is simultaneously outwards isolated, and the serial port insulating circuit includes Magnetic isolation module;
The VDD1 ends connection VIN input powers of the Magnetic isolation module, the OA ends of the Magnetic isolation module connect MCU RX
End, the IB ends of the Magnetic isolation module connect the TX ends of the MCU and connect the VIN input powers by a resistance, described
The GND1 ends of Magnetic isolation module connect the earth terminal of the MCU, and the VDD2 ends of the Magnetic isolation module connect the serial communication
The power supply of interface function switching circuit, the IA ends of the Magnetic isolation module connect the ISO_RX of the corresponding electrical level transferring chip
Hold and the power supply is connected by a resistance, the OB ends of the Magnetic isolation module connect the corresponding electrical level transferring chip
ISO_TX ends, the GND2 ends of the Magnetic isolation module connect the earth terminal of the serial communication interface function switching circuit.
Described mode switching signal isolation circuit and described mode switching signal interface electrical connection, for the mould
The signal that formula switching signal isolation circuit is received is isolated and sent to the mode switching signal interface, and the pattern is cut
Changing signal isolation circuit includes the first light-coupled isolation chip;
The input pattern switching signal that the first end of first light-coupled isolation chip connects the MCU by a resistance connects
Mouthful end and by a resistance eutral grounding, the second end of first light-coupled isolation chip is grounded, first light-coupled isolation chip
The mode switching signal interface of serial communication interface function switching circuit described in three-terminal link, first light-coupled isolation chip
The 4th end connect the power supply of the serial communication interface function switching circuit.
The first described transmitting-receiving control signal isolation circuit and the first described transmitting-receiving control signal interface electrical connection, are used for
The signal that described first transmitting-receiving control signal isolation circuit is received is isolated and the first described transmitting-receiving control is sent to
Signaling interface, the first transmitting-receiving control signal isolation circuit includes the second light-coupled isolation chip;
The first end of second light-coupled isolation chip connects the first input transmitting-receiving control letter of the MCU by a resistance
Number interface simultaneously passes through a resistance eutral grounding, the second end ground connection of second light-coupled isolation chip, second light-coupled isolation chip
Three-terminal link described in serial communication interface function switching circuit first transmitting-receiving control signal interface, second optocoupler every
4th end of off-chip piece connects the power supply of the serial communication interface function switching circuit;
The insulating power supply circuit is controlled with the electrical level transferring chip, mode switching signal isolation circuit, the first transmitting-receiving
Signal isolation circuit is electrically connected, and the signal for being received to it carries out isolated from power, is the electrical level transferring chip, pattern switching
Signal isolation circuit, the first transmitting-receiving control signal isolation circuit provide driving voltage.
A kind of serial communication interface function switching method provided in an embodiment of the present invention, based on a kind of above-mentioned serial communication
Interface function switching circuit is performed, including:
First function switching method:
Control the mode switching signal interface for low level by the MCU, control the first transmitting-receiving control signal
Interface is low level so that it is high level, described first that the first of first electrical level transferring chip, which receives and enable signaling interface,
It is low level to send and enable signaling interface, and it is low level that the second transmission of the second electrical level conversion chip, which enables signaling interface,
It is low level that the second of the second electrical level conversion chip, which receives and enable signaling interface,;
Second function switching method:
Control the mode switching signal interface for low level by the MCU, control the first transmitting-receiving control signal
Interface is high level so that it is high level, described first that the first of first electrical level transferring chip, which receives and enable signaling interface,
It is low level to send and enable signaling interface, and it is high level that the second transmission of the second electrical level conversion chip, which enables signaling interface,
It is high level that the second of the second electrical level conversion chip, which receives and enable signaling interface,;
3rd function switching method:
Control the mode switching signal interface for high level by the MCU, control the first transmitting-receiving control signal
Interface is low level so that it is low level, described first that the first of first electrical level transferring chip, which receives and enable signaling interface,
It is high level to send and enable signaling interface, and it is low level that the second transmission of the second electrical level conversion chip, which enables signaling interface,
It is high level that the second of the second electrical level conversion chip, which receives and enable signaling interface,;
4th function switching method:
Control the mode switching signal interface for high level by the MCU, control the first transmitting-receiving control signal
Interface is high level so that it is low level, described first that the first of first electrical level transferring chip, which receives and enable signaling interface,
It is high level to send and enable signaling interface, and it is low level that the second transmission of the second electrical level conversion chip, which enables signaling interface,
It is high level that the second of the second electrical level conversion chip, which receives and enable signaling interface,.
Preferably, first function switching method also includes:Five-function switching submethod, the 6th function switching side
Method;
The five-function switching submethod includes controlling the mode switching signal interface to be low electricity by the MCU
Put down, control it is described first transmitting-receiving control signal interface be low level, control it is described second receive and dispatch control signal interface be high level,
So that the first of first electrical level transferring chip receives enable signaling interface for high level, described first, which sends enable signal, connects
Mouth is low level, and the second of the second electrical level conversion chip sends enable signaling interface for low level, the second electrical level turn
It is low level to change the second of chip and receive enable signaling interface, and the 3rd of the 3rd electrical level transferring chip, which sends enable signal, connects
Mouth is high level;
The 6th function switching submethod includes controlling the mode switching signal interface to be low electricity by the MCU
Put down, control it is described first transmitting-receiving control signal interface be low level, control it is described second receive and dispatch control signal interface be low level,
So that the first of first electrical level transferring chip receives enable signaling interface for high level, described first, which sends enable signal, connects
Mouth is low level, and the second of the second electrical level conversion chip sends enable signaling interface for low level, the second electrical level turn
It is low level to change the second of chip and receive enable signaling interface, and the 3rd of the 3rd electrical level transferring chip, which sends enable signal, connects
Mouth is low level.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
The embodiment of the present invention includes first and receives control circuit, the first sending controling circuit, second receives control circuit, the
Two sending controling circuits, mode switching signal interface, the first transmitting-receiving control signal interface, first, which receive, enables signaling interface, the
One transmission enables signaling interface, the second reception and enables signaling interface, the second transmission enable signaling interface so that MCU can pass through
Control mode switch signaling interface, the low and high level of the first transmitting-receiving control signal interface realize the first electrical level transferring chip and second
The power and energy of electrical level transferring chip, realizes a serial line interface and possesses the technique effect of multiple functions, so as to solve existing
Multi-functional serial communication needs to consume CPU multi-channel serial ports resource or needs manual switching or the technology using expensive analog switch
Problem.In addition, by serial communication interface function switching circuit provided in an embodiment of the present invention and the 3rd transmitting-receiving control circuit,
Second transmitting-receiving control signal interface, the 3rd, which send, enables signaling interface, is controlled by control mode switch signaling interface, the first transmitting-receiving
The low and high level of signaling interface processed and the second transmitting-receiving control signal interface can control the power and energy of the 3rd electrical level transferring chip,
So as to realize the conversion of three functions.In addition, passing through the serial communication interface function switching circuit of the embodiment of the present invention and first
Function switching method, the second function switching method, the 3rd function switching method realize the switching of function, specifically, pass through MCU
The low and high level of control mode switch signaling interface and the first transmitting-receiving control signal interface, so as to control the enable of each function
The low and high level switching of signaling interface, realizes the switching of function so that realize any switching laws of function on a circuit, i.e.,
One serial ports can switch multiple functions.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is a kind of circuit of one embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
Figure;
Fig. 2 is a kind of RS-232 interface and RS- of serial communication interface function switching circuit provided in an embodiment of the present invention
485 interface switching control circuit figures;
Fig. 3 is a kind of another RS-232 interface of serial communication interface function switching circuit provided in an embodiment of the present invention
With RS-485 interface switching control circuit figures;
Fig. 4 is a kind of RS-232 interface, the RS- of serial communication interface function switching circuit provided in an embodiment of the present invention
485 interfaces and RS-422 interface switching control circuit figures;
Fig. 5 is a kind of electricity of the power isolation circuit of serial communication interface function switching circuit provided in an embodiment of the present invention
Lu Tu;
Fig. 6 is a kind of electricity of the serial port insulating circuit of serial communication interface function switching circuit provided in an embodiment of the present invention
Lu Tu;
Fig. 7 isolates for a kind of mode switching signal of serial communication interface function switching circuit provided in an embodiment of the present invention
The circuit diagram of circuit;
Fig. 8 controls for a kind of transmitting-receiving of one kind first of serial communication interface function switching circuit provided in an embodiment of the present invention
The circuit diagram of signal isolation circuit;
Fig. 9 is a kind of RS-232 interface, the RS- of serial communication interface function switching circuit provided in an embodiment of the present invention
The application illustration of 485 interfaces and the use metal-oxide-semiconductor of RS-422 interface switching control circuits.
Embodiment
The embodiments of the invention provide a kind of serial communication interface function switching circuit and method, for solving to realize many work(
Energy serial communication is needed to consume CPU multi-channel serial ports resource or needs manual switching or asked using the technology of expensive analog switch
Topic.
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention
Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that disclosed below
Embodiment be only a part of embodiment of the invention, and not all embodiment.Based on the embodiment in the present invention, this area
All other embodiment that those of ordinary skill is obtained under the premise of creative work is not made, belongs to protection of the present invention
Scope.
Referring to Fig. 1, a kind of one embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention,
Including:First receives control circuit, the first sending controling circuit, the second reception control circuit, the second sending controling circuit, pattern
Switching signal interface, the first transmitting-receiving control signal interface, first receive enable signaling interface, first send enable signaling interface,
Second, which receives enable signaling interface, the second transmission, enables signaling interface;
First receives the input connection mode switching signal interface of control circuit, and first receives the output end of control circuit
Connection first, which is received, enables signaling interface;The input connection mode switching signal interface of first sending controling circuit, the first hair
Send the output end connection first of control circuit to send and enable signaling interface;The second input connection mode for receiving control circuit is cut
Signaling interface and the first transmitting-receiving control signal interface are changed, the second output end connection second for receiving control circuit, which is received, enables signal
Interface;The input connection mode switching signal interface of second sending controling circuit and the first transmitting-receiving control signal interface, second
The output end connection second of sending controling circuit, which is sent, enables signaling interface;
First, which receives control circuit, is used for the mode switching signal according to input, and output first, which is received, enables signal to first
The reception control signal interface of electrical level transferring chip so that the first electrical level transferring chip is received according to first enables signal to first
The receive capabilities of electrical level transferring chip are enabled;
First sending controling circuit is used for the mode switching signal according to input, and output first, which is sent, enables signal to first
The transmission control signal interface of electrical level transferring chip so that the first electrical level transferring chip is sent according to first enables signal to first
The sending function of electrical level transferring chip is enabled;
Second, which receives control circuit, is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output second
Receive and enable signal to the reception control signal interface of second electrical level conversion chip so that second electrical level conversion chip is according to second
Receive the receive capabilities enable for enabling signal to second electrical level conversion chip;
Second sending controling circuit is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output second
Send and enable signal to the transmission control signal interface of second electrical level conversion chip so that second electrical level conversion chip is according to second
Send the sending function enable for enabling signal to the first electrical level transferring chip.
It should be noted that the first electrical level transferring chip and second electrical level conversion chip are all electrical level transferring chips, such as
RS-232 electrical level transferring chips, RS-485 electrical level transferring chips, RS-422 electrical level transferring chips etc..Mode switching signal interface is used
Can be the mode switching signal that the processors such as any CPU or MCU are sent in reception pattern switching signal;First transmitting-receiving control
Signaling interface processed is used to receive transmitting-receiving control signal, can be the transmitting-receiving control signal that the processors such as any CPU or MCU are sent;
First reception enable signaling interface, the first transmission enable signaling interface, the second reception enable signaling interface, the second transmission enable letter
Number interface is used to output enable signal to corresponding electrical level transferring chip, enables its sending function or receive capabilities.
Specifically, mode switching signal, the first transmitting-receiving control signal, first, which receive enable signal etc., can use height electricity
Flat mode carries out signal control, specific such as table 1:
Table 1
It can be seen from Table 1 that the embodiment of the present invention is by two signal outputs, 4 control signals, it is achieved thereby that control
The output of circuit is controlled to whether the reception sending function of electrical level transferring chip enables.
Above is entering to a kind of one embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
The detailed description of row, below by a kind of another reality of serial communication interface function switching circuit provided in an embodiment of the present invention
Example is applied to be described in detail.
Referring to Fig. 2, the embodiment of the present invention provides a kind of another embodiment of serial communication interface function switching circuit,
Including:First receives control circuit, the first sending controling circuit, the second reception control circuit, the second sending controling circuit, pattern
Switching signal interface, the first transmitting-receiving control signal interface, first receive enable signaling interface, first send enable signaling interface,
Second, which receives enable signaling interface, the second transmission, enables signaling interface;First, which receives control circuit, includes the first transistor, first
Resistance, second resistance, 3rd resistor;First sending controling circuit is a wire, one end connection mode switching signal of wire
Interface, the other end connection first of wire, which is sent, enables signaling interface;Second, which receives control circuit, includes the first diode, second
Diode, the 7th resistance;Second sending controling circuit includes second transistor, the 4th resistance, the 5th resistance, the 6th resistance;Tool
Body, the first transistor is specially that switching tube Q1, second transistor are specially that switching tube Q2, first resistor are to the 7th resistance specific
It is specially that diode D1, the second diode are specially diode D2 for resistance R1~R7, the first diode;
Switching tube Q1 first end is by resistance R2 connection mode switching signal interfaces and is grounded by resistance R3, switching tube
Q1 the second end ground connection, the first of the switching tube Q1 electrical level transferring chip of three-terminal link first receives enable signaling interface and leads to
Cross resistance R1 connection power supplys;
Switching tube Q2 first end is by resistance R5 connection mode switching signal interfaces and is grounded by resistance R6, switching tube
Q2 the second end ground connection, the second of switching tube Q2 three-terminal link second electrical level conversion chip sends enable signaling interface and leads to
Cross the transmitting-receiving control signal interface of resistance R4 connections first;
Diode D1 positive pole connection mode switching signal interface, diode D1 negative pole connection second electrical level conversion chip
Second receive to enable and signaling interface and be grounded by resistance R7;Diode D2 positive pole connection first is received and dispatched control signal and connect
Mouthful, diode D2 negative pole connection diode D1 negative pole.
It should be noted that the resistance of the resistance in the embodiment of the present invention need to be adjusted according to actual conditions, its resistance
Concrete numerical value have no effect on the function of the embodiment of the present invention.
The embodiment of the present invention can realize the function of RS-485, RS-232 two-in-one circuit:The circuit can realize RS-485,
RS-232 function any switching laws.Specifically, mode switching signal interface, DIR are common I/O mouthfuls of MCU, and first sends enable letter
Number interface, first receive the control signal interface forbidden with starting for enabling signaling interface for RS-232 electrical level transferring chips, the
Two, which send the transmission and reception that enable signaling interface, the second reception enable signaling interface are respectively RS-485 electrical level transferring chips, makes
Can signaling interface.
Circuit function pattern is as shown in table 2:
Table 2
In table 2, MODE is the mode switching signal in the embodiment of the present invention, and DIR is the first transmitting-receiving control signal, 232_
NEN is that the first reception enables signal, and 232_nSHDN is that the first transmission enables signal, and 485_DE sends for second and enables signal,
485_nRE is that the second reception enables signal.
Above is entering to a kind of one embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
The detailed description of row, below by a kind of another reality of serial communication interface function switching circuit provided in an embodiment of the present invention
Example is applied to be described in detail.
Referring to Fig. 3, a kind of serial communication interface function switching circuit provided in an embodiment of the present invention, including:First connects
Control circuit, the first sending controling circuit, the second reception control circuit, the second sending controling circuit, mode switching signal is received to connect
Mouth, the first transmitting-receiving control signal interface, the first reception enable signaling interface, the first transmission enable signaling interface, second, which receive, to be made
Can signaling interface, the second transmission enable signaling interface;
First sending controling circuit includes third transistor, the 8th resistance, the 9th resistance, the tenth resistance;Third transistor
First end is by the 9th resistance connection mode switching signal interface and passes through the tenth resistance eutral grounding, the second end of the first transistor
Ground connection, the first of the electrical level transferring chip of three-terminal link first of third transistor sends enable signaling interface and by the 8th electricity
Resistance connection power supply;First receives that control circuit be wire, one end connection mode switching signal interface of wire, wire it is another
One end connection first, which is received, enables signaling interface;Second, which receives control circuit, includes the 4th transistor, the 11st resistance, the 12nd
Resistance, the 13rd resistance, the 14th resistance;The first end of 4th transistor passes through the 13rd resistance connection the first transmitting-receiving control letter
Number interface is simultaneously by the 13rd resistance and the 12nd resistance connection mode switching signal interface, and the first end of the 4th transistor is also
By the 14th resistance eutral grounding, the second end of the 4th transistor is grounded, and the three-terminal link second of the 4th transistor, which is received, to be enabled
Signaling interface simultaneously connects power supply by the 11st resistance;Second sending controling circuit includes the 5th transistor, the 15th resistance, the
16 resistance, the 17th resistance, the 18th resistance;The first end of 5th transistor is controlled by the transmitting-receiving of the 17th resistance connection first
Signaling interface processed simultaneously passes through the 18th resistance eutral grounding, the second end ground connection of the 5th transistor, the three-terminal link of the 5th transistor
The second of second electrical level conversion chip, which sends, enables signaling interface and by the 15th resistance connection mode switching signal interface, the
3rd end of five transistors also passes through the 15th resistance and the 16th resistance eutral grounding.
Specifically, in the present embodiment, third transistor is specially that triode Q3, the 8th resistance are specially resistance R8, the 9th
Resistance be specially R9, the tenth resistance be specially R10, the 4th transistor be specially triode Q4, the 11st resistance be specially R11,
12nd resistance is specially that R12, the 13rd resistance are specially that R13, the 14th resistance are specially that R14, the 5th transistor are specially
Triode Q5, the 15th resistance are specially that R15, the 16th resistance are specially that R16, the 17th resistance are specially R17, the 18th electricity
Resistance is specially R18;
It should be noted that the first electrical level transferring chip and second electrical level conversion chip are all electrical level transferring chips, such as
RS-232 electrical level transferring chips, RS-485 electrical level transferring chips, RS-422 electrical level transferring chips etc..Mode switching signal interface is used
Can be the mode switching signal that the processors such as any CPU or MCU are sent in reception pattern switching signal;First transmitting-receiving control
Signaling interface processed is used to receive transmitting-receiving control signal, can be the transmitting-receiving control signal that the processors such as any CPU or MCU are sent;
First reception enable signaling interface, the first transmission enable signaling interface, the second reception enable signaling interface, the second transmission enable letter
Number interface is used to output enable signal to corresponding electrical level transferring chip, enables its sending function or receive capabilities.
Above is to a kind of another embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
Be described in detail, below by a kind of serial communication interface function switching circuit provided in an embodiment of the present invention another
Embodiment is described in detail.
Referring to Fig. 4, the embodiment of the present invention provides a kind of another embodiment of serial communication interface function switching circuit,
Including:First receives control circuit, the first sending controling circuit, the second reception control circuit, the second sending controling circuit, pattern
Switching signal interface, the first transmitting-receiving control signal interface, first receive enable signaling interface, first send enable signaling interface,
Second, which receives enable signaling interface, the second transmission, enables signaling interface;
First, which receives control circuit, includes the first transistor, first resistor, second resistance, 3rd resistor;First sends control
Circuit processed is a wire, and one end connection mode switching signal interface of wire, the other end connection first of wire sends enable
Signaling interface;Second, which receives control circuit, includes the first diode, the second diode, the 7th resistance;Second sending controling circuit
Including second transistor, the 4th resistance, the 5th resistance, the 6th resistance;
Specifically, the first transistor is specially that switching tube Q1, second transistor are specially switching tube Q2, first resistor to
Seven resistance are specially that resistance R1~R7, the first diode are specially that diode D1, the second diode are specially diode D2;
Switching tube Q1 first end is by R2 resistance connection mode switching signal interface and is grounded by resistance R3, switching tube
Q1 the second end ground connection, the first of the switching tube Q1 electrical level transferring chip of three-terminal link first receives enable signaling interface and leads to
Cross resistance R1 connection power supplys;
Switching tube Q2 first end is by R5 resistance connection mode switching signal interface and is grounded by resistance R6, switching tube
Q2 the second end ground connection, the second of switching tube Q2 three-terminal link second electrical level conversion chip sends enable signaling interface and leads to
Cross R4 resistance connection first and receive and dispatch control signal interface;
Control signal interface, diode D1 negative pole connection second electrical level conversion are received and dispatched in diode D1 positive pole connection first
The second of chip, which receives, to be enabled signaling interface and is grounded by resistance R7;Diode D2 positive pole connection mode switching signal connects
Mouthful, diode D2 negative pole connection diode D1 negative pole.
Further, the embodiment of the present invention also includes the 3rd transmitting-receiving control circuit, the second transmitting-receiving control signal interface, the 3rd
Send and enable signaling interface;
The 3rd transmitting-receiving control circuit includes the 6th transistor, the 19th resistance, the 20th resistance, the 21st electricity
Resistance;Specifically, the 6th transistor is specially switching tube Q6, and the 19th resistance is specially that resistance R19, the 20th resistance are specially electricity
It is specially resistance R21 to hinder R20, the 21st resistance.
Switching tube Q6 first end is by resistance R19 connection mode switching signal interfaces and passes through resistance R20 connections MCU's
Second transmitting-receiving control signal interface, switching tube Q6 the second end connection MCU the second transmitting-receiving control signal interface, switching tube Q6's
The 3rd of the electrical level transferring chip of three-terminal link the 3rd, which sends, to be enabled signaling interface and is grounded by resistance R21.
Further, switching tube Q1 is specially triode Q1, and switching tube Q1 first end is specially triode Q1 base stage,
Switching tube Q1 the second end is specially triode Q1 emitter stage, and switching tube Q1 the 3rd end is specially triode Q1 current collection
Pole;Switching tube Q2 is specially triode Q2, and switching tube Q2 first end is specially triode Q2 base stage, the second of switching tube Q2
End is specially triode Q2 emitter stage, and switching tube Q2 the 3rd end is specially triode Q2 colelctor electrode;Switching tube Q6 is specific
For triode Q6, switching tube Q6 first end is specially triode Q6 base stage, and switching tube Q6 the second end is specially triode
Q6 emitter stage, switching tube Q6 the 3rd end is specially triode Q6 colelctor electrode.
It should be noted that the first electrical level transferring chip and second electrical level conversion chip, the 3rd electrical level transferring chip are all
Electrical level transferring chip, such as RS-232 electrical level transferring chips, RS-485 electrical level transferring chips, RS-422 electrical level transferring chips etc..
Mode switching signal interface is used for reception pattern switching signal, can be that the pattern that the processors such as any CPU or MCU are sent is cut
Change signal;First transmitting-receiving control signal interface is used to receive transmitting-receiving control signal, can be the processors such as any CPU or MCU hair
The transmitting-receiving control signal sent;First reception enables signaling interface, the first transmission enable signaling interface, the second reception enable signal and connect
Mouth, second, which send, enables signaling interface, the 3rd transmission enable signaling interface for outputing enable signal to corresponding level conversion
Chip, enables its sending function or receive capabilities.
It should be noted that the resistance of the resistance in the embodiment of the present invention need to be adjusted according to actual conditions, its resistance
Concrete numerical value have no effect on the function of the embodiment of the present invention.
The embodiment of the present invention can realize RS-232 interface, RS-485 interfaces and RS-422 interface switching control circuit three in one circuit
Function.The present invention makes full use of the switching characteristic of triode and the one-way conduction characteristic of diode, realizes RS-232, RS-
485th, the automatic switching function of tri- kinds of functional circuits of RS-422.Mode switching signal interface, the first transmitting-receiving control in the application example
Signaling interface, common I/O mouthfuls that the second transmitting-receiving control signal interface is MCU, the first electrical level transferring chip is that RS-232 level turns
Change chip, first send enable signaling interface, first receive enable signaling interface for RS-232 electrical level transferring chips forbid with
The control signal interface of startup, second electrical level conversion chip is the first RS-485 electrical level transferring chips, and second sends enable signal
It is respectively that the transmission of RS-485 electrical level transferring chips and reception enable signaling interface that interface, second, which receive and enable signaling interface,;The
Three electrical level transferring chips are the 2nd RS-485 electrical level transferring chips, and the 3rd sends enable signaling interface turns for the 2nd RS-485 level
The transmission for changing chip enables signaling interface.The RS-422 patterns of the present embodiment are to come real using two RS-485 electrical level transferring chips
Existing.
MCU passes through control mode switch signaling interface, the first transmitting-receiving control signal interface, the second transmitting-receiving control signal interface
Low and high level realize the logic of tri- kinds of function any switching laws of RS-232, RS-485, RS-422.The RS-422 moulds of the present embodiment
Formula is realized using two RS-485 electrical level transferring chips.It is to utilize one in RS-422 patterns during RS-485 patterns
RS-485 chips, i.e. RS-422 share 485 electrical level transferring chips with RS-485.
Circuit function explanation:
Table 3
Signaling interface logic level values when table 3 is RS-232, RS-485, RS-422 switching.
In table 3, MODE is mode switching signal interface, and 485_DIR is the first transmitting-receiving control signal interface, and 422_DIR is
Second transmitting-receiving control signal interface, 232_nEN is that the first reception enables signaling interface, and 232_nSHDN sends to enable for first to be believed
Number interface, 485_DE is second to send and enable signaling interface, and 485_nRE is second to receive and enable signaling interface, and 422_DE is the
Three send enable signaling interface, and 422_nRE is that the 3rd reception enables signaling interface.
The functional mode to the embodiment of the present invention is described in detail below.
1st, RS-232 patterns:
When user uses RS-232, high level is exported with MCU control mode switchs signaling interface, you can open RS-232 electricity
Flat conversion chip simultaneously forbids two RS-485 electrical level transferring chips (i.e. the first RS-485 electrical level transferring chips and the 2nd RS-485 electricity
Flat conversion chip), concrete operating principle is as follows:
When mode switching signal interface=1, first sends to enable signaling interface=1, the second and receive and enables signaling interface
=1, triode Q1 are turned on, and first receives and enable signaling interface level and drags down, and such RS-232 electrical level transferring chips are enabled (the
One is sent and enables signaling interface=1, first receives and enable signaling interface=0), and 232 functions are activated;Triode Q2 is also led
It is logical, send enable signaling interface level by second and be pulled low, i.e., second sends enable signaling interface=0, then the first RS-485 electricity
Flat turn change chip transceiver function be all prohibited (second receive enable signaling interface=1, the second send enable signaling interface=
0), i.e., RS-485 functions are closed;Triode Q6 is not turned on, and at this moment the 3rd is sent and is enabled signaling interface and dragged down by resistance R21, i.e., and the
Three send enable signaling interface=0, then the function of the 2nd RS-485 electrical level transferring chips is also prohibited.Therefore, in pattern switching letter
During number interface=1,232 open, and 485 close, and 422 close.
2nd, RS-485 patterns:
When user uses RS-485, with MCU control mode switchs signaling interface, the first transmitting-receiving control signal interface, second
Receive and dispatch control signal interface and export corresponding level, you can forbid RS-232 electrical level transferring chips and open RS-485 level conversion cores
Piece, concrete operating principle is as follows:
2.1st, RS-485 reception patterns (default mode)
When mode switching signal interface=0, the first transmitting-receiving control signal interface=0, the second transmitting-receiving control signal interface=0
When, first, which sends enable signaling interface=0, the second, receives enable signaling interface=0, and triode Q1 is not turned on, and the first reception makes
Can signaling interface drawn high by resistance R1, such RS-232 electrical level transferring chips be disabled (first send enable signaling interface=0,
First reception enable signaling interface=1), RS-232 functions are prohibited;Triode Q2 is also not turned on, and second, which sends enable signal, connects
Mouth is dragged down by R4 by the first transmitting-receiving control signal interface, i.e., second transmission enable signaling interface=first receives and dispatches control signal and connect
Mouthful=0, second receives enable signaling interface level is dragged down by R7, i.e., second receives enable signaling interface=0, then the first RS-485
Electrical level transferring chip enters reception pattern, and (second receives to enable signaling interface=0, the second and send and enables signaling interface=0);Three
Pole pipe Q6 is not turned on, and at this moment the 3rd transmission enables signaling interface and dragged down by resistance R21, i.e., the 3rd sends enable signaling interface=0,
Then the function of the 2nd RS-485 electrical level transferring chips is also prohibited, i.e., RS-422 patterns are closed.
Therefore, in mode switching signal interface=0, the first transmitting-receiving control signal interface=0, the second transmitting-receiving control signal interface
When=0,232 close, and 485 receive, and 422 close.
2.2nd, RS-485 sending modes
When mode switching signal interface=0, the first transmitting-receiving control signal interface=1, the second transmitting-receiving control signal interface=0
When, first sends enable signaling interface=0, the second reception enable signaling interface is drawn by the first transmitting-receiving control signal interface by D2
Height, i.e., second receives enable signaling interface=1, and triode Q1 is not turned on, and first receives enable signaling interface is drawn high by resistance R1,
So RS-232 electrical level transferring chips be disabled (first send enable signaling interface=0, first receive enable signaling interface=
1), RS-232 functions are prohibited;Triode Q2 is also not turned on, and second sends enable signaling interface is controlled by R4 by the first transmitting-receiving
Signaling interface is drawn high, i.e., second, which sends enable signaling interface=first, receives and dispatches control signal interface=1, then the first RS-485 level
Conversion chip enters sending mode, and (second receives to enable signaling interface=1, the second and send and enables signaling interface=1);Triode
Q6 is not turned on, and at this moment the 3rd is sent and is enabled signaling interface and dragged down by resistance R21, i.e., the 3rd sends and enable signaling interface=0, then and the
The function of two RS-485 electrical level transferring chips is also prohibited, i.e., RS-422 patterns are closed.
Therefore, in mode switching signal interface=0, the first transmitting-receiving control signal interface=1, the second transmitting-receiving control signal interface
When=0,232 close, 485 hairs, and 422 close.
3rd, RS-422 patterns
When user uses RS-422, with MCU control mode switchs signaling interface, the first transmitting-receiving control signal interface, second
Receive and dispatch control signal signaling interface and export corresponding level, you can forbid RS-232 electrical level transferring chips and open two-way RS-485 electricity
Flat conversion chip, concrete operating principle is as follows:
When mode switching signal interface=0, the first transmitting-receiving control signal interface=0, the second transmitting-receiving control signal interface=1
When, first sends enable signaling interface=0, the second reception enable signaling interface is dragged down by resistance R7, i.e., the second reception, which is enabled, to be believed
Number interface=0, triode Q1 is not turned on, and first receives and enable signaling interface and is drawn high by resistance R1, such RS-232 level conversions
Chip is disabled (first, which sends enable signaling interface=0, the first reception, enables signaling interface=1), and RS-232 functions are prohibited;
Triode Q2 is also not turned on, and second sends enable signaling interface is dragged down by R4 by the first transmitting-receiving control signal interface, i.e., and second
Send enable signaling interface=first and receive and dispatch control signal interface=0, then the first RS-485 electrical level transferring chips, which enter, receives mould
Formula (second reception enable signaling interface=0, the second transmission enable signaling interface=0);Triode Q6 is turned on, and at this moment the 3rd is sent
Enable signaling interface to be drawn high by the second transmitting-receiving control signal interface, i.e., the 3rd, which sends enable signaling interface=second, receives and dispatches control letter
Number interface=1, then the 2nd RS-485 electrical level transferring chips enter sending mode, i.e. RS-422 patterns and open.
Therefore, in mode switching signal interface=0, the first transmitting-receiving control signal interface=0, the second transmitting-receiving control signal interface
When=1,232 close, and 485 receive, 422 hairs.
Above is to a kind of another embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
It is described in detail, below by a kind of embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
In isolation circuit be described in detail.
Referring to Fig. 5, a kind of embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention is also wrapped
Include power isolation circuit;
Power isolation circuit includes power isolation module;With the Vo interfaces of power isolation module after the resistor coupled in parallel of two electric capacity one
With 0V interface tandems, the Vin interfaces and GND interfaces of an electric capacity and power isolation module are in parallel and electric with two after connect with an inductance
Hold in parallel;Vo interfaces are connected with the power supply of serial communication interface function switching circuit, and 0V interfaces are cut with serial communication interface function
The earth terminal connection of circuit is changed, Vin interfaces are connected by inductance and MCU power end, and GND interfaces and MCU earth terminal are connected.
Referring to Fig. 6, further, in addition to serial port insulating circuit;Serial port insulating circuit includes Magnetic isolation module;It is described
The VDD1 ends connection VIN input powers of Magnetic isolation module, the OA ends of the Magnetic isolation module connect MCU RX ends, the magnetic every
IB ends from module connect the TX ends of the MCU and connect the VIN input powers by a resistance, the Magnetic isolation module
GND1 ends connect the earth terminal of the MCU, and the VDD2 ends of the Magnetic isolation module connect the serial communication interface function switching
The power supply of circuit, the IA ends of the Magnetic isolation module connect the ISO_RX ends of the corresponding electrical level transferring chip and by an electricity
The resistance connection power supply, the OB ends of the Magnetic isolation module connect the ISO_TX ends of the corresponding electrical level transferring chip, described
The GND2 ends of Magnetic isolation module connect the earth terminal of the serial communication interface function switching circuit.
Referring to Fig. 7, further, in addition to mode switching signal isolation circuit;Mode switching signal isolation circuit bag
Include the first light-coupled isolation chip;The input pattern that the first end of first light-coupled isolation chip connects MCU by a resistance, which switches, to be believed
Number interface end simultaneously passes through a resistance eutral grounding, the second end ground connection of the first light-coupled isolation chip, the 3rd of the first light-coupled isolation chip the
The mode switching signal interface end of end connection serial communication interface function switching circuit, the 4th end of the first light-coupled isolation chip connects
Connect the power supply of serial communication interface function switching circuit.
Referring to Fig. 8, further, in addition to the first transmitting-receiving control signal isolation circuit;First transmitting-receiving control signal every
Include the second light-coupled isolation chip from circuit;The first end of second light-coupled isolation chip connects the first defeated of MCU by a resistance
Enter to receive and dispatch control signal interface and by a resistance eutral grounding, the second end of the second light-coupled isolation chip is grounded, the second light-coupled isolation
First transmitting-receiving control signal interface of the three-terminal link serial communication interface function switching circuit of chip, the second light-coupled isolation core
4th end of piece connects the power supply of serial communication interface function switching circuit.
If to be protected to system, isolation circuit can be added in the circuit prime of the present invention.Wherein U1 be power supply every
From module, insulating power supply is provided for circuit of the present invention;U2 is Magnetic isolation module, by CPU serial ports TX and RX signal and the present invention
Circuit is isolated, if the communication speed of serial ports is very high, it is proposed that selection high-speed isolated chip;U3, U4 are light-coupled isolation chip,
Common I/O mouthfuls of CPU are isolated with circuit of the present invention., can be by CPU by the effect of above isolation module and isolating chip
Circuit and circuit of the present invention fully achieve isolating electrically, so not only increase the stability of system, also improve system
Antijamming capability.
Analysis method:For optocoupler U3, U4, when input pattern switching signal, the first input transmitting-receiving control signal are high electricity
Usually, optocoupler is turned on, i.e.,:Mode switching signal, the first transmitting-receiving control signal are also high level state;Believe when input pattern switches
Number, first input transmitting-receiving control signal be low level when, optocoupler is not turned on, i.e.,:Mode switching signal, the first transmitting-receiving control signal
Also it is high-impedance state, its level state depends on circuit of the present invention.
Above is to a kind of another embodiment of serial communication interface function switching circuit provided in an embodiment of the present invention
It is described in detail, below by an a kind of reality of serial communication interface function switching method provided in an embodiment of the present invention
Example is applied to be described in detail.
The embodiment of the present invention provides a kind of serial communication interface function switching method, is connect based on a kind of above-mentioned serial communication
Mouth function switching circuit is performed, including:
First function switching method:It is low level, the transmitting-receiving control of control first by MCU control mode switchs signaling interface
Signaling interface is low level so that it is high level that the first of the first electrical level transferring chip, which receives and enable signaling interface, and first sends
Enable signaling interface is low level, and the second of second electrical level conversion chip sends enable signaling interface for low level, second electrical level
It is low level that the second of conversion chip, which receives and enable signaling interface,;
Second function switching method:It is low level, the transmitting-receiving control of control first by MCU control mode switchs signaling interface
Signaling interface is high level so that it is high level that the first of the first electrical level transferring chip, which receives and enable signaling interface, and first sends
Enable signaling interface is low level, and the second of second electrical level conversion chip sends enable signaling interface for high level, second electrical level
It is high level that the second of conversion chip, which receives and enable signaling interface,;
3rd function switching method:It is high level, the transmitting-receiving control of control first by MCU control mode switchs signaling interface
Signaling interface is low level so that it is low level that the first of the first electrical level transferring chip, which receives and enable signaling interface, and first sends
Enable signaling interface is high level, and the second of second electrical level conversion chip sends enable signaling interface for low level, second electrical level
It is high level that the second of conversion chip, which receives and enable signaling interface,;
4th function switching method:It is high level, the transmitting-receiving control of control first by MCU control mode switchs signaling interface
Signaling interface is high level so that it is low level that the first of the first electrical level transferring chip, which receives and enable signaling interface, and first sends
Enable signaling interface is high level, and the second of second electrical level conversion chip sends enable signaling interface for low level, second electrical level
It is high level that the second of conversion chip, which receives and enable signaling interface,.
Five-function switches submethod:Five-function switching submethod includes passing through MCU control mode switch signaling interfaces
For low level, control first transmitting-receiving control signal interface be low level, control second receive and dispatch control signal interface be high level, make
It is high level to obtain the first of the first electrical level transferring chip and receive enable signaling interface, and the first transmission enable signaling interface is low electricity
Flat, the second of second electrical level conversion chip sends enable signaling interface for low level, and the second of second electrical level conversion chip receives
Enable signaling interface is low level, and the 3rd of the 3rd electrical level transferring chip sends enable signaling interface for high level;
It is low level that 6th function switching submethod, which is included by MCU control mode switchs signaling interface, control first to receive
Hair control signal interface is low level, controls the second transmitting-receiving control signal interface to be low level so that the first electrical level transferring chip
First receive enable signaling interface be high level, first send enable signaling interface be low level, second electrical level conversion chip
Second send enable signaling interface be low level, second electrical level conversion chip second receive enable signaling interface be low electricity
Flat, the 3rd of the 3rd electrical level transferring chip sends enable signaling interface for low level.
Above is entering to a kind of one embodiment of serial communication interface function switching method provided in an embodiment of the present invention
The detailed description of row, below by the one of a kind of serial communication interface function switching circuit and method provided in an embodiment of the present invention
Individual application examples is described in detail.
The embodiment of the present invention can also realize the switching of three kinds of functions using metal-oxide-semiconductor.
Referring to Fig. 9, using metal-oxide-semiconductor come instead of the triode in the present invention.Metal-oxide-semiconductor is voltage-controlled element, as long as being added to pressure
Control the conducting voltage of element, metal-oxide-semiconductor just can as triode saturation conduction, and it is minimum to turn on the pressure drop of knot.Below figure institute
Show:Three triodes in the present invention are replaced with into metal-oxide-semiconductor, can also realize that RS-485, RS-232, RS-422 function are arbitrarily cut
Change.
The analysis method of the replacement circuit and the analysis method of invention circuit are just the same, when Three models switch, each
I/O mouthfuls of logical relation is as shown in table 4.
Table 4
Analysis refers to RS-232 patterns, RS-485 patterns, RS-422 patterns during above-mentioned circuit function illustrates.
In table 4, MODE is mode switching signal interface, and 485_DIR is the first transmitting-receiving control signal interface, and 422_DIR is
Second transmitting-receiving control signal interface, 232_nEN is that the first reception enables signaling interface, and 232_nSHDN sends to enable for first to be believed
Number interface, 485_DE is second to send and enable signaling interface, and 485_nRE is second to receive and enable signaling interface, and 422_DE is the
Three send enable signaling interface, and 422_nRE is that the 3rd reception enables signaling interface.
It should be noted that the innovative point of the embodiment of the present invention is:1st, 3 kinds of interface standards are switched using serial ports all the way.Section
Hardware resource is saved, software automatically switches, and product can be made to meet distinct interface demand.2nd, circuit hardware cost is low, and compatibility is strong.
It is especially suitable for serial server circuit needs.
The advantage of the embodiment of the present invention is:Circuit components are few, reduce PCB surface product, fault rate is low, and cost is very
It is low;Software exchange is convenient, program code efficiency high;Circuit is simple, and reliability is high, and practicality is very strong;Used available for various
Among the circuit of serial equipment;This circuit is used can be widely;Serial server, industry control serial communication interface.Need
Bright, triode can be changed to combine gate circuit by the embodiment of the present invention;Can also be by the triode in the embodiment of the present invention
Metal-oxide-semiconductor is replaced with, any switching laws of three kinds of functions can be equally realized.It should be noted that this circuit form, all by soft
Part automatically switches, without artificial manual switching.Traditional switching mode switches over for jumper cap, and this mode, which is switched, comes time-consuming
Arduously, and easily malfunction, this circuit completely avoid this problem, and whole software automatically switches, according to those listed above
Truth table is selected, and reaches full automatic effect.
Circuit hardware cost provided in an embodiment of the present invention is low.Traditional switching mode, door is added using analog switch chip
Circuit is switched over, expensive, and required chip is relatively more, takes PCB surface product greatly, cost performance is not high, and simulation is opened
Close conducting internal resistance big.This circuit is switched over using metal-oxide-semiconductor or triode, cheap, and speed is fast, and required device is few, accounts for
It is small with area, beneficial to integrated, cost performance height.
It should be further stated that, the transistor in above-described embodiment can be switching tube, triode, metal-oxide-semiconductor etc., tool
Body, the first transistor is specially metal-oxide-semiconductor, and the first end of the first transistor is specially the grid of metal-oxide-semiconductor, the of the first transistor
Two ends are specially the source electrode of metal-oxide-semiconductor, and the 3rd end of the first transistor is specially the drain electrode of metal-oxide-semiconductor;Second transistor is specially MOS
Pipe, the first end of second transistor is specially the grid of metal-oxide-semiconductor, and the second end of second transistor is specially the source electrode of metal-oxide-semiconductor, the
3rd end of two-transistor is specially the drain electrode of metal-oxide-semiconductor;Third transistor is specially metal-oxide-semiconductor, the first end tool of third transistor
Body is the grid of metal-oxide-semiconductor, and the second end of third transistor is specially the source electrode of metal-oxide-semiconductor, and the 3rd end of third transistor is specially
The drain electrode of metal-oxide-semiconductor.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (10)
1. a kind of serial communication interface function switching circuit, it is characterised in that including:First receives control circuit, the first transmission
Circuit, second is controlled to receive control circuit, the second sending controling circuit, mode switching signal interface, the first transmitting-receiving control signal
Interface, the first reception enable signaling interface, first, which send, enables signaling interface, the second reception enable signaling interface, the second transmission
Enable signaling interface;
Described first input for receiving control circuit connects the mode switching signal interface, and described first receives control circuit
Output end connection it is described first receive enable signaling interface;
The input of first sending controling circuit connects the mode switching signal interface, first sending controling circuit
Output end connection it is described first send enable signaling interface;
Described second input for receiving control circuit connects the mode switching signal interface and the first transmitting-receiving control letter
Number interface, the described second output end connection described second for receiving control circuit, which is received, enables signaling interface;
The input of second sending controling circuit connects the mode switching signal interface and the first transmitting-receiving control letter
Number interface, the output end connection described second of second sending controling circuit, which is sent, enables signaling interface;
Described first, which receives control circuit, is used for the mode switching signal according to input, and output first, which is received, enables signal to first
The reception control signal interface of electrical level transferring chip so that first electrical level transferring chip receives according to described first and enables letter
Number the receive capabilities of first electrical level transferring chip are enabled;
First sending controling circuit is used for the mode switching signal according to input, and output first, which is sent, enables signal to first
The transmission control signal interface of electrical level transferring chip so that first electrical level transferring chip sends according to described first and enables letter
Number the sending function of first electrical level transferring chip is enabled;
Described second, which receives control circuit, is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output second
Receive enable signal to second electrical level conversion chip reception control signal interface so that the second electrical level conversion chip according to
Described second receives the receive capabilities enable for enabling signal to the second electrical level conversion chip;
Second sending controling circuit is used for according to the mode switching signal of input and the first transmitting-receiving control signal, output second
Send enable signal to second electrical level conversion chip transmission control signal interface so that the second electrical level conversion chip according to
Described second sends the sending function enable for enabling signal to the second electrical level conversion chip.
2. a kind of serial communication interface function switching circuit according to claim 1, it is characterised in that
Described first, which receives control circuit, includes the first transistor, first resistor, second resistance, 3rd resistor;
The first end of the first transistor connects the mode switching signal interface and by described by the second resistance
3rd resistor is grounded, the second end ground connection of the first transistor, the first electricity described in the three-terminal link of the first transistor
The first of flat conversion chip, which receives, to be enabled signaling interface and connects power supply by the first resistor;
First sending controling circuit is a wire, and one end of the wire connects the mode switching signal interface, institute
The other end connection described first for stating wire sends enable signaling interface;
Described second, which receives control circuit, includes the first diode, the second diode, the 7th resistance;
Positive pole connection the first transmitting-receiving control signal interface of first diode, the negative pole connection of first diode
The second of the second electrical level conversion chip receives enable signaling interface and passes through the 7th resistance eutral grounding;
The positive pole of second diode connects the mode switching signal interface, and the negative pole connection of second diode is described
The negative pole of first diode;
Second sending controling circuit includes second transistor, the 4th resistance, the 5th resistance, the 6th resistance;
The first end of the second transistor connects the mode switching signal interface and by described by the 5th resistance
6th resistance eutral grounding, the second end ground connection of the second transistor, the second electricity described in the three-terminal link of the second transistor
The second of flat conversion chip sends to enable signaling interface and connect the first transmitting-receiving control signal by the 4th resistance and connect
Mouthful.
3. a kind of serial communication interface function switching circuit according to claim 1, it is characterised in that
First sending controling circuit includes third transistor, the 8th resistance, the 9th resistance, the tenth resistance;
The first end of the third transistor connects the mode switching signal interface and by described by the 9th resistance
Tenth resistance eutral grounding, the second end ground connection of the third transistor, the first electricity described in the three-terminal link of the third transistor
The first of flat conversion chip, which sends, to be enabled signaling interface and connects power supply by the 8th resistance;
First reception controls circuit to be a wire, and one end of the wire connects the mode switching signal interface, institute
The other end connection described first for stating wire receives enable signaling interface;
Described second, which receives control circuit, includes the 4th transistor, the 11st resistance, the 12nd resistance, the 13rd resistance, the tenth
Four resistance;
The first end of 4th transistor connects the first transmitting-receiving control signal interface simultaneously by the 13rd resistance
The mode switching signal interface is connected by the 13rd resistance and the 12nd resistance, the of the 4th transistor
One end is also by the 14th resistance eutral grounding, and the second end of the 4th transistor is grounded, and the 3rd of the 4th transistor the
End connection described second, which is received, to be enabled signaling interface and connects power supply by the 11st resistance;
Second sending controling circuit includes the 5th transistor, the 15th resistance, the 16th resistance, the 17th resistance, the tenth
Eight resistance;
The first end of 5th transistor connects the first transmitting-receiving control signal interface by the 17th resistance and led to
Cross the 18th resistance eutral grounding, the second end ground connection of the 5th transistor, the three-terminal link institute of the 5th transistor
The second of second electrical level conversion chip is stated to send enable signaling interface and connect the pattern switching by the 15th resistance
Signaling interface, the 3rd end of the 5th transistor also passes through the 15th resistance and the 16th resistance eutral grounding.
4. a kind of serial communication interface function switching circuit according to claim 1, it is characterised in that also received including the 3rd
Hair control circuit, the second transmitting-receiving control signal interface, the 3rd, which send, enables signaling interface;
The input of the 3rd transmitting-receiving control circuit connects the mode switching signal interface and the second transmitting-receiving control letter
Number interface, the output end connection the described 3rd of the 3rd transmitting-receiving control circuit, which is sent, enables signaling interface;
3rd sending controling circuit is used for according to the mode switching signal of input and the second transmitting-receiving control signal, output the 3rd
Send and enable signal to the 3rd transmission enable signaling interface of the 3rd electrical level transferring chip so that the 3rd electrical level transferring chip
The sending function enable for enabling signal to the 3rd electrical level transferring chip is sent according to the described 3rd.
5. a kind of serial communication interface function switching circuit according to claim 4, it is characterised in that
The 3rd transmitting-receiving control circuit includes the 6th transistor, the 19th resistance, the 20th resistance, the 21st resistance;
The first end of 6th transistor connects the mode switching signal interface by the 19th resistance and passes through institute
The 20th resistance connection the second transmitting-receiving control signal interface is stated, the second end connection described second of the 6th transistor is received
Control signal interface is sent out, the 3rd sends and enable signaling interface and by described the described in the three-terminal link of the 6th transistor
21 resistance eutral groundings.
6. a kind of serial communication interface function switching circuit according to claim 2 to 5 any one, it is characterised in that
The transistor is specially triode, and the first end of the transistor is specially the base stage of triode, the transistor
Second end is specially the emitter stage of triode, and the 3rd end of the transistor is specially the colelctor electrode of triode.
7. a kind of serial communication interface function switching circuit according to claim 2 to 5 any one, it is characterised in that
The transistor is specially metal-oxide-semiconductor, and the first end of the transistor is specially the grid of metal-oxide-semiconductor, and the of the transistor
Two ends are specially the source electrode of metal-oxide-semiconductor, and the 3rd end of the transistor is specially the drain electrode of metal-oxide-semiconductor.
8. a kind of serial communication interface function switching circuit according to claim 1, it is characterised in that
The serial communication interface function switching circuit also includes serial port insulating circuit, mode switching signal isolation circuit, first
Receive and dispatch control signal isolation circuit, power isolation circuit;
The serial port insulating circuit is electrically connected with corresponding electrical level transferring chip, for what is received to the serial port insulating circuit
Signal is isolated and is sent to electrical level transferring chip, and the signal that electrical level transferring chip is received is sent into serial port insulating circuit
And outwards isolate, the serial port insulating circuit includes Magnetic isolation module;
The VDD1 ends connection VIN input powers of the Magnetic isolation module, the OA ends of the Magnetic isolation module connect MCU RX ends,
The IB ends of the Magnetic isolation module connect the TX ends of the MCU and connect the VIN input powers by a resistance, the magnetic every
GND1 ends from module connect the earth terminal of the MCU, and the VDD2 ends of the Magnetic isolation module connect the serial communication interface
The power supply of function switching circuit, the IA ends of the Magnetic isolation module connect the ISO_RX ends of the corresponding electrical level transferring chip simultaneously
The power supply is connected by a resistance, the OB ends of the Magnetic isolation module connect the ISO_TX of the corresponding electrical level transferring chip
End, the GND2 ends of the Magnetic isolation module connect the earth terminal of the serial communication interface function switching circuit;
Described mode switching signal isolation circuit and described mode switching signal interface electrical connection, for being cut to the pattern
The signal that signal isolation circuit receives is changed to be isolated and sent to the mode switching signal interface, the pattern switching letter
Number isolation circuit includes the first light-coupled isolation chip;
The first end of first light-coupled isolation chip connects the input pattern switching signal interface end of the MCU by a resistance
And by a resistance eutral grounding, the second end of first light-coupled isolation chip is grounded, the 3rd of first light-coupled isolation chip the
The mode switching signal interface of the end connection serial communication interface function switching circuit, the of first light-coupled isolation chip
Four ends connect the power supply of the serial communication interface function switching circuit;
The first described transmitting-receiving control signal isolation circuit and the first described transmitting-receiving control signal interface electrical connection, for institute
The signal that the first transmitting-receiving control signal isolation circuit receives is stated to be isolated and be sent to the first described transmitting-receiving control signal
Interface, the first transmitting-receiving control signal isolation circuit includes the second light-coupled isolation chip;
The first input transmitting-receiving control signal that the first end of second light-coupled isolation chip connects the MCU by a resistance connects
Mouthful and by a resistance eutral grounding, the second end of second light-coupled isolation chip is grounded, the of second light-coupled isolation chip
First transmitting-receiving control signal interface of serial communication interface function switching circuit described in three-terminal link, the second light-coupled isolation core
4th end of piece connects the power supply of the serial communication interface function switching circuit;
The insulating power supply circuit and the electrical level transferring chip, mode switching signal isolation circuit, the first transmitting-receiving control signal
Isolation circuit is electrically connected, and the signal for being received to it carries out isolated from power, is the electrical level transferring chip, mode switching signal
Isolation circuit, the first transmitting-receiving control signal isolation circuit provide driving voltage.
9. a kind of serial communication interface function switching method, based on a kind of serial logical described in any one in claim 1 to 8
Communication interface function switching circuit is performed, it is characterised in that including:
First function switching method:
Control the mode switching signal interface for low level by the MCU, control the first transmitting-receiving control signal interface
For low level so that it is high level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first sends
Enable signaling interface is low level, and the second of the second electrical level conversion chip sends enable signaling interface for low level, described
It is low level that the second of second electrical level conversion chip, which receives and enable signaling interface,;
Second function switching method:
Control the mode switching signal interface for low level by the MCU, control the first transmitting-receiving control signal interface
For high level so that it is high level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first sends
Enable signaling interface is low level, and the second of the second electrical level conversion chip sends enable signaling interface for high level, described
It is high level that the second of second electrical level conversion chip, which receives and enable signaling interface,;
3rd function switching method:
Control the mode switching signal interface for high level by the MCU, control the first transmitting-receiving control signal interface
For low level so that it is low level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first sends
Enable signaling interface is high level, and the second of the second electrical level conversion chip sends enable signaling interface for low level, described
It is high level that the second of second electrical level conversion chip, which receives and enable signaling interface,;
4th function switching method:
Control the mode switching signal interface for high level by the MCU, control the first transmitting-receiving control signal interface
For high level so that it is low level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first sends
Enable signaling interface is high level, and the second of the second electrical level conversion chip sends enable signaling interface for low level, described
It is high level that the second of second electrical level conversion chip, which receives and enable signaling interface,.
10. a kind of serial communication interface function switching method according to claim 9, it is characterised in that first work(
Energy switching method also includes:Five-function switching submethod, the 6th function switching submethod;
The five-function switching submethod includes controlling the mode switching signal interface to be low level, control by the MCU
The first transmitting-receiving control signal interface is made to be low level, control the second transmitting-receiving control signal interface to be high level so that
It is high level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first, which sends enable signaling interface, is
Low level, the second of the second electrical level conversion chip sends enable signaling interface for low level, and the second electrical level changes core
It is low level that the second of piece, which receives and enable signaling interface, and the 3rd of the 3rd electrical level transferring chip, which sends enable signaling interface, is
High level;
The 6th function switching submethod includes controlling the mode switching signal interface to be low level, control by the MCU
The first transmitting-receiving control signal interface is made to be low level, control the second transmitting-receiving control signal interface to be low level so that
It is high level that the first of first electrical level transferring chip, which receives and enable signaling interface, and described first, which sends enable signaling interface, is
Low level, the second of the second electrical level conversion chip sends enable signaling interface for low level, and the second electrical level changes core
It is low level that the second of piece, which receives and enable signaling interface, and the 3rd of the 3rd electrical level transferring chip, which sends enable signaling interface, is
Low level.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710175335.0A CN107070445B (en) | 2017-03-22 | 2017-03-22 | Serial communication interface function switching circuit and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710175335.0A CN107070445B (en) | 2017-03-22 | 2017-03-22 | Serial communication interface function switching circuit and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107070445A true CN107070445A (en) | 2017-08-18 |
CN107070445B CN107070445B (en) | 2023-05-12 |
Family
ID=59620062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710175335.0A Active CN107070445B (en) | 2017-03-22 | 2017-03-22 | Serial communication interface function switching circuit and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107070445B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107948034A (en) * | 2017-11-23 | 2018-04-20 | 安徽鑫绿源电子科技有限公司 | One kind is based on RS485 bus communication terminal systems |
CN108182166A (en) * | 2018-01-25 | 2018-06-19 | 深圳市朗仁科技有限公司 | Serial ports channel selection circuit and with its vehicular data acquisition box |
CN109557859A (en) * | 2018-12-13 | 2019-04-02 | 珠海派诺科技股份有限公司 | Simple general use circuit based on RS-485 communication |
CN110059044A (en) * | 2019-03-13 | 2019-07-26 | 深圳和而泰家居在线网络科技有限公司 | Serial ports switching method and system |
CN111835378A (en) * | 2020-06-08 | 2020-10-27 | 珠海格力电器股份有限公司 | Communication type switching circuit and method and air conditioning equipment |
CN113918389A (en) * | 2021-12-15 | 2022-01-11 | 苏州浪潮智能科技有限公司 | double-Flash switching device and server |
CN114371774A (en) * | 2021-11-30 | 2022-04-19 | 西安航空学院 | RS232 interface protection circuit with isolation function |
CN116149758A (en) * | 2023-04-18 | 2023-05-23 | 深圳魔视智能科技有限公司 | Chip starting configuration system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102545875A (en) * | 2011-11-29 | 2012-07-04 | 福建三元达软件有限公司 | Level identification switching circuit |
US20120246366A1 (en) * | 2011-03-21 | 2012-09-27 | Hon Hai Precision Industry Co., Ltd. | Serial port remote control circuit |
CN102708823A (en) * | 2012-06-01 | 2012-10-03 | 天马微电子股份有限公司 | Automatic switching circuit for RS232 interface and RS485 interface and serial port liquid crystal display module |
CN206820735U (en) * | 2017-03-22 | 2017-12-29 | 广州致远电子股份有限公司 | A kind of serial communication interface function switch circuit |
-
2017
- 2017-03-22 CN CN201710175335.0A patent/CN107070445B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120246366A1 (en) * | 2011-03-21 | 2012-09-27 | Hon Hai Precision Industry Co., Ltd. | Serial port remote control circuit |
CN102545875A (en) * | 2011-11-29 | 2012-07-04 | 福建三元达软件有限公司 | Level identification switching circuit |
CN102708823A (en) * | 2012-06-01 | 2012-10-03 | 天马微电子股份有限公司 | Automatic switching circuit for RS232 interface and RS485 interface and serial port liquid crystal display module |
CN206820735U (en) * | 2017-03-22 | 2017-12-29 | 广州致远电子股份有限公司 | A kind of serial communication interface function switch circuit |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107948034A (en) * | 2017-11-23 | 2018-04-20 | 安徽鑫绿源电子科技有限公司 | One kind is based on RS485 bus communication terminal systems |
CN108182166A (en) * | 2018-01-25 | 2018-06-19 | 深圳市朗仁科技有限公司 | Serial ports channel selection circuit and with its vehicular data acquisition box |
CN109557859A (en) * | 2018-12-13 | 2019-04-02 | 珠海派诺科技股份有限公司 | Simple general use circuit based on RS-485 communication |
CN110059044A (en) * | 2019-03-13 | 2019-07-26 | 深圳和而泰家居在线网络科技有限公司 | Serial ports switching method and system |
CN110059044B (en) * | 2019-03-13 | 2023-08-25 | 深圳数联天下智能科技有限公司 | Serial port switching method and system |
CN111835378A (en) * | 2020-06-08 | 2020-10-27 | 珠海格力电器股份有限公司 | Communication type switching circuit and method and air conditioning equipment |
CN111835378B (en) * | 2020-06-08 | 2024-03-08 | 珠海格力电器股份有限公司 | Communication type switching circuit and method and air conditioning equipment |
CN114371774A (en) * | 2021-11-30 | 2022-04-19 | 西安航空学院 | RS232 interface protection circuit with isolation function |
CN113918389A (en) * | 2021-12-15 | 2022-01-11 | 苏州浪潮智能科技有限公司 | double-Flash switching device and server |
CN116149758A (en) * | 2023-04-18 | 2023-05-23 | 深圳魔视智能科技有限公司 | Chip starting configuration system |
CN116149758B (en) * | 2023-04-18 | 2023-07-28 | 深圳魔视智能科技有限公司 | Chip starting configuration system |
Also Published As
Publication number | Publication date |
---|---|
CN107070445B (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107070445A (en) | A kind of serial communication interface function switching circuit and method | |
CN206820735U (en) | A kind of serial communication interface function switch circuit | |
CN204965418U (en) | Novel RS -485 interface drive circuit | |
CN106941349A (en) | A kind of low delay optical coupling isolation circuit and RS485 isolate telecommunication circuit | |
JP2003505921A (en) | Electrical isolator with optocoupler for bidirectional connection lines | |
CN103853689A (en) | Device and method of automatic switchover of USB (Universal Serial Bus) and four-line serial port UART (Universal Asynchronous Receiver Transmitter) | |
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 | |
CN105898493A (en) | Asynchronous receiver transmitter and USB interface multiplexing circuit and circuit board | |
CN105721059B (en) | Profibus-DP photoelectric signal transformation systems | |
CN107908584B (en) | Multi-path RS-485 communication network | |
CN205788168U (en) | Master-slave mode serial equipment hub | |
CN213042273U (en) | Circuit for converting two-wire system serial bus interface into single-wire half-duplex bus interface | |
CN206835123U (en) | A kind of RS485 automatic receiving-transmitting switching circuits | |
CN207232946U (en) | A kind of novel multi-interface multiplexer based on RJ45 | |
CN112052212B (en) | RS485 communication flow control isolation circuit | |
CN110034989A (en) | CAN transmission circuit and CAN communication system | |
CN103268300B (en) | A kind of serial interface circuit of serial communication management server | |
CN206178798U (en) | Serial port communication expanding unit | |
CN209447019U (en) | RS485 equipment connects circuit and system | |
CN205091733U (en) | Communication interface conversion device | |
CN207637147U (en) | It is a kind of based on one Uart mouthfuls of multichannel RS485 interface communication circuitries | |
CN208079287U (en) | A kind of communication manager | |
CN107122319A (en) | One kind communication multiplex circuit | |
CN202058138U (en) | Serial data interface multiplexing device | |
CN208110327U (en) | A kind of general CAN communication control module of power supply |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |