A connection detection circuit
By introducing a control unit and a detection unit into the connection detection circuit, voltage detection is only started when the connection port is determined to be connected to the device, which solves the problem of high power consumption caused by continuous detection of the voltage detection unit and improves the battery life of the mobile terminal and user experience.
Patent Information
- Application Number
- CN201811295051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-01
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2038-11-01
AI Technical Summary
In the prior art, the voltage detection unit continuously detects the voltage of the Type-C interface connection port, causing the mobile terminal to consume too much power in the unconnected state, reducing battery life and user experience.
A connection detection circuit is designed to generate a detection signal through the control unit receiving control signals. The voltage detection unit is only started when it is determined that the connection port is connected with a device, and a low-power prejudgment method is adopted to avoid continuous detection.
It reduces the power consumption of mobile terminals in the unconnected state, improves battery life and user experience, and realizes effective connection detection.
Smart Images

Figure CN109298985B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a connection detection circuit. Background Art
[0002] Universal Serial Bus (USB) is an external bus standard used to regulate the connection and communication between computers and external devices. Many domestic manufacturers have already used USB data cables based on Type-C interfaces on their own mobile devices on a large scale. Among them, connection detection is an essential part of device connection using the Type-C interface.
[0003] There are two main connection detection methods. One is to continuously collect the voltage of CC1 and CC2 lines in the Type-C connection port through a voltage detection unit including an analog-to-digital converter (ADC) to determine whether it is connected to other devices. Such continuous detection of the voltage of the connection port will cause large power consumption. The other is to confirm the voltage range of CC1 and CC2 lines through a voltage detection unit including multiple comparators to determine whether the connection port is connected to other devices. Since this process requires adjusting the reference voltage and the current and resistance within the accuracy range required by the connection protocol, it will also cause large power consumption. Since mobile terminals such as mobile phones are in a connected state for a short time, such high power consumption in an unconnected state will reduce the battery life of the mobile terminal and reduce the user experience. Summary of the invention
[0004] The present invention provides a connection detection circuit, which can solve the problem in the prior art that a mobile terminal consumes too much power in an unconnected state because a voltage detection unit continuously detects the voltage of a connection port.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A connection detection circuit, comprising:
[0007] A control unit, used for receiving a control signal, and generating a corresponding detection signal according to the control signal and sending it to the detection unit; the control signal is used for determining a mode when the connection detection circuit is connected to the device;
[0008] The detection unit connected to the control unit is used to detect whether a device is connected to the connection port according to the detection signal, generate a detection result, and send the detection result to the processing unit;
[0009] The processing unit connected to the detection unit is used to determine whether a device is connected to the connection port according to the detection result, and if so, send a start signal to the voltage detection unit, and the start signal is used to start the voltage detection unit.
[0010] Optionally, the control unit is used to generate a first detection signal and send it to the detection unit when the control signal is a downlink port control signal; and to generate a second detection signal and send it to the detection unit when the control signal is an uplink port control signal.
[0011] Optionally, the connection detection circuit further includes:
[0012] an oscillating unit, configured to generate a clock signal when the control signal is a dual-role port control signal;
[0013] The control unit generates the first detection signal and the second detection signal in turn according to the clock signal and sends them to the detection unit.
[0014] Optionally, the control unit includes:
[0015] A first OR gate having input terminals connected to output terminals of the first AND gate and the second AND gate respectively;
[0016] An oscillating unit having an input end connected to the output end of the first OR gate and an output end connected to the first input end of a third AND gate;
[0017] The third AND gate having a second input terminal connected to the output terminal of the first OR gate and an output terminal connected to the second input terminal of the second OR gate;
[0018] The second OR gate has a first input terminal connected to the output terminal of the fourth AND gate and an output terminal connected to the second input terminal of the fifth AND gate;
[0019] The first input terminal is connected to the output terminal of the first NAND gate, and the output terminal is connected to the fifth AND gate of the detection unit.
[0020] Optionally, the detection unit includes:
[0021] A first detection unit, configured to detect whether a device is connected to the CC1 pin of the connection port according to the detection signal;
[0022] The second detection unit is used to detect whether a device is connected to the CC2 pin of the connection port according to the detection signal.
[0023] Optionally, the first detection unit includes:
[0024] A first power source, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a CC1 pin connection end, a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch, a first inverter, a first comparator and a first output end, wherein:
[0025] A first end of the first resistor is connected to the first power supply, and a second end of the first resistor is connected to a first end of the second resistor;
[0026] The first end of the second resistor is connected to the second end of the first resistor, and the second end of the second resistor is connected to the first end of the third resistor;
[0027] The first end of the third resistor is connected to the second end of the second resistor, and the second end of the third resistor is grounded;
[0028] A first end of the first switch is connected to a first end of the first resistor, and a second end of the first switch is connected to a first end of the fourth resistor;
[0029] A first end of the second switch is connected to a first end of the fourth resistor, and a second end of the second switch is connected to a second end of the third resistor;
[0030] The first end of the fifth resistor is connected to the second end of the fourth resistor, and the second end of the fifth resistor is connected to the CC1 pin connection end;
[0031] A first end of the third switch is connected to a second end of the first resistor, and a second end of the third switch is connected to a positive input end of the first comparator;
[0032] A first end of the fourth switch is connected to a second end of the second resistor, and a second end of the fourth switch is connected to a positive input end of the first comparator;
[0033] The negative input terminal of the first comparator is connected to the second terminal of the fourth resistor;
[0034] A first end of the fifth switch is connected to the output end of the first comparator, and a second end of the fifth switch is connected to the first output end;
[0035] The input end of the first inverter is connected to the output end of the first comparator, and the output end of the first inverter is connected to the first end of the sixth switch;
[0036] The second end of the sixth switch is connected to the first output end.
[0037] Optionally, the second detection unit includes:
[0038] a second power supply, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, a CC2 pin connection terminal, a seventh switch, an eighth switch, a ninth switch, a tenth switch, an eleventh switch, a twelfth switch, a second inverter, a second comparator and a second output terminal, wherein:
[0039] The first end of the sixth resistor is connected to the second power supply, and the second end of the sixth resistor is connected to the first end of the seventh resistor;
[0040] The first end of the seventh resistor is connected to the second end of the sixth resistor, and the second end of the seventh resistor is connected to the first end of the eighth resistor;
[0041] The first end of the ninth resistor is connected to the second end of the eighth resistor, and the second end of the ninth resistor is grounded;
[0042] A first end of the seventh switch is connected to a first end of the sixth resistor, and a second end of the seventh switch is connected to a first end of the ninth resistor;
[0043] A first end of the eighth switch is connected to a first end of the ninth resistor, and a second end of the eighth switch is connected to a second end of the eighth resistor;
[0044] The first end of the tenth resistor is connected to the second end of the ninth resistor, and the second end of the tenth resistor is connected to the CC2 pin connection end;
[0045] The first end of the ninth switch is connected to the second end of the sixth resistor, and the second end of the ninth switch is connected to the positive input end of the second comparator;
[0046] A first end of the tenth switch is connected to the second end of the seventh resistor, and a second end of the tenth switch is connected to the positive input end of the second comparator;
[0047] The negative input terminal of the second comparator is connected to the second terminal of the ninth resistor;
[0048] A first end of the eleventh switch is connected to the output end of the second comparator, and a second end of the eleventh switch is connected to the second output end;
[0049] The input end of the second inverter is connected to the output end of the second comparator, and the output end of the second inverter is connected to the first end of the twelfth switch;
[0050] The second end of the twelfth switch is connected to the second output end.
[0051] Optionally, the processing unit is an OR gate, wherein two input ends of the OR gate are respectively connected to output ends of the first detection unit and the second detection unit.
[0052] Optionally, the processing unit further includes:
[0053] A filtering unit is used to filter the start signal.
[0054] Optionally, the filtering unit includes:
[0055] an eleventh resistor having a first end connected to the output end of the OR gate;
[0056] A capacitor having one end connected to the second end of the eleventh resistor and the other end grounded.
[0057] It can be known from the above technical solution that the present invention discloses a connection detection circuit, which can generate a detection signal according to a received control signal, detect whether a device is connected to the connection port according to the detection signal, and send a start signal to the voltage detection unit when it is determined that a device is connected to the connection port. The present invention uses a low-power connection detection circuit to pre-judge whether a device is connected to the connection port, and only starts the voltage detection unit when the connection detection circuit determines that a device is connected to the connection port, thereby solving the problem that the voltage detection unit continuously detects the voltage of the connection port, resulting in excessive power consumption of the mobile terminal in the unconnected state, reducing the power consumption of the mobile terminal in the unconnected state, and at the same time improving the endurance of the mobile terminal and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0059] Figure 1 A circuit diagram of a connection detection circuit disclosed in an embodiment of the present invention;
[0060] Figure 2 is a circuit diagram of the control unit;
[0061] Figure 3 is a circuit diagram of a first detection unit;
[0062] Figure 4 A circuit diagram when the terminal is connected to a conventional UFP device as a DFP device;
[0063] Figure 5A circuit diagram when the terminal is connected to a conventional DFP device as a UFP device;
[0064] Figure 6 A circuit diagram when a terminal as a DFP device is connected to a terminal as a UFP device;
[0065] Figure 7 This is the circuit diagram of the processing unit after adding the filtering unit. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] The present invention provides a connection detection circuit, which can solve the problem in the prior art that a mobile terminal consumes too much power in an unconnected state because a voltage detection unit continuously detects the voltage of a connection port.
[0068] like Figure 1 As shown, an embodiment of the present invention discloses a connection detection circuit, including:
[0069] The control unit 101 is used to receive a control signal and generate a corresponding detection signal according to the control signal and send it to the detection unit 102; the control signal is used to determine the mode when the connection detection circuit is connected to the device.
[0070] It should be noted that the control signal is sent by the control center of the terminal where the connection detection circuit is located. The control center sends a corresponding control signal to the control unit 101 according to the role of the terminal when it is connected to other devices for data transmission. Generally, when the terminal receives data, the port connected to the other device is a downstream port (Downstream Facing Port, DFP). At this time, the control center of the terminal sends a corresponding control signal to the connection detection circuit, so that the connection detection circuit is in a mode of detecting whether there is a device connected to the connection port serving as a downstream port. Similarly, when the terminal sends data, the port connected to the other device is an upstream port (Upstream Facing Port, UFP). At this time, the control center of the terminal sends a corresponding control signal to the connection detection circuit, so that the connection detection circuit is in a mode of detecting whether there is a device connected to the connection port serving as an upstream port.
[0071] Optional, such as Figure 2 FIG. 1 is a circuit diagram of a control unit 101, wherein the control unit 101 includes:
[0072] A first OR gate having input terminals connected to output terminals of the first AND gate and the second AND gate respectively;
[0073] An oscillating unit having an input end connected to the output end of the first OR gate and an output end connected to the first input end of a third AND gate;
[0074] The third AND gate having a second input terminal connected to the output terminal of the first OR gate and an output terminal connected to the second input terminal of the second OR gate;
[0075] The second OR gate has a first input terminal connected to the output terminal of the fourth AND gate and an output terminal connected to the second input terminal of the fifth AND gate;
[0076] The first input terminal is connected to the output terminal of the first NAND gate, and the output terminal is connected to the fifth AND gate of the detection unit 102 .
[0077] Optionally, the control unit 101 is used to generate a first detection signal and send it to the detection unit 102 when the control signal is a downlink port control signal; and to generate a second detection signal and send it to the detection unit 102 when the control signal is an uplink port control signal.
[0078] Optionally, the connection detection circuit further includes:
[0079] The oscillating unit is used to generate a clock signal when the control signal is a dual-role port control signal.
[0080] The control unit generates the first detection signal and the second detection signal in turn according to the clock signal and sends them to the detection unit.
[0081] Specifically, the control unit simultaneously receives two signals S0 and S1 as control signals, as shown in Table 1, which is a relationship table between detection mode and control signal. Different values of the two signals represent control signals of different modes, where DRP is a dynamic reconfiguration port (Dynamic Reconfiguration Port), also known as a dual-role port, which can switch between DFP mode and UFP mode according to different control signals.
[0082]
[0083] Table 1
[0084] Depend on Figure 2It can be seen that when S0=0, S1=0, the connection detection circuit is in UFP mode, and the value of the final detection signal is 0. When S0=0, S1=1, the connection detection circuit is in DFP mode, and the value of the final detection signal is 1. When S0=1, S1=0 or when S0=1, S1=1, the connection detection circuit is in DRP mode, and the value of the final detection signal will switch alternately between 0 and 1 according to the clock signal.
[0085] The detection unit 102 connected to the control unit 101 is used to detect whether a device is connected to the connection port according to the detection signal, generate a detection result, and send the detection result to the processing unit 103.
[0086] Optionally, the detection unit 102 includes:
[0087] The first detection unit is used to detect whether a device is connected to the CC1 pin of the connection port according to the detection signal.
[0088] The second detection unit is used to detect whether a device is connected to the CC2 pin of the connection port according to the detection signal.
[0089] Optional, such as Figure 3 FIG. 1 is a circuit diagram of a first detection unit, wherein the first detection unit comprises:
[0090] A first power supply VDD, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a CC1 pin connection end, a first switch SW1, a second switch SWB1, a third switch SW2, a fourth switch SWB2, a fifth switch SW3, a sixth switch SWB3, a first inverter INV1, a first comparator CMP1 and a first output end DET1, wherein:
[0091] A first end of the first resistor R1 is connected to the first power supply VDD, and a second end of the first resistor R1 is connected to a first end of the second resistor R2;
[0092] The first end of the second resistor R2 is connected to the second end of the first resistor R1, and the second end of the second resistor R2 is connected to the first end of the third resistor R3;
[0093] The first end of the third resistor R3 is connected to the second end of the second resistor R2, and the second end of the third resistor R3 is grounded;
[0094] A first end of the first switch SW1 is connected to a first end of the first resistor R1, and a second end of the first switch SW1 is connected to a first end of the fourth resistor R4;
[0095] A first end of the second switch SWB1 is connected to a first end of the fourth resistor R4, and a second end of the second switch SWB1 is connected to a second end of the third resistor R3;
[0096] The first end of the fifth resistor R5 is connected to the second end of the fourth resistor R4, and the second end of the fifth resistor R5 is connected to the CC1 pin connection end;
[0097] A first end of the third switch SW2 is connected to the second end of the first resistor R1, and a second end of the third switch SW2 is connected to the positive input end of the first comparator CMP1;
[0098] A first end of the fourth switch SWB2 is connected to the second end of the second resistor R2, and a second end of the fourth switch SWB2 is connected to the positive input end of the first comparator CMP1;
[0099] The negative input terminal of the first comparator CMP1 is connected to the second terminal of the fourth resistor R4;
[0100] A first end of the fifth switch SW3 is connected to the output end of the first comparator CMP1, and a second end of the fifth switch SW3 is connected to the first output end DET1;
[0101] The input end of the first inverter INV1 is connected to the output end of the first comparator CMP1, and the output end of the first inverter INV1 is connected to the first end of the sixth switch SWB3;
[0102] A second end of the sixth switch SWB3 is connected to the first output end DET1 .
[0103] Among them, the SW switch is closed when the detection signal is 1 and is opened when it is 0. The SWB switch is closed when the detection signal is 0 and is opened when it is 1. When the detection result output by the first output terminal DET1 is 1, it indicates that a device is connected, and when it is 0, it indicates that no device is connected.
[0104] Specifically, when the terminal is connected to other devices as a DFP device, the connection detection circuit is in DFP mode, the detection signal received by the detection unit 102 is 1, and accordingly, the other party is a UFP device.
[0105] After the port is connected to the device, Figure 3 All SW switches in are closed, and all SWB switches are opened. The other UFP device will pull down a resistor, which is connected to the CC1 pin connection end. By setting the resistance value of each resistor, the voltage at the VSW point is lower than the voltage at the VH point. At this time, the result signal output by the first output terminal DET1 is 1.
[0106] When the terminal is connected to other devices as a UFP device, the connection detection circuit is in UFP mode, and the detection signal received by the detection unit 102 is 0, and accordingly, the other party is a DFP device.
[0107] After the port is connected to the device, Figure 3 All SW switches in are disconnected, and all SWB switches are closed. The other DFP device will pull up the level of the CC1 pin connection end through an output current. The output current is generally 80uA, 180uA or 330uA. By setting the resistance value of each resistor, the voltage at the VSW point is higher than the voltage at the VL point. At this time, the result signal output by the first output terminal DET1 is 1.
[0108] When the terminal is connected to other devices as a DRP device, the connection detection circuit will switch to DFP mode and UFP mode alternately for detection. The specific detection method is the same as the above detection method when the terminal is connected to other devices as a DFP device and when the terminal is connected to other devices as a DFP device, and will not be repeated here.
[0109] From the above content, it can be known that in order to ensure that the result output by the first output terminal DET1 is 1 after the device is connected, the resistance in the detection unit 102 needs to be set. The setting requirements for the resistance are different for different situations. The specific setting method is as follows:
[0110] like Figure 4 As shown in the figure, it is a circuit diagram when the terminal is connected to the traditional UFP device as a DFP device. The traditional UFP device generally uses a 5.1K resistor as a pull-down resistor connected to the CC1 pin connection terminal. The result signal output by the first output terminal DET1 is required to be 1, that is, the voltage at the VSW point is lower than the voltage at the VH point. The resistor needs to meet the following conditions:
[0111]
[0112] After sorting, we get expression 1:
[0113]
[0114] like Figure 5As shown in the figure, it is a circuit diagram when the terminal is connected to the traditional DFP device as a UFP device. The traditional DFP device generally uses an output current to pull up the level of the CC1 pin connection end. The circuit of the detection unit 102 needs to meet the minimum current multiplied by R4 is greater than the voltage at the connection point of R3 and R2, which will make the resistance of R4 and R5 larger, so that R5 will be directly pulled up to the power supply of the other party's DFP device. In the figure, the power supply voltage of the other party's DFP device is VDD1. Then the result signal output by the first output terminal DET1 is required to be 1, that is, the voltage at the VSW point is higher than the voltage at the VL point, that is, the resistance needs to meet the following conditions:
[0115]
[0116] Then the value of the above resistor is related to VDD1 and VDD. According to the provisions of the Type-C protocol, VDD1 will be greater than 1.7V, but generally less than 5.5V. In order to calculate the limit, VDD1 is taken as 1.7V and VDD is taken as 5.5V. Then we finally get Expression 2:
[0117]
[0118] In summary, as long as the resistance values of the resistors in the detection unit 102 satisfy the conditions in Expression 1 and Expression 2 at the same time, it can be ensured that when a device is connected to the connection port, the detection result output by the detection unit 102 is 1.
[0119] In another embodiment of the present invention, the resistance values in the detection unit 102 are R1=R, R2=14R, R3=R, R4=7R, R5=R, where R=500KΩ.
[0120] It can be seen through verification that the above values meet the conditions of Expression 1 and Expression 2, and can enable the detection unit 102 to have the detection function required by the present invention.
[0121] It should be noted that the above resistance values are only for the convenience of understanding. The present invention does not limit the specific resistance values and can be set as needed.
[0122] In addition, if Figure 6 As shown, it is a circuit diagram when the terminal as a DFP device is connected to the terminal as a UFP device.
[0123] Depend on Figure 6 It can be seen that the voltage at point A is
[0124]
[0125] The voltage at point B is:
[0126]
[0127] According to the above resistor configuration, R1=R, R2=14R, R3=R, R4=7R, R5=R.
[0128] Then the voltage at point A is
[0129]
[0130] The voltage of point VH on the DFP side is:
[0131]
[0132] It can be seen that the voltage at point A is lower than the voltage at point VH on the DFP side, that is, the DFP device can detect that the UFP device is connected.
[0133] The voltage at point B is:
[0134]
[0135] The voltage of VL point on the UFP side is:
[0136]
[0137] It can be seen that the voltage at point B is higher than the voltage at point VL on the UFP side, that is, the UFP device can detect that the DFP device is connected.
[0138] Optionally, the second detection unit includes:
[0139] a second power supply, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, a CC2 pin connection terminal, a seventh switch, an eighth switch, a ninth switch, a tenth switch, an eleventh switch, a twelfth switch, a second inverter, a second comparator and a second output terminal, wherein:
[0140] The first end of the sixth resistor is connected to the second power supply, and the second end of the sixth resistor is connected to the first end of the seventh resistor;
[0141] The first end of the seventh resistor is connected to the second end of the sixth resistor, and the second end of the seventh resistor is connected to the first end of the eighth resistor;
[0142] The first end of the ninth resistor is connected to the second end of the eighth resistor, and the second end of the ninth resistor is grounded;
[0143] A first end of the seventh switch is connected to a first end of the sixth resistor, and a second end of the seventh switch is connected to a first end of the ninth resistor;
[0144] A first end of the eighth switch is connected to a first end of the ninth resistor, and a second end of the eighth switch is connected to a second end of the eighth resistor;
[0145] The first end of the tenth resistor is connected to the second end of the ninth resistor, and the second end of the tenth resistor is connected to the CC2 pin connection end;
[0146] The first end of the ninth switch is connected to the second end of the sixth resistor, and the second end of the ninth switch is connected to the positive input end of the second comparator;
[0147] A first end of the tenth switch is connected to the second end of the seventh resistor, and a second end of the tenth switch is connected to the positive input end of the second comparator;
[0148] The negative input terminal of the second comparator is connected to the second terminal of the ninth resistor;
[0149] A first end of the eleventh switch is connected to the output end of the second comparator, and a second end of the eleventh switch is connected to the second output end;
[0150] The input end of the second inverter is connected to the output end of the second comparator, and the output end of the second inverter is connected to the first end of the twelfth switch;
[0151] The second end of the twelfth switch is connected to the second output end.
[0152] It should be noted that the first detection unit and the second detection unit have the same circuit structure and function. For the specific working description of the second detection unit, please refer to the relevant part of the first detection unit.
[0153] The processing unit 103 connected to the detection unit 102 is used to determine whether a device is connected to the connection port according to the detection result, and if so, send a start signal to the voltage detection unit, and the start signal is used to start the voltage detection unit.
[0154] It should be noted that the voltage detection unit can use the same technical means as the voltage detection unit in the background technology to perform connection detection, but in the present invention, the voltage detection unit is usually in a closed state, and only starts to detect the voltage of the connection port CC1 and CC2 lines when a start signal is received.
[0155] Optionally, the processing unit 103 is an OR gate, wherein two input ends of the OR gate are respectively connected to output ends of the first detection unit and the second detection unit.
[0156] It should be noted that since the processing unit 103 is an OR gate, as long as one of the first detection unit and the second detection unit detects that a device is connected to the connection port, that is, the output detection result is 1, it can be determined that a device is connected to the connection port, and a start signal is sent to the voltage detection unit.
[0157] Optionally, the processing unit 103 further includes:
[0158] A filtering unit is used to filter the start signal.
[0159] It should be noted that filtering the start signal can filter out burr signals in the start signal to avoid false start of the voltage detection unit.
[0160] Optionally, the filtering unit includes:
[0161] An eleventh resistor R11 having a first terminal connected to the output terminal of the OR gate.
[0162] A capacitor C has one end connected to the second end of the eleventh resistor R11 and the other end connected to the ground.
[0163] like Figure 7 , which is a circuit diagram of the processing unit 103 after adding a filtering unit.
[0164] The connection detection circuit disclosed in this embodiment can generate a detection signal according to the received control signal, detect whether a device is connected to the connection port according to the detection signal, and send a start signal to the voltage detection unit when it is determined that a device is connected to the connection port. The present invention uses a low-power connection detection circuit to pre-judge whether a device is connected to the connection port, and only starts the voltage detection unit when the connection detection circuit determines that a device is connected to the connection port, thereby solving the problem that the voltage detection unit continuously detects the voltage of the connection port, resulting in excessive power consumption of the mobile terminal in the unconnected state, reducing the power consumption of the mobile terminal in the unconnected state, and at the same time improving the endurance of the mobile terminal and the user experience.
[0165] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0167] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A connection detection circuit, It is characterized in that include: A control unit, used for receiving a control signal, and generating a corresponding detection signal according to the control signal and sending it to the detection unit; the control signal is used for determining a mode when the connection detection circuit is connected to the device; The detection unit connected to the control unit is used to detect whether a device is connected to the connection port according to the detection signal, generate a detection result, and send the detection result to the processing unit; The processing unit connected to the detection unit is used to determine whether a device is connected to the connection port according to the detection result, and if so, send a start signal to the voltage detection unit, wherein the start signal is used to start the voltage detection unit; The detection unit includes: a first detection unit, configured to detect whether a device is connected to the CC1 pin of the connection port according to the detection signal; The first detection unit includes: a first power supply, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a CC1 pin connection end, a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch, a first inverter, a first comparator and a first output end, wherein: A first end of the first resistor is connected to the first power supply, and a second end of the first resistor is connected to a first end of the second resistor; The first end of the second resistor is connected to the second end of the first resistor, and the second end of the second resistor is connected to the first end of the third resistor; The first end of the third resistor is connected to the second end of the second resistor, and the second end of the third resistor is grounded; A first end of the first switch is connected to a first end of the first resistor, and a second end of the first switch is connected to a first end of the fourth resistor; A first end of the second switch is connected to a first end of the fourth resistor, and a second end of the second switch is connected to a second end of the third resistor; The first end of the fifth resistor is connected to the second end of the fourth resistor, and the second end of the fifth resistor is connected to the CC1 pin connection end; A first end of the third switch is connected to a second end of the first resistor, and a second end of the third switch is connected to a positive input end of the first comparator; A first end of the fourth switch is connected to a second end of the second resistor, and a second end of the fourth switch is connected to a positive input end of the first comparator; The negative input terminal of the first comparator is connected to the second terminal of the fourth resistor; A first end of the fifth switch is connected to the output end of the first comparator, and a second end of the fifth switch is connected to the first output end; The input end of the first inverter is connected to the output end of the first comparator, and the output end of the first inverter is connected to the first end of the sixth switch; The second end of the sixth switch is connected to the first output end; in, VDD1 is used to characterize the voltage value of the device connected to the connection port, VDD is used to characterize the voltage value of the first power supply, R1 is used to characterize the resistance value of the first resistor, R2 is used to characterize the resistance value of the second resistor, R3 is used to characterize the resistance value of the third resistor, R4 is used to characterize the resistance value of the fourth resistor, and R5 is used to characterize the resistance value of the fifth resistor.
2. The connection detection circuit according to claim 1, It is characterized in that The control unit is used to generate a first detection signal and send it to the detection unit when the control signal is a downlink port control signal; and to generate a second detection signal and send it to the detection unit when the control signal is an uplink port control signal.
3. The connection detection circuit according to claim 2, It is characterized in that Also includes: an oscillating unit, configured to generate a clock signal when the control signal is a dual-role port control signal; The control unit generates the first detection signal and the second detection signal in turn according to the clock signal and sends them to the detection unit.
4. The connection detection circuit according to claim 3, It is characterized in that The control unit comprises: A first OR gate having input terminals connected to output terminals of the first AND gate and the second AND gate respectively; An oscillating unit having an input end connected to the output end of the first OR gate and an output end connected to the first input end of a third AND gate; The third AND gate having a second input terminal connected to the output terminal of the first OR gate and an output terminal connected to the second input terminal of the second OR gate; The second OR gate has a first input terminal connected to the output terminal of the fourth AND gate and an output terminal connected to the second input terminal of the fifth AND gate; The first input terminal is connected to the output terminal of the first NAND gate, and the output terminal is connected to the fifth AND gate of the detection unit.
5. The connection detection circuit according to claim 1, It is characterized in that The detection unit further includes: The second detection unit is used to detect whether a device is connected to the CC2 pin of the connection port according to the detection signal.
6. The connection detection circuit according to claim 5, It is characterized in that The second detection unit comprises: a second power supply, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, a CC2 pin connection terminal, a seventh switch, an eighth switch, a ninth switch, a tenth switch, an eleventh switch, a twelfth switch, a second inverter, a second comparator and a second output terminal, wherein: The first end of the sixth resistor is connected to the second power supply, and the second end of the sixth resistor is connected to the first end of the seventh resistor; The first end of the seventh resistor is connected to the second end of the sixth resistor, and the second end of the seventh resistor is connected to the first end of the eighth resistor; The first end of the ninth resistor is connected to the second end of the eighth resistor, and the second end of the ninth resistor is grounded; A first end of the seventh switch is connected to a first end of the sixth resistor, and a second end of the seventh switch is connected to a first end of the ninth resistor; A first end of the eighth switch is connected to a first end of the ninth resistor, and a second end of the eighth switch is connected to a second end of the eighth resistor; The first end of the tenth resistor is connected to the second end of the ninth resistor, and the second end of the tenth resistor is connected to the CC2 pin connection end; The first end of the ninth switch is connected to the second end of the sixth resistor, and the second end of the ninth switch is connected to the positive input end of the second comparator; A first end of the tenth switch is connected to the second end of the seventh resistor, and a second end of the tenth switch is connected to the positive input end of the second comparator; The negative input terminal of the second comparator is connected to the second terminal of the ninth resistor; A first end of the eleventh switch is connected to the output end of the second comparator, and a second end of the eleventh switch is connected to the second output end; The input end of the second inverter is connected to the output end of the second comparator, and the output end of the second inverter is connected to the first end of the twelfth switch; The second end of the twelfth switch is connected to the second output end.
7. The connection detection circuit according to claim 5, It is characterized in that The processing unit is an OR gate, wherein two input ends of the OR gate are respectively connected to output ends of the first detection unit and the second detection unit.
8. The connection detection circuit according to claim 7, It is characterized in that The processing unit further includes: A filtering unit is used to filter the start signal.
9. The connection detection circuit according to claim 8, It is characterized in that The filtering unit comprises: an eleventh resistor having a first end connected to the output end of the OR gate; A capacitor having one end connected to the second end of the eleventh resistor and the other end grounded.
