Electronic system and control method thereof
By designing bridge charging circuits and switching circuits in electronic devices, the problem of wrong connection of positive and negative poles during charging of portable devices is solved, extending the device life and achieving safe and efficient charging and communication.
Patent Information
- Application Number
- CN202410931164.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-01
AI Technical Summary
During the charging process, portable electronic devices are prone to misconnection of the positive and negative electrodes of the headphones or Bluetooth smart glasses due to the charging chamber design, causing short circuits, affecting service life and even causing safety hazards.
Design an electronic system, including a charging circuit and a switching circuit, which connects the first input terminal and the second input terminal through a bridge to avoid distinction between positive and negative poles, and switches between charging mode and communication mode to ensure charging There is no short circuit at the time and communication with external communication without disassembling the machine.
It effectively avoids short circuits caused by wrong connection of positive and negative electrodes, extends the service life of electronic devices, improves charging safety, and realizes simple and efficient connection with external communication devices without disassembly.
Smart Images

Figure CN118889604A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of electronic circuits, and in particular to an electronic system and a control method thereof. Background Art
[0002] Portable electronic devices include products such as Bluetooth headsets and Bluetooth smart glasses. The current methods for charging portable electronic devices are as follows: For TWS (True Wireless Stereo) headsets and OWS (Open Wearable Stereo) headsets, they are generally equipped with a charging box, and the charging box has a charging compartment. When charging the headset, a power adapter is required to connect a USB (Universal Serial Bus) line to charge the charging box, and then the headset placed in the charging compartment is charged and docked with the charging box through a spring probe POGO PIN, and the headset is charged by the charging box. For Bluetooth smart glasses, they are generally charged through a charging cable with charging management. One end of the charging cable is connected to a power source, and the other end is divided into two charging seats, which are respectively connected to the corresponding temples to charge the Bluetooth smart glasses.
[0003] However, when the earphones are placed in the charging case, the design of some charging cases may cause the earphones to be placed upside down, which in turn causes the positive and negative charging ports of the earphones to be connected reversely with the two output ports of the charging box, causing a short circuit, affecting the service life of the earphones or even damaging the product. In severe cases, the battery may catch fire. The connection between the temples of Bluetooth smart glasses and the charging cable also has the same problem. Therefore, the current charging method of portable electronic devices needs to be improved. Summary of the invention
[0004] The embodiments of the present invention provide an electronic system and a control method thereof, which are at least beneficial to prolonging the service life of the electronic equipment.
[0005] An embodiment of the present invention provides an electronic system, including: an electronic device, the electronic device at least including: a charging circuit, the charging circuit having a first input terminal, a second input terminal and a first output terminal, and the charging circuit including a first transistor, a second transistor, a third transistor and a fourth transistor, the source of the first transistor is connected to the source of the third transistor, the source of the first transistor is connected to ground, the gate of the first transistor is connected to the gate of the second transistor, the drain of the first transistor is connected to the drain of the second transistor, the drain of the first transistor serves as the first input terminal, the source of the second transistor is connected to the source of the fourth transistor, the source of the second transistor serves as the first output terminal, the drain of the third transistor is connected to the drain of the fourth transistor, and the third transistor is connected to the drain of the fourth transistor. The drain of the body tube serves as the second input terminal, the gate of the third transistor is connected to the gate of the fourth transistor, the gate of the third transistor is connected to the first input terminal, and the gate of the first transistor is connected to the second input terminal; a switching circuit, the input terminal of the switching circuit is connected to the first output terminal, the output terminal of the switching circuit is connected to the power supply of the electronic device, and the switching circuit is used to turn on or off the connection path between the first output terminal and the power supply; during the period when the switching circuit turns on the connection path between the first output terminal and the power supply, the electronic device is in a charging mode, and during the period when the switching circuit disconnects the connection path between the first output terminal and the power supply, the electronic device is in a communication mode; in the communication mode, the communication device is connected to the first input terminal and the second input terminal to communicate with the electronic device through the first input terminal or the second input terminal.
[0006] In some embodiments, the electronic device also includes a main control module, which includes at least a first enable terminal; the switching circuit includes a fifth transistor, the gate of the fifth transistor is connected to the first enable terminal, the source of the fifth transistor serves as the input terminal of the switching circuit, and the drain of the fifth transistor serves as the output terminal of the switching circuit; during the period when the gate of the fifth transistor receives a first enable signal sent by the first enable terminal, the fifth transistor is in an on state, and during the period when the gate of the fifth transistor does not receive the first enable signal sent by the first enable terminal, the fifth transistor is in an off state.
[0007] In some embodiments, the switch circuit further includes a first resistor, and the gate of the fifth transistor is connected to the first enable terminal through the first resistor.
[0008] In some embodiments, the electronic device also includes a main control module, the main control module has at least a second enable terminal, a third enable terminal, a first detection terminal, a second detection terminal and a third detection terminal, the first detection terminal is connected to the first input terminal, the second detection terminal is connected to the second input terminal, and the third detection terminal is connected to the first output terminal; the electronic device also includes a communication control circuit, the communication control circuit has a second output terminal and a third output terminal, the communication control circuit includes: a sixth transistor, the source of the sixth transistor serves as the second output terminal, the drain of the sixth transistor is connected to the first input terminal, and the gate of the sixth transistor is connected to the second enable terminal; a seventh transistor, the source of the seventh transistor serves as the third output terminal, the drain of the seventh transistor is connected to the second input terminal, and the gate of the seventh transistor is connected to the third enable terminal; if the third detection terminal receives a communication signal sent by the first output terminal, the main control module controls the sixth transistor to be turned on or off according to the signal received by the first detection terminal, and controls the seventh transistor to be turned on or off according to the signal received by the second detection terminal.
[0009] In some embodiments, at the same time, one of the first input terminal or the second input terminal sends a first signal to the main control module through the corresponding detection terminal; during the period when the first detection terminal receives the first signal sent by the first input terminal, the main control module sends a second enable signal from the second enable terminal, and during the period when the gate of the sixth transistor receives the second enable signal, the sixth transistor is in the on state, and the second output terminal is connected to the first input terminal to realize communication between the communication device and the electronic device; during the period when the second detection terminal receives the first signal sent by the second input terminal, the main control module sends a third enable signal from the third enable terminal, and during the period when the gate of the seventh transistor receives the third enable signal, the seventh transistor is in the on state, and the third output terminal is connected to the second input terminal to realize communication between the communication device and the electronic device; during the period when the gate of the sixth transistor does not receive the second enable signal, the sixth transistor is in the off state, and during the period when the gate of the seventh transistor does not receive the third enable signal, the seventh transistor is in the off state.
[0010] In some embodiments, the electronic device also includes: a second resistor, a third resistor, a fourth resistor and a fifth resistor, the first detection terminal is connected to the first input terminal through the second resistor, one end of the third resistor is connected to the first detection terminal, and the other end of the third resistor is connected to the ground; the second detection terminal is connected to the second input terminal through the fourth resistor, one end of the fifth resistor is connected to the second detection terminal, and the other end of the fifth resistor is connected to the ground.
[0011] In some embodiments, the electronic device also includes: a sixth resistor, a seventh resistor, an eighth resistor and a ninth resistor, the gate of the sixth transistor is connected to the second enable terminal through the sixth resistor, one end of the seventh resistor is connected to the gate of the sixth transistor, and the other end of the seventh resistor is connected to the ground; the gate of the seventh transistor is connected to the third enable terminal through the eighth resistor, one end of the ninth resistor is connected to the gate of the seventh transistor, and the other end of the ninth resistor is connected to the ground.
[0012] In some embodiments, the communication control circuit also includes a tenth resistor, an eleventh resistor and a twelfth resistor, the first end of the tenth resistor is connected to the first output terminal, the first end of the eleventh resistor is connected to the second end of the tenth resistor, the second end of the eleventh resistor is connected to the first end of the twelfth resistor, the second end of the twelfth resistor is connected to ground, the second end of the eleventh resistor is connected to the third detection terminal, and the first output terminal is connected to the third detection terminal through the tenth resistor and the eleventh resistor.
[0013] In some embodiments, the sixth transistor and the seventh transistor are both NMOS transistors.
[0014] In some embodiments, the first transistor and the third transistor are both NMOS transistors, and the second transistor and the fourth transistor are both PMOS transistors.
[0015] In some embodiments, a communication device communicates with an electronic device via a two-wire-to-single-wire circuit, the two-wire-to-single-wire circuit having a first connection end and a second connection end, the two-wire-to-single-wire circuit comprising: an inverter chip and a multi-stage buffer chip, the multi-stage buffer chip comprising at least a first-stage buffer, a second-stage buffer and a third-stage buffer, the input end of the third-stage buffer being used to receive a TXD signal output by the communication device, the output end of the third-stage buffer being connected to an enable end of the second-stage buffer, an input end of the first-stage buffer and an input end of the inverter chip, the output end of the inverter chip being connected to the enable end of the first-stage buffer, the output end of the first-stage buffer being used as a first connection end, the input end of the second-stage buffer being connected to the first connection end, the output end of the second-stage buffer being used to output an RXD signal to the communication device, and the second connection end being connected to ground; in communication mode, the first connection end is connected to one of the first input end or the second input end, the second connection end is connected to the other of the first input end or the second input end, and the first connection end transmits a DATA signal to the electronic device.
[0016] In some embodiments, the two-wire to single-wire circuit also includes: a thirteenth resistor, a fourteenth resistor and a fifteenth resistor, one end of the thirteenth resistor is connected to the output end of the first-level buffer, and the other end of the thirteenth resistor is connected to the power supply voltage; one end of the fifteenth resistor is connected to the input end of the inverter chip, and the other end of the fifteenth resistor is connected to the power supply voltage; the enable end of the third-level buffer is connected to the power supply voltage through the fourteenth resistor.
[0017] In some embodiments, the electronic system includes a communication component, and the two-wire-to-single-wire circuit is arranged in the communication component. The communication component also includes a connector, and the connector includes: a first port, a second port, a third port, a fourth port and a fifth port. The power supply voltage is provided to the two-wire-to-single-wire circuit through the first port or the fifth port, and the ground voltage is provided to the two-wire-to-single-wire circuit through the fourth port. The second port is connected to the input end of the third-level buffer for receiving the TXD signal, and the third port is connected to the output end of the first-level buffer for outputting the RXD signal.
[0018] In some embodiments, the communication component also includes a sixteenth resistor and a seventeenth resistor, one end of the sixteenth resistor is connected to the first port, the other end of the sixteenth resistor is connected to the first voltage signal, one end of the seventeenth resistor is connected to the fifth port, the other end of the seventeenth resistor is connected to the second voltage signal, and the voltage value of the first voltage signal is different from the voltage value of the second voltage signal; wherein the resistance value of one of the sixteenth resistor and the seventeenth resistor is zero, and the resistance value of the other is infinite.
[0019] Another aspect of an embodiment of the present invention provides a control method for an electronic system, comprising: providing the electronic system described in any one of the above embodiments, the electronic system comprising: an electronic device and a communication device, the electronic device comprising at least: a charging circuit and a switching circuit, the input end of the switching circuit being connected to the first output end of the charging circuit, the output end of the switching circuit being connected to the power supply of the electronic device, and the switching circuit being controlled to turn on or off the connection path between the first output end and the power supply; during the period when the switching circuit turns on the connection path between the first output end and the power supply, the electronic device is in a charging mode, and during the period when the switching circuit turns off the connection path between the first output end and the power supply, the electronic device is in a communication mode, and in the communication mode, the communication device is connected to the first input end and the second input end of the charging circuit to communicate with the electronic device through the first input end or the second input end.
[0020] The beneficial effects of the present invention are as follows: This scheme provides an electronic system and a control method thereof, the electronic system includes an electronic device, the electronic device includes at least a charging circuit and a switching circuit, the charging circuit has a first input terminal and a second input terminal for connecting to an external charging line, a charging device or a communication device, and has a first output terminal connected to the input terminal of the switching circuit, and the output terminal of the switching circuit is connected to a power supply inside the electronic device. The charging circuit includes a first transistor, a second transistor, a third transistor and a fourth transistor connected in a bridge manner. When charging the electronic device, the positive terminal and the negative terminal of the external charging line or the charging device are respectively connected to the first input terminal and the second input terminal, the charging circuit is turned on, and the charging voltage output by the first output terminal is transmitted from the output terminal of the charging circuit to the power supply of the electronic device. Regardless of whether the positive terminal is connected to the first input terminal or the positive terminal is connected to the second input terminal, the charging voltage can be output from the first output terminal. In other words, the first input terminal and the second input terminal do not need to be distinguished between positive and negative. As long as one of the first input terminal and the second input terminal is connected to the positive terminal of the external charging line or the charging device, and the other is connected to the negative terminal of the external charging line or the charging device, the power supply of the electronic device can be charged, avoiding short circuits caused by incorrect connection of positive and negative poles, which is beneficial to improving the user experience of the electronic device, extending the service life of the electronic device, and avoiding safety hazards caused by reverse connection of positive and negative poles during charging.
[0021] In addition, after using the switching circuit to disconnect the connection path between the first output terminal and the power supply, the electronic device can be connected to an external communication device through the first input terminal and the second input terminal without disassembling the device, thereby realizing communication between the electronic device and the external communication device, and further realizing functions such as serial port communication and software burning, which is beneficial to avoiding the impact of disassembly on the electronic device, and is beneficial to simply and efficiently realizing the communication connection between the electronic device and the external communication device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by pictures in the corresponding drawings. These exemplified descriptions do not constitute a limitation on the embodiments. Unless otherwise specified, the pictures in the drawings do not constitute a scale limitation. In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A schematic diagram of the structure of an electronic system provided by an embodiment of the present invention;
[0024] Figure 2A schematic diagram of a partial circuit structure of an electronic device provided by an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of a partial circuit structure of an electronic system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] As can be seen from the background art, the current charging method of portable electronic devices needs to be improved.
[0027] In addition, after analysis, it was found that in the relevant technology, the current wired communication control mostly adopts two-wire UART (Universal Asynchronous Receiver / Transmitter universal) communication, and in general, electronic devices do not have communication interfaces, and wired upgrades and debugging of electronic devices cannot be performed. If debugging is required, the machine needs to be disassembled, which can easily damage the product.
[0028] To solve the above problems, an embodiment of the present invention provides an electronic system and a control method thereof. The electronic system includes an electronic device, and the electronic device includes at least a charging circuit and a switching circuit. The charging circuit has a first input terminal and a second input terminal for connecting to an external charging line, a charging device or a communication device, and a first output terminal connected to the input terminal of the switching circuit. The output terminal of the switching circuit is connected to a power supply inside the electronic device. As long as one of the first input terminal and the second input terminal is connected to the positive terminal of the external charging line or the charging device, and the other is connected to the negative terminal of the external charging line or the charging device, the power supply of the electronic device can be charged, thereby avoiding a short circuit caused by incorrect connection of the positive and negative poles, which is beneficial to improving the user experience of the electronic device and extending the service life of the electronic device.
[0029] In addition, after using the switching circuit to disconnect the connection path between the first output terminal and the power supply, it is possible to connect the first input terminal and the second input terminal to an external communication device without disassembling the device, thereby realizing communication between the electronic device and the external communication device, and further realizing functions such as serial port communication and software burning, thereby avoiding the impact of disassembly on the electronic device and facilitating the simple and efficient realization of communication connection between the electronic device and the communication device.
[0030] In order to make the purpose, technical scheme and advantages of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are provided to enable readers to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can be implemented.
[0031] Figure 1 A schematic diagram of the structure of an electronic system provided by an embodiment of the present invention; Figure 2 A schematic diagram of a partial circuit structure of an electronic device provided by an embodiment of the present invention.
[0032] refer to Figure 1 and Figure 2 The electronic system provided by the embodiment of the present invention includes: an electronic device 100, the electronic device 100 may be a portable electronic device, and in some embodiments, the electronic device 100 may be a Bluetooth headset or Bluetooth smart glasses.
[0033] The electronic device 100 has two modes, namely a charging mode and a communication mode. In the charging mode, the electronic device 100 can be connected to an external charging device or a charging cable to charge the electronic device 100; in the communication mode, the electronic device 100 can be connected to the communication device 200 to achieve communication between the electronic device 100 and the communication device 200.
[0034] The electronic device 100 includes at least a charging circuit 110 . In some embodiments, the electronic device 100 has a housing, and the charging circuit 110 may be disposed in the housing.
[0035] The charging circuit 110 has a first input terminal TP1 and a second input terminal TP2, wherein the first input terminal TP1 and the second input terminal TP2 can be metal contacts for docking with the POGO PIN on the charging bin, or a charging interface connected to an external charging cable. In the charging mode, the first input terminal TP1 and the second input terminal TP2 are used to connect to the external charging cable or charging device, thereby charging the electronic device 100. When the electronic device 100 is charged through the first input terminal TP1 and the second input terminal TP2, one of the first input terminal TP1 and the second input terminal TP2 is connected to the positive terminal of the external charging cable or the charging device, and the other of the first input terminal TP1 and the second input terminal TP2 is connected to the negative terminal of the external charging cable or the charging device. In the communication mode, the first input terminal TP1 and the second input terminal TP2 are used to connect to the communication device 200 to realize communication between the electronic device 100 and the external communication device 200, thereby realizing serial port communication and software burning, etc.
[0036] refer to Figure 1 and Figure 2 The charging circuit 110 further has a first output terminal TP3. In the charging mode, the first output terminal TP3 is used to output the charging voltage CHG+. In the communication mode, it can be determined whether it is in the communication mode based on the voltage of the first output terminal TP3, thereby realizing communication between the electronic device 100 and the external communication device 200.
[0037] Specifically, refer to Figure 2 The charging circuit 110 includes a first transistor Q1, a second transistor Q2, a third transistor Q3 and a fourth transistor Q4, the source of the first transistor Q1 is connected to the source of the third transistor Q3, the source of the first transistor Q1 is connected to the ground GND, the gate of the first transistor Q1 is connected to the gate of the second transistor Q2, the drain of the first transistor Q1 is connected to the drain of the second transistor Q2, the drain of the first transistor Q1 serves as a first input terminal TP1, the source of the second transistor Q2 is connected to the source of the fourth transistor Q4, the source of the second transistor Q2 serves as a first output terminal TP3, the drain of the third transistor Q3 is connected to the drain of the fourth transistor Q4, the drain of the third transistor Q3 serves as a second input terminal TP2, the gate of the third transistor Q3 is connected to the gate of the fourth transistor Q4, the gate of the third transistor Q3 is connected to the first input terminal TP1, and the gate of the first transistor Q1 is connected to the second input terminal TP2.
[0038] In some embodiments, the first transistor Q1 and the third transistor Q3 are both NMOS (N-channel metal oxide semiconductor) transistors, and the second transistor Q2 and the fourth transistor Q4 are both PMOS (P-channel metal oxide semiconductor) transistors.
[0039] The working principle of the charging circuit 110 can be as follows: when the first input terminal TP1 is connected to the positive terminal of the external charging line or the charging device, and the second input terminal TP2 is connected to the negative terminal of the external charging line or the charging device, the input voltage VINA of the first input terminal TP1 is a high-level voltage, the input voltage VINB of the second input terminal TP2 is a low-level voltage, the gate of the first transistor Q1 and the gate of the second transistor Q2 both receive the low-level voltage, the gate of the third transistor Q3 and the gate of the fourth transistor Q4 both receive the high-level voltage, the first transistor Q1 and the fourth transistor Q4 are in the cut-off state, the second transistor Q2 and the third transistor Q3 are in the on state, the input voltage VINA of the first input terminal TP1 is transmitted to the first output terminal TP3 through the turned-on second transistor Q2, and the first output terminal TP3 outputs a high-level voltage.
[0040] When the first input terminal TP1 is connected to the negative terminal of the external charging line or the charging device, and the second input terminal TP2 is connected to the positive terminal of the external charging line or the charging device, the input voltage VINA of the first input terminal TP1 is a low level voltage, the input voltage VINB of the second input terminal TP2 is a high level voltage, the gate of the first transistor Q1 and the gate of the second transistor Q2 both receive the high level voltage, the gate of the third transistor Q3 and the gate of the fourth transistor Q4 both receive the low level voltage, the first transistor Q1 and the fourth transistor Q4 are in the on state, the second transistor Q2 and the third transistor Q3 are in the off state, the input voltage VINB of the second input terminal TP2 is transmitted to the first output terminal TP3 through the turned-on fourth transistor Q4, and the first output terminal TP3 outputs a high level voltage.
[0041] It can be seen that no matter whether the positive terminal is connected to the first input terminal TP1 or the positive terminal is connected to the second input terminal TP2, a high-level voltage can be output from the first output terminal TP3 as the charging voltage CHG+. That is to say, the first input terminal TP1 and the second input terminal TP2 do not need to be distinguished between positive and negative. As long as one of the first input terminal TP1 and the second input terminal TP2 is connected to the positive terminal of the external charging line or the charging device, and the other of the first input terminal TP1 and the second input terminal TP2 is connected to the negative terminal of the external charging line or the charging device, the power supply 130 of the electronic device 100 can be charged, avoiding a short circuit caused by incorrect connection of the positive and negative poles, which is beneficial to improving the user experience of the electronic device 100, extending the service life of the electronic device 100, and avoiding safety hazards caused by reverse connection of the positive and negative poles during charging.
[0042] refer to Figure 1 and Figure 2 , the charging circuit 110 further includes a switch circuit 120, the input end of the switch circuit 120 is connected to the first output end TP3, the output end TP4 of the switch circuit 120 is connected to the power supply 130 of the electronic device 100, and the switch circuit 120 is used to conduct or disconnect the connection path between the first output end TP3 and the power supply 130; during the period when the switch circuit 120 conducts the connection path between the first output end TP3 and the power supply 130, the electronic device 100 is in the charging mode, and during the period when the switch circuit 120 disconnects the connection path between the first output end TP3 and the power supply 130, the electronic device 100 is in the communication mode. In the charging mode, the charging voltage CHG+ output by the first output end TP3 is transmitted to the power supply 130 of the electronic device 100 through the turned-on switch circuit 120, so as to charge the power supply 130. In the communication mode, the communication device 200 is connected to the first input end TP1 and the second input end TP2 to communicate with the electronic device 100 through the first input end TP1 or the second input end TP2.
[0043] The switching of the charging state and the communication state of the electronic device 100 is achieved through the switching circuit 120. In this way, the first input terminal TP1 and the second input terminal TP2 can be used to achieve a charging connection, and the first input terminal TP1 and the second input terminal TP2 can also be used to achieve a communication connection. Without disassembling the device, the charging port can be used to achieve a communication connection between the electronic device 100 and the external communication device 200, thereby realizing functions such as serial port communication and software burning, which is beneficial to avoiding the influence of disassembly on the electronic device 100, and is beneficial to simply and efficiently realizing the communication connection between the electronic device 100 and the external communication device 200.
[0044] It should be noted that the communication between the communication device 200 and the electronic device 100 mainly refers to wired upgrading and / or debugging of the product, for example, serial port communication control and software burning through a communication connection.
[0045] In some embodiments, reference Figure 1 and Figure 2 , the electronic device 100 further includes a main control module 140, which includes at least a first enable terminal EN1; the switch circuit 120 includes a fifth transistor Q5, the gate of the fifth transistor Q5 is connected to the first enable terminal EN1, the source of the fifth transistor Q5 is used as the input terminal of the switch circuit 120, and the drain of the fifth transistor Q5 is used as the output terminal TP4 of the switch circuit 120; during the period when the gate of the fifth transistor Q5 receives the first enable signal sent by the first enable terminal EN1, the fifth transistor Q5 is in a conducting state, and during the period when the gate of the fifth transistor Q5 does not receive the first enable signal sent by the first enable terminal EN1, the fifth transistor Q5 is in a cut-off state. In this way, by controlling the gate voltage of the fifth transistor Q5, the conduction or cut-off of the fifth transistor Q5 is controlled. When the fifth transistor Q5 is in a conducting state, the electronic device 100 is in a charging mode, and the charging voltage CHG+ output by the first output terminal TP3 is transmitted to the output terminal TP4 of the switch circuit 120 through the fifth transistor Q5, and the charging voltage VCGH is transmitted to the power supply 130 of the electronic device 100. Since transistors can be integrated onto a chip via integrated circuits, using the fifth transistor Q5 as a switching component in the switching circuit 120 is beneficial in reducing the space occupied by the switching circuit 120 in the electronic device 100, making it easier to apply the switching circuit 120 to small portable electronic devices such as portable headphones or portable smart glasses.
[0046] In some embodiments, the fifth transistor Q5 may be a PMOS transistor, and the first enable signal is a low level signal. In other embodiments, the fifth transistor Q5 may also be an NMOS transistor, and the first enable signal is a high level signal.
[0047] In some embodiments, the fifth transistor Q5 may be a PMOS tube, and the switch circuit 120 further includes a first resistor R1, and the gate of the fifth transistor Q5 is connected to the first enable terminal EN1 through the first resistor R1. The first resistor R1 is used to ensure that the voltage signal output by the first enable terminal EN1 can match the gate of the fifth transistor Q5, and to improve the circuit stability to avoid malfunction.
[0048] In some embodiments, the resistance of the first resistor R1 may be 9.5k-10.5k, for example, 9.5k, 9.8k, 10k, 10.1k or 10.2k.
[0049] In some embodiments, reference Figure 1 and Figure 2 The electronic device 100 further includes a main control module 140 and a communication control circuit 150. The main control module 140 at least has a second enable terminal EN2, a third enable terminal EN3, a first detection terminal VA-EN, a second detection terminal VB-EN and a third detection terminal COM3. The first detection terminal VA-EN is connected to the first input terminal TP1, the second detection terminal VB-EN is connected to the second input terminal TP2, and the third detection terminal COM3 is connected to the first output terminal TP3. The third detection terminal COM3 of the main control module 140 is used to detect the output voltage of the first output terminal TP3, and the switch circuit 120 is judged to be in the on state or the off state according to the output voltage of the third detection terminal COM3. When the switch circuit 120 is in the off state, the voltage detected by the third detection terminal COM3 at the first output terminal TP3 is a communication signal. When the main control module 140 detects a communication signal, the main control module 140 can control the communication control circuit 150 according to the voltage values detected by the first detection terminal VA-EN and the second detection terminal VB-EN. Specifically, the communication control module can be controlled by the second enable terminal EN2 and the third enable terminal EN3, thereby enabling the electronic device 100 to communicate with the communication device 200.
[0050] refer to Figure 1 and Figure 2The communication control circuit 150 has a second output terminal COM1 and a third output terminal COM2, and the communication control circuit 150 includes: a sixth transistor Q6, the source of the sixth transistor Q6 serves as the second output terminal COM1, the drain of the sixth transistor Q6 is connected to the first input terminal TP1, and the gate of the sixth transistor Q6 is connected to the second enable terminal EN2; a seventh transistor Q7, the source of the seventh transistor Q7 serves as the third output terminal COM2, the drain of the seventh transistor Q7 is connected to the second input terminal TP2, and the gate of the seventh transistor Q7 is connected to the third enable terminal EN3; if the third detection terminal COM3 receives a communication signal sent by the first output terminal TP3, the main control module 140 controls the sixth transistor Q6 to be turned on or off according to the signal received by the first detection terminal VA-EN, and controls the seventh transistor Q7 to be turned on or off according to the signal received by the second detection terminal VB-EN.
[0051] That is to say, the communication status of the electronic device 100 can be detected by using the main control module 140. When the main control module 140 detects that the electronic device 100 is in the communication state, the first detection terminal VA-EN of the main control module 140 is used to detect the first input terminal TP1, and the second detection terminal VB-EN of the main control module 140 is used to detect the second input terminal TP2, and then the internal circuit of the electronic device 100 is controlled, debugged or software burned through the second output terminal COM1 and the third output terminal COM2.
[0052] In some embodiments, reference Figure 1 and Figure 2 At the same time, one of the first input terminal TP1 or the second input terminal TP2 sends a first signal to the main control module 140 through the corresponding detection terminal; that is, the data transmission between the electronic device 100 and the communication device 200 is realized through one of the first input terminal TP1 and the second input terminal TP2. When the electronic device 100 performs data transmission with the communication device 200 through the first input terminal TP1, the first detection terminal VA-EN of the main control module 140 detects the first signal from the first input terminal TP1. When the electronic device 100 performs data transmission with the communication device 200 through the second input terminal TP2, the second detection terminal VB-EN of the main control module 140 detects the first signal from the second input terminal TP2.
[0053] During the period when the first detection terminal VA-EN receives the first signal emitted by the first input terminal TP1, the main control module 140 emits a second enable signal from the second enable terminal EN2, and during the period when the gate of the sixth transistor Q6 receives the second enable signal, the sixth transistor Q6 is in the on state, the second output terminal COM1 and the first input terminal TP1 are turned on, and the first signal is transmitted to the second output terminal COM1 through the sixth transistor Q6 to realize communication between the communication device 200 and the electronic device 100. At the same time, the third enable terminal EN3 is in a state of not emitting the third enable signal, and during the period when the gate of the seventh transistor Q7 does not receive the third enable signal, the seventh transistor Q7 is in the off state, and the third output terminal COM2 is disconnected from the second input terminal TP2.
[0054] During the period when the second detection terminal VB-EN receives the first signal emitted by the second input terminal TP2, the main control module 140 emits a third enable signal from the third enable terminal EN3, and during the period when the gate of the seventh transistor Q7 receives the third enable signal, the seventh transistor Q7 is in the on state, the third output terminal COM2 and the second input terminal TP2 are turned on, and the first signal is transmitted to the third output terminal COM2 through the seventh transistor Q7 to realize communication between the communication device 200 and the electronic device 100. At the same time, the second enable terminal EN2 is in a state of not emitting the second enable signal, and during the period when the gate of the sixth transistor Q6 does not receive the second enable signal, the sixth transistor Q6 is in the off state, and the second output terminal COM1 is disconnected from the first input terminal TP1.
[0055] In this way, the main control module 140 can determine which end of the first input terminal TP1 and the voltage signal of the second input terminal TP2 is the communication port for communication transmission, and then control the corresponding transistor connected to the communication port in the communication control circuit 150, so that the transistor connected to the communication port is turned on, and then the communication port is turned on with the corresponding output port, thereby realizing communication between the electronic device 100 and the communication device 200.
[0056] In some embodiments, reference Figure 1 and Figure 2 The electronic device 100 also includes: a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5; the first detection terminal VA-EN is connected to the first input terminal TP1 through the second resistor R2, one end of the third resistor R3 is connected to the first detection terminal VA-EN, and the other end of the third resistor R3 is connected to the ground GND; the second detection terminal VB-EN is connected to the second input terminal TP2 through the fourth resistor R4, one end of the fifth resistor R5 is connected to the second detection terminal VB-EN, and the other end of the fifth resistor R5 is connected to the ground GND.
[0057] Among them, the first end of the second resistor R2 is connected to the first input terminal TP1, and the second end of the second resistor R2 is connected to the first detection terminal VA-EN. The second resistor R2 is used to ensure that the voltage signal output by the first input terminal TP1 can match the first detection terminal VA-EN of the main control module 140, and to improve the circuit stability to avoid malfunction. In some embodiments, the resistance value of the first resistor R1 can be 0.5k~1.5k, for example, it can be 0.5k, 0.8k, 1k, 1.1k or 1.2k.
[0058] Among them, the first end of the fourth resistor R4 is connected to the second input terminal TP2, and the second end of the fourth resistor R4 is connected to the second detection terminal VB-EN. The fourth resistor R4 is used to ensure that the voltage signal output by the second input terminal TP2 can match the second detection terminal VB-EN of the main control module 140, and is used to improve the circuit stability and avoid causing false operation. In some embodiments, the resistance value of the second resistor R2 can be 0.5k~1.5k, for example, it can be 0.5k, 0.8k, 1k, 1.1k or 1.2k.
[0059] The third resistor R3 is used as a pull-down resistor of the first detection terminal VA-EN. When the first signal is not input to the first input terminal TP1, the signal of the first detection terminal VA-EN is clamped at a low level to prevent the signal line from being in an uncertain state due to being suspended, thereby causing an unexpected state of the system, and is used to improve circuit stability and avoid malfunction. In some embodiments, the resistance value of the third resistor R3 can be 90k to 110k, for example, 95k, 98k, 100k, 101k or 102k.
[0060] The fifth resistor R5 is used as a pull-down resistor of the second detection terminal VB-EN. When the first signal is not input to the second input terminal TP2, the signal of the second detection terminal VB-EN is clamped at a low level to prevent the signal line from being in an uncertain state due to being suspended, thereby causing an unexpected state of the system, and is used to improve circuit stability and avoid malfunction. In some embodiments, the resistance value of the fifth resistor R5 can be 90k to 110k, for example, 95k, 98k, 100k, 101k or 102k.
[0061] In some embodiments, reference Figure 1 and Figure 2 The sixth transistor Q6 and the seventh transistor Q7 are both NMOS transistors.
[0062] In some embodiments, reference Figure 1 and Figure 2The electronic device 100 also includes: a sixth resistor R6, a seventh resistor R7, an eighth resistor R8 and a ninth resistor R9, the gate of the sixth transistor Q6 is connected to the second enable terminal EN2 through the sixth resistor R6, one end of the seventh resistor R7 is connected to the gate of the sixth transistor Q6, and the other end of the seventh resistor R7 is connected to the ground GND; the gate of the seventh transistor Q7 is connected to the third enable terminal EN3 through the eighth resistor R8, one end of the ninth resistor R9 is connected to the gate of the seventh transistor Q7, and the other end of the ninth resistor R9 is connected to the ground GND.
[0063] Among them, the first end of the sixth resistor R6 is connected to the gate of the sixth transistor Q6, and the second end of the sixth resistor R6 is connected to the second enable terminal EN2. The sixth resistor R6 is used to ensure that the voltage signal output by the second enable terminal EN2 can match the gate of the sixth transistor Q6, and to improve the circuit stability to avoid malfunction. In some embodiments, the resistance value of the sixth resistor R6 can be 0.5k~1.5k, for example, it can be 0.5k, 0.8k, 1k, 1.1k or 1.2k.
[0064] Among them, the first end of the eighth resistor R8 is connected to the gate of the seventh transistor Q7, the second end of the eighth resistor R8 is connected to the third enable terminal EN3, and the eighth resistor R8 is used to ensure that the voltage signal output by the third enable terminal EN3 can match the gate of the seventh transistor Q7, and to improve the circuit stability and avoid malfunction. In some embodiments, the resistance value of the eighth resistor R8 can be 0.5k~1.5k, for example, it can be 0.5k, 0.8k, 1k, 1.1k or 1.2k.
[0065] The seventh resistor R7 is used as a pull-down resistor of the gate of the sixth transistor Q6. When the second enable terminal EN2 does not output the second enable signal, the gate of the sixth transistor Q6 is clamped at a low level to prevent the gate of the sixth transistor Q6 from being in an uncertain state due to being suspended, thereby causing an unexpected state of the system, so as to improve the circuit stability and avoid malfunction. In some embodiments, the resistance value of the seventh resistor R7 can be 90k to 110k, for example, 95k, 98k, 100k, 101k or 102k.
[0066] The ninth resistor R9 is used as a pull-down resistor of the gate of the seventh transistor Q7. When the third enable terminal EN3 does not output the third enable signal, the gate of the seventh transistor Q7 is clamped at a low level to prevent the gate of the seventh transistor Q7 from being in an uncertain state due to being suspended, thereby causing an unexpected state of the system, so as to improve the circuit stability and avoid malfunction. In some embodiments, the resistance value of the ninth resistor R9 can be 90k to 110k, for example, 95k, 98k, 100k, 101k or 102k.
[0067] In some embodiments, reference Figure 1 and Figure 2 The communication control circuit 150 also includes a tenth resistor R10, an eleventh resistor R11 and a twelfth resistor R12. The first end of the tenth resistor R10 is connected to the first output terminal TP3, and the second end of the tenth resistor R10 is connected to DET-VBUS. DET-VBUS is used to connect to the IO port of the back-end main control chip to play a role in power-on detection. The first end of the eleventh resistor R11 is connected to the second end of the tenth resistor R10, the second end of the eleventh resistor R11 is connected to the first end of the twelfth resistor R12, the second end of the twelfth resistor R12 is connected to the ground GND, and the second end of the eleventh resistor R11 is connected to the third detection terminal COM3. The first output terminal TP3 is connected to the third detection terminal COM3 through the tenth resistor R10 and the eleventh resistor R11.
[0068] In some embodiments, the resistance of the tenth resistor R10 may be 18k-22k, for example, 18k, 19k, 20k, 21k or 22k.
[0069] In some embodiments, the resistance of the eleventh resistor R11 may be 75k-90k, for example, 75k, 78k, 80k, 81k or 82k.
[0070] In some embodiments, the resistance of the twelfth resistor R12 may be 110k-130k, for example, 110k, 112k, 115k, 120k or 122k.
[0071] Figure 3 A schematic diagram of a partial circuit structure of an electronic system provided by an embodiment of the present invention.
[0072] In some embodiments, reference Figure 1 and Figure 3The communication device 200 communicates with the electronic device 100 via a two-wire-to-single-wire circuit 310. The two-wire-to-single-wire circuit 310 has a first connection terminal TP5 and a second connection terminal TP6. The two-wire-to-single-wire circuit 310 includes: an inverter chip U2 and a multi-stage buffer chip U1. The multi-stage buffer chip U1 includes at least a first-stage buffer, a second-stage buffer, and a third-stage buffer. The input terminal 3A of the third-stage buffer is used to receive the TXD signal output by the communication device 200. The output terminal 3Y of the third-stage buffer is connected to the enable terminal 2OE of the second-stage buffer, the input terminal 1A of the first-stage buffer, and the input terminal A of the inverter chip U2. The inverter chip The output terminal Y of U2 is connected to the enable terminal 1OE of the first-stage buffer, the output terminal 1Y of the first-stage buffer is used as the first connection terminal TP5, the input terminal 2A of the second-stage buffer is connected to the first connection terminal TP5, the output terminal 2Y of the second-stage buffer is used for outputting the RXD signal to the communication device 200, and the second connection terminal TP6 is connected to the ground GND; in the communication mode, the first connection terminal TP5 is connected to one of the first input terminal TP1 or the second input terminal TP2, the second connection terminal TP6 is connected to the other of the first input terminal TP1 or the second input terminal TP2, and the first connection terminal TP5 transmits a DATA signal to the electronic device 100. The two-line to single-line circuit 310 can convert a two-end communication port into a single-end communication port, and then use the charging port to realize the communication connection between the electronic device 100 and the external communication device 200, and realize the functions such as serial port communication and software burning through the charging port, which is conducive to avoiding the impact of disassembly on the electronic device 100, and is conducive to simply and efficiently realizing the communication between the electronic device 100 and the external communication device 200.
[0073] Specifically, the enable terminals of the buffer chip U1 are all valid at low levels. When the communication device 200 sends a TXD signal to the electronic device 100, the input terminal 3A of the third-level buffer receives the TXD signal, the enable terminal 3OE of the third-level buffer is at a low level, and the output terminal 3Y of the third-level buffer outputs a TXD-0 signal. The TXD-0 signal is transmitted to the input terminal A of the inverter chip U2, and the TXEN signal is output from the output terminal Y of the inverter chip U2. At this time, the TXD signal is a high-level signal, the TXD-0 signal is a high-level signal, and the TXEN signal is a low-level signal. The TXEN signal is transmitted to the enable terminal 1OE of the first-level buffer, the TXD-0 signal is input to the input terminal 1A of the first-level buffer, and the output terminal 1Y of the first-level buffer outputs a DATA signal. The DATA signal is transmitted to the electronic device 100 through either the first input terminal TP1 or the second input terminal TP2.
[0074] It should be noted that the DATA signal is the first signal in the aforementioned embodiment.
[0075] When the communication device 200 receives the RXD signal sent by the electronic device 100, the electronic device 100 sends a DATA signal through either the first input terminal TP1 or the second input terminal TP2, and the DATA signal is transmitted from the first connection terminal TP5 to the input terminal 2A of the second-stage buffer. The input terminal A of the inverter chip U2 is set to a low level, and the TXEN signal output by the output terminal Y of the inverter chip U2 is a high level, and the TXD-0 signal is a low level signal. Therefore, the output terminal 2Y of the second-stage buffer can output the RXD signal, and the communication device 200 receives the RXD signal.
[0076] In some embodiments, the inverter chip U2 may be a model 74HC1G04.
[0077] In some embodiments, the multi-level buffer chip U1 may be a four-level buffer chip. In some examples, the model of the four-level buffer chip U1 may be 74HC126.
[0078] In some embodiments, reference Figure 3 The two-wire to single-wire circuit 310 also includes: a thirteenth resistor R13, a fourteenth resistor R14 and a fifteenth resistor R15, one end of the thirteenth resistor R13 is connected to the output terminal 1Y of the first-stage buffer, and the other end of the thirteenth resistor R13 is connected to the power supply voltage VDD; one end of the fifteenth resistor R15 is connected to the input terminal A of the inverter chip U2, and the other end of the fifteenth resistor R15 is connected to the power supply voltage VDD; the enable end of the third-stage buffer is connected to the power supply voltage VDD through the fourteenth resistor R14.
[0079] The thirteenth resistor R13 is used as a pull-up resistor of the first connection terminal TP5. In some embodiments, the resistance of the thirteenth resistor R13 may be 1.8k-2.4k, for example, 1.8k, 1.9k, 2k, 2.1k or 2.2k.
[0080] A first end of the fourteenth resistor R14 is connected to the power supply voltage VDD, and a second end of the fourteenth resistor R14 is connected to the enable terminal 3OE of the third-stage buffer. In some embodiments, the resistance of the fourteenth resistor R14 may be 8k to 12k, for example, 8k, 9k, 10k, 11k or 12k. The fourteenth resistor R14 enables the enable terminal 3OE of the third-stage buffer to be in a low level state.
[0081] In some embodiments, the resistance of the fifteenth resistor R15 may be 0.5k to 1.5k, for example, 0.5k, 0.8k, 1k, 1.1k or 1.2k. When the TXD signal is in an invalid state, the fifteenth resistor R15 makes the input terminal A of the inverter chip U2 a low level, and makes the TXD-0 signal received by the enable terminal 2OE of the second-stage buffer a low level signal.
[0082] In some embodiments, the electronic system includes a communication component 300, a two-wire to single-wire circuit 310 is disposed in the communication component 300, and the communication component 300 further includes a connector J1, the connector J1 includes: a first port, a second port, a third port, a fourth port, and a fifth port, the power supply voltage VDD is provided to the two-wire to single-wire circuit 310 through the first port or the fifth port, the ground voltage is provided to the two-wire to single-wire circuit 310 through the fourth port, the second port is connected to the input terminal 3A of the third-stage buffer for receiving the TXD signal, and the third port is connected to the output terminal 1Y of the first-stage buffer for outputting the RXD signal. Among them, the advantage of providing the power supply voltage VDD to the two-wire to single-wire circuit 310 through the first port or the fifth port is that: the port for providing the power supply voltage VDD can be selected according to the actual demand for the power supply voltage VDD in the two-wire to single-wire circuit 310, which is conducive to improving the application flexibility of the communication component 300 in different scenarios.
[0083] In some embodiments, the communication component 300 may be a connection circuit board independent of the electronic device 100 and the communication device 200 .
[0084] In some embodiments, the communication component 300 also includes a sixteenth resistor R16 and a seventeenth resistor R17, one end of the sixteenth resistor R16 is connected to the first port, the other end of the sixteenth resistor R16 is connected to the first voltage signal VDD01, one end of the seventeenth resistor R17 is connected to the fifth port, the other end of the seventeenth resistor R17 is connected to the second voltage signal VDD02, and the voltage value of the first voltage signal VDD01 is different from the voltage value of the second voltage signal VDD02; wherein the resistance value of one of the sixteenth resistor R16 and the seventeenth resistor is zero, and the resistance value of the other is infinite.
[0085] For example, the voltage value of the first voltage signal VDD01 can be 3V, and the voltage value of the second voltage signal VDD02 can be 5V. When the power supply voltage VDD required by the two-wire to single-wire circuit 310 is 3V, the resistance value of the sixteenth resistor R16 is set to zero, and the resistance value of the seventeenth resistor R17 is set to infinity, and the power supply voltage VDD of 3V can be provided to the two-wire to single-wire circuit 310 through the first port; when the power supply voltage VDD required by the two-wire to single-wire circuit 310 is 5V, the resistance value of the sixteenth resistor R16 is set to infinity, and the resistance value of the seventeenth resistor R17 is set to zero, and the power supply voltage VDD of 5V can be provided to the two-wire to single-wire circuit 310 through the fifth port.
[0086] In the electronic system provided by the above embodiment, as long as one of the first input terminal and the second input terminal is connected to the positive terminal of the external charging line or the charging device, and the other is connected to the negative terminal of the external charging line or the charging device, the power supply of the electronic device can be charged, avoiding the short circuit caused by the wrong connection of the positive and negative poles, which is conducive to improving the user experience of the electronic device, extending the service life of the electronic device, and avoiding the safety hazards caused by the reverse connection of the positive and negative poles during the charging process. And meet the conditions for use in low-voltage circuits, where the low-voltage circuit refers to a power supply circuit equal to or less than 5V, avoiding the phenomenon of insufficient power supply due to the voltage drop of the characteristics of the transistor. In addition, after the connection path between the first output terminal and the power supply is disconnected by the switch circuit, the first input terminal and the second input terminal can be connected to the external communication device without disassembling the machine, so as to realize the communication between the electronic device and the external communication device, and then realize the functions such as serial port communication and software burning, which is conducive to avoiding the influence of disassembly on the electronic device, and is conducive to simply and efficiently realizing the communication between the electronic device and the external communication device.
[0087] On the other hand, an embodiment of the present invention further provides a control method for an electronic system. It should be noted that the control method for an electronic system is used to control the electronic system provided by the above-mentioned embodiment of the present invention. The above-mentioned embodiment has described the control method for an electronic system in detail. The control method for an electronic system provided by an embodiment of the present invention can refer to the above-mentioned embodiment, and the parts that are the same or corresponding to the above-mentioned embodiment will not be repeated here.
[0088] The control method of an electronic system includes: providing an electronic system according to any one of the above embodiments of the present invention, the electronic system includes: an electronic device and a communication device, the electronic device includes at least: a charging circuit and a switching circuit, the input end of the switching circuit is connected to the first output end of the charging circuit, the output end of the switching circuit is connected to the power supply of the electronic device, and the switching circuit is controlled to turn on or off the connection path between the first output end and the power supply; during the period when the switching circuit turns on the connection path between the first output end and the power supply, the electronic device is in a charging mode, and during the period when the switching circuit disconnects the connection path between the first output end and the power supply, the electronic device is in a communication mode, and in the communication mode, the communication device is connected to the first input end of the charging circuit and the second input end of the charging circuit to communicate with the electronic device through the first input end or the second input end.
[0089] By controlling the electronic system, the charging port of the electronic device can be used to achieve charging and communication. Without disassembling the device, the first input terminal and the second input terminal can be connected to an external communication device to achieve communication between the electronic device and the external communication device, thereby achieving functions such as serial port communication and software burning, which is beneficial to avoiding the impact of disassembly on the electronic device and facilitating the simple and efficient realization of communication between the electronic device and the external communication device.
[0090] It can be understood by those skilled in the art that the above-mentioned embodiments are specific examples for realizing the present invention, and in practical applications, various changes can be made to them in form and details without departing from the spirit and scope of the present invention. Any person skilled in the art can make their own changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention shall be subject to the scope defined in the claims.
Claims
1. An electronic system, characterized in that: include: An electronic device, the electronic device comprising at least: A charging circuit, wherein the charging circuit has a first input terminal, a second input terminal and a first output terminal, and the charging circuit includes a first transistor, a second transistor, a third transistor and a fourth transistor, the source of the first transistor is connected to the source of the third transistor, the source of the first transistor is connected to the ground, the gate of the first transistor is connected to the gate of the second transistor, the drain of the first transistor is connected to the drain of the second transistor, the drain of the first transistor serves as the first input terminal, the source of the second transistor is connected to the source of the fourth transistor, the source of the second transistor serves as the first output terminal, the drain of the third transistor is connected to the drain of the fourth transistor, the drain of the third transistor serves as the second input terminal, the gate of the third transistor is connected to the gate of the fourth transistor, the gate of the third transistor is connected to the first input terminal, and the gate of the first transistor is connected to the second input terminal; A switch circuit, wherein the input end of the switch circuit is connected to the first output end, the output end of the switch circuit is connected to the power supply of the electronic device, and the switch circuit is used to turn on or off the connection path between the first output end and the power supply; during the period when the switch circuit turns on the connection path between the first output end and the power supply, the electronic device is in a charging mode, and during the period when the switch circuit turns off the connection path between the first output end and the power supply, the electronic device is in a communication mode; in the communication mode, a communication device is connected to the first input end and the second input end to communicate with the electronic device through the first input end or the second input end.
2. The electronic system according to claim 1, characterized in that: The electronic device further comprises a main control module, and the main control module at least comprises a first enabling terminal; The switch circuit comprises a fifth transistor, the gate of the fifth transistor is connected to the first enable terminal, the source of the fifth transistor serves as the input terminal of the switch circuit, and the drain of the fifth transistor serves as the output terminal of the switch circuit; During the period when the gate of the fifth transistor receives the first enable signal sent by the first enable end, the fifth transistor is in the on state; during the period when the gate of the fifth transistor does not receive the first enable signal sent by the first enable end, the fifth transistor is in the off state.
3. The electronic system according to claim 2, characterized in that: The switch circuit further includes a first resistor, and the gate of the fifth transistor is connected to the first enable terminal through the first resistor.
4. The electronic system according to claim 1, characterized in that: The electronic device further includes a main control module, the main control module at least having a second enabling terminal, a third enabling terminal, a first detection terminal, a second detection terminal and a third detection terminal, the first detection terminal is connected to the first input terminal, the second detection terminal is connected to the second input terminal, and the third detection terminal is connected to the first output terminal; The electronic device further includes a communication control circuit, the communication control circuit having a second output terminal and a third output terminal, and the communication control circuit includes: a sixth transistor, wherein the source of the sixth transistor serves as the second output terminal, the drain of the sixth transistor is connected to the first input terminal, and the gate of the sixth transistor is connected to the second enable terminal; a seventh transistor, wherein the source of the seventh transistor serves as the third output terminal, the drain of the seventh transistor is connected to the second input terminal, and the gate of the seventh transistor is connected to the third enable terminal; If the third detection end receives the communication signal sent by the first output end, the main control module controls the sixth transistor to be turned on or off according to the signal received by the first detection end, and controls the seventh transistor to be turned on or off according to the signal received by the second detection end.
5. The electronic system according to claim 4, characterized in that: At the same time, one of the first input terminal or the second input terminal sends a first signal to the main control module through the corresponding detection terminal; During the period when the first detection end receives the first signal sent by the first input end, the main control module sends a second enable signal from the second enable end, and during the period when the gate of the sixth transistor receives the second enable signal, the sixth transistor is in a conducting state, and the second output end is connected to the first input end, so as to realize communication between the communication device and the electronic device; During the period when the second detection end receives the first signal sent by the second input end, the main control module sends a third enable signal from the third enable end, and during the period when the gate of the seventh transistor receives the third enable signal, the seventh transistor is in a conducting state, and the third output end is connected to the second input end, so as to realize communication between the communication device and the electronic device; During a period when the gate of the sixth transistor does not receive the second enable signal, the sixth transistor is in a cut-off state; during a period when the gate of the seventh transistor does not receive the third enable signal, the seventh transistor is in a cut-off state.
6. The electronic system according to claim 4 or 5, characterized in that: The electronic device further includes: a second resistor, a third resistor, a fourth resistor and a fifth resistor. The first detection terminal is connected to the first input terminal through the second resistor, one end of the third resistor is connected to the first detection terminal, and the other end of the third resistor is connected to the ground; The second detection terminal is connected to the second input terminal through the fourth resistor, one end of the fifth resistor is connected to the second detection terminal, and the other end of the fifth resistor is connected to the ground.
7. The electronic system according to claim 4 or 5, characterized in that: The electronic device further includes: a sixth resistor, a seventh resistor, an eighth resistor and a ninth resistor, The gate of the sixth transistor is connected to the second enable terminal through the sixth resistor, one end of the seventh resistor is connected to the gate of the sixth transistor, and the other end of the seventh resistor is connected to the ground; The gate of the seventh transistor is connected to the third enable terminal through the eighth resistor, one end of the ninth resistor is connected to the gate of the seventh transistor, and the other end of the ninth resistor is connected to the ground.
8. The electronic system according to claim 4 or 5, characterized in that: The communication control circuit further includes a tenth resistor, an eleventh resistor and a twelfth resistor, The first end of the tenth resistor is connected to the first output terminal, the first end of the eleventh resistor is connected to the second end of the tenth resistor, the second end of the eleventh resistor is connected to the first end of the twelfth resistor, the second end of the twelfth resistor is connected to ground, the second end of the eleventh resistor is connected to the third detection terminal, and the first output terminal is connected to the third detection terminal through the tenth resistor and the eleventh resistor.
9. The electronic system according to claim 4 or 5, characterized in that: The sixth transistor and the seventh transistor are both NMOS transistors.
10. The electronic system according to claim 1, characterized in that: The first transistor and the third transistor are both NMOS transistors, and the second transistor and the fourth transistor are both PMOS transistors.
11. The electronic system according to any one of claims 1 to 4, characterized in that: The communication device communicates with the electronic device via a two-wire-to-single-wire circuit, wherein the two-wire-to-single-wire circuit has a first connection end and a second connection end, and the two-wire-to-single-wire circuit includes: An inverter chip and a multi-stage buffer chip, wherein the multi-stage buffer chip comprises at least a first-stage buffer, a second-stage buffer and a third-stage buffer, wherein an input end of the third-stage buffer is used to receive a TXD signal output by the communication device, an output end of the third-stage buffer is connected to an enable end of the second-stage buffer, an input end of the first-stage buffer and an input end of the inverter chip, an output end of the inverter chip is connected to an enable end of the first-stage buffer, an output end of the first-stage buffer serves as the first connection end, an input end of the second-stage buffer is connected to the first connection end, an output end of the second-stage buffer is used to output an RXD signal to the communication device, and the second connection end is connected to ground; In the communication mode, the first connection end is connected to one of the first input end or the second input end, the second connection end is connected to the other of the first input end or the second input end, and the first connection end transmits a DATA signal to the electronic device.
12. The electronic system according to claim 11, characterized in that: The two-wire to single-wire circuit further includes: a thirteenth resistor, a fourteenth resistor and a fifteenth resistor. One end of the thirteenth resistor is connected to the output end of the first-stage buffer, and the other end of the thirteenth resistor is connected to the power supply voltage; One end of the fifteenth resistor is connected to the input end of the inverter chip, and the other end of the fifteenth resistor is connected to the power supply voltage; The enable terminal of the third-stage buffer is connected to the power supply voltage through the fourteenth resistor.
13. The electronic system according to claim 11, characterized in that: The electronic system includes a communication component, the two-wire to single-wire circuit is arranged in the communication component, and the communication component also includes a connector. The connector includes: a first port, a second port, a third port, a fourth port and a fifth port. A power supply voltage is provided to the two-wire to single-wire circuit through the first port or the fifth port, and a ground voltage is provided to the two-wire to single-wire circuit through the fourth port. The second port is connected to the input end of the third-level buffer for receiving the TXD signal, and the third port is connected to the output end of the first-level buffer for outputting the RXD signal.
14. The electronic system according to claim 13, characterized in that: The communication component further includes a sixteenth resistor and a seventeenth resistor, One end of the sixteenth resistor is connected to the first port, and the other end of the sixteenth resistor is connected to a first voltage signal; one end of the seventeenth resistor is connected to the fifth port, and the other end of the seventeenth resistor is connected to a second voltage signal, and a voltage value of the first voltage signal is different from a voltage value of the second voltage signal; Among them, the resistance value of one of the sixteenth resistor and the seventeenth resistor is zero, and the resistance value of the other one is infinite.
15. A control method for an electronic system, characterized in that: include: Provided is an electronic system according to any one of claims 1 to 14, wherein the electronic system comprises: An electronic device and a communication device, wherein the electronic device at least comprises: a charging circuit and a switch circuit, wherein an input end of the switch circuit is connected to a first output end of the charging circuit, an output end of the switch circuit is connected to a power supply of the electronic device, and the switch circuit is controlled to open or close a connection path between the first output end and the power supply; During the period when the switch circuit turns on the connection path between the first output terminal and the power supply, the electronic device is in a charging mode, and during the period when the switch circuit turns off the connection path between the first output terminal and the power supply, the electronic device is in a communication mode. In the communication mode, the communication device is connected to the first input terminal of the charging circuit and the second input terminal of the charging circuit to communicate with the electronic device through the first input terminal or the second input terminal.
