[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN101702146A - Method and unit for distinguishing charger and data line of universal serial bus - Google Patents

Method and unit for distinguishing charger and data line of universal serial bus Download PDF

Info

Publication number
CN101702146A
CN101702146A CN200910237033A CN200910237033A CN101702146A CN 101702146 A CN101702146 A CN 101702146A CN 200910237033 A CN200910237033 A CN 200910237033A CN 200910237033 A CN200910237033 A CN 200910237033A CN 101702146 A CN101702146 A CN 101702146A
Authority
CN
China
Prior art keywords
resistance
charger
usb
usb interface
data line
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN200910237033A
Other languages
Chinese (zh)
Other versions
CN101702146B (en
Inventor
黄辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongxingtianshi Technology Co ltd
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN200910237033.7A priority Critical patent/CN101702146B/en
Publication of CN101702146A publication Critical patent/CN101702146A/en
Application granted granted Critical
Publication of CN101702146B publication Critical patent/CN101702146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses a method and a unit for distinguishing a charger and a data line of a universal serial bus. The interfaces connected with the charger and the USB data line on a mobile terminal are both USB interfaces. D+ and D- pins of the USB interface of the charger are in short connection. The method is as follows: when mobile terminal detects a device is inserted into the USB interfaces, the voltage on the D- pin of the USB interfaces is detected, if the voltage is high level, the inserted device is determined as the charge, or the inserted device is determined as the USB data line. The invention improves the accuracy of distinguishing whether the device inserted into the USB interfaces is the charger or the USB data line by the mobile terminal.

Description

The method of distinguishing charger and data line of universal serial bus and unit
Technical field
The present invention relates to the mobile communication interface technical field, be specifically related to the method and the unit of distinguishing charger and data line of universal serial bus.
Background technology
The Ministry of Information Industry has issued new communication industry standard: YD/T1591-2006 " GSM CDMA charger and interfacing require and method of testing " in 2006, the standardization of portable terminal charger technical indicator and interface has been proposed specific requirement.According to this requirement, interface that links to each other with charger on the portable terminal and the interface that links to each other with USB (universal serial bus) (USB, Universal Serial BUS) data line can not separate design again, and both must unify.At present, the interface that links to each other with the usb data line with charger on the portable terminal all is a USB interface.
The USB interface that links to each other with portable terminal on the charger has 4 pins, and is as follows respectively:
V Charge: the charging pin is used to connect the Vin pin of the USB interface of portable terminal;
D+: the correction data pin is used to connect the D+ pin of the USB interface of portable terminal;
D-: the negative data pin is used to connect the D-pin of the USB interface of portable terminal;
GND: ground pin.
The USB interface that links to each other with portable terminal on the usb data line has 4 pins equally, and is as follows respectively:
V Bus: bus pin is used to connect the V of the USB interface of portable terminal InPin;
D+: the correction data pin is used to connect the D+ pin of the USB interface of portable terminal;
D-: the negative data pin is used to connect the D-pin of the USB interface of portable terminal;
GND: ground pin.
Because charging is different with the needed electric current of data transmission, the former is generally 1 peace, and the latter is generally 0.5 peace, therefore, what portable terminal must be able to be distinguished the insertion USB interface is charger or usb data line, obtains different electric currents to select different access resistance.
Fig. 1 is the structural drawing of existing portable terminal, wherein, and V InBe the input pin of USB interface, be used to connect the V of charger ChargeOr the V of usb data line BusR is an adjustable resistance, wherein, and the corresponding charger of first resistance, the corresponding usb data line of second resistance.
Work as V InWhen becoming high level by low level, portable terminal defines device and inserts USB interface, if definite insertion is charger, then R is adjusted to first resistance, begins charging; If what determine insertion is the usb data line, then R is adjusted to second resistance, begin to transmit data.
At present, what the mode that some manufacturers use USB to shake hands was judged the insertion USB interface is charger or usb data line, and detailed process is: detect V InBecome high level, then send the USB handshake information by USB interface to insertion person, if receive feedback message, what then think insertion is the usb data line; Otherwise what think insertion is charger.The shortcoming of this method is: as the personal computer (PC that links to each other with portable terminal by the usb data line, when Personal Computer) crashing, if what insert is the usb data line, then same not feedback, what this moment, portable terminal can be thought insertion by mistake is charger, thereby select wrong resistance, cause producing big electric current, thereby can burn the USB interface of PC.
Summary of the invention
The invention provides the method and the unit of a kind of distinguishing charger and usb data line,, improve that to distinguish what insert USB interface be the charger or the accuracy of usb data line with when charger and usb data line all insert portable terminal by USB interface.
Technical scheme of the present invention is achieved in that
The method of a kind of distinguishing charger and usb data line, the interface that links to each other with charger on the portable terminal all is a USB interface with the interface that links to each other with the usb data line, with the D+ and the D-pin short circuit of the USB interface of charger, this method comprises:
Portable terminal detects USB interface has device to insert, and then detects the voltage on the D-pin of USB interface, if high level, what then determine to insert be charger, otherwise what determine insertion is the usb data line.
Described method further comprises:
On the D-pin of the USB interface of portable terminal, connect a resistance, this resistance other end ground connection.
The resistance of described resistance is: 10k~100k ohm.
When determine to insert be charger the time, described method further comprises: portable terminal is adjusted to the first corresponding resistance of charging with adjustable resistance, begins to charge;
When determine to insert be the usb data line time, described method further comprises: portable terminal is adjusted to second resistance of data transmission correspondence with adjustable resistance, begins to transmit data.
The unit of a kind of distinguishing charger and usb data line, this unit links to each other with the USB interface of portable terminal, comprising:
USB interface is inserted detection module, and detecting USB interface has device to insert, and sends trigger pip to voltage detection module;
Voltage detection module, the reception trigger pip, the voltage on the D-pin of detection USB interface, if high level, what then determine insertion is charger, otherwise what determine insertion is the usb data line.
Described voltage detection module determine to insert be charger after, sending charging and indicating; Determine to insert be the usb data line after, send data transmission and indicate; And,
Described device further comprises:
The resistance adjusting module receives the charging indication, then adjustable resistance is adjusted to the first corresponding resistance of charging; Receive the data transmission indication, then adjustable resistance is adjusted to second resistance of data transmission correspondence.
Described voltage detection module is positioned at the baseband chip of portable terminal.
Described voltage detection module links to each other with the D-pin of the USB interface of portable terminal by the general input and output GPIO pin of baseband chip.
Be connected to a resistance on the D-pin of described USB interface, this resistance other end ground connection.
Compared with prior art, among the present invention, D+ and D-pin short circuit with the USB interface of charger, when portable terminal detects USB interface and has device to insert, then detect the voltage on the D-pin of USB interface, if high level, what then determine to insert is charger, otherwise what determine insertion is the usb data line.What the present invention had improved differentiation insertion USB interface is the charger or the accuracy of usb data line.
Description of drawings
Fig. 1 is the structural drawing of existing portable terminal;
The structural representation of the distinguishing charger that Fig. 2 provides for the embodiment of the invention and the portable terminal of usb data line;
The portable terminal distinguishing charger that Fig. 3 provides for the embodiment of the invention and the method flow diagram of usb data line.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
The structural representation of the distinguishing charger that Fig. 2 provides for the embodiment of the invention and the portable terminal of usb data line, as shown in Figure 2:
The USB interface of portable terminal has 4 pins, wherein:
V In: input pin is used for the V with charger ChargeOr the V of usb data line BusLink to each other;
D+: the correction data pin is used for linking to each other with the D+ of charger or the D+ of usb data line;
D-: the negative data pin is used for linking to each other with the D-of charger or the D-of usb data line;
GND: ground pin.
In the embodiment of the invention, the D+ and the D-pin of charger joined, like this, after the D+ of charger met power vd D, D-was identical with the voltage of D+ pin, was high level.
Simultaneously, as shown in Figure 2, in the embodiment of the invention, portable terminal comprises: USB interface is inserted detection module 20 and voltage detection module 21, and USB interface is inserted the V of detection module 20 and USB interface InPin links to each other, and voltage detection module 21 links to each other with the D-pin of USB interface, wherein:
USB interface is inserted detection module 20: the V that detects USB interface InWhen becoming high level, define device and insert USB interface, then send a trigger pip to voltage detection module 21 by low level.
Voltage detection module 21: receive USB interface and insert the trigger pip that detection module 20 is sent, then detect the voltage on the D-pin of USB interface, if this voltage is high level, what then determine to insert USB interface is charger; Otherwise what determine the insertion USB interface is the usb data line.
Voltage detection module 21 can be positioned at the baseband chip of portable terminal.At this moment, voltage detection module 21 can link to each other with the D-pin of USB interface by general input and output (GPIO, the General Purpose Input Output) pin of baseband chip.Wherein, if the inner no feedback resistance of baseband chip, then can be on the D-pin resistance R 1 in parallel, its resistance is 10k~100k ohm, to play the dividing potential drop effect.
Voltage detection module 21 determine to insert USB interface be charger after, can send charging to the intrinsic resistance adjusting module of portable terminal and indicate; Determine to insert USB interface be the usb data line after, can send data transmission to the resistance adjusting module and indicate.After the resistance adjusting module receives the charging indication, adjustable resistance is adjusted to the first corresponding resistance of charging; After receiving the data transmission indication, adjustable resistance is adjusted to second resistance of data transmission correspondence.
Wherein, USB interface is inserted detection module 20 and voltage detection module 21 can be formed an independently unit, and this unit can be positioned at the baseband chip of portable terminal.
The portable terminal distinguishing charger that Fig. 3 provides for the embodiment of the invention and the method flow diagram of usb data line, as shown in Figure 3, its concrete steps are as follows:
Step 301: with the D+ and the D-pin short circuit of charger.
Step 302: the Vin that the baseband chip of portable terminal detects USB interface becomes high level by low level, then defines device and inserts USB interface, the voltage on the D-pin of detection USB interface.
Step 303: baseband chip judges that the voltage of D-pin is high level or low level, if the former, then execution in step 304; Otherwise, step 305.
Step 304: what baseband chip was determined the insertion USB interface is charger, and adjustable resistance R is adjusted to first resistance, begins charging.
Step 305: what baseband chip was determined the insertion USB interface is the usb data line, and R is adjusted to second resistance, begins to transmit data.
From flow process shown in Figure 3 as can be seen, when the usb data line inserted the USB interface of portable terminal, if PC crashes, then the D-pin of usb data line still be a low level, thereby portable terminal still can think insertion is the usb data line, can not produce the erroneous judgement situation.
The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the method for distinguishing charger and general-purpose serial bus USB data line, the interface that links to each other with charger on the portable terminal all is a USB interface with the interface that links to each other with the usb data line, it is characterized in that with the D+ and the D-pin short circuit of the USB interface of charger, this method comprises:
Portable terminal detects USB interface has device to insert, and then detects the voltage on the D-pin of USB interface, if high level, what then determine to insert be charger, otherwise what determine insertion is the usb data line.
2. the method for claim 1 is characterized in that, described method further comprises:
On the D-pin of the USB interface of portable terminal, connect a resistance, this resistance other end ground connection.
3. method as claimed in claim 2 is characterized in that, the resistance of described resistance is: 10k~100k ohm.
4. as the arbitrary described method of claim 1 to 3, it is characterized in that, when determine to insert be charger the time, described method further comprises: portable terminal is adjusted to the first corresponding resistance of charging with adjustable resistance, begins to charge;
When determine to insert be the usb data line time, described method further comprises: portable terminal is adjusted to second resistance of data transmission correspondence with adjustable resistance, begins to transmit data.
5. the unit of distinguishing charger and usb data line, this unit links to each other with the USB interface of portable terminal, it is characterized in that, comprising:
USB interface is inserted detection module, and detecting USB interface has device to insert, and sends trigger pip to voltage detection module;
Voltage detection module, the reception trigger pip, the voltage on the D-pin of detection USB interface, if high level, what then determine insertion is charger, otherwise what determine insertion is the usb data line.
6. unit as claimed in claim 5 is characterized in that, described voltage detection module determine to insert be charger after, sending charging and indicating; Determine to insert be the usb data line after, send data transmission and indicate; And,
Described device further comprises:
The resistance adjusting module receives the charging indication, then adjustable resistance is adjusted to the first corresponding resistance of charging; Receive the data transmission indication, then adjustable resistance is adjusted to second resistance of data transmission correspondence.
7. as claim 5 or 6 described unit, it is characterized in that described voltage detection module is positioned at the baseband chip of portable terminal.
8. unit as claimed in claim 7 is characterized in that, described voltage detection module links to each other with the D-pin of the USB interface of portable terminal by the general input and output GPIO pin of baseband chip.
9. as claim 5 or 6 described unit, it is characterized in that, be connected to a resistance on the D-pin of described USB interface, this resistance other end ground connection.
CN200910237033.7A 2009-11-02 2009-11-02 The method of distinguishing charger and data line of universal serial bus and unit Active CN101702146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910237033.7A CN101702146B (en) 2009-11-02 2009-11-02 The method of distinguishing charger and data line of universal serial bus and unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910237033.7A CN101702146B (en) 2009-11-02 2009-11-02 The method of distinguishing charger and data line of universal serial bus and unit

Publications (2)

Publication Number Publication Date
CN101702146A true CN101702146A (en) 2010-05-05
CN101702146B CN101702146B (en) 2016-01-20

Family

ID=42157062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910237033.7A Active CN101702146B (en) 2009-11-02 2009-11-02 The method of distinguishing charger and data line of universal serial bus and unit

Country Status (1)

Country Link
CN (1) CN101702146B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255153A (en) * 2011-03-25 2011-11-23 苏州佳世达电通有限公司 Universal serial bus connector and charging adapter with same
WO2012071837A1 (en) * 2010-11-30 2012-06-07 中兴通讯股份有限公司 Method and terminal for starting universal serial bus state machine
CN102799554A (en) * 2012-07-23 2012-11-28 天津三星电子有限公司 Data transmission method, apparatus thereof and display terminal applied thereto
WO2013056683A1 (en) * 2011-10-21 2013-04-25 华为终端有限公司 Method for selecting internal circuit according to usb interface status and terminal
CN103760451A (en) * 2014-01-28 2014-04-30 天地融科技股份有限公司 Method and device for detecting interface access modes of intelligent secret key device
CN104101808A (en) * 2014-07-23 2014-10-15 Tcl通讯(宁波)有限公司 Charger detecting system and detecting method thereof and mobile terminal
CN104408015A (en) * 2014-11-06 2015-03-11 深圳市广和通无线通信软件有限公司 USB (universal serial bus) mode adaptive method of communication module
CN104411003A (en) * 2014-11-06 2015-03-11 深圳市广和通无线通信软件有限公司 Dormancy wakeup control method and system of wireless communication equipment
CN104539318A (en) * 2014-12-11 2015-04-22 飞天诚信科技股份有限公司 Bluetooth switching device and work method thereof
CN105071489A (en) * 2015-08-25 2015-11-18 广东欧珀移动通信有限公司 Charging method and apparatus of terminal having data exchange function
CN105573879A (en) * 2016-01-04 2016-05-11 浙江德景电子科技有限公司 Method and device for separated detection of intelligent terminal USB and charger interface
WO2017041461A1 (en) * 2015-09-10 2017-03-16 深圳市中兴微电子技术有限公司 Efficient universal serial bus utilization method and universal serial bus device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7502949B2 (en) * 2003-08-01 2009-03-10 Pn Telecom Co., Ltd. Data cable for automatically detecting power source with charger integrated circuit
CN101383627A (en) * 2007-09-04 2009-03-11 大唐移动通信设备有限公司 Device and method for terminal charger charging, USB charging and data communication
CN101398459A (en) * 2008-10-28 2009-04-01 深圳华为通信技术有限公司 Method and device for identifying charger type

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7502949B2 (en) * 2003-08-01 2009-03-10 Pn Telecom Co., Ltd. Data cable for automatically detecting power source with charger integrated circuit
CN101383627A (en) * 2007-09-04 2009-03-11 大唐移动通信设备有限公司 Device and method for terminal charger charging, USB charging and data communication
CN101398459A (en) * 2008-10-28 2009-04-01 深圳华为通信技术有限公司 Method and device for identifying charger type

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012071837A1 (en) * 2010-11-30 2012-06-07 中兴通讯股份有限公司 Method and terminal for starting universal serial bus state machine
US9529756B2 (en) 2010-11-30 2016-12-27 Zte Corporation Method and terminal for starting universal serial USB state machine
CN102255153A (en) * 2011-03-25 2011-11-23 苏州佳世达电通有限公司 Universal serial bus connector and charging adapter with same
US9128691B2 (en) 2011-10-21 2015-09-08 Huawei Device Co., Ltd. Method and terminal for selecting internal circuit according to USB interface status
WO2013056683A1 (en) * 2011-10-21 2013-04-25 华为终端有限公司 Method for selecting internal circuit according to usb interface status and terminal
CN102799554A (en) * 2012-07-23 2012-11-28 天津三星电子有限公司 Data transmission method, apparatus thereof and display terminal applied thereto
CN103760451B (en) * 2014-01-28 2016-08-17 天地融科技股份有限公司 The interface access module detection method of a kind of intelligent cipher key equipment and equipment
CN103760451A (en) * 2014-01-28 2014-04-30 天地融科技股份有限公司 Method and device for detecting interface access modes of intelligent secret key device
CN104101808A (en) * 2014-07-23 2014-10-15 Tcl通讯(宁波)有限公司 Charger detecting system and detecting method thereof and mobile terminal
CN104411003A (en) * 2014-11-06 2015-03-11 深圳市广和通无线通信软件有限公司 Dormancy wakeup control method and system of wireless communication equipment
CN104408015A (en) * 2014-11-06 2015-03-11 深圳市广和通无线通信软件有限公司 USB (universal serial bus) mode adaptive method of communication module
CN104408015B (en) * 2014-11-06 2017-11-03 深圳市广和通无线通信软件有限公司 The USB mode adaptive approach of communication module
CN104539318A (en) * 2014-12-11 2015-04-22 飞天诚信科技股份有限公司 Bluetooth switching device and work method thereof
CN105071489A (en) * 2015-08-25 2015-11-18 广东欧珀移动通信有限公司 Charging method and apparatus of terminal having data exchange function
WO2017041461A1 (en) * 2015-09-10 2017-03-16 深圳市中兴微电子技术有限公司 Efficient universal serial bus utilization method and universal serial bus device
CN105573879A (en) * 2016-01-04 2016-05-11 浙江德景电子科技有限公司 Method and device for separated detection of intelligent terminal USB and charger interface
CN105573879B (en) * 2016-01-04 2019-06-25 浙江德景电子科技有限公司 A kind of method and apparatus of intelligent terminal USB, charger interface separation detection

Also Published As

Publication number Publication date
CN101702146B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN101702146B (en) The method of distinguishing charger and data line of universal serial bus and unit
CN100495377C (en) Method for inspecting type of connected peripheral apparatus and terminal interface
CN102393837B (en) USB charger recognition device and method
CN103064489B (en) A kind of method and terminal of carrying out internal circuit selection according to USB interface state
CN102231543B (en) System capable of identifying charging capability of charger and charging method thereof
EP2480043A1 (en) Method and device for identifying universal serial bus (usb) insertion or charger insertion of mobile terminal
TWI398759B (en) Power supply device, portable electronic apparatus and related method for determining types of a power supply device
US8683087B2 (en) Mobile device auto detection apparatus and method
CN101320080B (en) Apparatuses and methods for detecting power source
CN101383627B (en) Device and method for terminal charger charging, USB charging and data communication
CN110829523B (en) Electronic equipment and reverse charging method
US20140340026A1 (en) Input-output circuit
CN101102119B (en) A charging detection circuit of appliance device and charging detection method
CN103019991A (en) Interface system, switching method, USB key and UART terminal
CN101267120B (en) Method for identifying power device and its circuit
US20120256596A1 (en) Input-output circuit
EP4119965A1 (en) Charging test apparatus and method
CN101989751B (en) Power supply device, portable electronic device and related judgment method
CN202798035U (en) Charging mode detection circuit and mobile terminal
CN106797414A (en) The leakage current detection circuit and terminal of a kind of terminal
CN105824732A (en) USB detection method and detection system
US20070103115A1 (en) Function-switching type linking apparatus
TWI459190B (en) Power supply device, portable electronic apparatus and related method for determining types of a power supply device
CN106451617A (en) Electronic device and charging method thereof
CN111813634A (en) Identification device for type of USB device interface and terminal device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201204

Address after: No.602, 6 / F, shining building, 35 Xueyuan Road, Haidian District, Beijing 100191

Patentee after: BEIJING ZHONGXINGTIANSHI TECHNOLOGY Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor

Patentee before: Vimicro Corp.