WO2015176621A1 - Interface detection circuit, apparatus and method - Google Patents

Interface detection circuit, apparatus and method Download PDF

Info

Publication number
WO2015176621A1
WO2015176621A1 PCT/CN2015/078879 CN2015078879W WO2015176621A1 WO 2015176621 A1 WO2015176621 A1 WO 2015176621A1 CN 2015078879 W CN2015078879 W CN 2015078879W WO 2015176621 A1 WO2015176621 A1 WO 2015176621A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
transistor
module
state
resistor
Prior art date
Application number
PCT/CN2015/078879
Other languages
French (fr)
Chinese (zh)
Inventor
安云霖
李军
程乔乔
徐旭伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015176621A1 publication Critical patent/WO2015176621A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R27/00Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/50Testing of electric apparatus, lines, cables or components for short-circuits, continuity, leakage current or incorrect line connections
    • G01R31/66Testing of connections, e.g. of plugs or non-disconnectable joints

Definitions

  • Embodiments of the present invention relate to the field of computers, and in particular, to an interface detection circuit, apparatus, and method.
  • a common interface on the one hand, provides versatility and compatibility of the device products, and on the other hand provides users with common interfaces, which are convenient and easy to use, thereby improving the user experience.
  • common common interfaces include: Universal Serial Bus (USB) interface, 3.5mm headphone jack, High Definition Multimedia Interface (HDMI) interface, network port RJ45 and RJ9 headphone jack.
  • the insertion state recognition design of the universal interface has become a common design requirement; at present, different detection schemes are adopted for different types of interfaces, such as by judging the closing and breaking of the elastic shrapnel.
  • the status of the interface is determined by detecting and detecting the level change of a pin on the interface and detecting the change in power consumption after the device is inserted. Therefore, the interface detection method provided by the prior art has poor versatility, and the partially targeted solution can only be applied to a specific type of interface, and has low practicability.
  • the embodiment of the invention provides an interface detection circuit, device and method, which can implement a universal interface state detection scheme, and is portable and practical based on a universal module structure. Higher sex.
  • an interface detection circuit includes: a decision module and a detection module, where:
  • the decision module is connected to the detection module, and configured to send an open signal to the detection module, where the open signal is used to open the detection module;
  • the detecting module is configured to connect a device interface, detect a load impedance on the device interface, and generate a load signal corresponding to the load impedance;
  • the determining module is further configured to: when the load signal meets a preset state condition, determine that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, It is determined that the interface state is an unplugged state.
  • the decision module is further configured to:
  • the decision module is further configured to:
  • the opening signal is sent to the detecting module at intervals of a first preset time, and the load signal is acquired again from the detecting module, and is determined according to the load signal.
  • the interface status is sent to the detecting module.
  • the decision module is further configured to:
  • the second predetermined time interval is sent, the opening signal is sent to the detecting module, and the load signal is acquired again from the detecting module, according to the load signal. Determine the interface status.
  • the determining module includes a central processing unit CPU;
  • the detecting module includes: a first transistor, a second transistor, a third transistor, a first resistor, a second resistor, a third resistor, and a fourth resistor, the first transistor and the first
  • the two transistors are bipolar transistors, and the third transistor is a field effect transistor;
  • the first interface of the CPU is connected to the first end of the first resistor and the first end of the second resistor, and the second interface is connected to the drain of the third transistor;
  • a base of the first transistor is connected to a second end of the first resistor, a collector is connected to a gate of the third transistor, a first end of the third resistor, and an emitter is connected to the device Connected to the first end;
  • the base of the second transistor is connected to the second end of the second resistor, the collector is connected to the second end of the device interface, and the emitter is connected to the first voltage end;
  • the second end of the third resistor is connected to the second voltage end
  • a source of the third transistor is connected to the first voltage end, and a drain is further connected to a first end of the fourth resistor;
  • the second end of the fourth resistor is connected to the second voltage end
  • the first voltage terminal is at a low level, and the second voltage terminal is at a high level;
  • the CPU in the decision module sends the open signal to the detecting module, and the open signal includes a signal for setting a first terminal voltage of the first resistor to a high level, so that the first resistor The second terminal voltage and the second terminal voltage of the second resistor are both high, and the first transistor is electrically connected to the second transistor;
  • the detecting module acquires a corresponding load signal according to a connection situation between the first end and the second end of the device interface, where the load signal is a drain voltage of the third transistor; when the device interface is first When the terminal and the second terminal are already connected, the collector voltage of the first transistor is a low level, the third transistor is turned on, and the drain voltage of the third transistor is a low level; or When the first end and the second end of the device interface are not connected, the collector voltage of the first transistor is a low level, the third transistor is turned off, and the drain voltage of the third transistor is a high level ;
  • the CPU in the decision module determines that the interface state is an inserted state when the drain voltage of the third transistor is a low level, or when the drain voltage of the third transistor is a high level And determining that the interface state is an uninserted state.
  • an interface detecting apparatus comprising a device interface, the first aspect to any one of the fourth possible implementation manners of the first aspect Port detection circuit.
  • an interface detection method includes:
  • Initialization phase the decision module sends an open signal to the detection module, the open signal is used to open the detection module;
  • the detection module detects a load impedance on a device interface, and generates a load signal corresponding to the load impedance;
  • a decision stage when the load signal meets a preset state condition, the decision module determines that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, The decision module determines that the interface state is an uninserted state.
  • the method further includes:
  • the decision module sends a shutdown signal to the detection module, the shutdown signal is used to close the detection module and stop detecting.
  • the method further includes:
  • the initialization phase is re-executed to the decision phase.
  • the method further includes:
  • the initialization phase is re-executed to the decision phase.
  • the interface detection circuit, device and method provided by the embodiment of the invention based on the coordination between the decision module and the detection module, determine the interface state by determining the load impedance of the device interface; for different types of device interfaces, On the basis of not changing the circuit design structure, the universal interface state detection scheme can be realized only by partial adjustment, which has strong portability and improves the practicability of the interface detection circuit.
  • FIG. 1 is a schematic structural diagram 1 of an interface detection circuit according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram 2 of an interface detection circuit according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a circuit of an interface detection circuit according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart 1 of an interface detection method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart 2 of an interface detection method according to an embodiment of the present invention.
  • An embodiment of the present invention provides an interface detection circuit 00.
  • the interface detection circuit 00 includes:
  • the decision module 001 is connected to the detection module 002 and configured to send an open signal to the detection module 002.
  • the open signal is used to open the detection module 002.
  • the detecting module 002 is configured to connect to the device interface 003, detect the load impedance on the device interface 003, and generate a load signal corresponding to the load impedance.
  • the device interface 003 may be a connection interface of the device itself for connecting various external devices. For example, taking the phone RJ9 earphone interface as an example, when detecting the insertion of the RJ9 earphone, the load on the device interface 003 is For the headset receiver.
  • the structure of the interface detection circuit 00 and the device interface 003 is connected. intention.
  • the decision module 001 is further configured to determine that the interface state of the device interface 003 is the inserted state when the load signal meets the preset state condition, or determine that the interface state is the unplugged state when the load signal does not satisfy the preset state condition.
  • the preset state condition may be a default setting of the system, or may be given by an external input.
  • the specific setting is different according to the circuit structure, and is not limited herein.
  • the decision module 001 is further configured to send a shutdown signal to the detection module 002 after determining that the interface state of the device interface 003 is the inserted state.
  • the shutdown signal is used to turn off the detection module 002.
  • the determining module 001 is further configured to: after sending the shutdown signal to the detecting module 002, send an open signal to the detecting module 002 at intervals of a first preset time, and obtain a load signal from the detecting module 002 again, and determine the device according to the load signal. Interface status of interface 003.
  • the first preset time is determined by the decision module 001 after the interface state of the device interface 003 is the inserted state, and the interval time of the interface state detection may be the default value of the system or the external input reference value. , here is not limited.
  • the determining module 001 is further configured to: after determining that the interface state of the device interface 003 is an uninserted state, send an open signal to the detecting module 002 at intervals of a second preset time, and obtain again from the detecting module 002.
  • the load signal determines the interface state of the device interface 003 according to the load signal.
  • the first preset time is determined by the decision module 001, and the interval time of the interface state detection after the interface state of the device interface 003 is not inserted, which may be a system default setting value or an external input setting value. , here is not limited.
  • the interface detection circuit opens the detection module by the decision module, and the detection module detects the load signal corresponding to the load impedance, and the decision module determines the interface state of the device interface according to the load signal; thus, for different types
  • the device interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
  • the decision module 001 can include a central processing unit CPU.
  • the CPU connects and interacts with other modules through a General Purpose Input Output (GPIO) interface.
  • GPIO General Purpose Input Output
  • decision module 001 may provide a part of the corresponding function in the CPU of the device where the interface detection circuit 00 is located, or may also be an accessory module under the control of the CPU; in the process of actual application, according to design requirements Make selections and adjustments.
  • the detecting module 002 may include:
  • first transistor Q1 a first transistor Q1, a second transistor Q2, a third transistor Q3, a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4;
  • first transistor Q1 and the second transistor Q2 can be bipolar Type transistor, the third transistor Q3 can be a field effect transistor;
  • the first transistor Q1 and the second transistor Q2 are all described by using a bipolar transistor, that is, a semiconductor transistor, and the third transistor Q3 is a P-channel enhancement type.
  • the field effect transistor is taken as an example. It is conceivable that when other devices with the same characteristics are used, such as the third transistor Q3 adopting an N-channel enhancement type field effect transistor, those skilled in the art can do no creative work. It is easily conceivable under the premise and is therefore also within the scope of the embodiments of the present invention.
  • the CPU is connected to the first end of the first resistor R1, the first end of the second resistor R2 through the first interface on the GPIO, and the second interface is connected to the drain of the third transistor Q3. ;
  • the base of the first transistor Q1 is connected to the second end of the first resistor R1, the collector is connected to the gate of the third transistor Q3, the first end of the third resistor R3, and the emitter is connected to the first end of the device interface 003. ;
  • the base of the second transistor Q2 is connected to the second end of the second resistor R2, the collector is connected to the second end of the device interface 003, and the emitter is connected to the first voltage terminal V1;
  • the second end of the third resistor R3 is connected to the second voltage terminal V2;
  • the source of the third transistor Q3 is connected to the first voltage terminal V1, and the drain is also connected to the first terminal of the fourth resistor R4;
  • the second end of the fourth resistor R4 is connected to the second voltage terminal V2;
  • the first voltage terminal V1 may be an input low level GND, and the second voltage terminal V2 may be an input high level VCC.
  • the CPU in the decision module 001 sends an open signal to the detection module 002, the open signal including the first end of the first resistor R1
  • the voltage is set to a high level signal, so that the voltage of the second terminal of the first resistor R1 and the voltage of the second terminal of the second resistor R2 are both high, and the first transistor Q1 and the second transistor Q2 are turned on;
  • the detecting module 002 obtains a corresponding load signal according to the connection between the first end and the second end of the device interface 003, and the load signal is the drain voltage of the third transistor Q3; when the first end and the second end of the device interface 003 already exist When connected, the collector voltage of the first transistor Q1 is at a low level, the third transistor Q3 is turned on, and the drain voltage of the third transistor Q3 is at a low level; or, when the first end and the second end of the device interface 003 are When not connected, the collector voltage of the first transistor Q1 is at a low level, the third transistor Q3 is turned off, and the drain voltage of the third transistor Q3 is at a high level;
  • the CPU in the decision module 001 determines that the interface state is the inserted state, or when the drain voltage of the third transistor is high, determines that the interface state is uninserted. .
  • the CPU in the decision module 001 sends a shutdown signal to the detection module 002, where the shutdown signal includes setting the first terminal voltage of the first resistor R1 to be low.
  • the flat signal is such that the voltage of the second terminal of the first resistor R1 and the voltage of the second terminal of the second resistor R2 are both low, the first transistor Q1 and the second transistor Q2 are turned off, and the detecting module 002 stops detecting; thus, avoiding The interface detection circuit 00 causes interference to the original circuit of the device.
  • the CPU in the decision module 001 may further send an open signal to the detecting module 002 after the first signal is sent to the detecting module 002, and obtain a load signal from the detecting module 002 again, and determine the load signal according to the load signal.
  • the interface status of the device interface 003 determines whether the device inserted on the device interface 003 is unplugged during the first preset time interval.
  • the CPU in the decision module 001 sends an open signal to the detecting module 002 at a second preset time interval.
  • the load signal is obtained from the detection module 002 again, and the interface state of the device interface 003 is determined according to the load signal, so that when the interface state of the device interface 003 is detected as being uninserted, the interface state is periodically detected.
  • the interface state is detected by determining the load impedance of the device interface, and the interface state is further determined to be inserted.
  • the detection is stopped after the state; for different types of device interfaces, the general interface state detection scheme can be realized only by partial adjustment without changing the circuit design structure, which has strong portability and avoids introduction of the original circuit of the device. Additional interference improves the usability of the interface detection circuit.
  • the embodiment of the invention further provides an interface detecting device, which is applied to any type of electronic device having a device interface, such as a smart phone, a tablet computer or a smart TV; the interface detecting device includes the interface detection as described above Circuit.
  • the interface detecting apparatus provided by the embodiment of the present invention may be an electronic device including a device interface and an interface detecting circuit.
  • the interface detecting apparatus includes an interface detecting circuit, based on the coordination between the decision module and the detecting module in the interface detecting circuit, and determining the interface state by determining the load impedance of the device interface; for different types of devices
  • the interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
  • the embodiment of the present invention provides an interface detection method, which can be applied to the interface detection circuit provided in the foregoing embodiment. As shown in FIG. 4, the method includes:
  • the decision module sends an open signal to the detection module.
  • the open signal is used to open the detection module.
  • the detection module detects a load impedance on the interface of the device, and generates a load signal corresponding to the load impedance.
  • the decision module determines that the interface state of the device interface is the inserted state, or when the load signal does not satisfy the preset state condition, the decision module determines that the interface state is the uninserted state.
  • the decision module determines that the interface state of the device interface is inserted. After the state is entered, the method further includes: the decision module sends a shutdown signal to the detection module, and the shutdown signal is used to close the detection module and stop the detection.
  • the decision module sends the shutdown signal to the detection module
  • the first preset time is interrupted, and the foregoing S101 to S103 are performed again, and the interface state detection is performed again.
  • the method further includes: after the second preset time interval, re-executing the foregoing S101 to S103, and performing the interface state detection again.
  • An interface detection method is provided by the embodiment of the present invention.
  • the detection module is opened by the decision module, and the detection module detects the load signal corresponding to the load impedance, and the decision module determines the interface state of the device interface according to the load signal; thus, for different types
  • the device interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
  • the interface detection circuit shown in FIG. 3 is taken as an example to describe the interface detection method provided by the embodiment of the present invention in detail.
  • the first transistor Q1 and the second transistor Q2 may be bipolar transistors, and the third transistor may be a field effect transistor, and each transistor mentioned in the embodiment of the present invention may be Use other devices with the same characteristics to replace them. In the use, only the circuit needs to be adjusted accordingly.
  • the specific selection can be determined according to the design requirements, which is not limited here.
  • the interface detection method provided by the embodiment of the present invention may include:
  • the high level can be the VCC set by the system.
  • the collector voltage of the first transistor Q1 has two situations: a high level and a low level:
  • the connection between the two ends of the device interface is not established, that is, the connection between the emitter of the first transistor Q1 and the collector of the second transistor Q2 is disconnected. Always stay high;
  • the two ends of the device interface form a connection relationship, that is, there is a connection between the emitter of the first transistor Q1 and the collector of the second transistor Q2, and the voltage at the point D is maintained high before.
  • the level changes to a low level
  • the low level can be the GND set by the system.
  • the voltage D D of the D point can be adjusted, and U D is low level by adjusting, that is, U D is less than a preset voltage value, and the preset voltage value can be
  • the turn-on voltage of the third transistor Q3 itself is determined; the configuration of the third resistor R3 can be determined according to the application requirements of the interface detection circuit, that is, the resistance range of the corresponding interface insertion device type.
  • the drain (E point) voltage of the third transistor Q3 is obtained; wherein, according to whether the device interface is connected to the load, the drain voltage of the third transistor Q3 has a high level and a low level:
  • the third transistor Q3 when the voltage at point D is high, the third transistor Q3 is turned off, and the voltage at point E is high; or, when the voltage at point D is low, the third transistor Q3 is turned on, and the voltage at point E is from before. The high level goes low.
  • a decision stage in this stage, the CPU obtains the voltage of the E point, determines whether the voltage of the E point meets the preset state condition, and if yes, determines that the interface state of the device interface is the inserted state; or, if not, determines The interface status is unplugged.
  • the preset state condition includes: the E point voltage is a low level.
  • the method further includes:
  • the voltage at point B and the voltage at point C are both low; the first transistor Q1 and the second transistor Q2 are turned off, the detection is stopped, and the interface detection circuit 00 is prevented from causing interference to the original circuit of the device.
  • the S201 to S203 may be performed again after the first preset time interval, and the interface state is re-detected; Whether the device inserted on the device interface is removed during the set time.
  • the first preset time is an interval time for performing the interface state detection again when the detection and confirmation interface state is the inserted state, and may be a system default setting value or an external input setting value. No restrictions are imposed.
  • the S201 may be performed again after the second preset time interval Go to S203 to re-detect the interface status.
  • the second preset time is an interval between when the interface is detected to be uninserted, and the interface is detected again, which may be a system default setting or an external input setting. No restrictions are imposed.
  • the interface detecting circuit may not include the third transistor Q3 and the fourth resistor R4, and the D point is directly connected to the second interface of the CPU, and the CPU determines according to the voltage of the D point.
  • the interface status of the device interface is similar to the above steps, and is not described here.
  • the third transistor Q3 is used to implement security isolation between the CPU and the interface load. It has better safety and stability when not in use.
  • the interface detection circuit shown in FIG. 3 is taken as an example to describe the interface detection method provided by the embodiment of the present invention.
  • the interface detection method provided by the embodiment of the present invention can also be applied to an interface detection circuit having the same module structure, and each The module circuit structure can be different from that of FIG. 3, and the specific process will not be described one by one.
  • the interface detection method provided by the embodiment of the present invention determines the interface state by determining the load impedance of the device interface, and further determines the interface state as After the state is inserted, the detection is stopped.
  • the general interface state detection scheme can be implemented only by partial adjustment without changing the circuit design structure, which has strong portability and avoids the original device.
  • the circuit introduces additional interference and improves the usability of the interface detection circuit.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

An interface detection circuit, apparatus and method, which relate to the field of electronic devices and can realize a universal interface state detection solution, thereby improving the practicability of the interface detection of electronic devices. The method comprises: opening, by a decision module (001), a detection module (002); detecting and acquiring, by the detection module (002), a load signal corresponding to a load impedance; and then, determining, by the decision module (001), an interface state of a device interface according to the load signal.

Description

一种接口检测电路、装置及方法Interface detection circuit, device and method
本申请要求于2014年5月19日提交中国专利局、申请号为201410210915.5、发明名称为“一种接口检测电路、装置及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201410210915.5, entitled "An Interface Detection Circuit, Apparatus and Method", filed on May 19, 2014, the entire contents of which is incorporated herein by reference. In the application.
技术领域Technical field
本发明的实施例涉及计算机领域,尤其涉及一种接口检测电路、装置及方法。Embodiments of the present invention relate to the field of computers, and in particular, to an interface detection circuit, apparatus, and method.
背景技术Background technique
现今,电子设备呈现出多样化的发展趋势,而不同类型的设备(如智能手机、平板电脑,智能电视等),在系统设计上,对通用接口的应用需求却在逐渐增大;通过使用各种通用接口,一方面提供了设备产品的通用性与兼容性,另一方面为用户提供常见的接口,方便易用从而提高用户体验。其中,常见的通用接口包括:通用串行总线(Universal Serial Bus,USB)接口、3.5mm耳机接口、高清晰度多媒体(High Definition Multimedia Interface,HDMI)接口、网口RJ45以及RJ9耳机接口等。Nowadays, electronic devices are showing a diversified development trend, and different types of devices (such as smart phones, tablets, smart TVs, etc.) have gradually increased the application requirements for general-purpose interfaces in system design; A common interface, on the one hand, provides versatility and compatibility of the device products, and on the other hand provides users with common interfaces, which are convenient and easy to use, thereby improving the user experience. Among them, common common interfaces include: Universal Serial Bus (USB) interface, 3.5mm headphone jack, High Definition Multimedia Interface (HDMI) interface, network port RJ45 and RJ9 headphone jack.
随着用户对各种智能设备要求的提高,通用接口的插入状态识别设计已成为一种普遍的设计需求;目前,针对不同类型的接口采用不同的检测方案,如通过判断弹性弹片的闭合和断开、检测接口上某一个引脚的电平变化、检测器件插入后功耗的变化等确定接口状态。因而,现有技术提供的接口检测方法通用性差,部分针对性的方案只能适用于特定的某类接口,实用性低。With the increase of users' requirements for various smart devices, the insertion state recognition design of the universal interface has become a common design requirement; at present, different detection schemes are adopted for different types of interfaces, such as by judging the closing and breaking of the elastic shrapnel. The status of the interface is determined by detecting and detecting the level change of a pin on the interface and detecting the change in power consumption after the device is inserted. Therefore, the interface detection method provided by the prior art has poor versatility, and the partially targeted solution can only be applied to a specific type of interface, and has low practicability.
发明内容Summary of the invention
本发明的实施例提供一种接口检测电路、装置及方法,能够实现通用的接口状态检测方案,基于通用的模块结构,可移植性强且实用 性较高。The embodiment of the invention provides an interface detection circuit, device and method, which can implement a universal interface state detection scheme, and is portable and practical based on a universal module structure. Higher sex.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种接口检测电路,所述接口检测电路包括:决策模块、检测模块,其中:In a first aspect, an interface detection circuit is provided, where the interface detection circuit includes: a decision module and a detection module, where:
所述决策模块,与所述检测模块相连,用于向所述检测模块发送打开信号,所述打开信号用于打开所述检测模块;The decision module is connected to the detection module, and configured to send an open signal to the detection module, where the open signal is used to open the detection module;
所述检测模块,用于连接设备接口,检测所述设备接口上的负载阻抗,并生成与所述负载阻抗对应的负载信号;The detecting module is configured to connect a device interface, detect a load impedance on the device interface, and generate a load signal corresponding to the load impedance;
所述决策模块,还用于当所述负载信号满足预设状态条件时,确定所述设备接口的接口状态为已插入状态,或,当所述负载信号不满足所述预设状态条件时,确定所述接口状态为未插入状态。The determining module is further configured to: when the load signal meets a preset state condition, determine that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, It is determined that the interface state is an unplugged state.
结合第一方面,在第一种可能的实现方式中,所述决策模块还用于:In conjunction with the first aspect, in a first possible implementation, the decision module is further configured to:
在确定所述接口状态为所述已插入状态后,向所述检测模块发送关闭信号,所述关闭信号用于关闭所述检测模块。After determining that the interface state is the inserted state, sending a shutdown signal to the detection module, the shutdown signal being used to close the detection module.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述决策模块还用于:In conjunction with the first possible implementation of the first aspect, in a second possible implementation, the decision module is further configured to:
在向所述检测模块发送所述关闭信号后,间隔第一预设时间,向所述检测模块发送所述打开信号,并再次从所述检测模块获取所述负载信号,根据所述负载信号确定所述接口状态。After the closing signal is sent to the detecting module, the opening signal is sent to the detecting module at intervals of a first preset time, and the load signal is acquired again from the detecting module, and is determined according to the load signal. The interface status.
结合第一方面,在第三种可能的实现方式中,所述决策模块还用于:In combination with the first aspect, in a third possible implementation, the decision module is further configured to:
在确定所述接口状态为所述未插入状态后,间隔第二预设时间,向所述检测模块发送所述打开信号,并再次从所述检测模块获取所述负载信号,根据所述负载信号确定所述接口状态。After determining that the interface state is the uninserted state, the second predetermined time interval is sent, the opening signal is sent to the detecting module, and the load signal is acquired again from the detecting module, according to the load signal. Determine the interface status.
结合第一方面至第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述决策模块包括中央处理器CPU;With reference to the third aspect, the third possible implementation manner of the first aspect, in a fourth possible implementation, the determining module includes a central processing unit CPU;
所述检测模块包括:第一晶体管、第二晶体管、第三晶体管、第一电阻、第二电阻、第三电阻及第四电阻,所述第一晶体管与所述第 二晶体管为双极型晶体管,所述第三晶体管为场效应晶体管;The detecting module includes: a first transistor, a second transistor, a third transistor, a first resistor, a second resistor, a third resistor, and a fourth resistor, the first transistor and the first The two transistors are bipolar transistors, and the third transistor is a field effect transistor;
所述CPU的第一接口与所述第一电阻的第一端、第二电阻的第一端相连,第二接口与所述第三晶体管的漏极相连;The first interface of the CPU is connected to the first end of the first resistor and the first end of the second resistor, and the second interface is connected to the drain of the third transistor;
所述第一晶体管的基极与所述第一电阻的第二端相连,集电极与所述第三晶体管的栅极、所述第三电阻的第一端相连,发射极与所述设备接口的第一端相连;a base of the first transistor is connected to a second end of the first resistor, a collector is connected to a gate of the third transistor, a first end of the third resistor, and an emitter is connected to the device Connected to the first end;
所述第二晶体管的基极与所述第二电阻的第二端相连,集电极与所述设备接口的第二端相连,发射极与第一电压端相连;The base of the second transistor is connected to the second end of the second resistor, the collector is connected to the second end of the device interface, and the emitter is connected to the first voltage end;
所述第三电阻的第二端与第二电压端相连;The second end of the third resistor is connected to the second voltage end;
所述第三晶体管的源极与所述第一电压端相连,漏极还与所述第四电阻的第一端相连;a source of the third transistor is connected to the first voltage end, and a drain is further connected to a first end of the fourth resistor;
所述第四电阻的第二端与所述第二电压端相连;The second end of the fourth resistor is connected to the second voltage end;
所述第一电压端为低电平,所述第二电压端为高电平;The first voltage terminal is at a low level, and the second voltage terminal is at a high level;
所述决策模块中的所述CPU向所述检测模块发送所述打开信号,所述打开信号包括将所述第一电阻的第一端电压置为高电平的信号,使得所述第一电阻的第二端电压、所述第二电阻的第二端电压都为高电平,所述第一晶体管与所述第二晶体管导通;The CPU in the decision module sends the open signal to the detecting module, and the open signal includes a signal for setting a first terminal voltage of the first resistor to a high level, so that the first resistor The second terminal voltage and the second terminal voltage of the second resistor are both high, and the first transistor is electrically connected to the second transistor;
所述检测模块根据所述设备接口的第一端与第二端的连接情况,获取相应所述负载信号,所述负载信号为所述第三晶体管的漏极电压;当所述设备接口的第一端与第二端已存在连接时,所述第一晶体管的集电极电压为低电平,所述第三晶体管导通,所述第三晶体管的漏极电压为低电平;或,当所述设备接口的第一端与第二端不存在连接时,所述第一晶体管的集电极电压为低电平,所述第三晶体管截止,所述第三晶体管的漏极电压为高电平;The detecting module acquires a corresponding load signal according to a connection situation between the first end and the second end of the device interface, where the load signal is a drain voltage of the third transistor; when the device interface is first When the terminal and the second terminal are already connected, the collector voltage of the first transistor is a low level, the third transistor is turned on, and the drain voltage of the third transistor is a low level; or When the first end and the second end of the device interface are not connected, the collector voltage of the first transistor is a low level, the third transistor is turned off, and the drain voltage of the third transistor is a high level ;
当所述第三晶体管的漏极电压为低电平时,所述决策模块中的所述CPU确定所述接口状态为已插入状态,或,当所述第三晶体管的漏极电压为高电平时,确定所述接口状态为未插入状态。The CPU in the decision module determines that the interface state is an inserted state when the drain voltage of the third transistor is a low level, or when the drain voltage of the third transistor is a high level And determining that the interface state is an uninserted state.
第二方面,提供一种接口检测装置,所述接口检测装置包括设备接口、第一方面至第一方面的第四种可能的实现方式中任一所述的接 口检测电路。In a second aspect, an interface detecting apparatus is provided, the interface detecting apparatus comprising a device interface, the first aspect to any one of the fourth possible implementation manners of the first aspect Port detection circuit.
第三方面,提供一种接口检测方法,所述方法包括:In a third aspect, an interface detection method is provided, and the method includes:
初始化阶段:决策模块向检测模块发送打开信号,所述打开信号用于打开所述检测模块;Initialization phase: the decision module sends an open signal to the detection module, the open signal is used to open the detection module;
检测阶段:所述检测模块检测设备接口上的负载阻抗,并生成与所述负载阻抗对应的负载信号;a detection phase: the detection module detects a load impedance on a device interface, and generates a load signal corresponding to the load impedance;
决策阶段:当所述负载信号满足预设状态条件时,所述决策模块确定所述设备接口的接口状态为已插入状态,或,当所述负载信号不满足所述预设状态条件时,所述决策模块确定所述接口状态为未插入状态。a decision stage: when the load signal meets a preset state condition, the decision module determines that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, The decision module determines that the interface state is an uninserted state.
结合第三方面,在第一种可能的实现方式中,在所述决策模块确定所述设备接口的接口状态为已插入状态之后,所述方法还包括:With reference to the third aspect, in a first possible implementation, after the determining, by the determining module, that the interface state of the device interface is an inserted state, the method further includes:
所述决策模块向所述检测模块发送关闭信号,所述关闭信号用于关闭所述检测模块,停止检测。The decision module sends a shutdown signal to the detection module, the shutdown signal is used to close the detection module and stop detecting.
结合第三方面的第一种可能的实现方式,在第二种可能的实现方式中,在所述决策模块向所述检测模块发送关闭信号之后,所述方法还包括:With the first possible implementation of the third aspect, in a second possible implementation, after the determining module sends a shutdown signal to the detection module, the method further includes:
在间隔第一预设时间后,重新执行所述初始化阶段至所述决策阶段。After the first predetermined time interval, the initialization phase is re-executed to the decision phase.
结合第三方面,在第三种可能的实现方式中,在所述决策模块确定所述接口状态为未插入状态之后,所述方法还包括:With reference to the third aspect, in a third possible implementation, after the determining, by the determining module, that the interface state is an uninserted state, the method further includes:
在间隔第二预设时间后,重新执行所述初始化阶段至所述决策阶段。After the second predetermined time interval, the initialization phase is re-executed to the decision phase.
本发明实施例提供的一种接口检测电路、装置及方法,基于决策模块与检测模块之间的协调,通过判断设备接口的负载阻抗情况,实现对接口状态的检测;对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,提高了接口检测电路的实用性。 The interface detection circuit, device and method provided by the embodiment of the invention, based on the coordination between the decision module and the detection module, determine the interface state by determining the load impedance of the device interface; for different types of device interfaces, On the basis of not changing the circuit design structure, the universal interface state detection scheme can be realized only by partial adjustment, which has strong portability and improves the practicability of the interface detection circuit.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明实施例提供的一种接口检测电路的结构示意图一;1 is a schematic structural diagram 1 of an interface detection circuit according to an embodiment of the present invention;
图2为本发明实施例提供的一种接口检测电路的结构示意图二;2 is a schematic structural diagram 2 of an interface detection circuit according to an embodiment of the present invention;
图3为本发明实施例提供的一种接口检测电路的电路结构示意图;3 is a schematic structural diagram of a circuit of an interface detection circuit according to an embodiment of the present invention;
图4为本发明实施例提供的一种接口检测方法的流程示意图一;FIG. 4 is a schematic flowchart 1 of an interface detection method according to an embodiment of the present disclosure;
图5为本发明实施例提供的一种接口检测方法的流程示意图二。FIG. 5 is a schematic flowchart 2 of an interface detection method according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供一种接口检测电路00,如图1所示,该接口检测电路00包括:An embodiment of the present invention provides an interface detection circuit 00. As shown in FIG. 1, the interface detection circuit 00 includes:
决策模块001、检测模块002。 Decision module 001, detection module 002.
具体的,决策模块001,与检测模块002相连,用于向检测模块002发送打开信号。Specifically, the decision module 001 is connected to the detection module 002 and configured to send an open signal to the detection module 002.
其中,打开信号用于打开检测模块002。The open signal is used to open the detection module 002.
检测模块002,用于连接设备接口003,检测设备接口003上的负载阻抗,并生成与负载阻抗对应的负载信号。The detecting module 002 is configured to connect to the device interface 003, detect the load impedance on the device interface 003, and generate a load signal corresponding to the load impedance.
其中,设备接口003可以为设备自身的用于连接各种外部器件的连接接口,示例性的,以话机RJ9耳机接口为例,在对RJ9耳机的插入进行检测时,设备接口003上的负载即为耳机受话器。The device interface 003 may be a connection interface of the device itself for connecting various external devices. For example, taking the phone RJ9 earphone interface as an example, when detecting the insertion of the RJ9 earphone, the load on the device interface 003 is For the headset receiver.
如图2所示,为接口检测电路00与设备接口003连接后的结构示 意图。As shown in FIG. 2, the structure of the interface detection circuit 00 and the device interface 003 is connected. intention.
决策模块001,还用于当负载信号满足预设状态条件时,确定设备接口003的接口状态为已插入状态,或,当负载信号不满足预设状态条件时,确定接口状态为未插入状态。The decision module 001 is further configured to determine that the interface state of the device interface 003 is the inserted state when the load signal meets the preset state condition, or determine that the interface state is the unplugged state when the load signal does not satisfy the preset state condition.
其中,预设状态条件可以为系统缺省设定,也可以为外部输入给定,具体的设定根据电路结构存在区别,此处不做限定。The preset state condition may be a default setting of the system, or may be given by an external input. The specific setting is different according to the circuit structure, and is not limited herein.
在一种实现方式下,决策模块001还用于在确定设备接口003的接口状态为已插入状态后,向检测模块002发送关闭信号。In an implementation manner, the decision module 001 is further configured to send a shutdown signal to the detection module 002 after determining that the interface state of the device interface 003 is the inserted state.
其中,关闭信号用于关闭检测模块002。The shutdown signal is used to turn off the detection module 002.
可选的,决策模块001还用于在向检测模块002发送关闭信号后,间隔第一预设时间,向检测模块002发送打开信号,并再次从检测模块002获取负载信号,根据负载信号确定设备接口003的接口状态。Optionally, the determining module 001 is further configured to: after sending the shutdown signal to the detecting module 002, send an open signal to the detecting module 002 at intervals of a first preset time, and obtain a load signal from the detecting module 002 again, and determine the device according to the load signal. Interface status of interface 003.
其中,第一预设时间为决策模块001确定设备接口003的接口状态为已插入状态后,再次进行接口状态检测的间隔时间,可以为系统缺省设定值,也可以为外部输入给定值,此处不做限定。The first preset time is determined by the decision module 001 after the interface state of the device interface 003 is the inserted state, and the interval time of the interface state detection may be the default value of the system or the external input reference value. , here is not limited.
在另一种实现方式下,决策模块001还用于在确定设备接口003的接口状态为未插入状态后,间隔第二预设时间,向检测模块002发送打开信号,并再次从检测模块002获取负载信号,根据负载信号确定设备接口003的接口状态。In another implementation manner, the determining module 001 is further configured to: after determining that the interface state of the device interface 003 is an uninserted state, send an open signal to the detecting module 002 at intervals of a second preset time, and obtain again from the detecting module 002. The load signal determines the interface state of the device interface 003 according to the load signal.
其中,第一预设时间为决策模块001确定设备接口003的接口状态为未插入状态后,再次进行接口状态检测的间隔时间,可以为系统缺省设定值,也可以为外部输入给定值,此处不做限定。The first preset time is determined by the decision module 001, and the interval time of the interface state detection after the interface state of the device interface 003 is not inserted, which may be a system default setting value or an external input setting value. , here is not limited.
本发明实施例提供的一种接口检测电路,通过决策模块打开检测模块,由检测模块检测获取与负载阻抗对应的负载信号,决策模块再根据负载信号确定设备接口的接口状态;这样,对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,提高了接口检测电路的实用性。The interface detection circuit provided by the embodiment of the invention opens the detection module by the decision module, and the detection module detects the load signal corresponding to the load impedance, and the decision module determines the interface state of the device interface according to the load signal; thus, for different types The device interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
具体的,如图3所示,在本发明实施例提供的接口检测电路00中, 决策模块001可以包括中央处理器CPU。Specifically, as shown in FIG. 3, in the interface detection circuit 00 provided by the embodiment of the present invention, The decision module 001 can include a central processing unit CPU.
其中,CPU通过通用输入/输出(General Purpose Input Output,GPIO)接口与其他模块进行连接及交互。Among them, the CPU connects and interacts with other modules through a General Purpose Input Output (GPIO) interface.
需要说明的是,决策模块001可以为接口检测电路00所在设备的CPU中提供相应功能的一部分,或者,也可以为该CPU控制下的一个附属模块;在实际应用的过程中,可依据设计要求进行选择及调整。It should be noted that the decision module 001 may provide a part of the corresponding function in the CPU of the device where the interface detection circuit 00 is located, or may also be an accessory module under the control of the CPU; in the process of actual application, according to design requirements Make selections and adjustments.
进一步的,如图3所示,检测模块002可以包括:Further, as shown in FIG. 3, the detecting module 002 may include:
第一晶体管Q1、第二晶体管Q2、第三晶体管Q3、第一电阻R1、第二电阻R2、第三电阻R3及第四电阻R4;其中,第一晶体管Q1与第二晶体管Q2可以为双极型晶体管,第三晶体管Q3可以为场效应晶体管;a first transistor Q1, a second transistor Q2, a third transistor Q3, a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4; wherein the first transistor Q1 and the second transistor Q2 can be bipolar Type transistor, the third transistor Q3 can be a field effect transistor;
值得一提的,在本发明实施例中,第一晶体管Q1以及第二晶体管Q2均是以双极型晶体管,即半导体三极管为例进行的说明,第三晶体管Q3均是以P沟道增强型场效应晶体管为例进行的说明,可以想到的是在采用其他特性相同的器件实现时,如第三晶体管Q3采用N沟道增强型场效应晶体管,是本领域技术人员可在没有做出创造性劳动前提下轻易想到的,因此也在本发明的实施例保护范围内。It is to be noted that, in the embodiment of the present invention, the first transistor Q1 and the second transistor Q2 are all described by using a bipolar transistor, that is, a semiconductor transistor, and the third transistor Q3 is a P-channel enhancement type. The field effect transistor is taken as an example. It is conceivable that when other devices with the same characteristics are used, such as the third transistor Q3 adopting an N-channel enhancement type field effect transistor, those skilled in the art can do no creative work. It is easily conceivable under the premise and is therefore also within the scope of the embodiments of the present invention.
示例性的,如图3所示,CPU通过GPIO上的第一接口与第一电阻R1的第一端、第二电阻R2的第一端相连,第二接口与第三晶体管Q3的漏极相连;Exemplarily, as shown in FIG. 3, the CPU is connected to the first end of the first resistor R1, the first end of the second resistor R2 through the first interface on the GPIO, and the second interface is connected to the drain of the third transistor Q3. ;
第一晶体管Q1的基极与第一电阻R1的第二端相连,集电极与第三晶体管Q3的栅极、第三电阻R3的第一端相连,发射极与设备接口003的第一端相连;The base of the first transistor Q1 is connected to the second end of the first resistor R1, the collector is connected to the gate of the third transistor Q3, the first end of the third resistor R3, and the emitter is connected to the first end of the device interface 003. ;
第二晶体管Q2的基极与第二电阻R2的第二端相连,集电极与设备接口003的第二端相连,发射极与第一电压端V1相连;The base of the second transistor Q2 is connected to the second end of the second resistor R2, the collector is connected to the second end of the device interface 003, and the emitter is connected to the first voltage terminal V1;
第三电阻R3的第二端与第二电压端V2相连;The second end of the third resistor R3 is connected to the second voltage terminal V2;
第三晶体管Q3的源极与第一电压端V1相连,漏极还与第四电阻R4的第一端相连;The source of the third transistor Q3 is connected to the first voltage terminal V1, and the drain is also connected to the first terminal of the fourth resistor R4;
第四电阻R4的第二端与第二电压端V2相连; The second end of the fourth resistor R4 is connected to the second voltage terminal V2;
其中,第一电压端V1可以为输入的低电平GND,第二电压端V2可以为输入的高电平VCC。The first voltage terminal V1 may be an input low level GND, and the second voltage terminal V2 may be an input high level VCC.
示例性的,基于如图3所示的接口检测电路00,在一种实现方式下,决策模块001中的CPU向检测模块002发送打开信号,该打开信号包括将第一电阻R1的第一端电压置为高电平的信号,使得第一电阻R1的第二端电压、第二电阻R2的第二端电压都为高电平,第一晶体管Q1与第二晶体管Q2导通;Exemplarily, based on the interface detection circuit 00 shown in FIG. 3, in an implementation manner, the CPU in the decision module 001 sends an open signal to the detection module 002, the open signal including the first end of the first resistor R1 The voltage is set to a high level signal, so that the voltage of the second terminal of the first resistor R1 and the voltage of the second terminal of the second resistor R2 are both high, and the first transistor Q1 and the second transistor Q2 are turned on;
检测模块002根据设备接口003的第一端与第二端的连接情况,获取相应负载信号,该负载信号为第三晶体管Q3的漏极电压;当设备接口003的第一端与第二端已存在连接时,第一晶体管Q1的集电极电压为低电平,第三晶体管Q3导通,第三晶体管Q3的漏极电压为低电平;或,当设备接口003的第一端与第二端未连接时,第一晶体管Q1的集电极电压为低电平,第三晶体管Q3截止,第三晶体管Q3的漏极电压为高电平;The detecting module 002 obtains a corresponding load signal according to the connection between the first end and the second end of the device interface 003, and the load signal is the drain voltage of the third transistor Q3; when the first end and the second end of the device interface 003 already exist When connected, the collector voltage of the first transistor Q1 is at a low level, the third transistor Q3 is turned on, and the drain voltage of the third transistor Q3 is at a low level; or, when the first end and the second end of the device interface 003 are When not connected, the collector voltage of the first transistor Q1 is at a low level, the third transistor Q3 is turned off, and the drain voltage of the third transistor Q3 is at a high level;
当第三晶体管Q3的漏极电压为低电平时,决策模块001中的CPU确定接口状态为已插入状态,或,当第三晶体管的漏极电压为高电平时,确定接口状态为未插入状态。When the drain voltage of the third transistor Q3 is low, the CPU in the decision module 001 determines that the interface state is the inserted state, or when the drain voltage of the third transistor is high, determines that the interface state is uninserted. .
可选的,决策模块001中的CPU在确定设备接口003的接口状态为已插入状态后,向检测模块002发送关闭信号,该关闭信号包括将第一电阻R1的第一端电压置为低电平的信号,使得第一电阻R1的第二端电压、第二电阻R2的第二端电压都为低电平,第一晶体管Q1与第二晶体管Q2截止,检测模块002停止检测;这样,避免了接口检测电路00对设备原电路造成干扰。Optionally, after determining that the interface state of the device interface 003 is the inserted state, the CPU in the decision module 001 sends a shutdown signal to the detection module 002, where the shutdown signal includes setting the first terminal voltage of the first resistor R1 to be low. The flat signal is such that the voltage of the second terminal of the first resistor R1 and the voltage of the second terminal of the second resistor R2 are both low, the first transistor Q1 and the second transistor Q2 are turned off, and the detecting module 002 stops detecting; thus, avoiding The interface detection circuit 00 causes interference to the original circuit of the device.
进一步的,决策模块001中的CPU还可以在向检测模块002发送关闭信号后,间隔第一预设时间,向检测模块002发送打开信号,并再次从检测模块002获取负载信号,根据负载信号确定设备接口003的接口状态,以确定在间隔第一预设时间内,设备接口003上插入的设备是否被拔出。Further, the CPU in the decision module 001 may further send an open signal to the detecting module 002 after the first signal is sent to the detecting module 002, and obtain a load signal from the detecting module 002 again, and determine the load signal according to the load signal. The interface status of the device interface 003 determines whether the device inserted on the device interface 003 is unplugged during the first preset time interval.
可选的,决策模块001中的CPU在确定设备接口003的接口状态为未插入状态后,间隔第二预设时间,向检测模块002发送打开信号, 并再次从检测模块002获取负载信号,根据负载信号确定设备接口003的接口状态,以便在检测到设备接口003的接口状态为未插入状态时,周期性的循环检测接口状态。Optionally, after determining that the interface state of the device interface 003 is an uninserted state, the CPU in the decision module 001 sends an open signal to the detecting module 002 at a second preset time interval. The load signal is obtained from the detection module 002 again, and the interface state of the device interface 003 is determined according to the load signal, so that when the interface state of the device interface 003 is detected as being uninserted, the interface state is periodically detected.
采用本发明实施例提供的这样一种接口检测电路,基于决策模块与检测模块之间的协调,通过判断设备接口的负载阻抗情况,实现对接口状态的检测,进一步可在确定接口状态为已插入状态后停止检测;对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,避免了对设备原电路引入额外的干扰,提高了接口检测电路的实用性。According to the interface detection circuit provided by the embodiment of the present invention, based on the coordination between the decision module and the detection module, the interface state is detected by determining the load impedance of the device interface, and the interface state is further determined to be inserted. The detection is stopped after the state; for different types of device interfaces, the general interface state detection scheme can be realized only by partial adjustment without changing the circuit design structure, which has strong portability and avoids introduction of the original circuit of the device. Additional interference improves the usability of the interface detection circuit.
本发明实施例还提供一种接口检测装置,该接口检测装置应用于具有设备接口的任一类型电子设备,如智能手机、平板电脑或智能电视等;该接口检测装置包括如上所述的接口检测电路。The embodiment of the invention further provides an interface detecting device, which is applied to any type of electronic device having a device interface, such as a smart phone, a tablet computer or a smart TV; the interface detecting device includes the interface detection as described above Circuit.
具体的,本发明实施例所提供的接口检测装置可以是包括设备接口及接口检测电路的电子设备。Specifically, the interface detecting apparatus provided by the embodiment of the present invention may be an electronic device including a device interface and an interface detecting circuit.
本发明实施例提供的接口检测装置,包括接口检测电路,基于接口检测电路中决策模块与检测模块之间的协调,通过判断设备接口的负载阻抗,实现对接口状态的检测;对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,提高了接口检测电路的实用性。The interface detecting apparatus provided by the embodiment of the invention includes an interface detecting circuit, based on the coordination between the decision module and the detecting module in the interface detecting circuit, and determining the interface state by determining the load impedance of the device interface; for different types of devices The interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
本发明实施例提供一种接口检测方法,可以应用于前述实施例中所提供的接口检测电路,如图4所示,该方法包括:The embodiment of the present invention provides an interface detection method, which can be applied to the interface detection circuit provided in the foregoing embodiment. As shown in FIG. 4, the method includes:
S101、决策模块向检测模块发送打开信号。S101. The decision module sends an open signal to the detection module.
其中,打开信号用于打开检测模块。The open signal is used to open the detection module.
S102、检测模块检测设备接口上的负载阻抗,并生成与负载阻抗对应的负载信号。S102. The detection module detects a load impedance on the interface of the device, and generates a load signal corresponding to the load impedance.
S103、当负载信号满足预设状态条件时,决策模块确定设备接口的接口状态为已插入状态,或,当负载信号不满足预设状态条件时,决策模块确定接口状态为未插入状态。S103. When the load signal meets the preset state condition, the decision module determines that the interface state of the device interface is the inserted state, or when the load signal does not satisfy the preset state condition, the decision module determines that the interface state is the uninserted state.
在一种实现方式下,在决策模块确定设备接口的接口状态为已插 入状态之后,该方法还包括:决策模块向检测模块发送关闭信号,关闭信号用于关闭检测模块,停止检测。In an implementation manner, the decision module determines that the interface state of the device interface is inserted. After the state is entered, the method further includes: the decision module sends a shutdown signal to the detection module, and the shutdown signal is used to close the detection module and stop the detection.
可选的,在决策模块向检测模块发送关闭信号之后,间隔第一预设时间,重新执行上述S101至S103,再次进行接口状态检测。Optionally, after the decision module sends the shutdown signal to the detection module, the first preset time is interrupted, and the foregoing S101 to S103 are performed again, and the interface state detection is performed again.
在另一种实现方式下,在决策模块确定接口状态为未插入状态之后,方法还包括:在间隔第二预设时间后,重新执行上述S101至S103,再次进行接口状态检测。In another implementation manner, after the determining module determines that the interface state is the uninserted state, the method further includes: after the second preset time interval, re-executing the foregoing S101 to S103, and performing the interface state detection again.
本发明实施例提供的一种接口检测方法,通过决策模块打开检测模块,由检测模块检测获取与负载阻抗对应的负载信号,决策模块再根据负载信号确定设备接口的接口状态;这样,对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,提高了接口检测电路的实用性。An interface detection method is provided by the embodiment of the present invention. The detection module is opened by the decision module, and the detection module detects the load signal corresponding to the load impedance, and the decision module determines the interface state of the device interface according to the load signal; thus, for different types The device interface can realize the universal interface state detection scheme only by partial adjustment without changing the circuit design structure, has strong portability, and improves the practicability of the interface detection circuit.
以下以图3所示的接口检测电路为例,对本发明实施例提供的接口检测方法进行详细说明。The interface detection circuit shown in FIG. 3 is taken as an example to describe the interface detection method provided by the embodiment of the present invention in detail.
在如图3所示的接口检测电路中,第一晶体管Q1、第二晶体管Q2可以为双极型晶体管,第三晶体管可以为场效应晶体管,且本发明实施例中提及的各晶体管均可以使用其他特性相同的器件替代,在使用时仅需要对电路进行相应的调整,具体的选择可根据设计需求确定,此处不做限定。In the interface detection circuit shown in FIG. 3, the first transistor Q1 and the second transistor Q2 may be bipolar transistors, and the third transistor may be a field effect transistor, and each transistor mentioned in the embodiment of the present invention may be Use other devices with the same characteristics to replace them. In the use, only the circuit needs to be adjusted accordingly. The specific selection can be determined according to the design requirements, which is not limited here.
具体的,如图5所示,本发明实施例提供的接口检测方法可以包括:Specifically, as shown in FIG. 5, the interface detection method provided by the embodiment of the present invention may include:
S201、初始化阶段:在此阶段下,CPU通过GPIO接口将第一电阻R1的第一端(A点)电压置为高电平。此时,第一电阻R1的第二端(B点)电压、第二电阻的第二端(C点)电压都为高电平;由于B点为第一晶体管Q1的基极、C点为第二晶体管Q2的基极,且B点与C点都为高电平,第一晶体管Q1与第二晶体管Q2导通。S201. Initialization phase: At this stage, the CPU sets the first terminal (point A) voltage of the first resistor R1 to a high level through the GPIO interface. At this time, the voltage of the second end (point B) of the first resistor R1 and the voltage of the second end (point C) of the second resistor are both high; since point B is the base of the first transistor Q1, point C is The base of the second transistor Q2, and points B and C are both high, and the first transistor Q1 and the second transistor Q2 are turned on.
其中,高电平可以为系统设定的VCC。Among them, the high level can be the VCC set by the system.
S202、检测阶段:在此阶段下,第一晶体管Q1与第二晶体管Q2导通,获取第一晶体管Q1的集电极(D点)电压。 S202. Detection phase: At this stage, the first transistor Q1 and the second transistor Q2 are turned on to obtain the collector (point D) voltage of the first transistor Q1.
其中,根据设备接口是否接入负载,第一晶体管Q1的集电极电压存在高电平与低电平两种情况:Wherein, according to whether the device interface is connected to the load, the collector voltage of the first transistor Q1 has two situations: a high level and a low level:
示例性的,当设备接口没有接入负载时,设备接口的两端未建立连接关系,即第一晶体管Q1的发射极与第二晶体管Q2的集电极之间连接断开,此时D点电压始终保持为高电平;Exemplarily, when the device interface is not connected to the load, the connection between the two ends of the device interface is not established, that is, the connection between the emitter of the first transistor Q1 and the collector of the second transistor Q2 is disconnected. Always stay high;
或者,当设备接口接入负载时,设备接口的两端形成连接关系,即第一晶体管Q1的发射极与第二晶体管Q2的集电极之间存在连接,此时D点电压由之前保持的高电平变为低电平;Alternatively, when the device interface is connected to the load, the two ends of the device interface form a connection relationship, that is, there is a connection between the emitter of the first transistor Q1 and the collector of the second transistor Q2, and the voltage at the point D is maintained high before. The level changes to a low level;
其中,低电平可以为系统设定的GND。Among them, the low level can be the GND set by the system.
值得一提的,假设设备接口接入负载的阻值为RL,在第一晶体管Q1、第二晶体管Q2导通的情况下,D点电压UD为:It is worth mentioning that, assuming that the resistance of the device interface access load is RL, in the case where the first transistor Q1 and the second transistor Q2 are turned on, the voltage D D at the D point is:
Figure PCTCN2015078879-appb-000001
Figure PCTCN2015078879-appb-000001
其中,根据配置第三电阻R3的阻值,可对D点电压UD进行调节,通过调节使UD为低电平,即使得UD小于一个预设电压值,该预设电压值可以根据第三晶体管Q3自身的开启电压确定;对第三电阻R3的配置,可根据接口检测电路的应用需求,即对应接口插入器件类型的阻值范围确定。Wherein, according to the resistance value of the third resistor R3, the voltage D D of the D point can be adjusted, and U D is low level by adjusting, that is, U D is less than a preset voltage value, and the preset voltage value can be The turn-on voltage of the third transistor Q3 itself is determined; the configuration of the third resistor R3 can be determined according to the application requirements of the interface detection circuit, that is, the resistance range of the corresponding interface insertion device type.
由此可见,针对不同类型设备接口,只需在设计时对第三电阻R3的阻值进行调整,即可在保持电路结构不变的情况下,进行移植,具有较高的实用性,且降低了工业成本。It can be seen that for different types of device interfaces, it is only necessary to adjust the resistance value of the third resistor R3 at the time of design, and the migration can be performed while maintaining the circuit structure unchanged, which has high practicability and is reduced. Industrial costs.
进一步的,获取第三晶体管Q3的漏极(E点)电压;其中,根据设备接口是否接入负载,第三晶体管Q3的漏极电压存在高电平与低电平两种情况:Further, the drain (E point) voltage of the third transistor Q3 is obtained; wherein, according to whether the device interface is connected to the load, the drain voltage of the third transistor Q3 has a high level and a low level:
示例性的,当D点电压为高电平时,第三晶体管Q3截止,E点电压为高电平;或者,当D点电压为低电平时,第三晶体管Q3导通,E点电压由之前的高电平变为低电平。Exemplarily, when the voltage at point D is high, the third transistor Q3 is turned off, and the voltage at point E is high; or, when the voltage at point D is low, the third transistor Q3 is turned on, and the voltage at point E is from before. The high level goes low.
S203、决策阶段:在此阶段下,CPU获取E点电压,判断E点电压是否满足预设状态条件,若满足,则确定设备接口的接口状态为已插入状态;或者,若不满足,则确定接口状态为未插入状态; S203, a decision stage: in this stage, the CPU obtains the voltage of the E point, determines whether the voltage of the E point meets the preset state condition, and if yes, determines that the interface state of the device interface is the inserted state; or, if not, determines The interface status is unplugged.
其中,预设状态条件包括:E点电压为低电平。The preset state condition includes: the E point voltage is a low level.
可选的,在上述决策阶段中,当CPU判断E点电压满足预设状态条件,即确定设备接口的接口状态为已插入状态时,该方法还包括:Optionally, in the foregoing determining phase, when the CPU determines that the E-point voltage meets the preset state condition, that is, determines that the interface state of the device interface is the inserted state, the method further includes:
S204、反馈阶段:在此阶段下,CPU通过GPIO接口将A点电压重新置为低电平。S204, feedback phase: In this phase, the CPU resets the voltage of point A to a low level through the GPIO interface.
此时,B点电压、C点电压都为低电平;第一晶体管Q1与第二晶体管Q2截止,检测停止,避免了接口检测电路00对设备原电路造成干扰。At this time, the voltage at point B and the voltage at point C are both low; the first transistor Q1 and the second transistor Q2 are turned off, the detection is stopped, and the interface detection circuit 00 is prevented from causing interference to the original circuit of the device.
进一步,CPU在将A点电压置为低电平,停止检测后,还可以在间隔第一预设时间后,再次执行上述S201至S203,重新对接口状态进行检测;以确定在间隔第一预设时间内,设备接口上插入的设备是否被拔出。Further, after the CPU sets the voltage of the A point to a low level and stops the detection, the S201 to S203 may be performed again after the first preset time interval, and the interface state is re-detected; Whether the device inserted on the device interface is removed during the set time.
其中,上述第一预设时间为在检测确认接口状态为已插入状态的情况下,再次进行接口状态检测的间隔时间,可以为系统缺省设定值,也可以为外部输入给定值,此处不做限定。The first preset time is an interval time for performing the interface state detection again when the detection and confirmation interface state is the inserted state, and may be a system default setting value or an external input setting value. No restrictions are imposed.
可选的,在上述决策阶段中,当CPU判断E点电压不满足预设状态条件,即确定设备接口的接口状态为未插入状态时,可以在间隔第二预设时间后,再次执行上述S201至S203,重新对接口状态进行检测。Optionally, in the foregoing determining stage, when the CPU determines that the E point voltage does not satisfy the preset state condition, that is, determines that the interface state of the device interface is the uninserted state, the S201 may be performed again after the second preset time interval Go to S203 to re-detect the interface status.
其中,上述第二预设时间为在检测确认接口状态为未插入状态的情况下,再次对接口进行检测的间隔时间,可以为系统缺省设定值,也可以为外部输入给定值,此处不做限定。The second preset time is an interval between when the interface is detected to be uninserted, and the interface is detected again, which may be a system default setting or an external input setting. No restrictions are imposed.
值得一提的,在一种可选的实现方式下,上述接口检测电路中可以不包括第三晶体管Q3与第四电阻R4,D点直接与CPU的第二接口相连,CPU根据D点电压确定设备接口的接口状态,具体判断过程与上述步骤类似,此处不再赘述;而上述图3所示接口检测电路中,第三晶体管Q3用于实现CPU与接口负载之间的安全隔离,相比于不使用的情况,具有更好的安全性及稳定性。It is worth mentioning that, in an optional implementation manner, the interface detecting circuit may not include the third transistor Q3 and the fourth resistor R4, and the D point is directly connected to the second interface of the CPU, and the CPU determines according to the voltage of the D point. The interface status of the device interface is similar to the above steps, and is not described here. In the interface detection circuit shown in Figure 3, the third transistor Q3 is used to implement security isolation between the CPU and the interface load. It has better safety and stability when not in use.
需要说明的是,以上仅是以图3所示的接口检测电路为例,对本发明实施例提供的接口检测方法进行的说明。本发明实施例提供的接口检测方法同样可以适用于具有相同模块结构的接口检测电路,且各 模块电路结构可以与图3不同,具体的过程不再一一赘述。It should be noted that the interface detection circuit shown in FIG. 3 is taken as an example to describe the interface detection method provided by the embodiment of the present invention. The interface detection method provided by the embodiment of the present invention can also be applied to an interface detection circuit having the same module structure, and each The module circuit structure can be different from that of FIG. 3, and the specific process will not be described one by one.
由此可见,本发明实施例提供的一种接口检测方法,基于决策模块与检测模块之间的协调,通过判断设备接口的负载阻抗情况,实现对接口状态的检测,进一步可在确定接口状态为已插入状态后停止检测;对于不同类型的设备接口,可以在不改变电路设计结构的基础上,仅通过部分调整实现通用的接口状态检测方案,具有较强的可移植性,避免了对设备原电路引入额外的干扰,提高了接口检测电路的实用性。It can be seen that the interface detection method provided by the embodiment of the present invention, based on the coordination between the decision module and the detection module, determines the interface state by determining the load impedance of the device interface, and further determines the interface state as After the state is inserted, the detection is stopped. For different types of device interfaces, the general interface state detection scheme can be implemented only by partial adjustment without changing the circuit design structure, which has strong portability and avoids the original device. The circuit introduces additional interference and improves the usability of the interface detection circuit.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (10)

  1. 一种接口检测电路,其特征在于,所述接口检测电路包括:决策模块、检测模块,其中:An interface detection circuit is characterized in that: the interface detection circuit comprises: a decision module and a detection module, wherein:
    所述决策模块,与所述检测模块相连,用于向所述检测模块发送打开信号,所述打开信号用于打开所述检测模块;The decision module is connected to the detection module, and configured to send an open signal to the detection module, where the open signal is used to open the detection module;
    所述检测模块,用于连接设备接口,检测所述设备接口上的负载阻抗,并生成与所述负载阻抗对应的负载信号;The detecting module is configured to connect a device interface, detect a load impedance on the device interface, and generate a load signal corresponding to the load impedance;
    所述决策模块,还用于当所述负载信号满足预设状态条件时,确定所述设备接口的接口状态为已插入状态,或,当所述负载信号不满足所述预设状态条件时,确定所述接口状态为未插入状态。The determining module is further configured to: when the load signal meets a preset state condition, determine that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, It is determined that the interface state is an unplugged state.
  2. 根据权利要求1所述的接口检测电路,其特征在于,所述决策模块还用于:The interface detection circuit according to claim 1, wherein the decision module is further configured to:
    在确定所述接口状态为所述已插入状态后,向所述检测模块发送关闭信号,所述关闭信号用于关闭所述检测模块。After determining that the interface state is the inserted state, sending a shutdown signal to the detection module, the shutdown signal being used to close the detection module.
  3. 根据权利要求2所述的接口检测电路,其特征在于,所述决策模块还用于:The interface detection circuit according to claim 2, wherein the decision module is further configured to:
    在向所述检测模块发送所述关闭信号后,间隔第一预设时间,向所述检测模块发送所述打开信号,并再次从所述检测模块获取所述负载信号,根据所述负载信号确定所述接口状态。After the closing signal is sent to the detecting module, the opening signal is sent to the detecting module at intervals of a first preset time, and the load signal is acquired again from the detecting module, and is determined according to the load signal. The interface status.
  4. 根据权利要求1所述的接口检测电路,其特征在于,所述决策模块还用于:The interface detection circuit according to claim 1, wherein the decision module is further configured to:
    在确定所述接口状态为所述未插入状态后,间隔第二预设时间,向所述检测模块发送所述打开信号,并再次从所述检测模块获取所述负载信号,根据所述负载信号确定所述接口状态。After determining that the interface state is the uninserted state, the second predetermined time interval is sent, the opening signal is sent to the detecting module, and the load signal is acquired again from the detecting module, according to the load signal. Determine the interface status.
  5. 根据权利要求1至4任一所述的接口检测电路,其特征在于,The interface detecting circuit according to any one of claims 1 to 4, characterized in that
    所述决策模块包括中央处理器CPU;The decision module includes a central processing unit CPU;
    所述检测模块包括:第一晶体管、第二晶体管、第三晶体管、第一电阻、第二电阻、第三电阻及第四电阻,所述第一晶体管与所述第二晶体管为双极型晶体管,所述第三晶体管为场效应晶体管;The detecting module includes: a first transistor, a second transistor, a third transistor, a first resistor, a second resistor, a third resistor, and a fourth resistor, wherein the first transistor and the second transistor are bipolar transistors The third transistor is a field effect transistor;
    所述CPU的第一接口与所述第一电阻的第一端、第二电阻的第一 端相连,第二接口与所述第三晶体管的漏极相连;a first interface of the CPU and a first end of the first resistor and a first resistor Connected to the terminal, the second interface is connected to the drain of the third transistor;
    所述第一晶体管的基极与所述第一电阻的第二端相连,集电极与所述第三晶体管的栅极、所述第三电阻的第一端相连,发射极与所述设备接口的第一端相连;a base of the first transistor is connected to a second end of the first resistor, a collector is connected to a gate of the third transistor, a first end of the third resistor, and an emitter is connected to the device Connected to the first end;
    所述第二晶体管的基极与所述第二电阻的第二端相连,集电极与所述设备接口的第二端相连,发射极与第一电压端相连;The base of the second transistor is connected to the second end of the second resistor, the collector is connected to the second end of the device interface, and the emitter is connected to the first voltage end;
    所述第三电阻的第二端与第二电压端相连;The second end of the third resistor is connected to the second voltage end;
    所述第三晶体管的源极与所述第一电压端相连,漏极还与所述第四电阻的第一端相连;a source of the third transistor is connected to the first voltage end, and a drain is further connected to a first end of the fourth resistor;
    所述第四电阻的第二端与所述第二电压端相连;The second end of the fourth resistor is connected to the second voltage end;
    所述第一电压端为低电平,所述第二电压端为高电平;The first voltage terminal is at a low level, and the second voltage terminal is at a high level;
    所述决策模块中的所述CPU向所述检测模块发送所述打开信号,所述打开信号包括将所述第一电阻的第一端电压置为高电平的信号,使得所述第一电阻的第二端电压、所述第二电阻的第二端电压都为高电平,所述第一晶体管与所述第二晶体管导通;The CPU in the decision module sends the open signal to the detecting module, and the open signal includes a signal for setting a first terminal voltage of the first resistor to a high level, so that the first resistor The second terminal voltage and the second terminal voltage of the second resistor are both high, and the first transistor is electrically connected to the second transistor;
    所述检测模块根据所述设备接口的第一端与第二端的连接情况,获取相应所述负载信号,所述负载信号为所述第三晶体管的漏极电压;当所述设备接口的第一端与第二端已存在连接时,所述第一晶体管的集电极电压为低电平,所述第三晶体管导通,所述第三晶体管的漏极电压为低电平;或,当所述设备接口的第一端与第二端不存在连接时,所述第一晶体管的集电极电压为低电平,所述第三晶体管截止,所述第三晶体管的漏极电压为高电平;The detecting module acquires a corresponding load signal according to a connection situation between the first end and the second end of the device interface, where the load signal is a drain voltage of the third transistor; when the device interface is first When the terminal and the second terminal are already connected, the collector voltage of the first transistor is a low level, the third transistor is turned on, and the drain voltage of the third transistor is a low level; or When the first end and the second end of the device interface are not connected, the collector voltage of the first transistor is a low level, the third transistor is turned off, and the drain voltage of the third transistor is a high level ;
    当所述第三晶体管的漏极电压为低电平时,所述决策模块中的所述CPU确定所述接口状态为已插入状态,或,当所述第三晶体管的漏极电压为高电平时,确定所述接口状态为未插入状态。The CPU in the decision module determines that the interface state is an inserted state when the drain voltage of the third transistor is a low level, or when the drain voltage of the third transistor is a high level And determining that the interface state is an uninserted state.
  6. 一种接口检测装置,其特征在于,所述接口检测装置包括设备接口、权利要求1至5任一所述的接口检测电路。An interface detecting device, characterized in that the interface detecting device comprises a device interface, and the interface detecting circuit according to any one of claims 1 to 5.
  7. 一种接口检测方法,其特征在于,所述方法包括:An interface detection method, the method comprising:
    初始化阶段:决策模块向检测模块发送打开信号,所述打开信号用于打开所述检测模块;Initialization phase: the decision module sends an open signal to the detection module, the open signal is used to open the detection module;
    检测阶段:所述检测模块检测设备接口上的负载阻抗,并生成与 所述负载阻抗对应的负载信号;Detection phase: the detection module detects the load impedance on the interface of the device, and generates and a load signal corresponding to the load impedance;
    决策阶段:当所述负载信号满足预设状态条件时,所述决策模块确定所述设备接口的接口状态为已插入状态,或,当所述负载信号不满足所述预设状态条件时,所述决策模块确定所述接口状态为未插入状态。a decision stage: when the load signal meets a preset state condition, the decision module determines that an interface state of the device interface is an inserted state, or when the load signal does not satisfy the preset state condition, The decision module determines that the interface state is an uninserted state.
  8. 根据权利要求7所述的方法,其特征在于,在所述决策模块确定所述设备接口的接口状态为已插入状态之后,所述方法还包括:The method according to claim 7, wherein after the determining module determines that the interface state of the device interface is the inserted state, the method further includes:
    所述决策模块向所述检测模块发送关闭信号,所述关闭信号用于关闭所述检测模块,停止检测。The decision module sends a shutdown signal to the detection module, the shutdown signal is used to close the detection module and stop detecting.
  9. 根据权利要求8所述的方法,其特征在于,在所述决策模块向所述检测模块发送关闭信号之后,所述方法还包括:The method according to claim 8, wherein after the decision module sends a shutdown signal to the detection module, the method further includes:
    在间隔第一预设时间后,重新执行所述初始化阶段至所述决策阶段。After the first predetermined time interval, the initialization phase is re-executed to the decision phase.
  10. 根据权利要求7所述的方法,其特征在于,在所述决策模块确定所述接口状态为未插入状态之后,所述方法还包括:The method according to claim 7, wherein after the determining module determines that the interface state is an uninserted state, the method further includes:
    在间隔第二预设时间后,重新执行所述初始化阶段至所述决策阶段。 After the second predetermined time interval, the initialization phase is re-executed to the decision phase.
PCT/CN2015/078879 2014-05-19 2015-05-13 Interface detection circuit, apparatus and method WO2015176621A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410210915.5 2014-05-19
CN201410210915.5A CN105092998A (en) 2014-05-19 2014-05-19 Interface detection circuit, device and method

Publications (1)

Publication Number Publication Date
WO2015176621A1 true WO2015176621A1 (en) 2015-11-26

Family

ID=54553410

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/078879 WO2015176621A1 (en) 2014-05-19 2015-05-13 Interface detection circuit, apparatus and method

Country Status (2)

Country Link
CN (1) CN105092998A (en)
WO (1) WO2015176621A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904122A (en) * 2021-01-22 2021-06-04 维沃移动通信有限公司 Insertion detection circuit and electronic device
CN114035023A (en) * 2021-10-22 2022-02-11 宁波集联软件科技有限公司 Multi-mode automobile core plate clamp judgment method and judgment system
CN114123146A (en) * 2020-08-31 2022-03-01 华为技术有限公司 Audio port processing circuit and surge protection method
TWI773403B (en) * 2021-06-24 2022-08-01 英業達股份有限公司 System for generating positive and negative plug signals to test interface and method thereof

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909375A (en) * 2017-02-17 2017-06-30 杭州迪普科技股份有限公司 The acquisition methods and device of a kind of port status
CN108562825A (en) * 2018-07-19 2018-09-21 重庆湃芯入微科技有限公司 A kind of load detecting circuit of high speed serialization interconnection transmitter
CN110412403B (en) * 2019-08-07 2021-09-17 中核控制系统工程有限公司 Nuclear safety level system general input/output port dynamic diagnosis circuit and method
CN111025195B (en) * 2019-12-19 2021-10-19 山东爱德邦智能科技有限公司 Detection circuit
CN111624462A (en) * 2020-04-23 2020-09-04 上海机电工程研究所 Weapon system PCB detection method, system, medium and equipment based on big data
CN113406538A (en) * 2021-06-22 2021-09-17 珠海拓芯科技有限公司 Expansion valve connection detection circuit, detection method and air conditioner
CN113960496B (en) * 2021-09-14 2023-08-18 联想(北京)有限公司 Circuit diagnosis method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5473760A (en) * 1992-10-13 1995-12-05 Mita Industrial Co., Ltd. Device and method for interface effective/ineffective state judging by varying threshold voltage to an input receiver circuit
CN1952668A (en) * 2005-10-20 2007-04-25 鸿富锦精密工业(深圳)有限公司 Voltage detector of universal serial bus interface
CN101030189A (en) * 2007-03-09 2007-09-05 华为技术有限公司 Method for inspecting connected peripheral apparatus mode, terminal, earphone, charger and USB interface
CN101493490A (en) * 2009-02-23 2009-07-29 深圳华为通信技术有限公司 Terminal port insertion detection circuit
CN101827162A (en) * 2009-03-04 2010-09-08 深圳富泰宏精密工业有限公司 Mobile phone USB interface detection system and method
CN102075720A (en) * 2010-12-27 2011-05-25 炬力集成电路设计有限公司 Device and method for detecting plug wire at video output port, device and method for detecting pull wire at video output port, and video play device
CN102141593A (en) * 2010-12-24 2011-08-03 华为终端有限公司 Device and method for detecting extrapolation connection of radio frequency interface
CN102288841A (en) * 2011-04-27 2011-12-21 株洲南车时代电气股份有限公司 Plug-in unit identification system and method of common testing interface

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5473760A (en) * 1992-10-13 1995-12-05 Mita Industrial Co., Ltd. Device and method for interface effective/ineffective state judging by varying threshold voltage to an input receiver circuit
CN1952668A (en) * 2005-10-20 2007-04-25 鸿富锦精密工业(深圳)有限公司 Voltage detector of universal serial bus interface
CN101030189A (en) * 2007-03-09 2007-09-05 华为技术有限公司 Method for inspecting connected peripheral apparatus mode, terminal, earphone, charger and USB interface
CN101493490A (en) * 2009-02-23 2009-07-29 深圳华为通信技术有限公司 Terminal port insertion detection circuit
CN101827162A (en) * 2009-03-04 2010-09-08 深圳富泰宏精密工业有限公司 Mobile phone USB interface detection system and method
CN102141593A (en) * 2010-12-24 2011-08-03 华为终端有限公司 Device and method for detecting extrapolation connection of radio frequency interface
CN102075720A (en) * 2010-12-27 2011-05-25 炬力集成电路设计有限公司 Device and method for detecting plug wire at video output port, device and method for detecting pull wire at video output port, and video play device
CN102288841A (en) * 2011-04-27 2011-12-21 株洲南车时代电气股份有限公司 Plug-in unit identification system and method of common testing interface

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114123146A (en) * 2020-08-31 2022-03-01 华为技术有限公司 Audio port processing circuit and surge protection method
CN114123146B (en) * 2020-08-31 2023-08-22 华为技术有限公司 Audio port processing circuit and surge protection method
CN112904122A (en) * 2021-01-22 2021-06-04 维沃移动通信有限公司 Insertion detection circuit and electronic device
TWI773403B (en) * 2021-06-24 2022-08-01 英業達股份有限公司 System for generating positive and negative plug signals to test interface and method thereof
CN114035023A (en) * 2021-10-22 2022-02-11 宁波集联软件科技有限公司 Multi-mode automobile core plate clamp judgment method and judgment system
CN114035023B (en) * 2021-10-22 2022-08-19 宁波集联软件科技有限公司 Multi-mode automobile core plate clamp judgment method and judgment system

Also Published As

Publication number Publication date
CN105092998A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2015176621A1 (en) Interface detection circuit, apparatus and method
JP6328795B2 (en) Baseband PD communication via USB standard A connector
US8977870B2 (en) Apparatus for determining a USB compatible device, and supplying corresponding power thereafter
US10241935B2 (en) Portable device, cable assembly, and USB system
US10042801B2 (en) System for detecting universal serial bus (USB) device and method thereof
US20140207977A1 (en) Usb device and control method thereof
US20130101132A1 (en) Method and Device for Earphone and USB to Share Micro-USB Interface
US20150208026A1 (en) Pluggable electronic device and method for determining output data of pluggable electronic device
US9904338B2 (en) Control chip, control method and connection device utilizing the same
US10243386B2 (en) Power supply circuit in electronic device and control method thereof
KR102348784B1 (en) Electronic apparatus and method for controlling signals strength based on a mode of the electronic apparatus
US8484402B2 (en) Data transmission interface and electronic device using the same
WO2020088388A1 (en) Charging control circuit, charging circuit and charging control method
US20150241953A1 (en) Load device and electronic device assembly with load device
KR20230038253A (en) Data line and charging device
JP6491760B2 (en) Interface identification method and terminal
WO2016004897A1 (en) Audio insert automatic wake-up device and audio insert automatic wake-up method
US9627901B2 (en) Charging circuit
US9722444B2 (en) Electronic device and charging interface
US9949024B2 (en) Method and apparatus for controlling output based on type of connector
TWI394036B (en) Mother board
US10051395B2 (en) Accessory management and data communication using audio port
US20170160860A1 (en) Electronic whiteboard and touch sensing signal transferring method thereof
US9609446B2 (en) Sensor systems
TWI615704B (en) Electronic device and the control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15796889

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15796889

Country of ref document: EP

Kind code of ref document: A1