[go: up one dir, main page]

CN113806272B - Circuit supporting serial port hot plug, control method and electronic equipment - Google Patents

Circuit supporting serial port hot plug, control method and electronic equipment Download PDF

Info

Publication number
CN113806272B
CN113806272B CN202111220713.5A CN202111220713A CN113806272B CN 113806272 B CN113806272 B CN 113806272B CN 202111220713 A CN202111220713 A CN 202111220713A CN 113806272 B CN113806272 B CN 113806272B
Authority
CN
China
Prior art keywords
serial port
pin
module
signal
main control
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.)
Active
Application number
CN202111220713.5A
Other languages
Chinese (zh)
Other versions
CN113806272A (en
Inventor
李友峰
王江
韩威巍
冉杰
张友近
沈文钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202111220713.5A priority Critical patent/CN113806272B/en
Publication of CN113806272A publication Critical patent/CN113806272A/en
Application granted granted Critical
Publication of CN113806272B publication Critical patent/CN113806272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Details Of Connecting Devices For Male And Female Coupling (AREA)

Abstract

The invention discloses a circuit supporting serial port hot plug, a control method and electronic equipment, wherein the circuit supporting serial port hot plug comprises: the device comprises a main control module, a serial port detection module and a switch module; the serial port detection module is connected with the main control module and is used for detecting whether a serial port plug is inserted into the main control module and outputting a detection signal to the main control module; the main control module is respectively connected with the serial port detection module and the switch module and is used for outputting a first control signal to the switch module according to the detection signal output by the detection module; the main control module is also used for delaying the preset time to output a first control signal to the switch module when detecting that the serial port plug is inserted; the switch module is connected with the main control module and the serial port detection module respectively and is used for controlling whether the main control module and the serial port detection module carry out serial port communication or not according to a first control signal output by the main control module. The invention reduces the correction time length of the tool equipment with the UART serial port when correcting the white balance of the television, and improves the production efficiency of the production line.

Description

Circuit supporting serial port hot plug, control method and electronic equipment
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a circuit supporting serial hot plug, a control method, and an electronic device.
Background
Because UART protocol does not support hot plug, when using the tooling equipment with asynchronous transceiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) serial port to correct the automatic white balance of the television, if the serial port plug is inserted into the serial port in the power-on state of the television, noise generated by the signal line will interfere the system at the moment of inserting the serial port plug, causing software logic error, thereby causing the failure of correcting the white balance. In order to avoid the above-mentioned problems, it is generally required to insert the serial port plug of the tool device into the serial port under the condition that the television is powered off, and then power up the television. However, the method of inserting the serial port plug of the tooling device into the serial port and powering on the television set can make the whole white balance correction process longer, resulting in reduced production efficiency.
Accordingly, the prior art is still in need of improvement and development.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention aims to provide a circuit, a control method and an electronic device for supporting serial port hot plug, so as to solve the problem of lower production efficiency caused by longer correction process time when a tooling device with an asynchronous transceiver serial port corrects an automatic white balance of a television.
The technical scheme of the invention is as follows:
a circuit supporting serial hot plug, comprising: the device comprises a main control module, a serial port detection module and a switch module;
The serial port detection module is connected with the main control module and is used for detecting whether a serial port plug is inserted into the main control module or not and outputting a detection signal to the main control module;
The main control module is respectively connected with the serial port detection module and the switch module, and is used for outputting a first control signal to the switch module according to the detection signal output by the serial port detection module; the main control module is further used for delaying a preset time to output the first control signal to the switch module when the insertion of the serial port plug is detected;
The switch module is respectively connected with the main control module and the serial port detection module, and is used for controlling whether the main control module and the serial port detection module carry out serial port communication according to a first control signal output by the main control module.
In the above technical scheme, whether a serial port plug is inserted into a serial port or not is detected by the serial port detection module, and a detection signal is output to the main control module, if no serial port plug is detected to be inserted into the serial port, the main control module outputs a first control signal to the switch module, and the switch module is in an off state, so that serial port communication is not performed between the main control module and the serial port detection module. When the serial port detection module detects that a serial port plug is inserted into a serial port, a first control signal is output to the switch module after the main control module delays for a preset time, and the switch module is in a conducting state, so that serial port communication can be carried out between the main control module and the serial port detection module, a serial port data line can be opened after the serial port data line is delayed, the situation that the serial port plug is inserted into the serial port is avoided, clutter on the signal line interferes with a system, and when tool equipment with a UART serial port carries out automatic white balance correction on a television, the serial port plug of the tool equipment can be inserted into the serial port without the need of the television in a power-off state, so that correction time is shortened, and production efficiency of a production line is improved.
The main control module of the invention further comprises: the control chip is provided with a detection pin, a signal sending pin, a signal receiving pin and a power switch pin;
the detection pin is connected with the serial port detection module and is used for judging whether a serial port plug is inserted or not according to a detection signal sent by the serial port detection module;
The signal sending pin and the signal receiving pin are respectively connected with the switch module, and the signal sending pin is used for sending and receiving signals;
The power switch pin is connected with the switch module and is used for controlling whether the serial port detection module and the main control module carry out serial port communication.
In a further arrangement of the present invention, the serial port detection module includes: an asynchronous transceiver interface unit, a first resistor and a second resistor; wherein,
The asynchronous receiving and transmitting transmitter interface unit is provided with a grounding pin, a detecting pin, a signal sending pin and a signal receiving pin; the grounding pin is grounded, the detection pin is connected with one end of the first resistor, and the signal sending pin and the signal receiving pin are respectively connected with the switch module;
The other end of the first resistor is connected with the detection pin of the control chip and one end of the second resistor respectively;
the other end of the second resistor is connected with a first power supply.
Further, the switch module of the present invention includes: a first switch unit and a second switch unit;
The first switch unit is respectively connected with the power switch pin of the control chip and the second switch unit, and is used for outputting a second control signal to control the on-off of the second switch unit according to a first control signal output by the control chip;
The second switch unit is further connected with the signal transmitting pin and the signal receiving pin of the control chip and the signal transmitting pin and the signal receiving pin of the asynchronous receiving and transmitting transmitter interface unit respectively, and the second switch unit is used for controlling whether the main control module is in serial port communication with the serial port detection module according to a second control signal output by the first switch unit.
Further, according to the present invention, the first switching unit includes: the third resistor, the fourth resistor, the fifth resistor, the first capacitor and the first triode; wherein,
One end of the third resistor is connected with a power switch pin of the control chip, and the other end of the third resistor is connected with a base electrode of the first triode;
one end of the fourth resistor is connected with the base electrode of the first triode, and the other end of the fourth resistor is connected with the first power supply;
The collector of the first triode is respectively connected with one end of the fifth resistor and the second switch unit, and the emitter of the first triode is grounded;
The other end of the fifth resistor is connected with a second power supply;
One end of the first capacitor is connected with the collector electrode of the first triode and the second switch unit respectively, and the other end of the first capacitor is connected with the emitter electrode of the first triode.
Further, the second switch unit includes: the switching device comprises a first switching tube, a second switching tube, a third switching tube and a fourth switching tube; wherein,
The first end of the first switching tube is connected with the first end of the second switching tube, the second end of the first switching tube is connected with the signal receiving pin of the control chip, the second end of the second switching tube is connected with the signal receiving pin of the serial port unit of the asynchronous receiving and transmitting transmitter, and the control ends of the first switching tube and the second switching tube are connected with the first switching unit;
The first end of the third switching tube is connected with the first end of the fourth switching tube, the second end of the third switching tube is connected with the signal sending pin of the control chip, the second end of the fourth switching tube is connected with the signal sending pin of the serial port unit of the asynchronous receiving and transmitting transmitter, and the control end of the third switching tube is connected with the control end of the fourth switching tube and the first switching unit.
According to the invention, the base electrode of the first triode is saturated and conducted when being connected with a high-level signal, and the base electrode of the first triode is cut off when being connected with a low-level signal.
According to the invention, the control ends of the first switching tube, the second switching tube, the third switching tube and the fourth switching tube are connected with high-level signals, and the control ends of the first switching tube, the second switching tube, the third switching tube and the fourth switching tube are connected with low-level signals.
Based on the same inventive concept, the invention also provides a control method of the circuit supporting serial port hot plug, which is applied to electronic equipment and comprises the following steps:
detecting whether a serial port plug is inserted after the electronic equipment is electrified;
If the serial port plug is detected to be inserted, serial port communication is performed after a delay is performed for a preset time.
In the technical scheme, after the equipment is electrified, whether the serial port plug of the tool equipment is inserted into the serial port is detected, if the serial port plug is detected to be inserted into the serial port, serial port communication is performed after a certain time delay, so that a serial port data line is opened after a certain time delay, interference of clutter of a signal line caused by insertion of the serial port plug (serial port line) on a system is eliminated, when the tool equipment with the UART serial port is used for carrying out automatic white balance correction on the equipment (such as a television and the like), the serial port plug of the tool equipment can be inserted into the serial port without the equipment in a power-off state, the correction duration is shortened, and the production efficiency of a production line is improved.
Based on the same inventive concept, the present invention also provides an electronic device, comprising:
A circuit board; and
The circuit supporting serial port hot plug is arranged on the circuit board.
In the technical scheme, after equipment is electrified, whether a serial port plug of tool equipment is inserted into a serial port is detected, if the serial port plug is detected to be inserted into the serial port, serial port communication is performed after a certain time delay, so that a serial port data line is opened after a certain time delay, interference to a system caused by clutters of the signal line in the moment of inserting the serial port plug is eliminated, automatic white balance correction is performed on equipment (such as a television) by the tool equipment with a UART serial port, the serial port plug of the tool equipment can be inserted into the serial port without the equipment in a power-off state, correction time is shortened, and production efficiency of a production line is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained from the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a functional block diagram of a circuit supporting serial hot plug in the present invention.
FIG. 2 is a schematic circuit diagram of a circuit supporting serial hot plug in the present invention.
Fig. 3 is a flow chart of a control method supporting serial hot plug in the present invention.
Fig. 4 is a schematic diagram of a control flow of a television supporting serial hot plug.
The marks in the drawings are as follows: 100. the serial port detection module; 200. a main control module; 300. a switch module; 301. a first switching unit; 302. and a second switching unit.
Detailed Description
The invention provides a circuit supporting serial port hot plug, a control method and electronic equipment, and aims to make the purposes, technical schemes and effects of the invention clearer and more definite. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the description and claims, unless the context specifically defines the terms "a," "an," "the," and "the" include plural referents. If there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature.
It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Referring to fig. 1 and fig. 2, the present invention provides a circuit for supporting serial hot plug.
The circuit supporting serial port hot plug is applied to electronic equipment with USRT serial ports, such as electronic equipment of televisions, set top boxes, DVDs and the like. The electronic equipment is provided with a circuit board, and the circuit supporting serial port hot plug is arranged on the circuit board.
As shown in fig. 1, in some embodiments, the circuit supporting serial hot plug includes: the serial port detection module 100, the main control module 200 and the switch module 300; the serial port detection module 100 is connected with the main control module 200, and the serial port detection module 100 is configured to detect whether a serial port plug is inserted into the main control module 200 and output a detection signal to the main control module 200; the main control module 200 is respectively connected with the serial port detection module 100 and the switch module 300, and the main control module 200 is configured to output a first control signal to the switch module 300 according to a detection signal output by the serial port detection module 100; wherein, the main control module 200 delays the preset time to output the first control signal to the switch module 300 when detecting that the serial plug is inserted; the switch module 300 is respectively connected with the main control module 200 and the serial port detection module 100, and the switch module 300 is configured to control whether the main control module 200 and the serial port detection module 100 perform serial port communication according to a first control signal output by the main control module 200.
Specifically, when the electronic device is powered on, the serial port detection module 100 is used to detect whether a serial port plug is plugged into a serial port and output a detection signal to the main control module 200, and if no serial port plug is plugged into the serial port, the main control module 200 outputs a first control signal to the switch module 300 and enables the switch module 300 to be in an off state, so that serial port communication is not performed between the main control module 200 and the serial port detection module 100. When the serial port detection module 100 detects that a serial port plug is inserted into a serial port, a first control signal is output to the switch module 300 after the serial port detection module 100 delays for a preset time, and the switch module 300 is in a conducting state, so that serial port communication can be performed between the serial port detection module 100 and the main control module 200, a serial port data line can be opened after the serial port data line is delayed, the situation that the serial port plug is inserted into the serial port is avoided, clutter on the signal line interferes with a system, and when tool equipment with a UART serial port carries out automatic white balance correction on a television, the serial port plug of the tool equipment can be inserted into the serial port without the need of the television in a power-off state, so that correction time is shortened, and production efficiency of a production line is improved.
Referring to fig. 2, in a further implementation of an embodiment, the main control module 200 includes: the control chip U1, the control chip U1 has detecting pin HP_DET, signal sending pin P_TX, signal receiving pin P_RX and power switch pin SW; the detection pin hp_det is connected with the serial port detection module 100, and the detection pin hp_det is configured to determine whether a serial port plug is inserted according to a detection signal sent by the serial port detection module 100; the signal sending pin p_tx and the signal receiving pin p_rx are respectively connected with the switch module 300, and the signal sending pin p_tx is used for sending and receiving signals; the power switch pin SW is connected to the switch module 300, and the power switch pin SW is used for controlling whether the serial port detection module 100 and the main control module 200 perform serial port communication.
Specifically, the signal transmitting pin p_tx and the signal receiving pin p_rx are used for implementing signal transceiving. The detection pin hp_det is configured to determine whether a serial plug is inserted according to a detection signal output by the serial detection module 100, if the detection signal is at a high level, the detection pin hp_det is at a high level, which indicates that no serial plug is inserted at this time, and the first control signal output by the power switch pin SW is also at a high level, where the switch module 300 is in an off state. If the detection signal is at a low level, the detection pin hp_det is at a low level, and at this time, the first control signal output by the power switch pin SW is also at a low level, so that the switch module 300 is turned on, and the serial data line is turned on after being delayed, so that the control chip U1 sets the first control signal of the power switch pin SW from a high level to a low level after delaying for a preset time, for example, the preset time may be set to 100ms, and of course, the delay time may also be set to other time periods according to the actual time. It can be understood that the time for powering up the device after the serial plug is inserted is much less than 100ms when the device is powered off, so that the white balance correction speed can be greatly improved, and the production efficiency of the production line can be improved. In one implementation, the model of the control chip U1 may be, but is not limited to, SC1408AJ1.
With continued reference to fig. 2, in a further implementation of an embodiment, the serial port detection module 100 includes: the UART interface unit J1, a first resistor R1 and a second resistor R2; the UART interface unit J1 has a ground pin (1 st pin), a detection pin (2 nd pin), a signal transmission pin (3 rd pin), and a signal reception pin (4 th pin); the grounding pin is grounded, the detection pin is connected with one end of the first resistor R1, and the signal sending pin and the signal receiving pin are respectively connected with the switch module 300; the other end of the first resistor R1 is connected with the detection pin HP_DET of the control chip U1 and one end of the second resistor R2 respectively; the other end of the second resistor R2 is connected to a first power supply SUB1, where the power supply voltage of the first power supply SUB1 may be 3.3V.
Specifically, the UART interface unit J1 has a ground pin (1 st pin), a detection pin (2 nd pin), a signal transmission pin (3 rd pin) and a signal reception pin (4 th pin), the detection pin of the UART interface unit J1 corresponds to the detection pin hp_det of the control chip U1, the signal transmission pin of the UART interface unit J1 corresponds to the signal transmission pin p_tx of the control chip U1, and the signal reception pin of the UART interface unit J1 corresponds to the signal reception pin p_rx of the control chip U1. The grounding pin of the UART interface unit J1 is grounded.
Then, when the UART interface unit J1 has no serial port plug inserted, the ground pin of the UART interface unit J1 is separated from the detection pin, the detection pin hp_det of the control chip U1 is pulled to a high level by the second resistor R2, that is, the serial port detection module 100 outputs a high level detection signal to the control chip U1, at this time, the power switch pin SW of the control chip U1 is pulled to a high level, that is, the first control signal output by the power switch pin SW of the control chip U1 is a high level signal, at this time, the switch module 300 is in an off state, so that the signal transmitting pin p_tx of the control chip U1 cannot transmit a signal to the UART interface unit J1, and at the same time, the signal receiving pin p_rx of the control chip U1 cannot receive a signal transmitted by the UART interface unit J1, so that the signal transmitting pin p_tx and the signal receiving pin p_rx of the control chip U1 are turned off.
When the UART interface unit J1 has a serial port plug inserted therein, the ground pin and the detection pin of the UART interface unit J1 are pressed together by the internal mechanical spring plate, so that the detection pin is connected to the ground end, and the detection pin hp_det of the control chip U1 is pulled down to a low level, that is, the detection signal output by the serial port detection module 100 is a low level signal at this time, and the switch power pin SW is set from a high level to a low level signal after a preset time delay under the control of the control chip U1, and the switch module 300 is in a conductive state at this time, so that the signal transmitting pin p_tx of the control chip U1 can transmit signals to the UART interface unit J1, and meanwhile, the signal receiving pin p_rx of the control chip U1 can also receive signals transmitted by the UART interface unit J1, and the control chip U1 can perform serial port communication with the serial port detection module 100, and achieve the purpose of opening the data line after delay, so as to achieve the purpose of eliminating noise on the signal line when the serial port line is inserted in an instant.
With continued reference to fig. 2, in a further implementation of an embodiment, the switch module 300 includes: a first switching unit 301 and a second switching unit 302; the first switch unit 301 is connected to the power switch pin SW of the control chip U1 and the second switch unit 302, respectively, where the first switch unit 301 is configured to output a second control signal according to a first control signal output by the control chip U1 to control on/off of the second switch unit 302; the second switch unit 302 is further connected to the signal transmitting pin and the signal receiving pin p_rx of the control chip U1 and the signal transmitting pin and the signal receiving pin of the UART interface unit J1, respectively, and the second switch unit 302 is configured to control whether the control chip U1 and the UART interface unit J1 perform serial port communication according to a second control signal output by the first switch unit 301.
Specifically, the first control signal output by the control chip U1 controls the on/off of the first switch unit 301, the first switch unit 301 controls the on/off of the second switch unit 302 by outputting a second control signal, and whether serial communication is performed between the control chip U1 and the serial detection module 100 is controlled by the on/off of the second switch unit 302. When the first control signal is a high level signal, the first switch unit 301 is in an on state, and the second control signal is a low level signal, at this time, the second switch unit 302 is in an off state, and the control chip U1 and the UART interface unit J1 cannot perform serial port communication. When the first control signal is a low level signal, the first switch unit 301 is in an off state, and the second control signal is a high level signal, and at this time, the second switch unit 302 is in an on state, and the control chip U1 and the UART interface unit J1 may perform serial port communication.
With continued reference to fig. 2, in a further implementation of an embodiment, the first switching unit 301 includes: the third resistor R3, the fourth resistor R4, the fifth resistor R5, the first capacitor C1 and the first triode Q1; one end of the third resistor R3 is connected with the power switch pin SW of the control chip U1, and the other end of the third resistor R3 is connected with the base electrode of the first triode Q1; one end of the fourth resistor R4 is connected with the base electrode of the first triode Q1, and the other end of the fourth resistor R4 is connected with the first power supply SUB1; the collector of the first triode Q1 is respectively connected with one end of the fifth resistor R5 and the second switching unit 302, and the emitter of the first triode Q1 is grounded; the other end of the fifth resistor R5 is connected with a second power supply SUB2, wherein the power supply voltage of the second power supply SUB2 is 12V; one end of the first capacitor C1 is connected to the collector of the first triode Q1 and the second switching unit 302, and the other end of the first capacitor C1 is connected to the emitter of the first triode Q1.
Specifically, when the first control signal output by the power switch pin SW of the control chip U1 is a high level signal, the base of the first triode Q1 is pulled up by the fourth resistor R4, the emitter of the first triode Q1 is forward biased, the first triode Q1 is turned on and saturated, and the collector of the first triode Q1 outputs a low level signal, so that the second switching unit 302 is in an off state. When the first control signal output by the power switch pin SW of the control chip U1 is a low level signal, the emitter of the first triode Q1 is reversely biased, the first triode Q1 is turned off, and the collector of the first triode Q1 outputs a high level signal, so that the second switch unit 302 is in a conducting state. The third resistor R3 is a current limiting resistor, the first capacitor C1 is a filter capacitor, and the first triode Q1 is an NPN triode.
In a further implementation of an embodiment, the second switching unit 302 includes: the switching device comprises a first switching tube, a second switching tube, a third switching tube and a fourth switching tube. The first end of the first switching tube is connected with the first end of the second switching tube, the second end of the first switching tube is connected with the signal receiving pin of the control chip, the second end of the second switching tube is connected with the signal receiving pin of the serial port unit of the asynchronous receiving and transmitting transmitter, and the control ends of the first switching tube and the second switching tube are connected with the first switching unit; the first end of the third switching tube is connected with the first end of the fourth switching tube, the second end of the third switching tube is connected with the signal sending pin of the control chip, the second end of the fourth switching tube is connected with the signal sending pin of the serial port unit of the asynchronous receiving and transmitting transmitter, and the control end of the third switching tube is connected with the control end of the fourth switching tube and the first switching unit.
Specifically, the control ends of the first switching tube, the second switching tube, the third switching tube and the fourth switching tube are connected when being connected with a high-level signal, and the control ends of the first switching tube, the second switching tube, the third switching tube and the fourth switching tube are connected when being connected with a low-level signal.
In some embodiments, the first switching tube is a first MOS tube Q2, the second switching tube is a second MOS tube Q3, the third switching tube is a third MOS tube Q4, and the fourth switching tube is a fourth MOS tube Q5; the source electrode of the first MOS transistor Q2 is connected with the source electrode of the second MOS transistor Q3, the drain electrode of the first MOS transistor Q2 is connected with the signal receiving pin p_rx of the control chip U1, the drain electrode of the second MOS transistor Q3 is connected with the signal receiving pin of the UART serial port unit, and the gates of the first MOS transistor Q2 and the second MOS transistor Q3 are connected with the first switch unit 301; the source electrode of the third MOS transistor Q4 is connected to the source electrode of the fourth MOS transistor, the drain electrode of the third MOS transistor Q4 is connected to the signal transmission pin p_tx of the control chip U1, the drain electrode of the fourth MOS transistor Q5 is connected to the signal transmission pin of the UART serial port unit J1, and the gate electrodes of the third MOS transistor Q4 and the fourth MOS transistor Q5 are connected to the first switch unit 301.
Specifically, the first MOS transistor Q2, the second MOS transistor Q3, the third MOS transistor Q4, and the fourth MOS transistor Q5 are all enhancement NPN type MOS transistors. Two MOS tubes are respectively and relatively connected between the signal receiving pin P_RX of the control chip U1 and the signal receiving pin of the UART interface unit J1, and between the signal transmitting pin P_TX of the control chip U1 and the signal transmitting pin of the UART interface unit J1, when the first MOS tube Q2, the second MOS tube Q3, the third MOS tube Q4 and the fourth MOS tube Q5 are all cut off, complete isolation can be realized, the moment that a serial port plug is inserted into a serial port is avoided, and clutter on a signal line interferes with a system.
The gates of the first MOS transistor Q2, the second MOS transistor Q3, the third MOS transistor Q4, and the fourth MOS transistor Q5 are all connected to the collector of the first triode Q1, and are controlled by a level signal output by the collector of the first triode Q1. When the first triode Q1 is saturated and turned on, the collector of the first triode Q1 outputs a low-level signal, that is, it is detected that no serial port plug is inserted into the serial port, and when the second control signal is a low-level signal, the first MOS tube Q2, the second MOS tube Q3, the third MOS tube Q4 and the fourth MOS tube Q5 are all turned off, and serial port communication cannot be performed between the control chip U1 and the UART interface unit J1. When the first triode Q1 is turned off, the collector of the first triode Q1 outputs a high-level signal, that is, it is detected that no serial port plug is inserted into the serial port, and when the second control signal is a high-level signal, the first MOS tube Q2, the second MOS tube Q3, the third MOS tube Q4 and the fourth MOS tube Q5 are all turned off, and serial port communication can be performed between the control chip U1 and the UART interface unit J1.
Further, when the serial port plug of the UART interface unit J1 is pulled out, the grounding pin and the detecting pin of the UART interface unit J1 are pulled out by the mechanical elastic sheet, the detecting pin of the UART interface unit J1 is pulled to a high level by the second resistor R2 again, and no serial port plug is judged to be connected at this time, so that the power switch pin SW of the control chip U1 is set to a high level signal, the first triode Q1 is saturated and turned on, the collector of the first triode Q1 outputs a low level signal, that is, the second control signal is a low level signal, the first MOS tube Q2, the second MOS tube Q3, the third MOS tube Q4 and the fourth MOS tube Q5 are all turned off, and serial port communication cannot be performed between the control chip U1 and the UART interface unit J1.
Referring to fig. 3, in some embodiments, the present invention further provides a method for controlling a circuit supporting serial hot plug, which is applied to an electronic device, and includes the steps of:
s100, detecting whether a serial port plug is inserted after the electronic equipment is electrified; in particular, a circuit supporting serial hot plug is described, and will not be described herein.
S200, if the serial port plug insertion is detected, serial port communication is performed after delay for a preset time. In particular, a circuit supporting serial hot plug is described, and will not be described herein.
In order to better understand the present invention, the following describes the above method by taking a television set as an example.
Referring to fig. 4 in combination with fig. 2, after the television is powered on, it is determined whether a serial port plug is inserted into a UART serial port, if yes, the switch power pin of the control chip U1 is set from a high level to a low level after a delay of 100ms, so that the first triode Q1 is turned off, and the first MOS transistor Q2, the second MOS transistor Q3, the third MOS transistor Q4 and the fourth MOS transistor Q5 are turned on, so that serial port communication can be performed between the control chip U1 and the UART interface unit J1. If no detection side is found and a serial port plug is inserted into the serial port, the power switch pin SW of the control chip U1 is set to be at a high level, so that the first triode Q1 is conducted, and the first MOS tube Q2, the second MOS tube Q3, the third MOS tube Q4 and the fourth MOS tube Q5 are cut off, so that serial port communication between the control chip U1 and the UART interface unit J1 is not possible. When serial communication is carried out between the control chip U1 and the UART interface unit J1, whether a serial plug is pulled out or not is synchronously detected, if yes, whether the serial plug is inserted again is further judged, the previous detection process is repeated, if no serial plug is detected to be pulled out when serial communication is carried out between the control chip U1 and the UART interface unit J1, real-time detection is carried out, and therefore whether the serial plug is inserted into the serial port or not can be detected in real time, automatic white balance correction can be carried out on the television by using tool equipment with the UART serial port without power failure of the television, and the production efficiency of a production line is greatly improved.
In some embodiments, the present invention also provides an electronic device, comprising: the circuit board and the circuit which is arranged on the circuit board and supports serial port hot plug are arranged on the circuit board. In particular, a circuit supporting serial hot plug is described, and will not be described herein.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.

Claims (9)

1. A circuit for supporting serial hot plug, comprising: the device comprises a serial port detection module, a main control module and a switch module;
The main control module comprises: the control chip is provided with a detection pin, a signal sending pin, a signal receiving pin and a power switch pin;
the detection pin is connected with the serial port detection module and is used for judging whether a serial port plug is inserted or not according to a detection signal sent by the serial port detection module;
The signal sending pin and the signal receiving pin are respectively connected with the switch module and are used for sending and receiving signals;
the power switch pin is connected with the switch module and is used for controlling whether the serial port detection module and the main control module carry out serial port communication or not;
The serial port detection module is connected with the main control module and is used for detecting whether a serial port plug is inserted into the main control module or not and outputting a detection signal to the main control module;
The main control module is respectively connected with the serial port detection module and the switch module, and is used for outputting a first control signal to the switch module according to the detection signal output by the serial port detection module; the main control module is further used for delaying a preset time to output the first control signal to the switch module when the insertion of the serial port plug is detected;
The switch module is respectively connected with the main control module and the serial port detection module, and is used for controlling whether serial port communication is carried out between the main control module and the serial port detection module according to a first control signal output by the main control module;
If the serial port detection module detects that no serial port plug is inserted into the serial port, the main control module outputs a first control signal to the switch module and enables the switch module to be in a disconnection state, so that serial port communication can not be carried out between the main control module and the serial port detection module.
2. The circuit for supporting serial hot plug according to claim 1, wherein the serial port detection module comprises: an asynchronous transceiver interface unit, a first resistor and a second resistor; wherein,
The asynchronous receiving and transmitting transmitter interface unit is provided with a grounding pin, a detecting pin, a signal sending pin and a signal receiving pin; the grounding pin is grounded, the detection pin is connected with one end of the first resistor, and the signal sending pin and the signal receiving pin are respectively connected with the switch module;
The other end of the first resistor is connected with the detection pin of the control chip and one end of the second resistor respectively;
the other end of the second resistor is connected with a first power supply.
3. The circuit of claim 2, wherein the switch module comprises: a first switch unit and a second switch unit;
The first switch unit is respectively connected with the power switch pin of the control chip and the second switch unit, and is used for outputting a second control signal to control the on-off of the second switch unit according to a first control signal output by the control chip;
The second switch unit is further connected with the signal transmitting pin and the signal receiving pin of the control chip and the signal transmitting pin and the signal receiving pin of the asynchronous receiving and transmitting transmitter interface unit respectively, and the second switch unit is used for controlling whether the main control module is in serial port communication with the serial port detection module according to a second control signal output by the first switch unit.
4. The circuit of claim 3, wherein the first switching unit comprises: the third resistor, the fourth resistor, the fifth resistor, the first capacitor and the first triode; wherein,
One end of the third resistor is connected with a power switch pin of the control chip, and the other end of the third resistor is connected with a base electrode of the first triode;
one end of the fourth resistor is connected with the base electrode of the first triode, and the other end of the fourth resistor is connected with the first power supply;
The collector of the first triode is respectively connected with one end of the fifth resistor and the second switch unit, and the emitter of the first triode is grounded;
The other end of the fifth resistor is connected with a second power supply;
One end of the first capacitor is connected with the collector electrode of the first triode and the second switch unit respectively, and the other end of the first capacitor is connected with the emitter electrode of the first triode.
5. The circuit of claim 3, wherein the second switching unit comprises: the switching device comprises a first switching tube, a second switching tube, a third switching tube and a fourth switching tube; wherein,
The first end of the first switching tube is connected with the first end of the second switching tube, the second end of the first switching tube is connected with the signal receiving pin of the control chip, the second end of the second switching tube is connected with the signal receiving pin of the asynchronous receiving and transmitting transmitter interface unit, and the control ends of the first switching tube and the second switching tube are connected with the first switching unit;
The first end of the third switching tube is connected with the first end of the fourth switching tube, the second end of the third switching tube is connected with the signal sending pin of the control chip, the second end of the fourth switching tube is connected with the signal sending pin of the serial port unit of the asynchronous receiving and transmitting transmitter, and the control end of the third switching tube is connected with the control end of the fourth switching tube and the first switching unit.
6. The circuit of claim 4, wherein the base of the first transistor is saturated to turn on when it is connected to a high level signal and the base of the first transistor is turned off when it is connected to a low level signal.
7. The circuit of claim 5, wherein the first, second, third and fourth switching tubes are turned on when the control ends of the first, second, third and fourth switching tubes are connected to a high-level signal, and are turned off when the control ends of the first, second, third and fourth switching tubes are connected to a low-level signal.
8. A method for controlling a circuit supporting serial hot plug according to any one of claims 1 to 7, applied to an electronic device, comprising:
detecting whether a serial port plug is inserted after the electronic equipment is electrified;
If the serial port plug is detected to be inserted, serial port communication is performed after a delay is performed for a preset time.
9. An electronic device, comprising:
A circuit board; and
The circuit for supporting serial hot plug according to any one of claims 1-7, wherein the circuit for supporting serial hot plug is disposed on the circuit board.
CN202111220713.5A 2021-10-20 2021-10-20 Circuit supporting serial port hot plug, control method and electronic equipment Active CN113806272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111220713.5A CN113806272B (en) 2021-10-20 2021-10-20 Circuit supporting serial port hot plug, control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111220713.5A CN113806272B (en) 2021-10-20 2021-10-20 Circuit supporting serial port hot plug, control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113806272A CN113806272A (en) 2021-12-17
CN113806272B true CN113806272B (en) 2024-05-28

Family

ID=78898063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111220713.5A Active CN113806272B (en) 2021-10-20 2021-10-20 Circuit supporting serial port hot plug, control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113806272B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2938015B1 (en) * 1998-04-09 1999-08-23 甲府日本電気株式会社 Live insertion / extraction device and insertion tool
CN102130669A (en) * 2011-01-13 2011-07-20 北京星网锐捷网络技术有限公司 A hot-swappable module state detection method, system, device and network equipment
CN103345460A (en) * 2013-06-26 2013-10-09 惠州Tcl移动通信有限公司 Communication module for achieving hot plug and terminal
CN205563450U (en) * 2016-04-15 2016-09-07 浪潮集团有限公司 Realize hot drawing of portable mainboard docking station interface and insert protection circuit of function
CN106774772A (en) * 2017-01-16 2017-05-31 郑州云海信息技术有限公司 A kind of hot plug module electric supply installation, method and system
TW201820787A (en) * 2016-11-29 2018-06-01 上銀科技股份有限公司 Hot swapping circuit performs multi-layered protection by disposing the detection module, the delay module, and the hysteresis module
CN110289607A (en) * 2019-06-20 2019-09-27 深圳市中创工业互联网有限公司 A kind of hot plug protection circuit and method
CN212658972U (en) * 2020-08-28 2021-03-05 上海海得控制系统股份有限公司 Hot plug communication protection circuit
CN113157527A (en) * 2021-04-27 2021-07-23 福建实达电脑设备有限公司 Serial port plugging detection circuit and serial port plugging detection system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2938015B1 (en) * 1998-04-09 1999-08-23 甲府日本電気株式会社 Live insertion / extraction device and insertion tool
CN102130669A (en) * 2011-01-13 2011-07-20 北京星网锐捷网络技术有限公司 A hot-swappable module state detection method, system, device and network equipment
CN103345460A (en) * 2013-06-26 2013-10-09 惠州Tcl移动通信有限公司 Communication module for achieving hot plug and terminal
CN205563450U (en) * 2016-04-15 2016-09-07 浪潮集团有限公司 Realize hot drawing of portable mainboard docking station interface and insert protection circuit of function
TW201820787A (en) * 2016-11-29 2018-06-01 上銀科技股份有限公司 Hot swapping circuit performs multi-layered protection by disposing the detection module, the delay module, and the hysteresis module
CN106774772A (en) * 2017-01-16 2017-05-31 郑州云海信息技术有限公司 A kind of hot plug module electric supply installation, method and system
CN110289607A (en) * 2019-06-20 2019-09-27 深圳市中创工业互联网有限公司 A kind of hot plug protection circuit and method
CN212658972U (en) * 2020-08-28 2021-03-05 上海海得控制系统股份有限公司 Hot plug communication protection circuit
CN113157527A (en) * 2021-04-27 2021-07-23 福建实达电脑设备有限公司 Serial port plugging detection circuit and serial port plugging detection system

Also Published As

Publication number Publication date
CN113806272A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN106776428B (en) Terminal device, read-write device, data transmission system and hardware initialization method
EP1029745A3 (en) Electronic interface and method for connecting the electrical systems of a truck and trailer
US7930441B2 (en) USB device and mode detecting method thereof
KR101719421B1 (en) Edge-based communication with a plurality of slave devices
CN103702056B (en) HDMI (High-definition Multimedia Interface) signal processing circuit and method
CN102736995B (en) Electronic equipment and control method for USB communication module of electronics equipment
US5257413A (en) Option selection method and apparatus
CN113806272B (en) Circuit supporting serial port hot plug, control method and electronic equipment
CN117978934B (en) Light supplementing synchronous signal circuit and electronic equipment thereof
US20170300441A1 (en) Hdmi and dp compatible interface circuit
CN103491412A (en) MHL equipment identification circuit with standby charging function
WO2010074443A2 (en) Power interface circuit of contact ic card reader
CN110209371B (en) Audio compatible circuit and video and audio equipment
CN217821585U (en) MAX485 receiving and dispatching control signal generating device based on serial port sending signal
CN216819835U (en) Single-wire isolated communication device and system
CN204408496U (en) Signal transmission circuit
CN216599583U (en) Communication circuit, electronic equipment and communication system
CN113411531B (en) Video transmission device
CN216928004U (en) Application circuit compatible with serial port of LED display screen
US8251721B2 (en) Active connector
CN217279563U (en) Interface multiplexing circuit and electronic equipment
CN219554952U (en) PWM communication interface circuit
CN221101384U (en) PCIe communication module based on DP interface
MXPA03004342A (en) Data bus.
CN216956935U (en) Serial port isolation circuit, communication module, intercom device and security access control system

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