CN103186483B - Terminal, for its OTG function and the executed in parallel method of charge function - Google Patents

Terminal, for its OTG function and the executed in parallel method of charge function Download PDF

Info

Publication number
CN103186483B
CN103186483B CN201110445514.4A CN201110445514A CN103186483B CN 103186483 B CN103186483 B CN 103186483B CN 201110445514 A CN201110445514 A CN 201110445514A CN 103186483 B CN103186483 B CN 103186483B
Authority
CN
China
Prior art keywords
interface
usb
wall
type
terminal
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.)
Active
Application number
CN201110445514.4A
Other languages
Chinese (zh)
Other versions
CN103186483A (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.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201110445514.4A priority Critical patent/CN103186483B/en
Publication of CN103186483A publication Critical patent/CN103186483A/en
Application granted granted Critical
Publication of CN103186483B publication Critical patent/CN103186483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a kind of OTG function for terminal and the executed in parallel method of charge function, comprise the steps: that USB according to terminal accesses the type of the data wire identifying that interface judges that terminal accesses;If the type of data wire that terminal accesses is OTG and charging data line, then detects described first wall and fill identification interface and described second wall fills identification interface, and fill identification interface according to described first wall and described second wall fills identification interface and judges charge type;If the type of the data wire that terminal accesses is USB data line, then detects described USB anode interface and described USB negative pole interface, and judge charge type according to described USB anode interface and described USB negative pole interface.The invention also discloses a kind of terminal.The present invention can realize OTG function and charge function executed in parallel.

Description

Terminal, for its OTG function and the executed in parallel method of charge function
Technical field
The present invention relates to communication technical field, the OTG function particularly to a kind of terminal and being used for this terminal and charging The executed in parallel method of function.
Background technology
Panel computer (Tablet Personal Computer is called for short Tablet PC, Flat Pc, Tablet, Slates), It is a kind of small-sized, PC of being convenient for carrying, using touch screen as basic input equipment.The touch of panel computer Screen allows user to carry out operation by pointer or digital pen, thus instead of traditional keyboard or mouse.User can To carry out input behaviour by the soft keyboard on built-in handwriting recognition, screen, speech recognition or a real keyboard Make.
Along with having an effect of all big enterprises and pursuing of user, panel computer becomes more and more popular, and market share amount is increasing. But panel computer is due to itself the most slim characteristic, determines its flying power the strongest.Traditional panel computer Having input and output (Input/Output, an IO) interface, user can use OTG function by this I/O interface Or it is charged, the inventors found that: the panel computer of traditional only one of which I/O interface is using During OTG (On-The-Go) function, the D+ of USB interface, D-coverlet is exclusive to be used, it is impossible to realize charge type Judge, thus charge function can not be performed, bring great inconvenience to user.
Summary of the invention
The purpose of the present invention is intended at least solve one of above-mentioned technological deficiency.
To this end, the first of the present invention purpose is to provide the parallel of a kind of OTG function for terminal and charge function Execution method, the method can realize OTG function and charge function executed in parallel.Second object of the present invention It is to provide a kind of terminal.
For reaching above-mentioned purpose, the embodiment of a first aspect of the present invention proposes a kind of OTG function for terminal and fills The executed in parallel method of Electricity Functional, comprises the steps: that the USB according to terminal accesses and identifies that interface judges that terminal accesses The type of data wire, wherein, described terminal is provided with universal input output GPIO interface equipment, described It is provided with described USB access on GPIO interface equipment and identifies that interface and the first wall fill identification interface, the second wall fills knowledge Other interface, USB anode interface and USB negative pole interface;If the type of the data wire that terminal accesses is OTG and fills Electricity data wire, then detect described first wall and fill identification interface and described second wall fills identification interface, and according to described the One wall fills identification interface and described second wall fills identification interface and judges charge type;If the class of the data wire that terminal accesses Type is USB data line, then detect described USB anode interface and described USB negative pole interface, and according to described USB Anode interface and described USB negative pole interface judge charge type.
The OTG function for terminal according to embodiments of the present invention and the executed in parallel method of charge function, by end GPIO interface equipment is set on end, and USB access identification interface and the first wall are set on GPIO interface equipment Fill identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface, such that it is able to pass through USB The type of the data wire that the terminal that judges access identification interface accesses, and according to described USB anode interface and USB negative pole Interface realizes the identification to charge type, therefore can realize OTG function and charging by GPIO interface equipment simultaneously Function, it is achieved thereby that OTG function and the executed in parallel of charge function.
The embodiment of second aspect present invention provides a kind of terminal, including I/O port female seat, is used for accessing data wire;Logical With input and output GPIO interface equipment, described GPIO interface equipment is provided with USB and accesses and identify interface, described First wall fills identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface;Control module, Described control module is connected with described GPIO interface equipment, identifies that interface judges terminal for accessing according to described USB The type of the data wire accessed, and fill identification interface, institute according to the type of the data wire judged, described first wall State that the second wall fills identification interface, described USB anode interface and described USB negative pole interface judge charge type.
Terminal according to embodiments of the present invention, arranges GPIO interface equipment in terminal, and on GPIO interface equipment Arrange USB access identify that interface and the first wall fill identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface, such that it is able to accessed the type of the data wire identifying that interface judges that terminal accesses by USB, and root Realize the identification to charge type according to described USB anode interface and USB negative pole interface, therefore connect by original IO Mouthful can realize OTG function, and can be with charge function by GPIO interface equipment, it is achieved thereby that OTG Function and the executed in parallel of charge function.
Aspect and advantage that the present invention adds will part be given in the following description, and part will become from the following description Obtain substantially, or recognized by the practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or that add aspect and advantage will become bright from the following description of the accompanying drawings of embodiments Aobvious and easy to understand, wherein:
Fig. 1 is the stream of the executed in parallel method of the OTG function for terminal according to the embodiment of the present invention and charge function Journey block diagram;
Fig. 2 is the flow chart of the executed in parallel method of the OTG function according to the embodiment of the present invention and charge function;
Fig. 3 is the schematic diagram of the structure of the terminal according to the embodiment of the present invention;
Fig. 4 is the schematic diagram of the I/O port pin of the GPIO interface equipment according to the embodiment of the present invention;
Fig. 5 is the structured flowchart of the control module according to the embodiment of the present invention;
Fig. 6 is the circuit diagram of the USB data line connected mode according to the embodiment of the present invention;
Fig. 7 is the OTG according to the embodiment of the present invention and the circuit diagram of charging data line connected mode;
Fig. 8 is the OTG interface according to the embodiment of the present invention and the schematic diagram of charging inlet parallel line connected mode;And
Fig. 9 is that middle D+ and D-in the GPIO interface EM equipment module USB interface according to the embodiment of the present invention realizes filling The circuit diagram of electro-detection.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the drawings, the most from start to finish Same or similar label represents same or similar element or has the element of same or like function.Below by ginseng The embodiment examining accompanying drawing description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
With reference to explained below and accompanying drawing, it will be clear that these and other aspects of embodiments of the invention.Describe at these With in accompanying drawing, specifically disclose some particular implementation in embodiments of the invention, represent and implement the present invention's Some modes of the principle of embodiment, but it is to be understood that the scope of embodiments of the invention is not limited.On the contrary, All changes in the range of spirit that embodiments of the invention include falling into attached claims and intension, amendment and Equivalent.
Below with reference to Fig. 1 and Fig. 2, the OTG function for terminal according to embodiments of the present invention and charge function are described Executed in parallel method.Wherein, terminal can be mobile phone, panel computer or other there is the electronic equipment of OTG function.
As it is shown in figure 1, the OTG function for terminal of embodiment of the present invention offer and the executed in parallel side of charge function Method, comprises the steps:
Step S101, accesses the type of the data wire identifying that interface judges that terminal accesses according to the USB of terminal, if end Terminate into the type of data wire be OTG and charging data line, then perform step S102, if the data that terminal accesses The type of line is USB data line, then perform step S103.
Terminal is provided with GPIO (General Purpose Input Output, universal input exports) interface equipment. In the present embodiment, GPIO interface equipment includes 30 pins, is the I/O port of 30pin, can charge with compatible terminal Interface design, simultaneously ensure have enough pins be used as compatible design.
GPIO interface equipment is provided with USB access and identifies that interface USB_ID, the first wall fill identification interface WALL_S1, the second wall fill identification interface WALL_S1, WALL_S2, USB anode interface USB_D+ and USB Negative pole interface USB_D-.Wherein, WALL_S1 and WALL_S2 simulate respectively USB interface USB_D+ and USB_D-。
Accessed data wire type can be judged according to the low and high level of the USB_ID detected, in the present embodiment, If USB_ID is low level, i.e. USB_ID ground connection, then judge the type of the data wire that terminal accesses be OTG and Charging (OTG+WALL charge) data wire.USB_ID is that low level explanation OTG function is opened, now USB_D+ Occupied with USB_D-, the identification to charge type can not be realized by above-mentioned USB_D+ and USB_D-.
If USB_ID is high level, then judge that the type of the data wire that terminal accesses is USB data line, the most commonly Data wire.USB_ID is that high level explanation is not turned on OTG function, then can pass through USB_D+ and USB_D- Realize the identification to charge type.
Step S102, if the type that terminal accesses data wire is OTG and charging data line, then detects the first wall and fills knowledge Other interface WALL_S1 and the second wall fill identification interface WALL_S2, judge according to WALL_S1 and WALL_S2 Charge type.
The level of detection WALL_S1 and WALL_S2.In the present embodiment, when WALL_S1 and WALL_S2 is short When connecing, i.e. when the level of WALL_S1 and WALL_S2 is equal, it is judged that the charger of access is wall charger, fills Electricity type is wall charging.When WALL_S1 is low level and WALL_S2 is high level, it is judged that the charging of access Device is the main equipment (USB Host) of USB, and charge type is USB charging.Thus, data wire is accessed when terminal Type be OTG and charging data line, utilize USB_D+ and USB_D-to realize OTG function, can utilize simultaneously WALL_S1 and WALL_S2 realizes the judgement to charge type so that OTG function and charge function can be parallel Perform.
Step S103, if the type that terminal accesses data wire is USB data line, then detection USB anode interface USB_D+ and USB negative pole interface USB_D-, judges charge type according to USB_D+ and USB_D-.
The level of detection USB_D+ and USB_D-.In the present embodiment, when USB_D+ and USB_D-short circuit, i.e. When the level of USB_D+ and USB_D-is equal, it is judged that the charger of access is wall charger, charge type is that wall fills Charging.When USB_D+ is high level and USB_D-is low level, it is judged that the charger of access is that the master of USB sets Standby (USB_Host), charge type is USB charging.Now, owing to not using OTG function, thus do not have Take USB_D+ and USB_D-, utilize USB_D+ and USB_D-can realize the judgement to charge type.
Below with reference to Fig. 2, the judge process of the charge type of the embodiment of the present invention is described in detail.
Step S201, arranges the USB_VBUS on GPIO interface equipment effective.
Arranging USB_VBUS is high level, and now USB_VBUS is effective, can enable GPIO interface equipment The pull-up of the level of interface and drop-down.
Step S202, it is judged that the level of USB_ID is high level or low level, if USB_ID is high level, Then perform step S203, if USB_ID is low level, then perform step S204.
If USB_ID is high level, i.e. USB_ID=1, then judge that the data wire accessed is USB data line.
If USB_ID is low level, i.e. USB_ID=0, then judge that the data wire accessed is OTG+WALL charge Data wire.
Step S203, it is judged that USB_D+ and USB_D-whether short circuit, if USB_D+=USB_D-, then performs Step S208, otherwise performs step S205.
Step S204, it is judged that WALL_S1 and WALL_S2 whether short circuit, if WALL_S1=WALL_S2, Then perform step S208, otherwise perform step S205.
Step S205, it is judged that charge type is USB charging, performs step S206.
USB_D+ is high level and time USB_D-is low level, or WALL_S1 is low level and WALL_S2 During for high level, it is judged that the charger of access is USB Host, charge type is USB charging.
Step S206, is set to high level by CHG_5V_EN, performs step S207.
Step S207, platform USB charges.
The charging to terminal is realized by USB mode.
Step S208, it is judged that charge type is wall charging, performs step S209.
When the level of USB_D+ and USB_D-is equal, or when the level of WALL_S1 and WALL_S2 is equal, Judging that the charger accessed is wall charger, charge type is wall charging.
Step S209, is set to low level by CHG_5V_EN, performs step S210.
Step S210, large current charge.
Access line voltage, terminal is carried out the charging of big electric current.
The OTG function for terminal according to embodiments of the present invention and the executed in parallel method of charge function, by end GPIO interface equipment is set on end, and USB access identification interface and the first wall are set on GPIO interface equipment Fill identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface, such that it is able to pass through USB The type of the data wire that the terminal that judges access identification interface accesses, and according to described USB anode interface and USB negative pole Interface realizes the identification to charge type, therefore can realize OTG function and charging by GPIO interface equipment simultaneously Function, it is achieved thereby that OTG function and the executed in parallel of charge function, such that it is able to solve due to the continuation of the journey energy of terminal The problem that cannot use OTG function during the charging that power deficiency causes.The OTG function for terminal of the present invention and filling The executed in parallel method of Electricity Functional can carry out wall by common USB data line to terminal and charge and USB charging, Can carry out when using OTG data wire the most again simultaneously wall charging and the parallel or USB charging of OTG function and OTG function parallel.The present invention can realize the judgement to charge type by the height of the level of corresponding interface, It is made without data transmission.
Below with reference to Fig. 3 to Fig. 9, terminal 1000 according to embodiments of the present invention is described.
As it is shown on figure 3, the terminal 1000 that the embodiment of the present invention provides includes that the output of I/O port female seat 100, universal input connects Mouth GPIO interface equipment 200 and control module 300.Wherein, I/O port female seat 100 is used for accessing data wire, GPIO Be provided with on interface equipment 200 USB access identify interface USB_ID, the first wall fill identification interface WALL_S1, the Two walls fill identification interface WALL_S2, USB anode interface USB_D+ and USB negative pole interface USB_D-, control Module 300 is connected with GPIO interface equipment 200, accesses for the USB according to terminal and identifies that interface USB_ID sentences The type of the data wire that disconnected terminal accesses, and fill identification interface according to type, first wall of the data wire judged WALL_S1, the second wall fill identification interface WALL_S2, USB anode interface USB_D+ and USB negative pole interface USB_D-judges charge type.
As shown in Figure 4, GPIO interface equipment 200 includes 30 pins, is the I/O port of 30pin, such that it is able to The Interface design of the charging of compatible terminal, ensures have enough pins to be used as compatible design simultaneously.Specifically, GPIO connects The pin 1 of jaws equipment 200 is GND, pin 2 is DDC/CEC ground connection, pin 3 is HDMI_5V/OTG_5V, Pin 4 is HDMI_HPD, pin 5 is HDMI_SDA, pin 6 is HDMI_SCL, pin 7 is CEC, Pin 8 be TMDS clock signal-, pin 9 be TMDS signal shielding line all the time, pin 10 be TMDS clock Signal+, pin 11 be GND, pin 12 be TMDS data 0-, pin 13 be TMDS data 0 shielding line, Pin 14 be TMDS data 0+, pin 15 and pin 16 be GND, pin 17 be TMDS data 1-, pipe Foot 18 be TMDS data 1 shielding line, pin 19 be TMDS data 1+, pin 20 be TMDS data 2-, Pin 21 be TMDS data 2 shielding line, pin 22 be TMDS data 2+, pin 23, pin 24 and pin 28 be USB_VBUS, pin 25 be USB_D-, pin 26 be USB_ID, pin 27 be USB_D+, pipe Foot 29 is WALL_S1, pin 30 is WALL_S2.
Wherein, WALL_S1 and WALL_S2 simulates USB_D+ and USB_D-of USB interface respectively.
As it is shown in figure 5, control module 300 includes the first detector unit 310 and the first judging unit 320, wherein, One detector unit 310 is for detecting the level of USB_ID, and the first judging unit 320 is for according to the first detector unit The testing result of 310 judges.
Specifically, the first detector unit 310 detects the level of USB_ID, and connects according to the electrical level judging of USB_ID The type of the data wire entered.If USB_ID is high level, then the first judging unit 320 judges the number that terminal accesses It is USB data line, i.e. normal data line according to the type of line.USB_ID is that high level explanation is not turned on OTG function, Then can realize the identification to charge type by USB_D+ and USB_D-.Fig. 6 shows that external connection line is USB The schematic diagram of line.Now, USB_D+ and USB_D-is not taken by OTG interface, it is possible to achieve usb communication merit Energy and charge function.
In one embodiment of the invention, control module 300 also includes that the second detector unit 330 and second judges list Unit 340, wherein, the second detector unit 330 is for judging, at the first judging unit 320, the data that I/O port female seat accesses Detecting USB anode interface and USB negative pole interface when the type of line is USB data line, the second judging unit 340 is used In judging charge type according to USB anode interface and USB negative pole interface.
Specifically, the second detector unit 330 is judging that the type of data wire that I/O port female seat 100 accesses is USB number During according to line, detect USB_D+ and USB_D-.Second judging unit 340 judges to fill according to USB_D+ and USB_D- Electricity type.If USB_D+ and USB_D-short circuit, then the second judging unit 340 judges that the charger accessed is that wall fills Charger, charge type is wall charging.If USB_D+ is high level and USB_D-is low level, then second Judging unit 340 judges the main equipment as USB accessed, and charge type is USB charging.
Fig. 7 shows the schematic diagram that external connection line is OTG line.Now, USB_ID pin is coupled directly to ground, The power supply triggering OTG_5V enables.OTG_5V is connected on the USB_VUSB pin of OTG interface, to outside Equipment is powered.But, owing to now USB_D+ and USB_D-is occupied, OTG function can only be realized, it is impossible to real Existing usb communication function and charge function.
First detector unit 310 detects when USB_ID is low level, i.e. USB_ID ground connection, then first judges list The type of the data wire that the terminal that judges unit's block 320 accesses is OTG and charging (OTG+WALL charge) data wire. USB_ID is that low level explanation OTG function is opened, and now USB_D+ and USB_D-is occupied, by above-mentioned USB_D+ and USB_D-can not realize the identification to charge type.Fig. 8 shows OTG interface and charging inlet also The circuit diagram of line connected mode.OTG_5V is connected to USB_VBUS, USB_D+ and the USB_D-of OTG interface It is connected respectively to D+ and D-of OTG interface, USB_ID pin ground connection trigger OTG_5V and power enable.Thus When accessing external equipment, it is powered to external equipment, makes external equipment normally to use.GPIO interface equipment 200 USB_VBUS pin be connected to the USB_VBUS pin of charging inlet, GPIO interface equipment 200 WALL_S1 and WALL_S2 is connected respectively to USB_D-and USB_D+ of charging inlet.
Second detector unit 330 is judging that the type of data wire that I/O port female seat 100 accesses is OTG and charge data During line, detect WALL_S1 and WALL_S2.Second judging unit 340 is according to WALL_S1 and WALL_S2 Judge charge type.
If charging inlet is connected on wall charger by USB line, USB_D+ and USB_D-is shorted, WALL_S1 and WALL_S2 short circuit, i.e. WALL_S1=WALL_S2, the second judging unit 340 are judged Charge type is wall charging.If WALL_S1 is low level and WALL_S2 is high level, then second judge single Unit 340 judges that charge type is USB charging.
In one embodiment of the invention, GPIO interface equipment also includes pull-up resistor R1 and pull down resistor R2.Its In, pull-up resistor R1 respectively with pin and the internal electric source VCC phase of GPIO interface equipment 200 of WALL_S2 Even.As it is shown in figure 9, pull down resistor R2 respectively with being internally connected of WALL_S1 and GPIO interface equipment 200. Low level it is respectively at the idling mode by pull-up resistor R1 and pull down resistor R2, WALL_S1 and WALL_S2 And high level.Charging inlet connect USB main equipment (USB Host) time, WALL_S1 be low level and WALL_S2 is high level, and the second judging unit 340 judges that charge type is USB charging.
In one embodiment of the invention, after the second judging unit 340 judges that charge type is wall charging, will CHG_5V_EN is set to low level, terminal accesses line voltage, thus terminal carries out the charging of big electric current. After the second judging unit 340 judges that charge type is USB charging, CHG_5V_EN is set to high level, logical Cross USB mode and realize the charging to terminal.
Terminal according to embodiments of the present invention, by arranging GPIO interface equipment in terminal, and sets at GPIO interface USB access is set on Bei and identifies that interface and the first wall fill identification interface, the second wall fills identification interface, USB positive pole connects Mouthful and USB negative pole interface, such that it is able to accessed the type of the data wire identifying that interface judges that terminal accesses by USB, And realize the identification to charge type according to described USB anode interface and USB negative pole interface, therefore connect by GPIO Jaws equipment can realize OTG function and charge function simultaneously, it is achieved thereby that OTG function and charge function is parallel Perform, such that it is able to the problem solving to use OTG function during the charging caused due to the flying power deficiency of terminal. The terminal of the present invention can carry out wall charging by common USB data line and USB charges, and can make again simultaneously Parallel or the USB charging of wall charging and OTG function and the parallel of OTG function is carried out during with OTG data wire. The present invention can realize the judgement to charge type by the height of the level of corresponding interface, it is not necessary to carries out data biography Defeated.
In flow chart or at this, any process described otherwise above or method description are construed as, and expression includes One or more is for realizing the module of code of executable instruction of step of specific logical function or process, fragment Or part, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not by shown or The order discussed, including according to involved function by basic mode simultaneously or in the opposite order, performs function, This should be understood by embodiments of the invention person of ordinary skill in the field.
Represent in flow charts or the logic described otherwise above at this and/or step, for example, it is possible to be considered as to use In the sequencing list of the executable instruction realizing logic function, may be embodied in any computer-readable medium, For instruction execution system, device or equipment (system such as computer based system, including processor or other can With from instruction execution system, device or equipment instruction fetch the system performing instruction) use, or combine these instructions and hold Row system, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be any can comprise, Store, communicate, propagate or transmission procedure for instruction execution system, device or equipment or combines these instructions and performs system System, device or equipment and the device that uses.More specifically example (non-exhaustive list) bag of computer-readable medium Include following: there is the electrical connection section (electronic installation) of one or more wiring, portable computer diskette box (magnetic device), Random access memory (RAM), read only memory (ROM), erasable edit read only memory (EPROM Or flash memory), fiber device, and portable optic disk read only memory (CDROM).It addition, computer Computer-readable recording medium can even is that paper or other the suitable media that can print described program thereon, because can be the most logical Cross and paper or other media are carried out optical scanning, then carry out editing, interpret or carrying out with other suitable methods if desired Process and electronically obtain described program, be then stored in computer storage.
Should be appreciated that each several part of the present invention can realize by hardware, software, firmware or combinations thereof.Upper Stating in embodiment, multiple steps or method in memory and can be performed by suitable instruction execution system with storage Software or firmware realize.Such as, if realized with hardware, with the most the same, can use this Any one or their combination in following technology known to field realize: have for data signal is realized logic The discrete logic of the logic gates of function, has the special IC of suitable combination logic gate circuit, can Programming gate array (PGA), field programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that and realize all or part of step that above-described embodiment method is carried The program that can be by completes to instruct relevant hardware, and described program can be stored in a kind of computer-readable storage In medium, this program upon execution, including one or a combination set of the step of embodiment of the method.
Additionally, each functional unit in each embodiment of the present invention can be integrated in a processing module, it is also possible to It is that unit is individually physically present, it is also possible to two or more unit are integrated in a module.Above-mentioned integrated Module both can realize to use the form of hardware, it would however also be possible to employ the form of software function module realizes.Described integrated If module realize using the form of software function module and as independent production marketing or when using, it is also possible to storage In a computer read/write memory medium.
Storage medium mentioned above can be read only memory, disk or CD etc..
In the description of this specification, reference term " embodiment ", " some embodiments ", " example ", " specifically show Example " or the description of " some examples " etc. means to combine this embodiment or example describes specific features, structure, material or Person's feature is contained at least one embodiment or the example of the present invention.In this manual, the signal to above-mentioned term Property statement be not necessarily referring to identical embodiment or example.And, the specific features of description, structure, material or Feature can combine in any one or more embodiments or example in an appropriate manner.
Although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, permissible Understand these embodiments can be carried out without departing from the principles and spirit of the present invention multiple change, amendment, Replacing and modification, the scope of the present invention is limited by claims and equivalent thereof.

Claims (11)

1. the OTG function for terminal and the executed in parallel method of charge function, it is characterised in that include as follows Step:
The type of the data wire that the terminal that judges the USB access identification interface according to terminal accesses, wherein, in described terminal On be provided with universal input output GPIO interface equipment, described GPIO interface equipment is provided with described USB access Identify that interface and the first wall fill identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface;
If the type of data wire that terminal accesses is OTG and charging data line, then detects described first wall and fill identification and connect Mouthful and described second wall fill identification interface, and fill identification interface according to described first wall and described second wall fills identification and connects Mouth judges charge type;
If the type of the data wire that terminal accesses is USB data line, then detect described USB anode interface and described USB Negative pole interface, and judge charge type according to described USB anode interface and described USB negative pole interface.
2. executed in parallel method as claimed in claim 1, it is characterised in that the described USB according to terminal accesses and knows The type of the data wire that the terminal that judges other interface accesses, comprises the steps:
When described USB accesses and identifies that interface is low level, it is judged that the type of the data wire that described terminal accesses is OTG And charging data line;
When described USB accesses and identifies that interface is high level, it is judged that the type of the data wire that described terminal accesses is USB Data wire.
3. executed in parallel method as claimed in claim 2, it is characterised in that the data wire accessed when described terminal When type is OTG and charging data line,
If described first wall fills identification interface and described second wall fills identification interface short circuit, it is judged that described charge type is Wall charging;
If described first wall fill identification interface be low level and described second wall to fill identification interface be high level, it is judged that institute Stating charge type is USB charging.
4. executed in parallel method as claimed in claim 1, it is characterised in that the data wire accessed when described terminal When type is USB data line,
If described USB anode interface and described USB negative pole interface short circuit, it is judged that described charge type is wall charging;
If described USB anode interface is high level and described USB negative pole interface is low level, it is judged that described charge type Type is USB charging.
5. a mobile terminal, it is characterised in that including:
I/O port female seat, is used for accessing data wire;
Universal input output GPIO interface equipment, described GPIO interface equipment is provided with USB access identify interface, First wall fills identification interface, the second wall fills identification interface, USB anode interface and USB negative pole interface;
Control module, described control module is connected with described GPIO interface equipment, identifies for accessing according to described USB The type of the data wire that the terminal that judges interface accesses, and fill according to type, described first wall of the data wire judged Identify that interface, described second wall fill identification interface, described USB anode interface and described USB negative pole interface and judge charging Type.
6. mobile terminal as claimed in claim 5, it is characterised in that described control module includes: the first detection is single Unit and the first judging unit, wherein:
Described first detector unit detects described USB and accesses the level identifying interface;
Described first judging unit judges according to the testing result of the first detector unit, identifies when described USB accesses When interface is low level, the most described control module judges that the type of the data wire that described I/O port female seat accesses is OTG and fills Electricity data wire;When described USB accesses and identifies that interface is high level, the most described control module judges described I/O port female seat The type of the data wire accessed is USB data line.
7. mobile terminal as claimed in claim 6, it is characterised in that described control module also includes the second detection list Unit and the second judging unit, wherein:
At described first judging unit, described second detector unit judges that the type of data wire that described I/O port female seat accesses is When OTG and charging data line, detect described first wall fill identification interface and described second wall fill identification interface;
Described second judging unit fills identification interface according to described first wall and described second wall fills identification interface and judges charging Type.
8. mobile terminal as claimed in claim 7, it is characterised in that
In described second detector unit, described second judging unit detects that described first wall fills identification interface and described second Wall judges that described charge type is wall charging when filling identification interface short circuit;
Described second judging unit described second detector unit detect described first wall fill identification interface be low level and It is to judge during high level that described charge type is USB charging that described second wall fills identification interface.
9. mobile terminal as claimed in claim 8, it is characterised in that described GPIO interface equipment also includes:
Pull-up resistor, one end of described pull-up resistor fill with described first wall identification interface be connected, the other end and power supply phase Even;
Pull down resistor, one end of described pull down resistor fill with described second wall identification interface be connected, the other end and signal ground It is connected.
10. mobile terminal as claimed in claim 7, it is characterised in that
Described second detector unit is additionally operable to judge, at described first judging unit, data wire that described I/O port female seat accesses Type is to detect described USB anode interface and described USB negative pole interface during USB data line;
Described second judging unit is additionally operable to judge charge type according to described USB anode interface and described USB negative pole interface Type.
11. mobile terminals as claimed in claim 10, it is characterised in that
Described second judging unit detects described USB anode interface and described USB negative pole in described second detector unit Judge during interface short circuit that described charge type is wall charging;
In described second detector unit, described second judging unit detects that described USB anode interface is high level and described USB negative pole interface is to judge during low level that described charge type is USB charging.
CN201110445514.4A 2011-12-27 2011-12-27 Terminal, for its OTG function and the executed in parallel method of charge function Active CN103186483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110445514.4A CN103186483B (en) 2011-12-27 2011-12-27 Terminal, for its OTG function and the executed in parallel method of charge function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110445514.4A CN103186483B (en) 2011-12-27 2011-12-27 Terminal, for its OTG function and the executed in parallel method of charge function

Publications (2)

Publication Number Publication Date
CN103186483A CN103186483A (en) 2013-07-03
CN103186483B true CN103186483B (en) 2016-08-17

Family

ID=48677657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110445514.4A Active CN103186483B (en) 2011-12-27 2011-12-27 Terminal, for its OTG function and the executed in parallel method of charge function

Country Status (1)

Country Link
CN (1) CN103186483B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106233271B (en) * 2014-12-25 2019-06-07 华为技术有限公司 A kind of identifying system and device of USB OTG equipment
CN104978300B (en) * 2015-07-16 2019-04-12 Oppo广东移动通信有限公司 Mobile terminal and its detection method being connect with external equipment and device
CN105068954B (en) * 2015-08-25 2018-05-08 广东欧珀移动通信有限公司 The communication means and device of terminal interface
CN106684955B (en) * 2015-11-11 2019-10-15 小米科技有限责任公司 Charger, electronic equipment and charging method
CN105515115B (en) * 2016-01-15 2018-03-16 广东欧珀移动通信有限公司 Mobile terminal is the method and charging device of other mobile terminals charging
CN105954614A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Method and device for prompting data line type, and terminal device
CN106026228B (en) * 2016-05-26 2019-02-15 维沃移动通信有限公司 A kind of charging USB line, adapter and mobile terminal
CN106484126A (en) * 2016-09-12 2017-03-08 广东欧珀移动通信有限公司 A kind of OTG function open method and terminal
CN106571657B (en) * 2016-09-28 2020-03-06 上海创功通讯技术有限公司 Terminal, converter, and connection conversion system and method
US20200132734A1 (en) * 2016-11-23 2020-04-30 Huawei Technologies Co., Ltd. Detection circuit and detection method for on-the-go device, and terminal
CN107145456B (en) * 2017-04-10 2021-05-04 硅谷数模半导体(北京)有限公司 Method, device and system for identifying self-connection of equipment
CN107632266B (en) * 2017-09-08 2020-10-09 奇酷互联网络科技(深圳)有限公司 Mobile terminal, test system and test method of mobile terminal
CN107632949B (en) * 2017-09-30 2019-10-25 Oppo广东移动通信有限公司 Data line identification circuit, method and terminal
CN108072775B (en) * 2017-11-06 2020-08-07 Oppo广东移动通信有限公司 Testing device of mobile terminal
CN108446246B (en) * 2018-02-27 2021-09-21 努比亚技术有限公司 Method and device for realizing OTG function
CN110544963B (en) * 2018-05-29 2021-05-04 青岛海信移动通信技术股份有限公司 Electronic equipment switching circuit
CN109189707A (en) * 2018-08-24 2019-01-11 Oppo广东移动通信有限公司 The detection circuit and detection method of USB device type
CN109918327A (en) * 2019-03-27 2019-06-21 深圳传音通讯有限公司 OTG reversely charging electric current improvement method and OTG mobile phone

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340110A (en) * 2008-04-29 2009-01-07 北京中星微电子有限公司 USB OTC device power source and implementing method thereof
CN101383627A (en) * 2007-09-04 2009-03-11 大唐移动通信设备有限公司 Device and method for terminal charger charging, USB charging and data communication
CN201260086Y (en) * 2008-08-01 2009-06-17 青岛海信移动通信技术股份有限公司 Mobile terminal and charging detection device thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7581970B2 (en) * 2007-11-16 2009-09-01 Sony Ericsson Mobile Communications Ab Multipurpose universal serial bus cable
CN101674366B (en) * 2009-09-19 2012-03-28 惠州Tcl移动通信有限公司 Mobile terminal USB, or charger inserting identification method and identification device thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383627A (en) * 2007-09-04 2009-03-11 大唐移动通信设备有限公司 Device and method for terminal charger charging, USB charging and data communication
CN101340110A (en) * 2008-04-29 2009-01-07 北京中星微电子有限公司 USB OTC device power source and implementing method thereof
CN201260086Y (en) * 2008-08-01 2009-06-17 青岛海信移动通信技术股份有限公司 Mobile terminal and charging detection device thereof

Also Published As

Publication number Publication date
CN103186483A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
CN103186483B (en) Terminal, for its OTG function and the executed in parallel method of charge function
CN101694889B (en) Intelligent charging method and device
CN102684270B (en) Method for identifying type of universal serial bus (USB) chargers and USB device
CN104951034B (en) Mobile terminal and its USB interface condition control method and device
CN106571657B (en) Terminal, converter, and connection conversion system and method
KR101494900B1 (en) Mobile phone and method for charging through discernment charging cable
TWI384721B (en) Charger and portable device having the same
US8200852B2 (en) Multi-mode dongle for peripheral devices and associated methods
WO2013168289A1 (en) Electronic device and control method therefor
CN101989749B (en) Charging device and charging method
CN108845655B (en) Electronic equipment control method and device, control circuit and electronic equipment
CN103064489A (en) Method for selecting internal circuit according to conditions of universal serial bus (USB) interface and terminal
CN108808785A (en) Electronic equipment charge control method, device, electronic equipment and storage medium
US20140084850A1 (en) Host apparatus, user terminal apparatus, method of controlling charger, and method of communication using the same
US20200117633A1 (en) Methods and apparatus to enable status change detection in a low power mode of a microcontroller unit
CN106230070A (en) A kind of charging method and device
US8941361B2 (en) Computer system and control method thereof
CN106786960A (en) Charge control method, device and terminal
CN106329630A (en) Charging method and device
CN106292989A (en) A kind of information processing method and electronic equipment
CN103219042B (en) Circuit and the memory circuitry of burning program is realized by USB interface
CN203643893U (en) Terminal equipment
CN102005786B (en) Battery charger and portable device with battery charger
US20110040505A1 (en) Testing System and Method for Testing Charging Circuit
US9678538B2 (en) Electronic apparatus

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