WO2016168987A1 - Solution for mutually identifying forward and reverse insertion between touch type usb devices - Google Patents

Solution for mutually identifying forward and reverse insertion between touch type usb devices Download PDF

Info

Publication number
WO2016168987A1
WO2016168987A1 PCT/CN2015/077104 CN2015077104W WO2016168987A1 WO 2016168987 A1 WO2016168987 A1 WO 2016168987A1 CN 2015077104 W CN2015077104 W CN 2015077104W WO 2016168987 A1 WO2016168987 A1 WO 2016168987A1
Authority
WO
WIPO (PCT)
Prior art keywords
pin
usb interface
terminal
processor
level
Prior art date
Application number
PCT/CN2015/077104
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 华为技术有限公司
Priority to CN201580030730.9A priority Critical patent/CN106462512B/en
Priority to PCT/CN2015/077104 priority patent/WO2016168987A1/en
Publication of WO2016168987A1 publication Critical patent/WO2016168987A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units

Definitions

  • the processor When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter
  • the processor instructs the switch to operate in the connected state, so that the detection pin, the second data transfer pin, the first data transfer pin, and the power pin of the processor are respectively The first, second, fourth, and fifth pins of the terminal USB interface are electrically connected, wherein VDD is a level value of the first power source, R1 is a resistance value of the pull-up resistor, and R3 is The resistance value of the third resistor.
  • the USB device is centered on the ground pin, and the other four pins are symmetrically arranged.
  • the USB pin sequence is: a power pin, a first data transfer pin, a ground pin, and a second data transfer pin. Inspection Measuring pin
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the second pin of the terminal USB interface is electrically connected to the second data transmission pin of the USB device
  • the fifth pin of the terminal USB interface is pulled up to the first power supply VDD through the first resistor R1 of the pull-up resistor, and the level value of the fifth pin of the terminal USB interface is the first power.
  • Vc The reference level Vc of the comparator, for convenience of explanation, is exemplified by the following definitions of the magnitude relationship of each level value: Vc ⁇ first level, that is, VDD; Vc> second level; Vc> third level;
  • D6 pin connected to the second pin of the terminal USB interface

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)
  • Power Sources (AREA)

Abstract

A solution for mutually identifying forward and reverse insertion between touch type USB devices, which is applied to the field of mobile terminals. The solution comprises: on one hand, a terminal processor (24) indicates, according to a result of comparison between a level of a fifth pin of a terminal USB interface (20) and a reference level and a level value of the fifth pin of the terminal USB interface (20), a working state of a changeover switch (23) so as to connect the terminal USB interface (20) and a processor USB interface or disconnect the terminal USB interface (20) from a processor USB interface, and when the terminal USB interface (20) and the processor USB interface are connected, the changeover switch (23) enables, according to the indication of the processor (24), a power pin, first data transmission pin, second data transmission pin and detection pin of the processor (24) to be connected to first, second, fourth and fifth pins of the terminal USB interface (20), respectively, or to be connected to the fifth, fourth, second and first pins of the terminal USB interface (20); and on the other hand, a USB device processor identifies, according to a logic level of the detection pin, whether a USB device is connected to the terminal USB interface (20).

Description

一种触点式USB设备之间正反向插入相互识别的方案A scheme for mutual recognition of positive and negative insertion between contact type USB devices 技术领域Technical field
本发明实施例涉及移动终端技术领域,特别涉及一种触点式USB设备之间正反向插入相互识别的方案。Embodiments of the present invention relate to the field of mobile terminal technologies, and in particular, to a scheme for positive and negative insertion mutual recognition between contact type USB devices.
背景技术Background technique
USB设备与终端进行连接,一般采用连接器方式或触点方式的USB口,目前实现正反向插入都是通过在USB设备或者终端结构上增加一排管脚的方式实现,即在USB设备或者终端上设置两组电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚。The USB device is connected to the terminal, generally adopting a USB port of a connector mode or a contact mode. Currently, the forward and reverse insertion is implemented by adding a row of pins to the USB device or the terminal structure, that is, in the USB device or Two sets of power pins, a first data transmission pin, a second data transmission pin, and a detection pin are disposed on the terminal.
增加管脚会导致连接器尺寸增大并影响产品外观。Increasing the pins can cause the connector to increase in size and affect the appearance of the product.
发明内容Summary of the invention
为了解决现有技术中通过增加管脚实现USB设备正反向插入导致连接器尺寸增大并影响产品外观的问题,本发明的实施例采用如下技术方案:In order to solve the problem in the prior art that the connector is increased in size and the connector is increased in size and the appearance of the product is affected by the addition of the pin, the embodiment of the present invention adopts the following technical solutions:
第一方面,本发明的实施例提供一种终端,所述终端包括终端USB接口、上拉电阻、比较器、ADC转换器、切换开关、处理器:In a first aspect, an embodiment of the present invention provides a terminal, where the terminal includes a terminal USB interface, a pull-up resistor, a comparator, an ADC converter, a switch, and a processor:
所述终端USB接口用于与USB设备连接,包括5个管脚,分别为:第一管脚、第二管脚、地管脚、第四管脚、第五管脚;以地管脚为中心,其他4个管脚对称排布;所述处理器设置有处理器USB接口包括电源管脚、第一数据传输管脚、接地管脚、第二数据传输管脚、检测管脚;所述终端USB接口的地管脚和所述处理器USB接口的地管脚接地;The terminal USB interface is connected to the USB device, and includes five pins, which are: a first pin, a second pin, a ground pin, a fourth pin, and a fifth pin; Center, the other four pins are symmetrically arranged; the processor is provided with a processor USB interface including a power pin, a first data transmission pin, a ground pin, a second data transmission pin, and a detection pin; The ground pin of the terminal USB interface and the ground pin of the USB interface of the processor are grounded;
所述上拉电阻:一端与第一电源连接,另一端与所述终端USB接口的第五管脚电气连接;The pull-up resistor has one end connected to the first power source and the other end electrically connected to the fifth pin of the terminal USB interface;
所述比较器包括第一输入管脚,第二输入管脚,输出管脚,所述第一输入管脚与所述终端USB接口的第五管脚电气连接、所述第二输入管脚与参考电平电气连接,所述输出管脚与所述处理器电气连接;所述比较器用于将所述终端USB接口的第五管脚的电平与所述参考电平做比较,并将比较结果传递 给所述处理器;所述参考电平的电平值小于所述第一电源电平值;The comparator includes a first input pin, a second input pin, an output pin, the first input pin is electrically connected to a fifth pin of the terminal USB interface, and the second input pin is a reference level electrical connection, the output pin being electrically coupled to the processor; the comparator for comparing a level of a fifth pin of the terminal USB interface with the reference level and comparing Result delivery Giving the processor; the level value of the reference level is less than the first power level value;
所述ADC转换器:与所述终端USB接口的第五管脚、处理器电气连接;用于检测所述终端USB接口的第五管脚的电平值;The ADC converter is electrically connected to a fifth pin of the terminal USB interface and a processor; and is configured to detect a level value of a fifth pin of the USB interface of the terminal;
所述切换开关:分别与所述终端USB接口和所述处理器的USB接口连接,所述切换开关根据所述处理器的指示,使得所述终端USB接口与所述处理器USB接口连接或断开;当所述终端USB接口与所述处理器的USB接口连接时,切换开关根据所述处理器的指示使得处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接,或者与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接;The switch is respectively connected to the USB interface of the terminal and the USB interface of the processor, and the switch is connected to the USB interface of the terminal according to the instruction of the processor. When the terminal USB interface is connected to the USB interface of the processor, the switch performs a power pin, a first data transfer pin, a second data transfer pin of the processor according to the instruction of the processor, The detecting pin is respectively connected to the first pin, the second pin, the fourth pin, the fifth pin of the terminal USB interface, or the fifth pin, the fourth pin, the second pin of the terminal USB interface , the first pin is connected;
所述处理器:与比较器、ADC转换器、切换开关电气连接;用于根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态。The processor is electrically connected to the comparator, the ADC converter, and the switch; and is configured to indicate the operation of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter status.
结合第一方面,在第一方面的第一种可能的实现方式中,所述处理器根据比较器传递的比较结果指示切换开关的工作状态,包括:In conjunction with the first aspect, in a first possible implementation manner of the first aspect, the processor, according to a comparison result delivered by the comparator, indicates an operating state of the switch, including:
当处理器接收到比较器传递的终端USB接口第五管脚电平高于比较器的参考电平的比较结果时,处理器指示切换开关工作在断开状态。When the processor receives a comparison result that the fifth terminal level of the terminal USB interface passed by the comparator is higher than the reference level of the comparator, the processor instructs the switch to operate in the off state.
结合第一方面以及第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述USB设备包括:USB接口,包含5个管脚:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;第二电阻,一端与所述检测管脚电气连接,另一端接地管脚;第三电阻,一端与所述电源管脚电气连接,另一端接地管脚;所述USB设备采用以地管脚为中心,其他4个管脚对称排布,所述USB接口的管脚顺序为:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚。With reference to the first aspect, and the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the USB device includes: a USB interface, including five pins: a power pin, a first data transmission pin, a ground pin, a second data transfer pin, and a detection pin; a second resistor, one end electrically connected to the detecting pin, and the other end is grounded; the third resistor, one end and the The power pin is electrically connected, and the other end is grounded; the USB device is centered on the ground pin, and the other four pins are symmetrically arranged. The pin order of the USB interface is: power pin, first data Transfer pin, ground pin, second data transfer pin, and sense pin.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:In conjunction with the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the processor is configured according to a comparison result transmitted by the comparator and a fifth end of the terminal USB interface transmitted by the ADC converter The level value of the pin indicates the working state of the switch, including:
当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五 管脚的电平值为VDD*R2/(R1+R2)时,处理器指示切换开关工作在连接状态,使处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚电气连接,其中VDD为所述第一电源的电平值,R1为所述上拉电阻的电阻值,R2为所述第二电阻的电阻值。When the processor receives the comparison result of the fifth pin level of the terminal USB interface passed by the comparator lower than the reference level of the comparator, and the processor receives the terminal USB interface transmitted by the ADC converter, the fifth When the level value of the pin is VDD*R2/(R1+R2), the processor instructs the switch to operate in the connected state, so that the power pin of the processor, the first data transfer pin, the second data transfer pin, The detecting pins are respectively electrically connected to the first pin, the second pin, the fourth pin, and the fifth pin of the terminal USB interface, wherein VDD is a level value of the first power source, and R1 is the pull-up The resistance value of the resistor, and R2 is the resistance value of the second resistor.
结合第一方面的第二、三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:In conjunction with the second and third possible implementations of the first aspect, in a fourth possible implementation of the first aspect, the processor is configured according to a comparison result transmitted by the comparator and a terminal USB interface transmitted by the ADC converter The level value of the fifth pin indicates the working state of the switch, including:
当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五管脚的电平值为VDD*R3/(R1+R3)时,处理器指示切换开关工作在连接状态,使处理器的检测管脚、第二数据传输管脚、第一数据传输管脚、电源管脚分别与终端USB接口的第一、第二管脚、第四管脚、第五管脚电气连接,其中VDD为所述第一电源的电平值,R1为所述上拉电阻的电阻值,R3为所述第三电阻的电阻值。When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter When the value is VDD*R3/(R1+R3), the processor instructs the switch to operate in the connected state, so that the detection pin, the second data transfer pin, the first data transfer pin, and the power pin of the processor are respectively The first, second, fourth, and fifth pins of the terminal USB interface are electrically connected, wherein VDD is a level value of the first power source, R1 is a resistance value of the pull-up resistor, and R3 is The resistance value of the third resistor.
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:In conjunction with the fourth possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, the processor is based on a comparison result transmitted by the comparator and a fifth end of the terminal USB interface transmitted by the ADC converter The level value of the pin indicates the working state of the switch, including:
当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五管脚的电平值为除VDD*R2/(R1+R2)以及VDD*R3/(R1+R3)以外的值时,处理器指示切换开关工作在断开状态。When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter When the value is other than VDD*R2/(R1+R2) and VDD*R3/(R1+R3), the processor instructs the switch to operate in the off state.
结合第一方面以及第一方面的第一至五种可能的实现方式,在第一方面的第六种可能的实现方式中,所述终端USB接口的管脚为触点式。In conjunction with the first aspect and the first to fifth possible implementations of the first aspect, in a sixth possible implementation of the first aspect, the pin of the terminal USB interface is a contact type.
第二方面,本发明的实施例提供一种USB设备,所述USB设备包括:In a second aspect, an embodiment of the present invention provides a USB device, where the USB device includes:
USB接口,包含5个管脚:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;USB interface, comprising five pins: a power pin, a first data transfer pin, a ground pin, a second data transfer pin, and a detection pin;
所述USB设备采用以地管脚为中心,其他4个管脚对称排布,所述USB管脚顺序为:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检 测管脚;The USB device is centered on the ground pin, and the other four pins are symmetrically arranged. The USB pin sequence is: a power pin, a first data transfer pin, a ground pin, and a second data transfer pin. Inspection Measuring pin
第二电阻,一端与所述检测管脚电气连接,另一端接地管脚;a second resistor, one end is electrically connected to the detecting pin, and the other end is grounded;
第三电阻,一端与所述电源管脚电气连接,另一端接地管脚;a third resistor, one end is electrically connected to the power pin, and the other end is grounded;
所述第二电阻的阻值和所述第三电阻的阻值不相等。The resistance of the second resistor and the resistance of the third resistor are not equal.
结合第二方面,在第二方面的第一种可能的实现方式中,所述USB设备的管脚为触点式。In conjunction with the second aspect, in a first possible implementation of the second aspect, the pin of the USB device is a contact type.
结合第二方面,在第二方面的第二种可能的实现方式中,所述USB设备还包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, the USB device further includes:
处理器,与所述USB接口连接,用于根据所述检测管脚的逻辑电平识别USB设备是否连接终端USB接口。And a processor, connected to the USB interface, for identifying whether the USB device is connected to the terminal USB interface according to the logic level of the detection pin.
本发明实施例提供的设备都仅需一排USB管脚,即仅需一组电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚,极大改善了现有技术中在结构上增加USB连接器管脚以实现USB设备正反向插入的相互识别而导致连接器尺寸增大并影响产品外观的不足,提升了用户体验。The device provided by the embodiment of the invention only needs one row of USB pins, that is, only one set of power pins, the first data transmission pin, the ground pin, the second data transmission pin, and the detection pin are required to be greatly improved. In the prior art, the USB connector pins are structurally added to realize the mutual recognition of the forward and reverse insertion of the USB device, which leads to an increase in the size of the connector and affects the appearance of the product, thereby improving the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为本发明第一实施例的示意图;Figure 1 is a schematic view of a first embodiment of the present invention;
图2为本发明第一实施例的流程图。Figure 2 is a flow chart of the first embodiment of the present invention.
图3为本发明第二实施例的示意图;Figure 3 is a schematic view of a second embodiment of the present invention;
图4为本发明第二实施例的示意图;Figure 4 is a schematic view of a second embodiment of the present invention;
图5为本发明第二实施例的示意图;Figure 5 is a schematic view of a second embodiment of the present invention;
图6为本发明第三实施例的流程图。 Figure 6 is a flow chart of a third 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, and not all of the 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.
实施例一:Embodiment 1:
本发明实施例提供了一种触点式USB设备,如图1所示为本发明提供的USB设备的一个实施例,在实施例中,所述USB设备包括:An embodiment of the present invention provides a contact type USB device. As shown in FIG. 1 , an embodiment of a USB device according to the present invention is provided. In an embodiment, the USB device includes:
USB接口10,包含5个管脚:电源管脚(VBUS)、第一数据传输管脚(D+或D-)、地管脚(GND)、第二数据传输管脚(D-或D+)、检测管脚(ID); USB interface 10, including 5 pins: power supply pin (VBUS), first data transfer pin (D+ or D-), ground pin (GND), second data transfer pin (D- or D+), Detection pin (ID);
所述USB设备USB接口的数据传输管脚说明如下:The data transmission pin of the USB device USB interface is as follows:
当第一数据传输管脚为D+时,第二数据传输管脚为D-;或When the first data transmission pin is D+, the second data transmission pin is D-; or
当第一数据传输管脚为D-时,第二数据传输管脚为D+;When the first data transmission pin is D-, the second data transmission pin is D+;
USB设备采用以地管脚为中心,其他4个管脚对称排布,参见图1,USB设备的接口管脚顺序为:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;The USB device is centered on the ground pin and the other four pins are symmetrically arranged. Referring to Figure 1, the interface pins of the USB device are: power pin, first data transfer pin, ground pin, and second data. Transmission pin, detection pin;
所述USB设备还包括:The USB device further includes:
第二电阻R2,一端与USB设备的检测管脚电气连接,另一端接地管脚;a second resistor R2, one end is electrically connected to the detecting pin of the USB device, and the other end is grounded;
第三电阻R3,一端与USB设备的电源管脚电气连接,另一端接地管脚;a third resistor R3, one end is electrically connected to a power pin of the USB device, and the other end is grounded;
且第二电阻R2的阻值和第三电阻R3的阻值不相等;The resistance of the second resistor R2 and the resistance of the third resistor R3 are not equal;
可选地,USB设备还可以包括处理器11,参见图1,与所述USB接口连接,用于根据所述检测管脚的逻辑电平识别USB设备是否插入终端,即连接终端USB接口; Optionally, the USB device may further include a processor 11, and is connected to the USB interface, for identifying whether the USB device is inserted into the terminal according to the logic level of the detection pin, that is, connecting the terminal USB interface;
处理器11根据所述检测管脚的第一逻辑电平识别USB设备插入终端,根据所述检测管脚的第二逻辑电平识别USB设备没有插入终端;The processor 11 identifies the USB device insertion terminal according to the first logic level of the detection pin, and identifies that the USB device is not inserted into the terminal according to the second logic level of the detection pin;
所述第一逻辑电平为高电平,则所述第二逻辑电平为低电平;所述第一逻辑电平为低电平,则所述第二逻辑电平为高电平;具体可根据实际电路设计进行设置。The first logic level is a high level, and the second logic level is a low level; the first logic level is a low level, and the second logic level is a high level; It can be set according to the actual circuit design.
为了便于说明,以第一逻辑电平为高电平,第二逻辑电平为低电平为例,处理器识别USB设备是否插入终端流程图,参见图2:For convenience of explanation, taking the first logic level as the high level and the second logic level as the low level, the processor identifies whether the USB device is inserted into the terminal flow chart, see FIG. 2:
步骤201:处理器判断检测管脚的电平高低,当所述检测管脚的电平为高电平时,执行步骤202,当所述检测管脚的电平为低电平时,执行步骤203;Step 201: The processor determines the level of the detection pin is high and low, when the level of the detection pin is high level, step 202 is performed, when the level of the detection pin is low level, step 203 is performed;
步骤202:处理器根据检测管脚的高电平识别USB设备插入终端;Step 202: The processor recognizes that the USB device is inserted into the terminal according to the high level of the detection pin.
步骤203:处理器根据检测管脚的低电平识别USB设备没有插入终端;Step 203: The processor identifies that the USB device is not inserted into the terminal according to the low level of the detection pin.
实施例二:Embodiment 2:
本发明实施例提供了一种终端,如图3所示,所述终端包括终端USB接口20、上拉电阻、比较器21、ADC转换器22、切换开关23、处理器24:The embodiment of the present invention provides a terminal. As shown in FIG. 3, the terminal includes a terminal USB interface 20, a pull-up resistor, a comparator 21, an ADC converter 22, a switch 23, and a processor 24:
所述终端USB接口20包括5个管脚,分别为:第一管脚、第二管脚、第三管脚(即地管脚)、第四管脚、第五管脚;以地管脚为中心,其他4个管脚对称排布,终端USB接口20的管脚顺序为第一管脚、第二管脚、第三管脚(即地管脚)、第四管脚、第五管脚,所述终端USB接口的地管脚接地;所述处理器上设有处理器USB接口包括电源管脚(VBUS)、第一数据传输管脚(D+或D-)、地管脚(GND)、第二数据传输管脚(D-或D+)、检测管脚(ID),所述处理器USB接口的地管脚接地;所述切换开关分别与所述终端USB接口和所述处理器的USB接口连接,所述切换开关根据所述处理器的指示,使得所述终端USB接口与所述处理器的USB接口连接或断开;当所述终端USB接口与所述处理器的USB接口连接时,切换开关根据所述处理器的指示使处理器的USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接,或者与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接; The terminal USB interface 20 includes five pins, which are: a first pin, a second pin, a third pin (ie, a ground pin), a fourth pin, a fifth pin, and a ground pin. For the center, the other four pins are symmetrically arranged, and the pin sequence of the terminal USB interface 20 is the first pin, the second pin, the third pin (ie, the ground pin), the fourth pin, and the fifth tube. The ground pin of the terminal USB interface is grounded; the processor has a processor USB interface including a power supply pin (VBUS), a first data transmission pin (D+ or D-), and a ground pin (GND). a second data transmission pin (D- or D+), a detection pin (ID), the ground pin of the processor USB interface is grounded; the switch is respectively connected to the terminal USB interface and the processor Connected to the USB interface, the switch is connected or disconnected from the USB interface of the processor according to the indication of the processor; when the USB interface of the terminal and the USB interface of the processor When connected, the switch performs a power pin, a first data transfer pin, and a second data transfer pin of the USB interface of the processor according to the instruction of the processor. The detecting pin is respectively connected to the first pin, the second pin, the fourth pin, the fifth pin of the terminal USB interface, or the fifth pin, the fourth pin, the second tube of the terminal USB interface The foot and the first pin are connected;
所述处理器USB接口的数据传输管脚说明如下:The data transmission pin of the processor USB interface is as follows:
当第一数据传输管脚为D+时,第二数据传输管脚为D-;或When the first data transmission pin is D+, the second data transmission pin is D-; or
当第一数据传输管脚为D-时,第二数据传输管脚为D+;When the first data transmission pin is D-, the second data transmission pin is D+;
所述处理器USB接口的数据传输管脚与USB设备的USB接口的数据传输管脚相应设置,即,The data transmission pin of the USB interface of the processor is correspondingly set with the data transmission pin of the USB interface of the USB device, that is,
所述处理器USB接口的第一数据传输管脚和所述USB设备的USB接口的第一数据传输管脚都为D+,所述处理器USB接口的第二数据传输管脚和所述USB设备的USB接口的第二数据传输管脚都为D-;或The first data transmission pin of the processor USB interface and the first data transmission pin of the USB interface of the USB device are both D+, the second data transmission pin of the processor USB interface and the USB device The second data transfer pin of the USB interface is D-; or
所述处理器USB接口的第一数据传输管脚和所述USB设备的USB接口的第一数据传输管脚都为D-,所述处理器USB接口的第二数据传输管脚和所述USB设备的USB接口的第二数据传输管脚都为D+;The first data transmission pin of the processor USB interface and the first data transmission pin of the USB interface of the USB device are both D-, the second data transmission pin of the processor USB interface and the USB The second data transmission pin of the USB interface of the device is D+;
终端USB接口20,参见图3,包括5个管脚,包括第一管脚、第二管脚、地管脚、第四管脚、第五管脚;为实现识别触点式USB设备正反向插入,终端USB接口采用与USB设备的USB接口对应的设计方式,包括管脚间距,管脚尺寸等;终端USB接口以地管脚为中心,其他4个管脚对称排布;The terminal USB interface 20, as shown in FIG. 3, includes five pins, including a first pin, a second pin, a ground pin, a fourth pin, and a fifth pin; To insert, the terminal USB interface adopts a design method corresponding to the USB interface of the USB device, including pin spacing, pin size, etc.; the terminal USB interface is centered on the ground pin, and the other four pins are symmetrically arranged;
由第一实施例可知,USB设备采用以地管脚为中心,其他4个管脚对称排布,USB设备的USB接口管脚顺序为:电源管脚(VBUS)、第一数据传输管脚(D+或D-)、地管脚、第二数据传输管脚(D-或D+)、检测管脚(ID);As can be seen from the first embodiment, the USB device is centered on the ground pin, and the other four pins are symmetrically arranged. The USB interface pin sequence of the USB device is: a power pin (VBUS) and a first data transfer pin ( D+ or D-), ground pin, second data transfer pin (D- or D+), detection pin (ID);
因此,当USB设备正向插入终端USB接口时:Therefore, when the USB device is plugged into the terminal USB interface:
终端USB接口的第一管脚与USB设备的电源管脚电气连接;The first pin of the terminal USB interface is electrically connected to the power pin of the USB device;
终端USB接口的第二管脚与USB设备的第一数据传输管脚电气连接;The second pin of the terminal USB interface is electrically connected to the first data transmission pin of the USB device;
终端USB接口的地管脚与USB设备的地管脚电气连接;The ground pin of the terminal USB interface is electrically connected to the ground pin of the USB device;
终端USB接口的第四管脚与USB设备的第二数据传输管脚电气连接;The fourth pin of the terminal USB interface is electrically connected to the second data transmission pin of the USB device;
终端USB接口的第五管脚与USB设备的检测管脚电气连接。The fifth pin of the terminal USB interface is electrically connected to the detection pin of the USB device.
当USB设备反向插入终端USB接口时:When the USB device is plugged back into the terminal USB interface:
终端USB接口的第一管脚与USB设备的检测管脚电气连接; The first pin of the terminal USB interface is electrically connected to the detecting pin of the USB device;
终端USB接口的第二管脚与USB设备的第二数据传输管脚电气连接;The second pin of the terminal USB interface is electrically connected to the second data transmission pin of the USB device;
终端USB接口的地管脚与USB设备的地管脚电气连接;The ground pin of the terminal USB interface is electrically connected to the ground pin of the USB device;
终端USB接口的第四管脚与USB设备的第一数据传输管脚电气连接;The fourth pin of the terminal USB interface is electrically connected to the first data transmission pin of the USB device;
终端USB接口的第五管脚与USB设备的电源管脚电气连接。The fifth pin of the terminal USB interface is electrically connected to the power pin of the USB device.
上拉电阻为第一电阻R1,一端与第一电源VDD电气连接,另一端与终端USB接口的第五管脚电气连接;The pull-up resistor is a first resistor R1, one end is electrically connected to the first power source VDD, and the other end is electrically connected to the fifth pin of the terminal USB interface;
第一电阻R1用于当有USB设备插入终端时,R1与R2或R3分压,具体为:如图4所示,当USB设备31正向插入终端30时,终端USB接口的第五管脚与USB设备的检测管脚电气连接,USB设备检测管脚的第二电阻R2与终端USB接口的第五管脚的第一电阻R1分压,第二电阻R2分得的电平值即为USB设备正向插入终端时,终端USB接口第五管脚的电平值,定义为第二电平,即:VDD*R2/(R1+R2);The first resistor R1 is used to divide R1 and R2 or R3 when a USB device is inserted into the terminal. Specifically, as shown in FIG. 4, when the USB device 31 is inserted into the terminal 30, the fifth pin of the terminal USB interface. Electrically connected to the detecting pin of the USB device, the second resistor R2 of the USB device detecting pin is divided with the first resistor R1 of the fifth pin of the terminal USB interface, and the level value of the second resistor R2 is USB. When the device is inserted into the terminal, the level value of the fifth pin of the terminal USB interface is defined as the second level, namely: VDD*R2/(R1+R2);
如图5所示,当USB设备41反向插入终端40时,终端USB接口的第五管脚与USB设备的电源管脚电气连接,USB设备电源管脚的第三电阻R3与终端USB接口的第五管脚的第一电阻R1分压,第三电阻R3分得的电平值即为USB设备反向插入终端时,终端USB接口第五管脚的电平值,定义为第三电平,即:VDD*R3/(R1+R3);As shown in FIG. 5, when the USB device 41 is reversely inserted into the terminal 40, the fifth pin of the USB interface of the terminal is electrically connected to the power pin of the USB device, and the third resistor R3 of the USB device power pin is connected to the USB interface of the terminal. The first resistor R1 of the fifth pin is divided, and the level value of the third resistor R3 is the level value of the fifth pin of the terminal USB interface when the USB device is reversely inserted into the terminal, and is defined as the third level. , namely: VDD*R3/(R1+R3);
当没有USB设备插入终端时,终端USB接口的第五管脚通过上拉电阻第一电阻R1上拉至第一电源VDD,此时终端USB接口的第五管脚的电平值为第一电平,即:VDD;When no USB device is inserted into the terminal, the fifth pin of the terminal USB interface is pulled up to the first power supply VDD through the first resistor R1 of the pull-up resistor, and the level value of the fifth pin of the terminal USB interface is the first power. Flat, ie: VDD;
本实施例中,VDD,既可表示第一电源,也可表示第一电源的电平值;R1,R2,R3既可表示电路中的电阻器件,也可表示电阻的阻值。In this embodiment, VDD can represent both the first power source and the level value of the first power source; R1, R2, and R3 can represent both the resistance device in the circuit and the resistance value of the resistor.
比较器21,包括第一输入管脚,第二输入管脚,输出管脚,地管脚,所述第一输入管脚与所述终端USB接口的第五管脚电气连接、所述第二输入管脚与参考电平电气连接,所述输出管脚与所述处理器电气连接;所述比较器用于将终端USB接口的第五管脚的电平与参考电平做比较,并将终端USB接口的第五管脚的电平与参考电平的比较结果传递给所述处理器;比较结果可以为 逻辑信号,如高、低电平。The comparator 21 includes a first input pin, a second input pin, an output pin, and a ground pin. The first input pin is electrically connected to the fifth pin of the terminal USB interface, and the second The input pin is electrically connected to a reference level, the output pin is electrically connected to the processor; the comparator is for comparing a level of a fifth pin of the terminal USB interface with a reference level, and the terminal is The result of comparing the level of the fifth pin of the USB interface with the reference level is transmitted to the processor; the comparison result may be Logic signals, such as high and low.
比较器的参考电平Vc,为了便于说明,以各电平值的大小关系以下述定义为例:Vc<第一电平,即VDD;Vc>第二电平;Vc>第三电平;The reference level Vc of the comparator, for convenience of explanation, is exemplified by the following definitions of the magnitude relationship of each level value: Vc < first level, that is, VDD; Vc> second level; Vc> third level;
本发明的实施例中给出的电平值大小关系只是本发明实施例的一种实现,各参数值可以根据电路的需要进行适当的调整。The magnitude relationship shown in the embodiment of the present invention is only one implementation of the embodiment of the present invention, and each parameter value can be appropriately adjusted according to the needs of the circuit.
本实施例中,VDD,既可表示参考电平,也可表示参考电平的电平值;In this embodiment, VDD can represent both a reference level and a level value of the reference level;
当没有USB设备插入终端时,终端USB接口的第五管脚电平为第一电平,高于比较器的参考电平时,因此比较器向处理器传递第一逻辑信号作为比较结果;处理器根据比较器传递的第一逻辑信号,指示切换开关工作在断开状态;When no USB device is inserted into the terminal, the fifth pin level of the terminal USB interface is at a first level, higher than the reference level of the comparator, so the comparator transmits the first logic signal to the processor as a comparison result; the processor Determining that the switch is operated in an off state according to the first logic signal transmitted by the comparator;
当有USB设备插入终端时,终端USB接口的第五管脚电平低于比较器的参考电平时,比较器向处理器传递第二逻辑信号作为比较结果;处理器根据比较器传递的第二逻辑信号,获取ADC转换器检测终端USB接口的第五管脚的电平值;When a USB device is inserted into the terminal, when the fifth pin level of the terminal USB interface is lower than the reference level of the comparator, the comparator transmits a second logic signal to the processor as a comparison result; the processor transmits the second according to the comparator a logic signal, obtaining an ADC converter detecting a level value of a fifth pin of the terminal USB interface;
第一逻辑信号为高电平,则第二逻辑信号为低电平;第一逻辑信号为低电平,则第二逻辑信号为高电平;具体可根据实际电路设计进行设置。When the first logic signal is at a high level, the second logic signal is at a low level; when the first logic signal is at a low level, the second logic signal is at a high level; specifically, the setting may be performed according to an actual circuit design.
处理器可以根据比较器传递的比较结果来识别是否有USB设备插入终端,即连接终端USB接口。The processor can identify whether a USB device is plugged into the terminal according to the comparison result transmitted by the comparator, that is, connect the terminal USB interface.
优选地,当有USB设备插入时,比较器的比较结果触发处理器获取ADC转换器检测到终端USB接口的第五管脚的电平值,具体地可以为处理器收到触发时指示ADC转换器检测,或者是处理器收到触发时读取ADC转换器检测到的终端USB接口的第五管脚的电平值,本发明的实施例对此不作限制。Preferably, when a USB device is inserted, the comparison result of the comparator triggers the processor to acquire the level value of the fifth pin of the terminal USB interface detected by the ADC converter, specifically, the ADC conversion is indicated when the processor receives the trigger. The device detects, or reads the level value of the fifth pin of the terminal USB interface detected by the ADC converter when the processor receives the trigger, which is not limited by the embodiment of the present invention.
ADC转换器22:与终端USB接口的第五管脚、处理器电气连接;用于根据处理器的指示检测终端USB接口的第五管脚的电平值,并将检测到的电平值传递给处理器;The ADC converter 22 is electrically connected to the fifth pin of the terminal USB interface and the processor; for detecting the level value of the fifth pin of the terminal USB interface according to the indication of the processor, and transmitting the detected level value Give the processor;
ADC转换器根据处理器的指示检测终端USB接口的第五管脚的电平值:The ADC converter detects the level value of the fifth pin of the terminal USB interface according to the indication of the processor:
根据上述描述可知,当USB设备正向插入终端时,ADC转换器检测到终端USB接口的第五管脚的电平值为第二电平;According to the above description, when the USB device is inserted into the terminal, the ADC converter detects that the level value of the fifth pin of the terminal USB interface is the second level;
当USB设备反向插入终端时,ADC转换器检测到终端USB接口的第五 管脚的电平值为第三电平;When the USB device is inserted back into the terminal, the ADC converter detects the fifth of the terminal's USB interface. The level of the pin is the third level;
当有与终端不匹配的USB设备插入终端时,ADC转换器检测到终端USB接口的第五管脚的电平值为除第一电平、第二电平、第三电平以外的电平值;When a USB device that does not match the terminal is inserted into the terminal, the ADC converter detects that the level of the fifth pin of the terminal USB interface is a level other than the first level, the second level, and the third level. value;
处理器24,与比较器、ADC转换器、切换开关电气连接;用于根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态;The processor 24 is electrically connected to the comparator, the ADC converter, and the switch; and is configured to indicate the working state of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter. ;
切换开关23:分别与所述终端USB接口和所述处理器USB接口连接,所述切换开关根据所述处理器的指示,使得所述终端USB接口与所述处理器的USB接口连接或断开;当所述终端USB接口与所述处理器的USB接口连接时,切换开关根据所述处理器的指示使处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接,或者与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接;The switch 23 is respectively connected to the terminal USB interface and the processor USB interface, and the switch is connected or disconnected from the USB interface of the processor according to the instruction of the processor. When the terminal USB interface is connected to the USB interface of the processor, the switch performs the power pin, the first data transfer pin, the second data transfer pin, and the detection of the processor according to the instruction of the processor. The pins are respectively connected to the first pin, the second pin, the fourth pin, the fifth pin of the terminal USB interface, or the fifth pin, the fourth pin, the second pin of the terminal USB interface, First pin connection;
处理器接收到ADC转换器传递的第二电平,即终端USB接口的第五管脚的电平值,当处理器判断所述ADC转换器传递的电平值为第二电平时,指示切换开关的工作状态使处理器USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接;即:使所述终端USB接口的管脚定义随USB设备正向插入状态做适应性调整;The processor receives the second level transmitted by the ADC converter, that is, the level value of the fifth pin of the terminal USB interface, and when the processor determines that the level value transmitted by the ADC converter is the second level, indicating switching The working state of the switch causes the power pin, the first data transmission pin, the second data transmission pin, and the detection pin of the processor USB interface to be respectively connected to the first pin, the second pin, and the fourth tube of the terminal USB interface. The foot and the fifth pin are connected; that is, the pin definition of the USB interface of the terminal is adaptively adjusted according to the forward insertion state of the USB device;
当处理器判断所述ADC转换器传递的电平值为第三电平时,指示切换开关的工作状态使处理器USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚管脚分别与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接;即:使所述终端USB接口的管脚定义随USB设备反向插入状态做适应性调整;When the processor determines that the level value transmitted by the ADC converter is the third level, indicating that the working state of the switch is such that the power pin of the processor USB interface, the first data transmission pin, the second data transmission pin, The detection pin pins are respectively connected to the fifth pin, the fourth pin, the second pin, and the first pin of the terminal USB interface; that is, the pin definition of the terminal USB interface is inserted backward with the USB device. State to make adaptive adjustments;
当处理器接收到ADC转换器传递的电平值为除第一电平、第二电平、第三电平以外的电平值时,处理器由此指示切换开关工作在断开状态;即:使所述终端USB接口与所述处理器的USB接口断开;When the processor receives the level value transmitted by the ADC converter and the level value other than the first level, the second level, and the third level, the processor thereby instructs the switch to operate in the off state; : disconnecting the terminal USB interface from the USB interface of the processor;
本发明实施例以图3为例,说明切换开关的工作原理,示意图中切换开关 的表现形式仅仅为了方便描述说明,不限于实施例中的一种开关形式,本实施例中所述切换开关包含四路切换电路,每一路切换电路包含1个S管脚,2个D管脚;如图3所示;其中,切换开关的S1~S4管脚,分别与处理器USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚电气连接;切换开关的D1~D8管脚,分别与终端USB接口管脚电气连接;切换开关的输入管脚与处理器连接,接收处理器的指示信号;The embodiment of the present invention uses FIG. 3 as an example to illustrate the working principle of the switch, and the switch in the schematic diagram. The expression is only for convenience of description, and is not limited to one switch form in the embodiment. In the embodiment, the switch includes four switching circuits, and each switching circuit includes one S pin and two D pins. As shown in FIG. 3, wherein the S1 to S4 pins of the switch are electrically connected to the power pin, the first data transfer pin, the second data transfer pin, and the detection pin of the processor USB interface; The D1 to D8 pins of the switch are respectively electrically connected to the terminal USB interface pin; the input pin of the switch is connected to the processor, and receives an indication signal of the processor;
如图3所示,切换开关的D1管脚连接终端USB接口的第一管脚;切换开关的D2管脚连接终端USB接口的第五管脚;切换开关的D3管脚连接终端USB接口的第二管脚;切换开关的D4管脚连接终端USB接口的第四管脚;切换开关的D5管脚连接终端USB接口的第四管脚;切换开关的D6管脚连接终端USB接口的第二管脚;切换开关的D7管脚连接终端USB接口的第五管脚;切换开关的D8管脚连接终端USB接口的第一管脚;As shown in FIG. 3, the D1 pin of the switch is connected to the first pin of the terminal USB interface; the D2 pin of the switch is connected to the fifth pin of the terminal USB interface; the D3 pin of the switch is connected to the terminal of the USB interface Two pins; the D4 pin of the switch is connected to the fourth pin of the terminal USB interface; the D5 pin of the switch is connected to the fourth pin of the terminal USB interface; the D6 pin of the switch is connected to the second tube of the terminal USB interface The D7 pin of the switch is connected to the fifth pin of the terminal USB interface; the D8 pin of the switch is connected to the first pin of the terminal USB interface;
以下详细介绍切换开关的每一路切换电路的管脚连接关系:The pin connection relationship of each switching circuit of the switch is described in detail below:
切换开关的第一路切换电路包含:The first switching circuit of the switch includes:
S1管脚,与处理器的电源管脚连接;S1 pin, connected to the power pin of the processor;
D1管脚,与终端USB接口的第一管脚连接;D1 pin, connected to the first pin of the terminal USB interface;
D2管脚,与终端USB接口的第五管脚连接;D2 pin, connected to the fifth pin of the terminal USB interface;
切换开关的第二路切换电路包含:The second switching circuit of the switch includes:
S2管脚,与处理器的第一数据传输管脚连接;S2 pin, connected to the first data transmission pin of the processor;
D3管脚,与终端USB接口的第二管脚连接;D3 pin, connected to the second pin of the terminal USB interface;
D4管脚,与终端USB接口的第四管脚连接;D4 pin, connected to the fourth pin of the terminal USB interface;
切换开关的第三路切换电路包含:The third switching circuit of the switch includes:
S3管脚,与处理器的第二数据传输管脚连接;S3 pin, connected to the second data transmission pin of the processor;
D5管脚,与终端USB接口的第四管脚连接;D5 pin, connected to the fourth pin of the terminal USB interface;
D6管脚,与终端USB接口的第二管脚连接;D6 pin, connected to the second pin of the terminal USB interface;
切换开关的第四路切换电路包含: The fourth switching circuit of the switch includes:
S4管脚,与处理器的检测管脚连接;S4 pin, connected to the detection pin of the processor;
D7管脚,与终端USB接口的第五管脚连接;D7 pin, connected to the fifth pin of the terminal USB interface;
D8管脚,与终端USB接口的第一管脚连接。D8 pin, connected to the first pin of the terminal USB interface.
当没有USB设备插入终端时,处理器根据比较器传递的第一逻辑信号,指示切换开关工作在断开状态;即:使所述终端USB接口与所述处理器的USB接口断开;即:When no USB device is inserted into the terminal, the processor instructs the switch to operate in an off state according to the first logic signal transmitted by the comparator; that is, disconnect the USB interface of the terminal from the USB interface of the processor;
第一路切换电路S1管脚与D1、D2管脚都不连接;The first switching circuit S1 pin is not connected to the D1 and D2 pins;
第二路切换电路S2管脚与D3、D4管脚都不连接;The second switching circuit S2 pin is not connected to the D3 and D4 pins;
第三路切换电路S3管脚与D5、D6管脚都不连接;The third circuit switching circuit S3 pin is not connected to the D5 and D6 pins;
第四路切换电路S4管脚与D7、D8管脚都不连接;The fourth circuit switching circuit S4 pin is not connected to the D7 and D8 pins;
当USB设备正向插入终端时,处理器根据比较器传递的第二逻辑信号,获取ADC转换器检测到终端USB接口的第五管脚的电平值,处理器判断出终端USB接口的第五管脚的电平值为第二电平,指示切换开关的工作状态使处理器的处理器USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接;使得终端USB接口的管脚定义随USB设备正向插入状态做适应性调整;即:When the USB device is being inserted into the terminal, the processor acquires the level value of the fifth pin of the terminal USB interface detected by the ADC converter according to the second logic signal transmitted by the comparator, and the processor determines the fifth terminal of the USB interface of the terminal. The level value of the pin is a second level, indicating that the working state of the switch is such that the power pin, the first data transfer pin, the second data transfer pin, and the detection pin of the processor USB interface of the processor are respectively The first pin, the second pin, the fourth pin, and the fifth pin of the terminal USB interface are connected; so that the pin definition of the terminal USB interface is adaptively adjusted according to the forward insertion state of the USB device;
第一路切换电路S1管脚与D1管脚连接;The first switching circuit S1 pin is connected to the D1 pin;
第二路切换电路S2管脚与D3管脚连接;The second switching circuit S2 pin is connected to the D3 pin;
第三路切换电路S3管脚与D5管脚连接;The third circuit switching circuit S3 pin is connected to the D5 pin;
第四路切换电路S4管脚与D7管脚连接;The fourth circuit switching circuit S4 pin is connected to the D7 pin;
当USB设备反向插入终端时,处理器根据比较器传递的第二逻辑信号,获取ADC转换器检测到终端USB接口的第五管脚的电平值,处理器判断出终端USB接口的第五管脚的电平值为第三电平,指示切换开关的工作状态使处理器的处理器USB接口的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接;使得终端USB接口的管脚定义随USB设备反向插入状态做适应性调整; 即:When the USB device is reversely inserted into the terminal, the processor acquires the level value of the fifth pin of the terminal USB interface detected by the ADC converter according to the second logic signal transmitted by the comparator, and the processor determines the fifth terminal of the USB interface of the terminal. The level of the pin is a third level, indicating that the working state of the switch is such that the power pin, the first data transfer pin, the second data transfer pin, and the detection pin of the processor's USB interface of the processor are respectively The fifth pin, the fourth pin, the second pin, and the first pin of the terminal USB interface are connected; so that the pin definition of the terminal USB interface is adaptively adjusted according to the reverse insertion state of the USB device; which is:
第一路切换电路S1管脚与D2管脚连接;The first switching circuit S1 pin is connected to the D2 pin;
第二路切换电路S2管脚与D4管脚连接;The second switching circuit S2 pin is connected to the D4 pin;
第三路切换电路S3管脚与D6管脚连接;The third circuit switching circuit S3 pin is connected to the D6 pin;
第四路切换电路S4管脚与D8管脚连接;The fourth circuit switching circuit S4 pin is connected to the D8 pin;
当有与终端不匹配的USB设备插入终端时,处理器根据比较器传递的第二逻辑信号,获取ADC转换器检测终端USB接口的第五管脚的电平值,此时终端USB接口的第五管脚的电平值为除第一电平、第二电平、第三电平以外的电平值,ADC转换器将检测到的电平值传递给处理器,处理器由此指示切换开关工作在断开状态;即:使得所述终端USB接口与所述处理器USB接口断开;即:When a USB device that does not match the terminal is inserted into the terminal, the processor acquires the level value of the fifth pin of the USB interface of the ADC converter according to the second logic signal transmitted by the comparator, and the terminal USB interface The five-pin level value is a level value other than the first level, the second level, and the third level, and the ADC converter transmits the detected level value to the processor, and the processor instructs the switching The switch operates in an off state; that is, the terminal USB interface is disconnected from the processor USB interface;
第一路切换电路S1管脚与D1、D2管脚都不连接;The first switching circuit S1 pin is not connected to the D1 and D2 pins;
第二路切换电路S2管脚与D3、D4管脚都不连接;The second switching circuit S2 pin is not connected to the D3 and D4 pins;
第三路切换电路S3管脚与D5、D6管脚都不连接;The third circuit switching circuit S3 pin is not connected to the D5 and D6 pins;
第四路切换电路S4管脚与D7、D8管脚都不连接;The fourth circuit switching circuit S4 pin is not connected to the D7 and D8 pins;
第三实施例Third embodiment
本发明实施例提供了一种应用于上述终端的的工作流程,如图6所示,所述方法包括:An embodiment of the present invention provides a workflow applied to the foregoing terminal. As shown in FIG. 6, the method includes:
步骤501、比较器对终端USB接口第五管脚电平与参考电平做比较;Step 501: The comparator compares the fifth pin level of the terminal USB interface with a reference level;
步骤502、比较器判断终端USB接口第五管脚电平是否高于参考电平,如果是,执行步骤503;如果否,执行步骤507; Step 502, the comparator determines whether the fifth pin level of the terminal USB interface is higher than the reference level, and if so, step 503 is performed; if not, step 507 is performed;
步骤503、比较器向处理器传递第一逻辑信号;Step 503: The comparator transmits the first logic signal to the processor.
步骤504、处理器根据比较器传递的第一逻辑信号,指示切换开关工作在断开状态,结束;Step 504: The processor instructs the switch to operate in an off state according to the first logic signal transmitted by the comparator, and ends.
步骤505、比较器向处理器传递第二逻辑信号;Step 505: The comparator transmits a second logic signal to the processor.
步骤506、处理器根据比较器传递的第二逻辑信号,获取ADC转换器检测的终端USB接口的第五管脚的电平值;Step 506: The processor acquires, according to the second logic signal transmitted by the comparator, a level value of the fifth pin of the terminal USB interface detected by the ADC converter.
步骤507、处理器判断ADC转换器检测的电平值是否是第二电平,如果 是,执行步骤508;如果否,执行步骤509Step 507: The processor determines whether the level value detected by the ADC converter is the second level, if If yes, go to step 508; if no, go to step 509.
步骤508、处理器指示切换开关的工作状态使处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接,结束;Step 508: The processor indicates the working state of the switch, so that the power pin, the first data transfer pin, the second data transfer pin, and the detection pin of the processor are respectively connected to the first pin and the second tube of the terminal USB interface. The foot, the fourth pin, and the fifth pin are connected, and the end is completed;
步骤509、处理器判断ADC转换器检测的电平值是否是第三电平,如果是,执行步骤510;如果否,执行步骤511; Step 509, the processor determines whether the level value detected by the ADC converter is the third level, and if so, step 510 is performed; if not, step 511 is performed;
步骤510、处理器指示切换开关的工作状态使处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接,结束;Step 510: The processor indicates the working state of the switch, so that the power pin of the processor, the first data transmission pin, the second data transmission pin, and the detection pin are respectively connected to the fifth pin and the fourth tube of the terminal USB interface. The foot, the second pin, and the first pin are connected, and the end is completed;
步骤511、处理器指示切换开关工作在断开状态,结束。Step 511: The processor instructs the switch to operate in an off state and ends.
与现有技术相比,本发明实施例提供设备都仅需一排USB管脚,即仅需一组电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚,极大改善了现有技术中在结构上增加USB连接器管脚以实现USB设备正反向插入的相互识别而导致连接器尺寸增大并影响产品外观的不足,提升了用户体验。Compared with the prior art, the embodiments of the present invention provide only one row of USB pins, that is, only one power supply pin, the first data transmission pin, the ground pin, the second data transmission pin, and the detection. The pin greatly improves the user experience by adding a USB connector pin to the mutual recognition of the forward and reverse insertion of the USB device in the prior art, resulting in an increase in the size of the connector and affecting the appearance of the product.
本发明的实施例中给出的电阻值大小关系、电平值大小关系只是本发明实施例的一种实现,各参数值可以根据电路的需要进行适当的调整。The relationship between the magnitude of the resistance value and the magnitude of the level value given in the embodiment of the present invention is only one implementation of the embodiment of the present invention, and each parameter value can be appropriately adjusted according to the needs of the circuit.
还需要说明的是,在本发明实施例中,诸如第一、第二、第三、第四、第五以及管脚序号等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或者操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者任何其他涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅仅包括那些要素,而且还包括没有明确列出的其他要素,或者还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括…”、“包含…”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in the embodiments of the present invention, relational terms such as first, second, third, fourth, fifth, and pin number are used only to refer one entity or operation to another entity. Or the operations are distinct and do not necessarily require or imply any such actual relationship or order between the entities or operations. Furthermore, the term "comprises," "comprises," or "includes" or "includes" or "includes" or "includes" or "includes" or "includes" or "includes" Or include elements inherent to such a process, method, article, or device. The elements defined by the terms "including", "comprising", and <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt;
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those skilled in the art can understand that all or part of the steps of implementing the above embodiments can be The completion of the hardware may also be performed by a program to instruct related hardware. The program may be stored in a computer readable storage medium. The storage medium mentioned above may be a read only memory, a magnetic disk or an optical disk.
以上所述的具体实施方式,对本发明的目的、技术方案有益效果进行了进一步详细说明,所应理解的是,不同的实施例可以进行组合,以上所述进而本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何组合、修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The specific embodiments described above further explain the beneficial effects of the present invention and the technical solutions. It should be understood that different embodiments may be combined, and the above embodiments are further described. Any combination, modification, equivalent substitution, improvement, etc., made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (10)

  1. 一种终端,其特征在于,所述终端包括终端USB接口、上拉电阻、比较器、ADC转换器、切换开关、处理器:A terminal, wherein the terminal comprises a terminal USB interface, a pull-up resistor, a comparator, an ADC converter, a switch, and a processor:
    所述终端USB接口用于与USB设备连接,包括5个管脚,分别为:第一管脚、第二管脚、地管脚、第四管脚、第五管脚;以地管脚为中心,其他4个管脚对称排布;所述处理器设置有处理器USB接口包括电源管脚、第一数据传输管脚、接地管脚、第二数据传输管脚、检测管脚;所述终端USB接口的地管脚和所述处理器USB接口的地管脚接地;The terminal USB interface is connected to the USB device, and includes five pins, which are: a first pin, a second pin, a ground pin, a fourth pin, and a fifth pin; Center, the other four pins are symmetrically arranged; the processor is provided with a processor USB interface including a power pin, a first data transmission pin, a ground pin, a second data transmission pin, and a detection pin; The ground pin of the terminal USB interface and the ground pin of the USB interface of the processor are grounded;
    所述上拉电阻:一端与第一电源连接,另一端与所述终端USB接口的第五管脚电气连接;The pull-up resistor has one end connected to the first power source and the other end electrically connected to the fifth pin of the terminal USB interface;
    所述比较器包括第一输入管脚,第二输入管脚,输出管脚,所述第一输入管脚与所述终端USB接口的第五管脚电气连接、所述第二输入管脚与参考电平电气连接,所述输出管脚与所述处理器电气连接;所述比较器用于将所述终端USB接口的第五管脚的电平与所述参考电平做比较,并将比较结果传递给所述处理器;所述参考电平的电平值小于所述第一电源电平值;The comparator includes a first input pin, a second input pin, an output pin, the first input pin is electrically connected to a fifth pin of the terminal USB interface, and the second input pin is a reference level electrical connection, the output pin being electrically coupled to the processor; the comparator for comparing a level of a fifth pin of the terminal USB interface with the reference level and comparing Passing the result to the processor; the level value of the reference level is less than the first power level value;
    所述ADC转换器:与所述终端USB接口的第五管脚、处理器电气连接;用于检测所述终端USB接口的第五管脚的电平值;The ADC converter is electrically connected to a fifth pin of the terminal USB interface and a processor; and is configured to detect a level value of a fifth pin of the USB interface of the terminal;
    所述切换开关:分别与所述终端USB接口和所述处理器的USB接口连接,所述切换开关根据所述处理器的指示,使得所述终端USB接口与所述处理器USB接口连接或断开;当所述终端USB接口与所述处理器的USB接口连接时,切换开关根据所述处理器的指示使得处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚连接,或者与终端USB接口的第五管脚、第四管脚、第二管脚、第一管脚连接;The switch is respectively connected to the USB interface of the terminal and the USB interface of the processor, and the switch is connected to the USB interface of the terminal according to the instruction of the processor. When the terminal USB interface is connected to the USB interface of the processor, the switch performs a power pin, a first data transfer pin, a second data transfer pin of the processor according to the instruction of the processor, The detecting pin is respectively connected to the first pin, the second pin, the fourth pin, the fifth pin of the terminal USB interface, or the fifth pin, the fourth pin, the second pin of the terminal USB interface , the first pin is connected;
    所述处理器:与比较器、ADC转换器、切换开关电气连接;用于根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态。The processor is electrically connected to the comparator, the ADC converter, and the switch; and is configured to indicate the operation of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter status.
  2. 如权利要求1所述的终端,其特征在于,所述处理器根据比较器传递 的比较结果指示切换开关的工作状态,包括:The terminal of claim 1 wherein said processor is passed according to a comparator The comparison result indicates the working state of the switch, including:
    当处理器接收到比较器传递的终端USB接口第五管脚电平高于比较器的参考电平的比较结果时,处理器指示切换开关工作在断开状态。When the processor receives a comparison result that the fifth terminal level of the terminal USB interface passed by the comparator is higher than the reference level of the comparator, the processor instructs the switch to operate in the off state.
  3. 如权利要求1或2所述的终端,其特征在于,A terminal according to claim 1 or 2, characterized in that
    所述USB设备包括:USB接口,包含5个管脚:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;第二电阻,一端与所述检测管脚电气连接,另一端接地管脚;第三电阻,一端与所述电源管脚电气连接,另一端接地管脚;所述USB设备采用以地管脚为中心,其他4个管脚对称排布,所述USB接口的管脚顺序为:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚。The USB device comprises: a USB interface, comprising: five pins: a power pin, a first data transfer pin, a ground pin, a second data transfer pin, a detection pin; a second resistor, one end and the detecting The pin is electrically connected, and the other end is grounded; the third resistor has one end electrically connected to the power pin and the other end is grounded; the USB device is centered on the ground pin, and the other four pins are symmetrically arranged. The order of the pins of the USB interface is: a power pin, a first data transfer pin, a ground pin, a second data transfer pin, and a detection pin.
  4. 如权利要求3所述的终端,其特征在于,所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:The terminal according to claim 3, wherein the processor indicates the operating state of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter, including :
    当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五管脚的电平值为VDD*R2/(R1+R2)时,处理器指示切换开关工作在连接状态,使处理器的电源管脚、第一数据传输管脚、第二数据传输管脚、检测管脚分别与终端USB接口的第一管脚、第二管脚、第四管脚、第五管脚电气连接,其中VDD为所述第一电源的电平值,R1为所述上拉电阻的电阻值,R2为所述第二电阻的电阻值。When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter When the value is VDD*R2/(R1+R2), the processor instructs the switch to operate in the connected state, so that the power pin, the first data transfer pin, the second data transfer pin, and the detection pin of the processor are respectively The first pin, the second pin, the fourth pin, and the fifth pin of the terminal USB interface are electrically connected, wherein VDD is a level value of the first power source, and R1 is a resistance value of the pull-up resistor. R2 is a resistance value of the second resistor.
  5. 如权利要求3或4所述的终端,其特征在于,所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:The terminal according to claim 3 or 4, wherein the processor indicates the working state of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter. ,include:
    当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五管脚的电平值为VDD*R3/(R1+R3)时,处理器指示切换开关工作在连接状态,使处理器的检测管脚、第二数据传输管脚、第一数据传输管脚、电源管脚分别与终端USB接口的第一、第二管脚、第四管脚、第五管脚电气连接,其中VDD为所述第一电源的电平值,R1为所述上拉电阻的电阻值,R3为所述第三电阻 的电阻值。When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter When the value is VDD*R3/(R1+R3), the processor instructs the switch to operate in the connected state, so that the detection pin, the second data transfer pin, the first data transfer pin, and the power pin of the processor are respectively The first, second, fourth, and fifth pins of the terminal USB interface are electrically connected, wherein VDD is a level value of the first power source, R1 is a resistance value of the pull-up resistor, and R3 is The third resistor The resistance value.
  6. 如权利要求5所述的终端,其特征在于所述处理器根据比较器传递的比较结果以及ADC转换器传递的终端USB接口的第五管脚的电平值指示切换开关的工作状态,包括:The terminal according to claim 5, wherein the processor indicates the working state of the switch according to the comparison result transmitted by the comparator and the level value of the fifth pin of the terminal USB interface transmitted by the ADC converter, including:
    当处理器接收到比较器传递的终端USB接口第五管脚电平低于比较器的参考电平的比较结果,且处理器接收到ADC转换器传递的终端USB接口第五管脚的电平值为除VDD*R2/(R1+R2)以及VDD*R3/(R1+R3)以外的值时,处理器指示切换开关工作在断开状态。When the processor receives the comparison result of the fifth pin level of the terminal USB interface transmitted by the comparator being lower than the reference level of the comparator, and the processor receives the level of the fifth pin of the terminal USB interface transmitted by the ADC converter When the value is other than VDD*R2/(R1+R2) and VDD*R3/(R1+R3), the processor instructs the switch to operate in the off state.
  7. 如权利要求1-6任一项所述的终端,其特征在于,所述终端USB接口的管脚为触点式。The terminal according to any one of claims 1 to 6, wherein the pin of the terminal USB interface is a contact type.
  8. 一种USB设备,其特征在于,所述USB设备包括:A USB device, characterized in that the USB device comprises:
    USB接口,包含5个管脚:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;USB interface, comprising five pins: a power pin, a first data transfer pin, a ground pin, a second data transfer pin, and a detection pin;
    所述USB设备采用以地管脚为中心,其他4个管脚对称排布,所述USB管脚顺序为:电源管脚、第一数据传输管脚、地管脚、第二数据传输管脚、检测管脚;The USB device is centered on the ground pin, and the other four pins are symmetrically arranged. The USB pin sequence is: a power pin, a first data transfer pin, a ground pin, and a second data transfer pin. , detecting the pin;
    第二电阻,一端与所述检测管脚电气连接,另一端接地管脚;a second resistor, one end is electrically connected to the detecting pin, and the other end is grounded;
    第三电阻,一端与所述电源管脚电气连接,另一端接地管脚;a third resistor, one end is electrically connected to the power pin, and the other end is grounded;
    所述第二电阻的阻值和所述第三电阻的阻值不相等。The resistance of the second resistor and the resistance of the third resistor are not equal.
  9. 如权利要求8所述的USB设备,其特征在于,所述USB设备的管脚为触点式。The USB device of claim 8, wherein the pins of the USB device are contact type.
  10. 如权利要求8所述的USB设备,其特征在于,所述USB设备还包括:The USB device of claim 8, wherein the USB device further comprises:
    处理器,与所述USB接口连接,用于根据所述检测管脚的逻辑电平识别USB设备是否连接终端USB接口。 And a processor, connected to the USB interface, for identifying whether the USB device is connected to the terminal USB interface according to the logic level of the detection pin.
PCT/CN2015/077104 2015-04-21 2015-04-21 Solution for mutually identifying forward and reverse insertion between touch type usb devices WO2016168987A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580030730.9A CN106462512B (en) 2015-04-21 2015-04-21 It is forward and reverse between a kind of contact USB device to be inserted into the scheme being mutually distinguishable
PCT/CN2015/077104 WO2016168987A1 (en) 2015-04-21 2015-04-21 Solution for mutually identifying forward and reverse insertion between touch type usb devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/077104 WO2016168987A1 (en) 2015-04-21 2015-04-21 Solution for mutually identifying forward and reverse insertion between touch type usb devices

Publications (1)

Publication Number Publication Date
WO2016168987A1 true WO2016168987A1 (en) 2016-10-27

Family

ID=57142807

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/077104 WO2016168987A1 (en) 2015-04-21 2015-04-21 Solution for mutually identifying forward and reverse insertion between touch type usb devices

Country Status (2)

Country Link
CN (1) CN106462512B (en)
WO (1) WO2016168987A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109856201A (en) * 2019-01-18 2019-06-07 深圳和而泰数据资源与云技术有限公司 Saliva detection device
CN110175144A (en) * 2019-05-14 2019-08-27 惠州Tcl移动通信有限公司 USB data transmission control method and relevant device
US10483698B2 (en) * 2017-09-27 2019-11-19 Samsung Electronics Co., Ltd. Connector for connecting antenna and electronic device having the same
US10879893B1 (en) 2019-08-07 2020-12-29 Texas Instruments Incorporated Passive detection of device decoupling
CN115098421A (en) * 2022-06-30 2022-09-23 山东云海国创云计算装备产业创新中心有限公司 Method and device for supporting parallel bus IO signal positive and negative connection

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221546A (en) * 2007-01-12 2008-07-16 奇岩电子股份有限公司 Device for automatically detecting universal serial bus main unit or peripherals
EP2278668A2 (en) * 2009-07-22 2011-01-26 HTC Corporation Power supply device, portable electronic apparatus and related method for determining types of a power supply device
JP2011223313A (en) * 2010-04-09 2011-11-04 Panasonic Corp Conversion adapter, electronic apparatus, and electronic apparatus system
CN103576016A (en) * 2012-08-02 2014-02-12 鸿富锦精密工业(深圳)有限公司 USB interface detection system and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100495377C (en) * 2007-03-09 2009-06-03 华为技术有限公司 Method for inspecting type of connected peripheral apparatus and terminal interface
CN103064489B (en) * 2011-10-21 2016-03-30 华为终端有限公司 A kind of method and terminal of carrying out internal circuit selection according to USB interface state
CN204155267U (en) * 2014-07-29 2015-02-11 合肥宝龙达信息技术有限公司 A kind of OTG usb circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221546A (en) * 2007-01-12 2008-07-16 奇岩电子股份有限公司 Device for automatically detecting universal serial bus main unit or peripherals
EP2278668A2 (en) * 2009-07-22 2011-01-26 HTC Corporation Power supply device, portable electronic apparatus and related method for determining types of a power supply device
JP2011223313A (en) * 2010-04-09 2011-11-04 Panasonic Corp Conversion adapter, electronic apparatus, and electronic apparatus system
CN103576016A (en) * 2012-08-02 2014-02-12 鸿富锦精密工业(深圳)有限公司 USB interface detection system and method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10483698B2 (en) * 2017-09-27 2019-11-19 Samsung Electronics Co., Ltd. Connector for connecting antenna and electronic device having the same
US10886672B2 (en) 2017-09-27 2021-01-05 Samsung Electronics Co., Ltd. Connector for connecting antenna and electronic device having the same
CN109856201A (en) * 2019-01-18 2019-06-07 深圳和而泰数据资源与云技术有限公司 Saliva detection device
WO2020147173A1 (en) * 2019-01-18 2020-07-23 深圳和而泰数据资源与云技术有限公司 Saliva testing device and system
CN110175144A (en) * 2019-05-14 2019-08-27 惠州Tcl移动通信有限公司 USB data transmission control method and relevant device
CN110175144B (en) * 2019-05-14 2024-01-19 惠州Tcl移动通信有限公司 USB data transmission control method and related equipment
US10879893B1 (en) 2019-08-07 2020-12-29 Texas Instruments Incorporated Passive detection of device decoupling
WO2021026288A1 (en) * 2019-08-07 2021-02-11 Texas Instruments Incorporated Passive detection of device decoupling
CN114503090A (en) * 2019-08-07 2022-05-13 德克萨斯仪器股份有限公司 Passive detection of device decoupling
CN114503090B (en) * 2019-08-07 2024-03-29 德克萨斯仪器股份有限公司 Passive detection of device decoupling
CN115098421A (en) * 2022-06-30 2022-09-23 山东云海国创云计算装备产业创新中心有限公司 Method and device for supporting parallel bus IO signal positive and negative connection

Also Published As

Publication number Publication date
CN106462512A (en) 2017-02-22
CN106462512B (en) 2019-10-01

Similar Documents

Publication Publication Date Title
WO2016168987A1 (en) Solution for mutually identifying forward and reverse insertion between touch type usb devices
US11215653B2 (en) Electronic devices and methods for detecting foreign object on connector
JP5975360B2 (en) General purpose connectors and handheld electronic devices
WO2012167677A1 (en) Device and method for communication and charging for external device via usb interface
TW201017431A (en) Discovery of connections utilizing a control bus
TWI394346B (en) Mother board with rapid charging handheld multimedia device
TW201329731A (en) Apparatus and method of identifying a USB or an MHL device
WO2017161750A1 (en) Mobile apparatus
TWI462396B (en) Signal connecting module, electronic device, and connector identification method thereof
US20200313366A1 (en) Adapter, multi-device detection system and detection method thereof
TW201523266A (en) Electronic device using USB plugging set to load firmware and firmware loading method thereof
CN102404679B (en) Headset detection circuit and electronic equipment
TW201535128A (en) Electric system
TW201901459A (en) Method for controlling audio device and system thereof
TWI451235B (en) Connecting module for coupling output ends of a host device to an external storage device and coupling method thereof
TWI522812B (en) Universal serial bus and mobile electronic device
US20130244455A1 (en) Processing device and processing system
CN109478174B (en) Switch for reversible interface
TWI338840B (en) Expandable express card and its method for isolating noise and method for combining functionalities of the express card with a non-host device
US11081840B2 (en) Detection circuit applied to a connecting port
CN201837990U (en) Detection circuit and mobile terminal
TW201505293A (en) Electronic apparatus, base and switching function of pins of a connector
TW202424750A (en) Computer assembly and control method therefor
CN214412881U (en) TypeC and HDMI two-in-one transmission display control circuit and device
CN112214430B (en) USB Type-C connector detection method and dual-purpose port device

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: 15889476

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: 15889476

Country of ref document: EP

Kind code of ref document: A1