Terminal equipment

By setting the insertion detection circuit and identification circuit in the terminal device, combined with the switch module, the grounding pin is controlled only when the external device type is a preset type, which solves the problem that the grounding pin cannot be grounded normally, and improves the flow capability of the data transmission interface and the accuracy of the grounding pin.

CN223078688UActive Publication Date: 2025-07-08BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422115135.4
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-07-08
Estimated Expiration
2034-08-29

AI Technical Summary

Technical Problem

In the prior art, when the data transmission interface of the terminal device is used for insertion detection using the ground pin, the ground pin cannot be grounded normally, and the ground loop is missing, which affects the function and flow capability of the data transmission interface.

Method used

By setting the insertion detection circuit and identification circuit in the terminal device, combined with the switch module, the grounding pin is controlled to ground only when the external device type is a preset type, forming an effective ground loop to ensure the normal use of the data transmission interface.

Benefits of technology

提升了数据传输接口的通流能力,减少了由于插入检测错误导致的功能影响,提高了接地引脚接地的精确性和稳定性,满足Type-C协议的要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223078688U_ABST
    Figure CN223078688U_ABST
Patent Text Reader

Abstract

The utility model relates to terminal equipment. The terminal equipment comprises a data transmission interface which is provided with a grounding pin and an identification pin; the insertion detection circuit is electrically connected with the grounding pin and used for outputting a detection result, and the detection result is used for indicating whether the data transmission interface is connected with external equipment or not; the identification circuit is connected with the identification pin and used for outputting an identification result, and the identification result is used for indicating the type of the external equipment; the first end of the switch module is electrically connected to a connecting line between the insertion detection circuit and the grounding pin, and the second end of the switch module is electrically connected with the first grounding end of the terminal equipment; wherein under the condition that the detection result indicates that the data transmission interface is connected with the external equipment and the identification result indicates that the type of the external equipment belongs to a preset type, a connecting line between the first end and the second end of the switch module is in a conducting state. The grounding pin of the terminal device can be grounded when insertion detection is not carried out, and an effective ground loop is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electronic devices, and in particular, to a terminal device. Background Art

[0002] With the rapid development of electronic products and the increasing improvement of people's living standards, more and more terminal devices are constantly innovating; currently, electronic products mainly include portable terminal devices such as mobile phones and tablet computers, as well as wearable terminal devices such as earphones and watches; these terminal devices are usually provided with a data transmission interface, which can be connected to a charging device to achieve wired charging, and the data transmission interface can also be connected to other terminal devices to achieve data transmission between other terminal devices, such as two-way communication.

[0003] In the related art, a terminal device can use a ground pin in a data transmission interface to detect the insertion of an external device. However, the solution of using this ground pin for insertion detection makes the data transmission interface lack a ground loop, affecting the function of the data transmission interface. Summary of the Utility Model

[0004] To overcome the problems existing in the related art, the present disclosure provides a terminal device. The ground pin of the terminal device in the present disclosure can be grounded when no insertion detection is performed, forming an effective ground loop.

[0005] An embodiment of the present disclosure provides a terminal device, including:

[0006] A data transmission interface having a ground pin and an identification pin;

[0007] An insertion detection circuit electrically connected to the ground pin for outputting a detection result, and the detection result is used to indicate whether the data transmission interface is connected to an external device;

[0008] An identification circuit connected to the identification pin for outputting an identification result, and the identification result is used to indicate the type of the external device;

[0009] A switch module, a first end of the switch module is electrically connected to a connection line between the insertion detection circuit and the ground pin, and a second end of the switch module is electrically connected to a first ground end of the terminal device;

[0010] Wherein, when the detection result indicates that the data transmission interface is connected to the external device and the identification result indicates that the type of the external device belongs to a preset type, a connection line between the first end and the second end of the switch module is in a conducting state.

[0011] In some embodiments, the terminal device further includes:

[0012] A processing module, having a first signal terminal, a second signal terminal, and a third signal terminal;

[0013] The first signal terminal is electrically connected to the insertion detection circuit for obtaining the detection result;

[0014] The second signal terminal is electrically connected to the identification circuit for obtaining the identification result;

[0015] The third signal terminal is electrically connected to the third terminal of the switch module;

[0016] The processing module is configured to input a control signal to the switch module through the third signal terminal when the detection result indicates that the data transmission interface is connected to the external device and the identification result indicates that the type of the external device belongs to a preset type;

[0017] Wherein, the control signal is used to control the connection line between the first end and the second end of the switch module to be in a conducting state.

[0018] In some embodiments, the processing module further includes a fourth signal terminal;

[0019] The fourth signal terminal is connected to the identification circuit;

[0020] The processing module is further configured to input an identification signal to the identification circuit and the identification pin through the fourth signal terminal when the detection result indicates that the data transmission interface is connected to the external device;

[0021] Wherein, the identification signal is used to control the identification circuit to detect the type of the external device.

[0022] In some embodiments, the insertion detection circuit includes:

[0023] A voltage input terminal for inputting a detection voltage;

[0024] A matching circuit is electrically connected to the ground pin, the voltage input terminal, and the second ground terminal of the insertion detection circuit respectively;

[0025] A comparator, having a positive input terminal, a negative input terminal, and an output terminal, the positive input terminal and the negative input terminal are respectively connected to different voltage-dividing positions of the matching circuit, and the output terminal is electrically connected to the first signal terminal;

[0026] Wherein, the comparator is configured to output the detection result based on the voltage difference between the voltage at the positive input terminal and the voltage at the negative input terminal after the matching circuit divides the detection voltage.

[0027] In some embodiments, the matching circuit includes: a first impedance element, a second impedance element, a third impedance element, a fourth impedance element, and a fifth impedance element;

[0028] The first impedance element and the second impedance element are serially connected on the connection line between the voltage input terminal and the second ground terminal; the negative input terminal is electrically connected to a first node between the first impedance element and the second impedance element;

[0029] The third impedance element and the fourth impedance element are serially connected on the connection line between the voltage input terminal and the second ground terminal; the positive input terminal is electrically connected to a second node between the third impedance element and the fourth impedance element;

[0030] The fifth impedance element is connected on the connection line between the ground pin and the second node.

[0031] In some embodiments, the switch module includes a mechanical switch or a signal switch.

[0032] In some embodiments, the signal switch includes a field effect transistor.

[0033] In some embodiments, there are at least two ground pins, and the insertion detection circuit includes at least two;

[0034] Among them, at least two of the ground pins are respectively electrically connected to different insertion detection circuits.

[0035] In some embodiments, the switch module has at least two first ends;

[0036] At least two detection connection lines are formed between at least two of the ground pins and different insertion detection circuits;

[0037] At least two first ends of the switch module are respectively connected to at least two different detection connection lines.

[0038] In some embodiments, the switch module includes at least two;

[0039] At least two detection connection lines are formed between at least two of the ground pins and different insertion detection circuits;

[0040] At least two first ends in at least two of the switch modules are respectively connected to at least two different detection connection lines.

[0041] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

[0042] In the embodiments of the present disclosure, the ground pin of the data transmission interface of the terminal device is connected to the insertion detection circuit, the identification pin is connected to the identification circuit, and the switch module is connected to the ground pin and the first ground terminal; when it is determined that an external device is connected and the type of the external device is determined, the terminal device grounds the ground pin through the switch module to form an effective ground loop, improving the current-carrying capacity of the data transmission interface and ensuring the normal use of the data transmission interface; moreover, since the embodiments of the present disclosure can control the grounding of the ground pin only when the type of the external device belongs to a preset type, the influence of the insertion detection circuit adjusting the insertion pin to be grounded due to misdetection on the function of the data transmission interface is reduced, and the accuracy and stability of controlling the grounding of the ground pin are improved.

[0043] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0045] Figure 1 is a structural diagram of a terminal device shown according to an exemplary embodiment.

[0046] Figure 2 is a schematic structural diagram of an insertion detection circuit shown according to an exemplary embodiment.

[0047] Figure 3a is a schematic diagram of the connection manner between the ground pin and the insertion detection circuit shown according to an exemplary embodiment Figure 1 .

[0048] Figure 3b is a schematic diagram of the connection manner between the ground pin and the insertion detection circuit shown according to an exemplary embodiment Figure 2 .

[0049] Figure 4 is a schematic diagram of the pin circuit of the data transmission interface shown according to an exemplary embodiment.

[0050] Figure 5 is a schematic circuit diagram of the identification pin and the identification circuit shown according to an exemplary embodiment.

[0051] Figure 6 is a waveform diagram of the identification signal output according to an exemplary embodiment.

[0052] Figure 7 is a block diagram of the structure of a terminal device shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] Currently, in order to enable long-term use of a terminal device, a data transmission interface is usually configured, and this data transmission interface can be used for data transmission or wired charging. Taking the data transmission interface as a Type-C interface in the Universal Serial Bus (USB) as an example, in the related art, when detecting whether an external device is connected by using the Type-C interface, it is necessary to continuously drive two configuration channel (CC) pins on the Type-C interface to be in a working state, that is, the two CC pins are always in a pulse width modulation (PWM) signal inversion state, and this solution is likely to cause electrical corrosion of the two CC pins. Thus, on the product side of the terminal device, a ground pin GND set in the Type-C can be used to detect whether there is an electrical connection between the Type-C interface and an external device. In this way, the two CC pins do not need to be always in the PWM signal inversion state, which slows down the electrical corrosion of the CC pins to a certain extent.

[0055] However, if the ground pin is used to detect whether there is an electrical connection between the Type-C interface and an external device, then this ground pin cannot be normally grounded for use, resulting in a shortage of the number of ground pins and a lack of a ground loop, which not only increases the impedance of the return path but also cannot meet the requirements of the Type-C protocol and affects the function of the Type-C interface.

[0056] To overcome the problems existing in the related art, an embodiment of the present disclosure provides a terminal device. Refer to Figure 1 , Figure 1 which is a structural diagram of a terminal device shown according to an exemplary embodiment; wherein, the terminal device 1 includes:

[0057] A data transmission interface 11 having a ground pin 111 and an identification pin 112;

[0058] An insertion detection circuit 12 electrically connected to the ground pin 111 for outputting a detection result, and the detection result is used to indicate whether the data transmission interface 11 is connected to an external device ( Figure 1 not shown);

[0059] An identification circuit 13 connected to the identification pin 112 for outputting an identification result, and the identification result is used to indicate the type of the external device;

[0060] The switch module 14, the first end of the switch module 14 is electrically connected to the connection line between the insertion detection circuit 12 and the ground pin 111, and the second end of the switch module 14 is electrically connected to the first ground terminal GND1 of the terminal device 1;

[0061] Wherein, when the detection result indicates that the data transmission interface 11 is connected to an external device and the recognition result indicates that the type of the external device belongs to a preset type, the connection line between the first end and the second end of the switch module 14 is in a conducting state.

[0062] Here, the terminal device proposed in the embodiments of the present disclosure includes electronic devices such as mobile phones, tablet computers, and personal computers, or wearable devices such as headphones and watches; wherein, when the terminal device is electrically connected to an external device, the terminal device can perform different types of information interactions with the external device according to the type of the external device.

[0063] In the embodiments of the present disclosure, the type of the data transmission interface provided in the terminal device is not limited. Exemplarily, the data transmission interface includes: a display interface (DisplayPort, DP), a high-definition multimedia interface (HDMI), a Lightning interface, and a USB interface; here, the USB interface includes a Type-A interface, a Type-B interface, and a Type-C interface, etc.

[0064] Here, the data transmission interface has multiple pins, and different pins have different functions; in the embodiments of the present disclosure, the multiple pins of the data transmission interface include: data pins, power pins, ground pins, and identification pins, etc.

[0065] Among them, the data pins include a signal receiving pin (RX pin) and a signal transmitting pin (TX pin), which are used to form a two-way data transmission with an external device, such as realizing file transmission; a power pin (VBUS pin), which is used to perform power interaction with the external device to realize forward or reverse charging. The ground pin is used to provide a ground position for the pin circuit of the data transmission interface, so that the pin circuit has an effective return path; the identification pin is used to transmit an identification signal, and the type of the external device is further detected through the identification signal. In this way, the data transmission interface can charge using the above-mentioned VBUS pin or perform data exchange using the above-mentioned RX pin or TX pin based on the type of the external device.

[0066] Here, in the embodiments of the present disclosure, the grounding pins provided on the data transmission interface include multiple ones. Among the multiple grounding pins, at least one grounding pin can be normally connected to the grounding end of the terminal device, and at least one grounding pin can be connected to the insertion detection circuit for cooperating with the insertion detection circuit to implement the insertion detection of the external device.

[0067] Among them, taking the above data transmission interface as a Type-C interface as an example, the grounding pins include A1 pin, B1 pin, A12 pin, and B12 pin. Hereinafter, the grounding pin for insertion detection is taken as the B1 pin for illustration.

[0068] Here, the B1 pin is connected to the insertion detection circuit; the insertion detection circuit has a signal detection unit, and the signal detection unit can detect the signal difference when the B1 pin is in a floating state (that is, the data transmission interface is not connected to the external device) and when the B1 pin is connected to the external device, so as to determine whether the external device is connected.

[0069] Taking the data transmission interface on the terminal device as a female head interface and the matching interface on the external device as a male head interface as an example, similarly hereinafter, since the matching interface has pins arranged in alignment with the data transmission interface, that is, when the male head interface is inserted into the female head interface, each GND pin of the male head interface contacts each grounding pin in the terminal device. At this time, since each GND pin in the male head interface is directly grounded, when the B1 pin in the female head interface is electrically connected to the GND pin of the male head interface, the insertion detection circuit can detect a signal fluctuation at the B1 pin.

[0070] In some examples, the insertion detection circuit includes a waveform detector. If the waveform detector detects a signal on the B1 pin, that is, a waveform of abnormal signal fluctuation appears, there may be an external device connected; in other examples, the insertion detection circuit includes a current detector. If the current detector detects an abnormal fluctuation in the current in the signal transmitted by the B1 pin, there may be an external device connected; of course, the insertion detection circuit can also be formed by other electrical parameter detection devices, and the embodiments of the present disclosure do not limit this.

[0071] Here, based on the detection, the insertion detection circuit can output a detection result, and the detection results are different when the insertion detection circuit detects that there is an external device connected and when it does not detect an external device connected. Exemplarily, if a signal fluctuation is detected, the detected result output is a high-level signal; if no signal fluctuation is detected, the detected result output is a low-level signal; or, if a signal fluctuation is detected, the detection result is "1"; if no signal fluctuation is detected, the detection result is "0".

[0072] In an embodiment of the present disclosure, there is an electrical connection between the identification pin and the identification circuit; in actual implementation, an identification signal is continuously transmitted on the identification pin, and the identification circuit can determine the type of the connected external device according to the identification signal.

[0073] Here, the identification circuit has an identification and matching component, and the identification and matching component is connected to the identification pin; the identification and matching component is connected to a signal identification line, and the signal identification line is used to transmit an identification signal such as a CC signal; here, taking the data transmission interface on the terminal device as a female header interface and the matching interface on the external device as a male header interface as an example, since impedance elements with different resistances are connected to the pins adaptively connected in the male header interfaces of different types of external devices, when the male header interface and the female header interface are connected, the impedance elements with different resistances are electrically connected to the identification and matching component to form a connection loop. At this time, the CC signal transmitted on the signal identification line is used to determine the node voltage of the connection node between the signal identification line and the identification and matching component; among them, because the voltage division capabilities of the impedance elements with different resistances are different, the node voltages are different.

[0074] Exemplarily, if the external device is a power receiving device (a device that needs to be powered), the impedance component has a first resistance value; at this time, the node voltage is within a first voltage range; if the external device is a power supply device (a device that can charge the terminal), the impedance component has a second resistance value, and at this time, the node voltage is within a second voltage range; if the external device is a data interaction device (a device that only performs data transmission without power interaction), the impedance component has a third resistance value, and at this time, the node voltage is within a third voltage range.

[0075] In an embodiment of the present disclosure, the identification circuit can use the node voltage as the identification result; alternatively, when the node voltage is within the first voltage range, the identification result indicates "1"; when the node voltage is within the second voltage range, the identification result indicates "2"; when the node voltage is within the third voltage range, the identification result indicates "3". Of course, the identification result can also be other forms of information, and the embodiments of the present disclosure do not limit this.

[0076] Taking the above data transmission interface as a Type-C interface as an example, the above identification pin can be a CC pin, and there are two CC pins, namely a CC1 pin and a CC2 pin; due to the front-back pluggable feature of the Type-C interface, the CC1 pin and the CC2 pin can jointly transmit an identification signal (CC signal) to enable the identification circuit to identify the type of the external device and the front-back pluggable state.

[0077] In an embodiment of the present disclosure, a switch module is proposed. The first end of the switch module is electrically connected to the connection line between the insertion detection circuit and the ground pin, and the second end of the switch module is electrically connected to the first ground end of the terminal device. That is to say, when the switch module is closed, that is, the connection line between the first end and the second end is in a conducting state, the ground pin connected to the first end can be directly grounded.

[0078] Here, the switch module can be a light-controlled switch, a signal switch, etc. The switch module can be composed of one switch, or can be formed by combining and connecting multiple switch elements. The present disclosure does not limit this.

[0079] It should be noted that since at least one ground pin is connected to the insertion detection circuit and the grounding function cannot be used, the data transmission interface lacks a ground pin and the ground loop formed thereby, resulting in limited functions of the data transmission interface. Therefore, in the embodiment of the present disclosure, the switch module can be turned on at an appropriate time so that the ground pin can be directly grounded through the switch module to restore the ground return function of the ground pin.

[0080] Since the insertion detection circuit of the ground pin can identify whether there is an electrical connection of the ground pin of the data transmission interface, but in actual scenarios, if there are the following scenarios: only the signal line is inserted, or the data transmission interface is inserted insensitively, or the inserted pin accidentally contacts other conductive structures, etc., the detection results of the insertion detection circuit will all indicate that the data transmission interface is connected to an external device. If the ground return function of the ground pin is restored at this time, it will affect the actual insertion detection in the subsequent process and affect the normal use of the data transmission interface. Therefore, in the embodiment of the present disclosure, by using the identification pin and the identification circuit to determine the identification result, when the identification result indicates that the type of the external device belongs to the preset type, the switch module is then controlled to close, so that the problem of using the data transmission interface caused by incorrect insertion detection can be reduced to a certain extent.

[0081] Among them, the preset type includes a power receiving type, a power supply type, and a data interaction type. It should be noted that if only the signal line is inserted, or the data transmission interface is inserted insensitively, or the inserted pin accidentally contacts other conductive structures, etc., the node voltage of the above-mentioned identification circuit may be the original voltage, or there may be a voltage value jump, or it does not belong to the above voltage range. At this time, the identification result output by the identification circuit can indicate that the type of the terminal device connected is other types; other types are not within the range of the preset type. Therefore, the terminal device can control the connection line between the first end and the second end of the switch module to be in a conducting state.

[0082] It should be noted that after determining the type of the external device in the embodiments of the present disclosure, corresponding data interaction can occur with the external device according to the type of the external device; if the type of the external device is a power-receiving type, the terminal device transmits power to the external device through the VBUS pin of the data transmission interface; if the type of the external device is a power-supplying type (i.e., the external device is a charging device, such as a charger or an adapter), power is received from the external device through the VBUS pin of the data transmission interface; if the type of the external device is a data-interaction type (i.e., the external device is an interaction device, such as headphones, etc.), then the terminal device can perform unidirectional or bidirectional data transmission with the external device through the data pins, such as transmitting picture files, text files, etc. to the external device, or obtaining the above files from the external device, etc. The embodiments of the present disclosure will not elaborate further on this.

[0083] It should be noted that the type of some external devices may be a power-receiving type, but the terminal device can respond to the indication of the external device and not supply power to the external device, but only perform data transmission with the external device.

[0084] In the embodiments of the present disclosure, the ground pin of the data transmission interface of the terminal device is connected to the insertion detection circuit, the identification pin is connected to the identification circuit, and the switch module is connected to the ground pin and the first ground terminal; when it is determined that there is an external device connected and the type of the external device is determined, the terminal device grounds the ground pin through the switch module to form an effective ground loop, improving the current-carrying capacity of the data transmission interface and ensuring the normal use of the data transmission interface; moreover, since the embodiments of the present disclosure can control the grounding of the ground pin only when the type of the external device belongs to the preset type, it reduces the influence of the insertion detection circuit adjusting the insertion pin to ground due to misdetection on the function of the data transmission interface, and improves the accuracy and stability of controlling the grounding of the ground pin.

[0085] In some embodiments, in combination with Figure 1 , the terminal device 1 further includes:

[0086] A processing module 15, having a first signal terminal, a second signal terminal, and a third signal terminal;

[0087] The first signal terminal is electrically connected to the insertion detection circuit 12 for obtaining a detection result;

[0088] The second signal terminal is electrically connected to the identification circuit 13 for obtaining an identification result;

[0089] The third signal terminal is electrically connected to the third terminal of the switch module 14;

[0090] The processing module 15 is configured to input a control signal to the switch module 14 through the third signal terminal when the detection result indicates that the data transmission interface 11 is connected to an external device and the identification result indicates that the type of the external device belongs to the preset type.

[0091] Wherein, the control signal is used to control the connection line between the first end and the second end of the switch module 14 to be in a conducting state.

[0092] In the embodiments of the present disclosure, the processing module is the core functional module of the terminal device, which is arranged on the main board of the terminal device and is used for data processing and function control in the terminal device; for example, the processing module can control the data transmission interface to receive and send data, and can also control the terminal device to perform functions such as audio playback, screen display, and wireless signal transmission. Among them, the processing module includes a Central Processing Unit (CPU), a Micro Processor Unit (MPU), etc.

[0093] Here, the processing module has a first signal terminal, a second signal terminal, and a third signal terminal; the first signal terminal, the second signal terminal, and the third signal terminal can all be set as General-Purpose Input / Output (GPIO) interfaces; the first signal terminal and the second signal terminal can also be set as Serial Peripheral Interface (SPI) interfaces, etc., and the present disclosure does not limit this.

[0094] Here, the first signal terminal can obtain the detection result, such as obtaining a low-level signal or a high-level signal transmitted by the insertion detection circuit; the second signal terminal can obtain the recognition result, such as obtaining the node voltage transmitted by the recognition circuit.

[0095] In the embodiments of the present disclosure, a control module is provided in the processing module. The control module is connected to the first signal terminal and the second signal terminal and is used to analyze the recognition result and the detection result to determine whether there is an external device and whether the type of the external device is a preset type, and generate a control signal according to the determination result. Here, the control module is also connected to the third signal terminal and outputs the control signal to the third end of the connected switch module through the third signal terminal, so as to control the conduction between the first end and the second end of the switch module through the control signal.

[0096] It should be noted that the control module also has a fifth signal terminal, which can be connected to the VBUS pin or the data pin proposed in the above embodiments of the present disclosure. The control module is connected to the fifth signal terminal and is used to enable the VBUS pin or the data pin to interact with the external device according to the type of the external device.

[0097] It should also be noted that when there is no interaction with an external device within a preset time period, it is determined that the terminal device is disconnected from the external device. At this time, the control module can also output the adjustment signal through the third signal terminal; the adjustment signal is used to turn off the switch module, that is, the connection line between the first end and the second end of the switch module is in a disconnected state; in this way, a grounding pin connected to the switch module will return to a floating state, which is used to re-determine whether there is an external device electrically connected, or wait for the next insertion detection.

[0098] By providing a processing module in the embodiments of the present disclosure, the connection status between the terminal device and the external device can be effectively determined, and the conduction and disconnection of the switch module can be flexibly controlled.

[0099] In some embodiments, the processing module further includes a fourth signal terminal;

[0100] The fourth signal terminal is connected to an identification circuit;

[0101] The processing module is further configured to input an identification signal to the identification circuit and the identification pin through the fourth signal terminal when the detection result indicates that the data transmission interface is connected to an external device;

[0102] Wherein, the identification signal is used to control the identification circuit to detect the type of the external device.

[0103] Here, the fourth signal terminal is connected to the control module. When the detection signal received by the first signal terminal indicates that the data transmission interface of the terminal device is electrically connected to an external device, the control module outputs an identification signal to the connected identification circuit through the fourth signal terminal.

[0104] It should be noted that if the processing module continuously inputs an identification signal to the identification pin, it will cause electrical corrosion of the identification pin. Therefore, in the embodiments of the present disclosure, the insertion pin is used for preliminary insertion detection. When the detection result of the insertion detection determines that there is an electrical connection at the data transmission interface, the identification pin is then used for external device identification, which helps to improve the problem of electrical corrosion of the identification pin.

[0105] By providing the fourth signal terminal of the processing module in the embodiments of the present disclosure, the identification signal can be effectively output, and the terminal device can be timely controlled to perform external device type detection, which helps to perform reasonable data interaction with the external device subsequently.

[0106] In some embodiments, refer to Figure 2 , Figure 2 is a schematic structural diagram of an insertion detection circuit shown according to an exemplary embodiment; wherein, the insertion detection circuit 12 includes:

[0107] A voltage input terminal 121, which is used to input a detection voltage;

[0108] The matching circuit 122 is electrically connected to the ground pin 111, the voltage input terminal 121, and the second ground terminal GND2 of the insertion detection circuit 12 respectively;

[0109] The comparator 123 has a positive input terminal (+), a negative input terminal (-), and an output terminal (out). The positive input terminal (+) and the negative input terminal (-) are respectively connected to different voltage dividing positions of the matching circuit 122, and the output terminal (out) is electrically connected to the first signal terminal;

[0110] Among them, the comparator 123 is configured to output a detection result based on the voltage difference between the voltage at the positive input terminal (+) and the voltage at the negative input terminal (-) after the matching circuit 122 divides the detection voltage.

[0111] Here, the voltage input terminal in the insertion detection circuit is connected to a DC power supply, which is used to input a constant detection voltage to the matching circuit. Exemplarily, the detection voltage can be 1.8V.

[0112] Among them, a plurality of impedance elements are provided in the matching circuit. After the plurality of impedance elements are connected in series and parallel, they are arranged on the connection line between the ground pin and the insertion detection circuit, and at least one impedance element is connected to one ground terminal (the second ground terminal) of the insertion detection circuit to form a ground loop. Here, the impedance values of the impedance elements provided in the matching circuit can be the same or different, and the embodiments of the present disclosure do not limit this.

[0113] Each impedance component in the matching circuit proposed in the embodiments of the present disclosure can be expected to play a role in dividing the detection voltage. Therefore, the matching circuit can have different voltage dividing positions, and the node voltages corresponding to different voltage dividing positions are different.

[0114] In the embodiments of the present disclosure, a detection unit for insertion detection is provided in the insertion detection circuit. Exemplarily, the detection unit includes a comparator; the working principle of the comparator is that the comparator uses the difference between the two input signals received by the two input terminals and outputs the result of comparing the two input signals through the output terminal. Thus, in the embodiments of the present disclosure, the positive input terminal and the negative input terminal of the comparator are respectively connected to different voltage dividing point positions in the matching circuit, and the output terminal is connected to the first signal terminal of the processor module; in this way, when the data transmission interface is electrically connected to an external device, since the GND pin of the external device is grounded, an additional ground loop is formed in the matching circuit. Therefore, the node voltage at the voltage dividing point position will change; the positive input terminal and the negative input terminal of the comparator sense the voltage change and output a detection result.

[0115] Exemplarily, when there is no electrical connection between the data transmission interface and the external device, the voltage difference between the negative input terminal and the positive input terminal is within the specified voltage range. At this time, the comparator can output a high-level signal. If the data interface is electrically connected to the external device and the voltage difference between the negative input terminal and the input terminal of the whole machine is not within the specified voltage range, the comparator can output a low-level signal.

[0116] Here, in the embodiment of the present disclosure, by arranging a matching circuit and a comparator in the insertion detection circuit, the detection result output by the comparator can be quickly obtained by using a simple circuit structure and detection logic, improving the accuracy and efficiency of insertion detection.

[0117] In some embodiments, in combination with Figure 2 , the matching circuit 122 includes: a first impedance element R1, a second impedance element R2, a third impedance element R3, a fourth impedance element R4, and a fifth impedance element R5;

[0118] The first impedance element R1 and the second impedance element R2 are connected in series on the connection line between the voltage input terminal 121 and the second ground terminal GND2; the negative input terminal (-) is electrically connected to the first node a1 between the first impedance element R1 and the second impedance element R2;

[0119] The third impedance element R3 and the fourth impedance element R4 are connected in series on the connection line between the voltage input terminal 121 and the second ground terminal GND2; the positive input terminal (+) is electrically connected to the second node a2 between the third impedance element R3 and the fourth impedance element R4;

[0120] The fifth impedance element R5 is connected on the connection line between the ground pin 111 and the second node a2.

[0121] Here, there are five impedance elements in the matching circuit proposed in the embodiment of the present disclosure. The five impedance elements can all be resistance elements, or some can be inductance elements, or they can be set as switch elements. The embodiment of the present disclosure does not limit this. The impedance values of these five impedance elements can be the same or different. To improve the difference between the input signals of the two input terminals of the comparator, the embodiment of the present disclosure can set the impedance values of the five impedance elements to be different.

[0122] As Figure 2 shown in the matching circuit 122, R1 and R2 are connected in series between the 1.8V voltage input terminal 121 and the second ground terminal GND2, and R3 and R4 are connected in series between the 1.8V voltage input terminal 121 and the second ground terminal GND2; one end of R5 is connected to the connection pin 111, and the other end is connected to the second node between R3 and R4. The (-) of the comparator 123 is connected to the first node a1 between R1 and R2, and the (+) of the comparator 123 is connected to the second node a2.

[0123] Taking the resistance value of R1 as 330 kiloohms (K), the resistance value of R2 as 47K, the resistance value of R3 as 68K, the resistance value of R4 as 20K, and the resistance value of R5 as 68K as an example, when the matching interface of the external device is not inserted into the data transmission interface, the branch where R5 is located is open, and the node voltage of the first node a1 is 1.8 * (47 / (47 + 330)) = 0.22V; the node voltage of the second node a2 is 1.8 * (20 / (20 + 68)) = 0.41V. Thus, the voltage at the negative input terminal of the comparator is lower than the voltage at the positive input terminal, and at this time, the comparator can output a high-level signal; when the matching interface of the external device is inserted into the data transmission interface of the present disclosure, the GND pin in the matching interface is grounded, and the grounding pin 111 and R5 can be pulled to the ground. Therefore, R5 and R4 form a parallel relationship and are connected in parallel between the second node a2 and the ground. At this time, the node voltage of the first node a1 is still 0.22V, but the node voltage of the second node a2 is 1.8 * ((20 / / 10) / ((20 / / 10) + 68)) = 0.16V; where (20 / / 10) = 1 / (1 / 20 + 1 / 10), which is used to represent the parallel resistance value of R5 and R4; thus, the voltage at the negative input terminal of the comparator is higher than the voltage at the positive input terminal, and at this time, the comparator can output a low-level signal.

[0124] Here, due to the series-parallel connection of the above five impedance elements proposed in the embodiments of the present disclosure, the node voltage of the second node can be changed when the data transmission interface is connected or not connected to the external device. Thus, different-level detection results can be output through the comparator, effectively reflecting whether the terminal device is electrically connected to the external device.

[0125] In some embodiments, the switch module includes a mechanical switch or a signal switch.

[0126] When the switch module includes a mechanical switch, the mechanical switch can be a single-pole single-throw switch and is connected to a driving module, and the driving module is connected to the third signal terminal of the processing module; when a control signal is output at the third signal terminal, the driving module drives the connection line between the first end and the second end of the mechanical switch to conduct.

[0127] Here, the mechanical switch can be a single-pole multi-throw switch, which can have multiple second terminals, and the multiple second terminals can be connected to different ground terminals of the terminal device; in the embodiments of the present disclosure, different impedance components can also be provided between different second terminals and different ground terminals to enrich the ground return circuit design of the data transmission port in the embodiments of the present disclosure. Among them, when the control signal is output from the third signal terminal, the driving module can drive the connection line between the first terminal and any one of the second terminals of the mechanical switch to conduct according to the control signal. In actual implementation, if different control signals carry different information, the driving module can also control the single-pole multi-throw switch according to different control signals to adjust the connection line between the first terminal and the second terminal indicated by the information carried by the control signal to conduct.

[0128] Of course, the mechanical switch proposed in the embodiments of the present disclosure can also be a multi-pole multi-throw switch, an electromagnetic switch, etc., and the embodiments of the present disclosure will not elaborate on this.

[0129] When the switch module includes a signal switch, if the signal parameters of the signal received by the third terminal of the signal switch are different, different connection states can be controlled between the first terminal and the second terminal of the signal switch; among them, the signal switch can include a triode. At this time, the base of the triode is the third terminal. At this time, if the current of the control signal exceeds the current threshold, a forward bias is obtained between the base and the emitter of the triode, and the collector current reaches the saturation value, so that the connection circuit between the collector and the emitter (the first terminal and the second terminal) conducts.

[0130] Of course, the above signal switch can also be a relay, an optoelectronic switch, etc., and the embodiments of the present disclosure do not limit this.

[0131] The switch module proposed in the embodiments of the present disclosure can be set as a mechanical switch or a signal switch, which improves the design diversity of the switch module.

[0132] In some embodiments, the signal switch includes a field effect transistor.

[0133] Here, the field effect transistor can include a metal oxide semiconductor field effect transistor (MOSFET). Among them, the drain (D pole) of the MOS transistor is used as the first terminal of the signal switch, the source (S pole) of the MOS transistor is used as the second terminal of the signal switch, and the gate (G pole) of the MOS transistor is used as the third terminal of the signal switch. When the processing module inputs a control signal to the gate, the source and the drain are short-circuited, that is, the connection line between the source and the drain is in a conducting state.

[0134] Exemplarily, the MOS transistor may include: a PMOS transistor or an NMOS transistor. When the signal switch is a PMOS transistor, the control signal is a low-level signal. At this time, the voltage of the gate with respect to the source, VGS, is less than the first conduction threshold, so that the connection line between the source and the drain is in a conducting state. When the signal switch is an NMOS transistor, the control signal is a high-level signal. At this time, the voltage of the gate with respect to the source, VGS, is higher than the second conduction threshold, so that the connection line between the source and the drain is in a conducting state.

[0135] It should be noted that when the processing device determines that the terminal device is disconnected from the external device, an adjustment signal with a level opposite to that of the control signal is output. For example, when the signal switch is a PMOS transistor, a high-level signal is output; when the signal switch is an NMOS transistor, a low-level signal is input. In this way, the signal switch can be turned off, so that the ground pin connected to the signal switch returns to the floating state.

[0136] Exemplarily, Figure 2 The illustrated switch module 14 shows a signal switch of an NMOS transistor.

[0137] In the embodiments of the present disclosure, by setting the switch module as a field effect transistor, the ground pin can be adjusted to resume grounding by outputting a high-level or low-level control signal, and the control logic is simple and effective.

[0138] In some embodiments, there are at least two ground pins, and the insertion detection circuit includes at least two;

[0139] Among them, at least two ground pins are electrically connected to different insertion detection circuits respectively.

[0140] Here, in the embodiments of the present disclosure, the ground pins in the data transmission interface include at least two; taking the above data transmission interface as a Type-C interface as an example, the ground pins include four: A1 pin, B1 pin, A12 pin, and B12 pin; one or more of the A1 pin, B1 pin, A12 pin, and B12 pin can be used as a ground, and some other pins are used to connect a corresponding insertion detection circuit.

[0141] See Figure 3a and Figure 3b , Figure 3a is a schematic diagram of the connection manner between the ground pin and the insertion detection circuit shown according to an exemplary embodiment Figure 1 ; Figure 3b is a schematic diagram of the connection manner between the ground pin and the insertion detection circuit shown according to an exemplary embodiment Figure 2 ; Figure 3a and Figure 3bIt is shown that the A1 pin and the B1 pin are respectively connected to different insertion detection circuits 12 (124 and 125 respectively). Here, one insertion detection circuit 124 has a third ground terminal GND3, and the other insertion detection circuit 125 has a third ground terminal GND2); the first signal terminal of the processing module 15 can receive the detection results output by the two insertion detection circuits 12 (124 and 125 respectively), and determine whether the data transmission interface 11 is electrically connected to an external device based on the two detection results.

[0142] Exemplarily, if both detection results indicate that the data transmission interface is electrically connected to an external device, it is determined that the data transmission interface is electrically connected to the external device; if only one of the two detection results indicates whether the data transmission interface is electrically connected to an external device, the detection results are re-obtained after a preset waiting time.

[0143] It should be noted that in the embodiments of the present disclosure, the matching circuits and comparators in the insertion detection circuits respectively connected to at least two ground pins may be exactly the same or different. Here, Figure 3a and Figure 3b the two insertion detection circuits shown (corresponding to 124 and 125) are different.

[0144] It can be understood that by using at least two ground pins to be respectively electrically connected to a corresponding insertion detection circuit in the present disclosure, the accuracy of insertion detection can be effectively improved.

[0145] In some embodiments, the switch module has at least two first ends;

[0146] At least two detection connection lines are formed between at least two ground pins and different insertion detection circuits;

[0147] At least two first ends of the switch module are respectively connected to at least two different detection connection lines.

[0148] Here, when at least two insertion pins for insertion detection are provided in the embodiments of the present disclosure, at least two ground pins are respectively connected to an insertion detection circuit, and at least two detection connection lines are formed.

[0149] One switch module can be provided in the embodiments of the present disclosure, and the one switch module is provided with at least two first ends, and each first end is correspondingly connected to one of the above detection connection lines.

[0150] In some examples, the switch module may have at least two second ends, and the at least two second ends are respectively connected to different ground terminals, and one second end corresponds to one first end; at this time, when both detection results indicate that the data transmission interface is electrically connected to an external device and the recognition result indicates that the type of the external device belongs to a preset type, the connection line between each first end and its corresponding second end can be controlled to be in a conducting state, and at this time each ground pin can be grounded.

[0151] In other examples, the switch module may have one second end, and this second end is connected to the first ground terminal; at this time, when both detection results indicate that the data transmission interface is electrically connected to an external device and the recognition result indicates that the type of the external device belongs to a preset type, each first end can be controlled to be connected to the second end, and at this time each ground pin can be grounded.

[0152] See Figure 3a , Figure 3a shows a switch module 14, where the switch module 14 may be a multi-pole multi-throw switch; here, one first end of the switch module 14 is connected to the detection connection line between the ground pin A1 and an insertion detection circuit 124, and the other first end is connected to the detection connection line between the ground pin B1 and another insertion detection circuit 125. And, the second end of the switch module 14 is connected to the first ground terminal GND1 of the terminal device; the third end of the switch module 14 is connected to the third signal terminal of the processing module 15.

[0153] By setting a switch module in the embodiments of the present disclosure, when there is an external device connected and the external device is of a preset type, the two insertion pins used for insertion detection can be respectively grounded through one switch module. The structure formed by setting one switch module occupies less space and has lower cost.

[0154] In some embodiments, there are at least two switch modules;

[0155] At least two detection connection lines are formed between at least two ground pins and different insertion detection circuits;

[0156] The first ends of at least two switch modules are respectively connected to at least two different detection connection lines.

[0157] Here, the number of switch modules is the same as the number of ground pins used for insertion detection and the number of set detection circuits. Exemplarily, the number of switch modules is two.

[0158] See Figure 3b , Figure 3bTwo switch modules 14 are shown. Here, both of the two switch modules 14 can be field effect transistors. Here, the first end of one switch module 14 is connected to the detection connection line between the ground pin A1 and an insertion detection circuit 124, and the first end of the other switch module 14 is connected to the detection connection line between the ground pin B1 and another insertion detection circuit 125. And, the second ends of the two switch modules 14 are respectively connected to different ground terminals ( Figure 3b the first ground terminal GND1 and the fourth ground terminal GND4 shown); the third ends of the two switch modules 14 are respectively connected to the third signal terminal of the processing module 15.

[0159] Here, when the two insertion detection circuits respectively output detection results, the processing module can analyze the two detection results. If both of the two detection results indicate that the data transmission interface is electrically connected to the external device, it is determined that the data transmission interface is electrically connected to the external device, and then an identification signal is output through the fourth signal terminal; at this time, if it is determined that the type of the external device is the preset type, a control signal is simultaneously output to the two switch modules through the third signal terminal to control the ground pin B1 and the ground pin A1 to return to ground. If only one of the two detection results indicates whether the data transmission interface is electrically connected to the external device, the detection results are re-obtained after a preset waiting time, and the identification signal is not output through the fourth signal terminal.

[0160] Here, in the embodiment of the present disclosure, by setting at least two switch modules, under the condition that there is an external device connected and the external device is of the preset type, the at least two insertion pins used for insertion detection can be respectively grounded through the at least two switch modules, and the control logic of setting two switch modules is simpler.

[0161] In some other embodiments, the ground pin can include at least two, and the insertion detection circuit includes one.

[0162] Taking the two ground pins used for insertion detection as an example, two comparators can be set in the insertion detection circuit, and more impedance elements are connected in series and parallel in the matching circuit therein; the negative input terminals of the two comparators can be connected to the same voltage dividing node of the matching circuit, and the positive input terminals are respectively connected to two voltage dividing nodes with the same node voltage and different positions, and the two ground pins are connected to the voltage dividing nodes connected by the two above-mentioned positive input terminals through the same impedance element.

[0163] Here, in the embodiments of the present disclosure, two switch modules may be provided. The two switch modules are respectively connected to the connection lines between the two ground pins and their respective corresponding impedance elements, and are respectively connected to a ground terminal. Among them, under the condition that it is determined that there is an external device connected and the type of the external device is a preset type, both of the two switch modules are closed, that is, the two ground pins are grounded through the two switch modules, and the original ground return function is restored.

[0164] Exemplarily, taking Figure 2 the insertion detection circuit 12 shown as an example, a sixth impedance component (not shown in the figure) may also be provided. The sixth impedance component is connected to another connection node between R3 and R4 and has the same resistance value as R5. One of the two comparators 123, such as Figure 2 shown, and the other is connected to the above-mentioned another connection node.

[0165] In this way, when there is no electrical connection between the terminal device and the external device, both of the two comparators may output high-level signals. If there is an effective electrical connection between the terminal device and the external device, both of the two comparators output low-level signals. If there is a wrong connection, it is possible that only one comparator outputs a low-level signal, or there is an electrical parameter difference between the signals output by the two comparators, indicating that the electrical connection between the terminal device and the external device is unstable, or it is a connection of a terminal device of a preset type.

[0166] It can be understood that the present disclosure uses two ground pins to be electrically connected to the same insertion detection circuit for insertion detection, which can improve the accuracy of insertion detection.

[0167] The following takes a mobile phone as the terminal device and a Type-C interface as the data transmission interface as an example to illustrate an exemplary embodiment of a terminal device proposed by the present disclosure.

[0168] Referring to Figure 4 , Figure 4 is a schematic diagram of the pin circuit of a data transmission interface shown according to an exemplary embodiment; among them, Figure 4 the data transmission interface 11 shown is a Type-C interface.

[0169] Here, Figure 4 in (1) and (2), 24 pins of A1 - A12 and B1 - B12 in the Type-C interface are shown. Among them, G1 - G4 are the welding points between the Type-C interface and the Printed Circuit Board (PCB), and these welding points are all the grounding positions of the PCB.

[0170] Combined with Figure 4In the example of (2), A1-12 and the functional definitions are mirror-symmetrical to B1-B12. Such a setting enables the Type-C interface to support the positive and reverse insertion of the matching interface. Here, the B1 pin is used to connect to the insertion detection circuit to implement the insertion detection in the embodiments of the present disclosure; the A1 pin, the A12 pin, and the B12 pin are respectively connected to different ground terminals (GND) and are used as the return ground of the Type-C interface circuit; A2 and A3 are a pair of signal receiving pins (TX1+ and TX1-) for receiving USB high-speed signals; B2 and B3 are another pair of signal receiving pins (TX2+ and TX2-); A10 and A11 are a pair of signal sending pins (RX2+ and RX2-) for sending USB high-speed signals; B10 and B11 are a pair of signal sending pins (RX1+ and RX1-); A4, A9, B4, and B9 are four VBUS pins, which are connected to a voltage source (F) and voltage matching components (C1 and C2). During charging, the four VBUS pins act as the voltage positive pole; A5 and B5 are two identification pins (CC pins) for transmitting the CC1 signal and identifying the type of the external device through the identification circuit; A6 and B6 are two D+ signal interfaces, and A7 and B7 are two D- signal interfaces for transmitting data through differential signals (D+ and D-), which have good anti-interference performance during data transmission; A8 and B8 are two extended pins. In actual implementation, they can be used as the Mic signal for the headphone signal and the headphone return ground.

[0171] Among them, Figure 4Twenty-four pins are each connected to corresponding signal channels X1 to X16. The corresponding signal channels can transmit different types and functions of signals respectively to implement the functions of the corresponding pins. Among them, X1 is USB0_SS_TX0_P, connected to pin A2; X2 is USB0_SS_TX0_M, connected to pin A3; X3 is USB_CC1, connected to pin A5; X4 is USB0_HS_D_CONN_P, connected to pin A6; X5 is USB0_HS_D_CONN_M, connected to pin A7; X6 is USB_SUB1, used to connect to pin A8; X7 is USB0_SS_RX1_M, used to connect to pin A10; X8 is USB0_SS_RX1_P, used to connect to pin A11; X9 is USB0_SS_RX0_P, used to connect to pin B11; X10 is USB0_SS_RX0_M, used to connect to pin B10; X11 is USB_SUB2, used to connect to pin B8; X12 is USB0_HS_D_CONN_M, connected to pin B7; X13 is USB0_HS_D_CONN_P, connected to pin B6; X14 is USB_CC2, connected to pin B5; X15 is USB0_SS_TX1_M, connected to pin B3; X16 is USB0_SS_TX1_P, connected to pin B2; X17 is CID_DET, and is connected to the ground pin B1 by an inductive element. CID_DET serves as a signal channel connecting to the insertion detection circuit.

[0172] Here, pin B1 of the Type-C interface is connected to an insertion detection circuit, and the insertion detection circuit is used to detect the insertion of an external device; the specific circuit structure can be seen Figure 2 as shown. For the specific processing process, refer to the above text of the present disclosure. The embodiments of the present disclosure will not elaborate on this.

[0173] Refer to Figure 5 , Figure 5 which is a schematic circuit diagram of the identification pins and the identification circuit shown according to an exemplary embodiment; Figure 6 which is a waveform diagram of the identification signal output according to an exemplary embodiment. Combining Figure 5 as shown, the VBUS pins are respectively connected to different signal terminals of the processing module 15 through different triodes, and the mobile phone (i.e., the terminal device 1) can supply power to the outside (as an external device 2 in the Source role) or receive power supply (as an external device 2 in the sink role); among them, Figure 6The schematic external device 2 acts as a sink; the identification pins CC1 and CC2 are respectively connected to the processing module 15 through two identification circuits 13; there are two switches S1 and S2 in the two identification circuits 13, and the switch S1 can be switched to connect the voltage-dividing resistor Rp or Rd, and the switch S1 can be switched to connect the voltage-dividing resistor Rp or Rd; among them, when the switch is connected to Rp, the CC signal is at a high level, and when it is connected to Rd, the CC signal is at a low level. The waveform of the CC signal is as Figure 6 shown in 61. At this time, the CC signal is always in an inverted state, and the mobile phone keeps switching between the Source and sink roles.

[0174] Figure 5 It illustrates the principle of how the identification circuit identifies the type of external device through CC1 or CC2; taking the external device as a power-receiving device (sink) as an example, there are grounded Rd resistors on the CC1 and CC2 pins of the matching interface of the external device. When the external device contacts the CC1 or CC2 pin of the mobile phone, when the switch S1 is switched to connect to Rd, since the Rd of the external device is also grounded, it cannot be recognized. When the switch S1 is switched to connect to Rp, since Rp is connected to a power supply (such as a 5V power supply), after the 5V is divided by Rp and the Rd of the external device and then connected to the ground, the identification circuit can determine the voltage on Rd at this time, so that the type of the external device can be determined as the power-receiving type according to the voltage on Rd.

[0175] In other examples, if the type of the external device is a power supply type or a data interaction type, the set Rd of the external device is different. Therefore, the embodiments of the present disclosure can determine the specific type of the external device through the voltage results of Rp or Rd in the circuit.

[0176] Exemplarily, if the resistance value of Rd of the external device is 5.1K ± 20%, the type of the external device can be determined as the power-receiving type; if the resistance value of Rd of the external device is less than 1.2K, the type of the external device can be determined as the charging type (or data interaction type), and at this time the external device can be a headset.

[0177] In the embodiments of the present disclosure, the preset types include the power-receiving type, the power supply type, and the data interaction type. In the case where the detection result of the insertion detection circuit indicates that an external device is connected and the type of the external device indicated by the identification circuit belongs to the preset type, the embodiments of the present disclosure can adjust Figure 1 and Figure 2 the connection line between the first end and the second end of the switch module 14 shown in the figure is in a conducting state; in this way, the original function of the GND in the Type-C interface can be restored, that is, the return ground of the current, meeting the requirements of the Type-C protocol and the needs of partial regional certification.

[0178] Figure 7It is a block diagram of a terminal device shown according to an exemplary embodiment. For example, the terminal device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0179] Referring to Figure 7 , the terminal device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0180] The processing component 702 generally controls the overall operation of the terminal device 700, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0181] The memory 704 is configured to store various types of data to support the operations on the terminal device 700. Examples of these data include at least one of the following: instructions for any application or method operating on the terminal device 700, contact data, phone book data, messages, pictures, and videos. The memory 704 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0182] The power supply component 706 provides power to various components of the terminal device 700. The power supply component 706 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the terminal device 700.

[0183] The multimedia component 708 includes a screen that provides an output interface between the terminal device 700 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the terminal device 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0184] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a Microphone (MIC) that is configured to receive external audio signals when the terminal device 700 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.

[0185] The I / O interface 712 provides an interface between the processing component 702 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0186] The sensor assembly 714 includes one or more sensors for providing a status assessment of various aspects for the terminal device 700. For example, the sensor assembly 714 can detect the on / off state of the terminal device 700, the relative positioning of components, such as the display and keypad of the terminal device 700. The sensor assembly 714 can also detect a change in the position of the terminal device 700 or a component in the terminal device 700, the presence or absence of user contact with the terminal device 700, the orientation or acceleration / deceleration of the terminal device 700, and a change in the temperature of the terminal device 700. The sensor assembly 714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 can also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 can also include, but is not limited to, at least one of the following: an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, and a temperature sensor.

[0187] The communication component 716 is configured to facilitate communication between the terminal device 700 and other devices in a wired or wireless manner. The terminal device 700 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0188] In an exemplary embodiment, the terminal device 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0189] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the utility model disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

[0190] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A terminal device, characterized in that, Comprising: A data transmission interface having a ground pin and an identification pin; An insertion detection circuit electrically connected to the ground pin for outputting a detection result, the detection result being used to indicate whether the data transmission interface is connected to an external device; An identification circuit connected to the identification pin for outputting an identification result, the identification result being used to indicate the type of the external device; A switch module, a first end of the switch module being electrically connected to a connection line between the insertion detection circuit and the ground pin, and a second end of the switch module being electrically connected to a first ground end of the terminal device; Wherein, when the detection result indicates that the data transmission interface is connected to the external device and the identification result indicates that the type of the external device belongs to a preset type, a connection line between the first end and the second end of the switch module is in a conducting state.

2. The terminal device according to claim 1, wherein The terminal device further comprises: A processing module having a first signal end, a second signal end and a third signal end; The first signal end is electrically connected to the insertion detection circuit for obtaining the detection result; The second signal end is electrically connected to the identification circuit for obtaining the identification result; The third signal end is electrically connected to a third end of the switch module; The processing module is configured to input a control signal to the switch module through the third signal end when the detection result indicates that the data transmission interface is connected to the external device and the identification result indicates that the type of the external device belongs to a preset type; Wherein, the control signal is used to control the connection line between the first end and the second end of the switch module to be in a conducting state.

3. The terminal device according to claim 2, wherein The processing module further comprises a fourth signal end; The fourth signal end is connected to the identification circuit; The processing module is further configured to input an identification signal to the identification circuit and the identification pin through the fourth signal end when the detection result indicates that the data transmission interface is connected to the external device; Wherein, the identification signal is used to control the identification circuit to detect the type of the external device.

4. The terminal device according to claim 2, wherein The insertion detection circuit comprises: A voltage input end for inputting a detection voltage; A matching circuit electrically connected to the ground pin, the voltage input end and a second ground end of the insertion detection circuit respectively; A comparator having a positive input end, a negative input end and an output end, the positive input end and the negative input end being respectively connected to different voltage dividing positions of the matching circuit, and the output end being electrically connected to the first signal end; Wherein, the comparator is configured to output the detection result based on a voltage difference between a voltage at the positive input end and a voltage at the negative input end after the matching circuit divides the detection voltage.

5. The terminal device according to claim 4, wherein The matching circuit comprises: a first impedance element, a second impedance element, a third impedance element, a fourth impedance element and a fifth impedance element; The first impedance element and the second impedance element are connected in series to a connection line between the voltage input end and the second ground end; the negative input end is electrically connected to a first node between the first impedance element and the second impedance element; The third impedance element and the fourth impedance element are connected in series on the connection line between the voltage input terminal and the second ground terminal; the positive input terminal is electrically connected to the second node between the third impedance element and the fourth impedance element; The fifth impedance element is connected on the connection line between the ground pin and the second node.

6. The terminal device according to any one of claims 1 to 4, characterized in that The switch module includes a mechanical switch or a signal switch.

7. The terminal device according to claim 6, wherein The signal switch includes a field effect transistor.

8. The terminal device according to any one of claims 1 to 4, characterized in that, There are at least two ground pins, and the insertion detection circuit includes at least two; Among them, at least two of the ground pins are electrically connected to different insertion detection circuits respectively.

9. The terminal device according to claim 8, wherein The switch module has at least two first ends; At least two detection connection lines are formed between at least two of the ground pins and different insertion detection circuits; At least two first ends of the switch module are respectively connected to at least two different detection connection lines.

10. The terminal device according to claim 8, wherein The switch module includes at least two; At least two detection connection lines are formed between at least two of the ground pins and different insertion detection circuits; First ends of at least two of the switch modules are respectively connected to at least two different detection connection lines.