USB TYPE-C cable data line function detection and indication method and system
By detecting the functional characteristics of USB TYPE-C cables, the problem that the existing technology cannot distinguish the cable functions is solved, fast and accurate function recognition is achieved, and the use efficiency and safety is improved. It is suitable for a variety of application scenarios.
Patent Information
- Application Number
- CN202411427683.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art cannot effectively distinguish and detect the functional differences of USB TYPE-C cables, resulting in users purchasing mismatched cables that affect the user experience and development progress.
A USB TYPE-C cable data line function detection and indication method is designed. Through reference time acquisition and data line function detection process, pulse signals are sent using the CC and TX1+ and D1+ pins of the TYPEC port, and voltage is detected through the ADC module. Change, determine the functional characteristics of the cable, and display the recognition results through the indication module.
It realizes the rapid and accurate judgment of the functional characteristics of USB TYPE-C cable, avoids the wrong cable use, improves the efficiency and safety of use, and has the characteristics of rapid and convenient, suitable for integration in other devices or as independent Use of detection equipment.
Smart Images

Figure CN119291336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data line detection, and in particular to a USB TYPE-C cable data line function detection and indication method and system. Background Art
[0002] There are many types of USB cables with TYPE-C interfaces on the current market. They are all TYPE-C in appearance and cannot be distinguished from each other. However, their actual functions vary greatly. Some can only charge, some can only support USB2.0, and some support USB3.0. If you buy a cable with incompatible functions, it will not only affect the actual use experience, but also may affect the product development progress. Therefore, the present invention provides a USB TYPE-C cable data line function detection and indication method and system to solve the inconvenience and loss caused by improper cable use. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a USB TYPE-C cable data line function detection and indication method and system, which can quickly identify and indicate the specific functions of the TYPE-C cable, so that users can quickly distinguish the functions of the cable and avoid unnecessary losses.
[0004] The technical solution adopted by the present invention to solve the technical problem is:
[0005] A USB TYPE-C cable data line function detection and indication method, including a reference time acquisition process and a data line function detection process;
[0006] The reference time acquisition process includes the following steps:
[0007] Step 1.1: Determine whether a cable is plugged in by checking the CC pin status of the TYPEC port:
[0008] Step 1.2, the cable is not inserted, and the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface;
[0009] Step 1.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0010] Step 1.4: If the ADC of the core processing module detects that the voltage exceeds the threshold VT again, it is considered that there is a return signal, and the core processing module synchronously records the timer time T1 at this time; if the voltage does not reach the threshold VT, re-execute steps 1.2-1.3 for testing; T1 will be recorded inside the core processing module as the reference time required to receive the reflected signal when no cable is inserted;
[0011] The data line function detection process includes the following steps:
[0012] Step 2.1: Check whether a cable is plugged in by checking the CC pin status of the TYPEC port:
[0013] Step 2.2, if the cable is inserted into the interface, the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface;
[0014] Step 2.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0015] Step 2.4: If the ADC of the core processing module detects that the voltage exceeds the threshold VT, it is considered that there is a return signal, and the core processing module synchronously records the time T2 of the timer at this time; if the voltage is not detected to exceed the threshold VT, repeat steps 2.2-2.3;
[0016] Step 2.5, the core processing module compares T2 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that TX1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the IO interface to prompt that the current cable supports USB3.0;
[0017] Step 2.6, if the core processing module compares T2 with the reference time T1 when no cable is inserted, if the time error is less than or equal to T3, it is determined that TX1+ of the TYPEC port is not connected to an external wire. At this time, the core processing module controls the high-speed signal switching module to conduct with D1+ of the TYPEC port through the IO interface;
[0018] Step 2.7, the core processing module sends a pulse signal of a specific voltage V to the D1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0019] Step 2.8: If the ADC of the core processing module detects that the voltage exceeds the threshold VT again, it is considered that there is a return signal, and the core processing module synchronously records the time T4 of the timer at this time; if the voltage is not detected to exceed the threshold VT, repeat steps 2.6-2.7;
[0020] Step 2.9, the core processing module compares T4 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that D1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the PIO interface to prompt that the current cable supports USB2.0;
[0021] Step 2.10: If the core processing module compares T4 with the reference time T1 when no cable is inserted, and if the time error is less than or equal to T3, it is determined that D1+ of the TYPEC port is not connected to an external wire, and the core processing module controls the indication module through the IO interface to prompt that the current cable only supports power supply.
[0022] A USB TYPE-C cable data line function detection and indication system, used to implement the detection and indication method, the system comprising:
[0023] The power module is used to provide necessary working power to the high-speed signal switching module, the core processing module, and the indication module;
[0024] High-speed signal switching module, used to receive IO signals from the core processing module, and switch the on / off relationship between the USB-Type-C interface and the corresponding PIN angle;
[0025] The core processing module includes a communication interface, a pulse signal generator, a timer, an ADC, and an IO interface; wherein the communication interface is used to communicate with other devices or a host computer, and the recognition result can be synchronized to other devices or a host computer; the pulse signal generator is used to generate a pulse signal of a characteristic voltage; the timer is used to record the time interval from sending a pulse voltage signal to receiving a reflected pulse voltage signal; the ADC is used to collect the voltage value of the reflected pulse signal; the IO interface is used to control the high-speed signal switching module to select the conduction and disconnection of the USB-Type-C interface and the corresponding PIN angle, and can also control the indication module to indicate the corresponding recognition result;
[0026] The indication module is used to display the identification result of the USB-Type-C cable function.
[0027] Furthermore, the core processing module may be any one of a variety of IC solutions such as FPGA, CPU, GPU, MCU, SOC, etc.
[0028] Furthermore, the communication interface type may be any one of a variety of communication modes such as I2C, UART, USB, SPI, etc.
[0029] Furthermore, the USB TYPE-C cable data line function detection and indication system is integrated into other devices or used as an independent detection device.
[0030] Technical effects of the present invention:
[0031] Compared with the prior art, the USB TYPE-C cable data line function detection and indication method of the present invention can help users quickly determine the functional characteristics of the TYPE-C cable without the need for professional knowledge, avoid the situation where the TYPE-C cable is used incorrectly, improve the use efficiency and safety, and has the characteristics of being fast, accurate and convenient. The detection and indication system can be integrated into other devices for use, or used alone as an independent detection device, with flexible usage and a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a structural block diagram of the USB TYPE-C cable data line function detection and indication system of the present invention;
[0033] Figure 2 A flowchart for obtaining reference time of the present invention;
[0034] Figure 3 This is a flow chart of data line function detection according to the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention is clearly and completely described below in conjunction with the accompanying drawings.
[0036] Embodiment 1:
[0037] like Figure 1 As shown, this embodiment relates to a USB TYPE-C cable data line function detection and indication system, including a power module, a high-speed signal switching module, a core processing module and an indication module;
[0038] The power supply module is used to provide necessary working power to the high-speed signal switching module, the core processing module and the indication module;
[0039] The high-speed signal switching module is used to receive the IO signal of the core processing module, and switch the on and off relationship between the USB-Type-C interface and the corresponding PIN angle;
[0040] The core processing module includes a communication interface, a pulse signal generator, a timer, an ADC, and an IO interface; wherein the communication interface is used to communicate with other devices or a host computer, and the recognition result can be synchronized to other devices or a host computer; the pulse signal generator is used to generate a pulse signal of a characteristic voltage; the timer is used to record the time interval from sending a pulse voltage signal to receiving a reflected pulse voltage signal; the ADC is used to collect the voltage value of the reflected pulse signal; the IO interface is used to control the high-speed signal switching module to select the conduction and disconnection of the USB-Type-C interface and the corresponding PIN angle, and can also control the indication module to indicate the corresponding recognition result;
[0041] The indication module is used to display the identification result of the USB-Type-C cable function.
[0042] The USB TYPE-C cable data line function detection and indication system of the present invention can be used as a part of other equipment or as an independent detection device.
[0043] The core processing module in this embodiment may adopt FPGA, and the communication interface type may be I2C.
[0044] Embodiment 2:
[0045] The present embodiment relates to a USB TYPE-C cable data line function detection and indication method, including a reference time acquisition process and a data line function detection process.
[0046] The reference time acquisition process is as follows: Figure 2 As shown, the following steps are included:
[0047] Step 1.1: Determine whether a cable is plugged in by checking the CC pin status of the TYPEC port:
[0048] Step 1.2, the cable is not inserted, and the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface;
[0049] Step 1.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0050] Step 1.4: If the ADC of the core processing module detects that the voltage exceeds a certain threshold value VT again, it is considered that there is a return signal, and the core processing module synchronously records the timer time T1 at this time; if the voltage does not reach the threshold value VT, steps 1.2-1.3 are re-executed for testing; T1 will be recorded inside the core processing module as the reference time required to receive the reflected signal when no cable is inserted.
[0051] The data line function detection process is as follows Figure 3 As shown, the following steps are included:
[0052] Step 2.1: Check whether a cable is plugged in by checking the CC pin status of the TYPEC port:
[0053] Step 2.2, if the cable is inserted into the interface, the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface;
[0054] Step 2.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0055] Step 2.4: If the ADC of the core processing module detects that the voltage exceeds a certain threshold value VT, it is considered that there is a return signal, and the core processing module synchronously records the time T2 of the timer at this time; if the voltage is not detected to exceed the threshold value VT, repeat steps 2.2-2.3;
[0056] Step 2.5, the core processing module compares T2 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that TX1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the IO interface to prompt that the current cable supports USB3.0;
[0057] Step 2.6, if the core processing module compares T2 with the reference time T1 when no cable is inserted, if the time error is less than or equal to T3, it is determined that TX1+ of the TYPEC port is not connected to an external wire. At this time, the core processing module controls the high-speed signal switching module to conduct with D1+ of the TYPEC port through the IO interface;
[0058] Step 2.7, the core processing module sends a pulse signal of a specific voltage V to the D1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin;
[0059] Step 2.8: If the ADC of the core processing module detects that the voltage exceeds a certain threshold value VT again, it is considered that there is a return signal, and the core processing module synchronously records the time T4 of the timer at this time; if the voltage is not detected to exceed the threshold value VT, repeat steps 2.6-2.7;
[0060] Step 2.9, the core processing module compares T4 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that D1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the PIO interface to prompt that the current cable supports USB2.0;
[0061] Step 2.10: If the core processing module compares T4 with the reference time T1 when no cable is inserted, and if the time error is less than or equal to T3, it is determined that D1+ of the TYPEC port is not connected to an external wire, and the core processing module controls the indication module through the IO interface to prompt that the current cable only supports power supply.
[0062] The method of the present invention can quickly determine the actual function of the TYPE-C cable, and through corresponding instructions, the user can quickly make a judgment, thereby avoiding the situation where the TYPE-C cable is used incorrectly, and effectively avoiding the problem of device damage or poor performance caused by the user using an incompatible cable.
[0063] The above-mentioned specific implementation modes are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementation modes. Any appropriate changes or modifications made thereto by any ordinary technician in the technical field in accordance with the claims of the present invention shall fall within the patent protection scope of the present invention.
Claims
1. A USB TYPE-C cable data line function detection and indication method, characterized in that: Including reference time acquisition process and data line function detection process; The reference time acquisition process includes the following steps: Step 1.1: Determine whether a cable is plugged in by checking the CC pin status of the TYPEC port: Step 1.2, the cable is not inserted, and the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface; Step 1.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin; Step 1.4: If the ADC of the core processing module detects that the voltage exceeds the threshold VT again, it is considered that there is a return signal, and the core processing module synchronously records the timer time T1 at this time; if the voltage does not reach the threshold VT, re-execute steps 1.2-1.3 for testing; T1 will be recorded inside the core processing module as the reference time required to receive the reflected signal when no cable is inserted; The data line function detection process includes the following steps: Step 2.1: Check whether a cable is plugged in by checking the CC pin status of the TYPEC port: Step 2.2, if the cable is inserted into the interface, the core processing module controls the high-speed signal switching module and TX1+ of the TYPEC port through the IO interface; Step 2.3, the core processing module sends a pulse signal of a specific voltage V to the TX1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin; Step 2.4: If the ADC of the core processing module detects that the voltage exceeds the threshold VT, it is considered that there is a return signal, and the core processing module synchronously records the time T2 of the timer at this time; if the voltage is not detected to exceed the threshold VT, repeat steps 2.2-2.3; Step 2.5, the core processing module compares T2 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that TX1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the IO interface to prompt that the current cable supports USB3.0; Step 2.6, if the core processing module compares T2 with the reference time T1 when no cable is inserted, if the time error is less than or equal to T3, it is determined that TX1+ of the TYPEC port is not connected to an external wire. At this time, the core processing module controls the high-speed signal switching module to conduct with D1+ of the TYPEC port through the IO interface; Step 2.7, the core processing module sends a pulse signal of a specific voltage V to the D1+ pin through the pulse signal generator, and at the same time, the core processing module starts the timer for timing, and synchronously starts the ADC module to detect the voltage of the pulse signal generator pin; Step 2.8: If the ADC of the core processing module detects that the voltage exceeds the threshold VT again, it is considered that there is a return signal, and the core processing module synchronously records the time T4 of the timer at this time; if the voltage is not detected to exceed the threshold VT, repeat steps 2.6-2.7; Step 2.9, the core processing module compares T4 with the reference time T1 when no cable is inserted. If the time error is greater than T3, it is determined that D1+ of the TYPEC port is connected to a wire. At this time, the core processing module controls the indication module through the PIO interface to prompt that the current cable supports USB2.0; Step 2.10: If the core processing module compares T4 with the reference time T1 when no cable is inserted, and if the time error is less than or equal to T3, it is determined that D1+ of the TYPEC port is not connected to an external wire, and the core processing module controls the indication module through the IO interface to prompt that the current cable only supports power supply.
2. A USB TYPE-C cable data line function detection and indication system, characterized in that: For implementing the detection and indication method as claimed in claim 1, the system comprises: The power module is used to provide necessary working power to the high-speed signal switching module, the core processing module, and the indication module; High-speed signal switching module, used to receive IO signals from the core processing module, and switch the on / off relationship between the USB-Type-C interface and the corresponding PIN angle; The core processing module includes a communication interface, a pulse signal generator, a timer, an ADC, and an IO interface; the communication interface is used to communicate with other devices or a host computer and synchronize the recognition results to other devices or a host computer; the pulse signal generator is used to generate a pulse signal of a characteristic voltage; the timer is used to record the time interval from sending a pulse voltage signal to receiving a reflected pulse voltage signal; the ADC is used to collect the voltage value of the reflected pulse signal; the IO interface is used to control the high-speed signal switching module to select the conduction and disconnection of the USB-Type-C interface and the corresponding PIN angle, and at the same time control the indication module to indicate the corresponding recognition result; The indication module is used to display the identification result of the USB-Type-C cable function.
3. The USB TYPE-C cable data line function detection and indication system according to claim 2, characterized in that: The core processing module is any one of FPGA, CPU, GPU, MCU, and SOC.
4. The USB TYPE-C cable data line function detection and indication method according to claim 2, characterized in that: The communication interface type is any one of I2C, UART, USB, and SPI.
5. The USB TYPE-C cable data line function detection and indication method according to claim 2, 3 or 4, characterized in that: The USB TYPE-C cable data line function detection and indication system is integrated into other devices or used as an independent detection device.