CN103186483A - Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same - Google Patents

Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same Download PDF

Info

Publication number
CN103186483A
CN103186483A CN2011104455144A CN201110445514A CN103186483A CN 103186483 A CN103186483 A CN 103186483A CN 2011104455144 A CN2011104455144 A CN 2011104455144A CN 201110445514 A CN201110445514 A CN 201110445514A CN 103186483 A CN103186483 A CN 103186483A
Authority
CN
China
Prior art keywords
usb
interface
wall
charging
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
CN2011104455144A
Other languages
Chinese (zh)
Other versions
CN103186483B (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

Images

Landscapes

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

Abstract

The invention discloses an OTG (On-The-Go) function-charging function paralleled execution method used for a terminal. The method comprises the steps as follows: judging the type of a data line accessed to the terminal by a USB (Universal Serial Bus) accessing identifying interface of the terminal, detecting a first wall charging identifying interface and a second wall charging identifying interface if the type of a data line accessed to the terminal is an OTG-charging data line, judging the charging type according to the first wall charging identifying interface and the second wall charging identifying interface, detecting a USB anode interface and a USB cathode interface if the type of a data line accessed to the terminal is a USB data line, and judging the charging type according to the USB anode interface and the USB cathode interface. The invention further discloses the terminal. According to the invention, parallel execution of the OTG function and the charging function is realized.

Description

Terminal, the OTG function that is used for it and the executed in parallel method of charge function
Technical field
The present invention relates to communication technical field, particularly a kind of terminal and be used for the OTG function of this terminal and the executed in parallel method of charge function.
Background technology
Panel computer (Tablet Personal Computer is called for short Tablet PC, Flat Pc, Tablet, Slates) is a kind of small-sized, PC of being convenient for carrying, with touch-screen as basic input equipment.The touch-screen of panel computer allows the user to carry out operation by pointer or digital pen, thereby has replaced traditional keyboard or mouse.The user can carry out input operation by built-in handwriting recognition, soft keyboard, speech recognition or a real keyboard on the screen.
Along with having an effect of all big enterprises and pursuing of user, panel computer becomes more and more popular, and the market occupancy volume is increasing.But panel computer is because itself light and handy slim characteristic has determined its flying power not strong.Traditional panel computer has an input and output (Input/Output, IO) interface, the user can use the OTG function by this IO interface or it is charged, the present inventor finds: traditional panel computer that has only an IO interface is when using OTG (On-The-Go) function, the D+ of USB interface, the D-coverlet is monopolized usefulness, can not realize the judgement to the charging type, thereby can not carry out charge function, bring great inconvenience to the user.
Summary of the invention
Purpose of the present invention is intended to solve at least one of above-mentioned technological deficiency.
For this reason, it is a kind of for the OTG function of terminal and the executed in parallel method of charge function that first purpose of the present invention is to provide, and this method can realize the OTG function and executed in parallel charge function.Second purpose of the present invention is to provide a kind of terminal.
For achieving the above object, the embodiment of a first aspect of the present invention proposes a kind of for the OTG function of terminal and the executed in parallel method of charge function, comprise the steps: to insert the type that recognition interface is judged the data line that terminal inserts according to the USB of terminal, wherein, described terminal is provided with general input and output GPIO interfacing equipment, and described GPIO interfacing equipment is provided with described USB access recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface; If the type of the data line that terminal inserts is OTG and charging data line, detects then that described first wall fills recognition interface and described second wall fills recognition interface, and fill recognition interface and described second wall according to described first wall and fill recognition interface and judge the charging type; If the type of the data line that terminal inserts is the usb data line, then detects described USB anode interface and described USB negative pole interface, and judge the charging type according to described USB anode interface and described USB negative pole interface.
According to the OTG function that is used for terminal of the embodiment of the invention and the executed in parallel method of charge function, by the GPIO interfacing equipment is set in terminal, and arrange at the GPIO interfacing equipment that USB inserts recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface, thereby can insert the type that recognition interface is judged the data line that terminal inserts by USB, and realize identification to the charging type according to described USB anode interface and USB negative pole interface, therefore can realize OTG function and charge function simultaneously by the GPIO interfacing equipment, thereby realize the executed in parallel of OTG function and charge function.
The embodiment of second aspect present invention provides a kind of terminal, comprises IO mouth female seat, is used for inserting data line; General input and output GPIO interfacing equipment, described GPIO interfacing equipment are provided with USB and insert that recognition interface, described first wall fill recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface; Control module, described control module links to each other with described GPIO interfacing equipment, be used for inserting the type that recognition interface is judged the data line that terminal inserts according to described USB, and according to the type of the data line of judging, described first wall fill recognition interface, described second wall fills recognition interface, described USB anode interface and described USB negative pole interface and judges the charging type.
Terminal according to the embodiment of the invention, in terminal the GPIO interfacing equipment is set, and arrange at the GPIO interfacing equipment that USB inserts recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface, thereby can insert the type that recognition interface is judged the data line that terminal inserts by USB, and realize identification to the charging type according to described USB anode interface and USB negative pole interface, therefore can realize the function to OTG by original IO interface, and can charge function by the GPIO interfacing equipment, thereby have realized the executed in parallel of OTG function and charge function.
The aspect that the present invention adds and advantage part in the following description provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Description of drawings
Above-mentioned and/or the additional aspect of the present invention and advantage are from obviously and easily understanding becoming the description of embodiment below in conjunction with accompanying drawing, wherein:
Fig. 1 is the FB(flow block) according to the executed in parallel method of the OTG function that is used for terminal of the embodiment of the invention and charge function;
Fig. 2 is the process flow diagram according to the executed in parallel method of the OTG function of the embodiment of the invention and charge function;
Fig. 3 is the synoptic diagram according to the structure of the terminal of the embodiment of the invention;
Fig. 4 is the synoptic diagram according to the IO mouth pin of the GPIO interfacing equipment of the embodiment of the invention;
Fig. 5 is the structured flowchart according to the control module of the embodiment of the invention;
Fig. 6 is the circuit diagram according to the usb data line connected mode of the embodiment of the invention;
Fig. 7 is the circuit diagram according to the OTG of the embodiment of the invention and charging data line connected mode;
Fig. 8 is the synoptic diagram according to the OTG interface of the embodiment of the invention and charging inlet parallel line connected mode; And
Fig. 9 realizes the circuit diagram that charging detects according to the middle D+ in the GPIO interfacing equipment module USB interface of the embodiment of the invention and D-.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein identical or similar label is represented identical or similar elements or the element with identical or similar functions from start to finish.Be exemplary below by the embodiment that is described with reference to the drawings, only be used for explaining the present invention, and can not be interpreted as limitation of the present invention.
With reference to following description and accompanying drawing, these and other aspects of embodiments of the invention will be known.These describe and accompanying drawing in, some specific implementations in the embodiments of the invention are specifically disclosed, represent to implement some modes of the principle of embodiments of the invention, still should be appreciated that the scope of embodiments of the invention is not limited.On the contrary, embodiments of the invention comprise spirit and interior all changes, modification and the equivalent of intension scope that falls into institute's additional claims.
Describe according to the OTG function that is used for terminal of the embodiment of the invention and the executed in parallel method of charge function below with reference to Fig. 1 and Fig. 2.Wherein, terminal can have the electronic equipment of OTG function for mobile phone, panel computer or other.
As shown in Figure 1, the OTG function that is used for terminal that the embodiment of the invention provides and the executed in parallel method of charge function comprise the steps:
Step S101, USB according to terminal inserts the type that recognition interface is judged the data line that terminal inserts, if the type of the data line that terminal inserts is OTG and charging data line, then execution in step S102, if the type of the data line that terminal inserts is the usb data line, then execution in step S103.
Terminal is provided with GPIO (General Purpose Input Output, general input and output) interfacing equipment.In the present embodiment, the GPIO interfacing equipment comprises 30 pins, is the IO mouth of 30pin, can compatible terminal the Interface design of charging, guarantee to have enough pins as compatible design simultaneously.
The GPIO interfacing equipment is provided with USB and inserts that recognition interface USB_ID, first wall fill recognition interface WALL_S1, second wall fills recognition interface WALL_S1, WALL_S2, USB anode interface USB_D+ and USB negative pole interface USB_D-.Wherein, WALL_S1 and WALL_S2 simulate USB_D+ and the USB_D-of USB interface respectively.
Can judge the data line type that inserts according to the high-low level of detected USB_ID, in the present embodiment, if USB_ID is low level, namely USB_ID ground connection judges that then the type of the data line that terminal inserts is OTG and charging (OTG+WALL charge) data line.USB_ID is that low level explanation OTG function is opened, and this moment, USB_D+ and USB_D-were occupied, can not realize identification to the charging type by above-mentioned USB_D+ and USB_D-.
If USB_ID is high level, judge that then the type of the data line that terminal inserts is the usb data line, i.e. the general data line.USB_ID is that the OTG function is not opened in high level explanation, then can realize identification to the charging type by USB_D+ and USB_D-.
Step S102 is OTG and charging data line if terminal inserts the type of data line, detects then that first wall fills recognition interface WALL_S1 and second wall fills recognition interface WALL_S2, judges the charging type according to WALL_S1 and WALL_S2.
Detect the level of WALL_S1 and WALL_S2.In the present embodiment, when WALL_S1 and WALL_S2 short circuit, when namely the level of WALL_S1 and WALL_S2 equates, judge that the charger that inserts is the wall charger, the charging type is the wall charging.When WALL_S1 is low level and WALL_S2 when being high level, judge that the charger that inserts is the main equipment (USB Host) of USB, the charging type is the USB charging.Thus, the type that inserts data line when terminal is OTG and charging data line, utilizes USB_D+ and USB_D-to realize the OTG function, can utilize WALL_S1 and WALL_S2 to realize the judgement of charging type is made that OTG function and charge function can executed in parallel simultaneously.
Step S103 is the usb data line if terminal inserts the type of data line, then detects USB anode interface USB_D+ and USB negative pole interface USB_D-, judges the charging type according to USB_D+ and USB_D-.
Detect the level of USB_D+ and USB_D-.In the present embodiment, when USB_D+ and USB_D-short circuit, when namely the level of USB_D+ and USB_D-equates, judge that the charger that inserts is the wall charger, the charging type is the wall charging.When USB_D+ is high level and USB_D-when being low level, judge that the charger that inserts is the main equipment (USB_Host) of USB, the charging type is the USB charging.At this moment, owing to do not use the OTG function, thereby do not take USB_D+ and USB_D-, utilize USB_D+ and USB_D-can realize judgement to the charging type.
Deterministic process below with reference to the charging type of the embodiment of the invention of Fig. 2 is described in detail.
Step S201, the USB_VBUS that arranges on the GPIO interfacing equipment is effective.
It is high level that USB_VBUS is set, this moment USB_VBUS effective, can enable the GPIO interfacing equipment interface level on draw with drop-down.
Step S202 judges that the level of USB_ID is high level or low level, if USB_ID is high level, and execution in step S203 then, if USB_ID is low level, execution in step S204 then.
If USB_ID is high level, namely USB_ID=1 judges that then the data line that inserts is the usb data line.
If USB_ID is low level, namely USB_ID=0 judges that then the data line that inserts is OTG+WALL charge data line.
Step S203 judges whether short circuit of USB_D+ and USB_D-, if USB_D+=USB_D-, execution in step S208 then, otherwise execution in step S205.
Step S204 judges whether short circuit of WALL_S1 and WALL_S2, if WALL_S1=WALL_S2, execution in step S208 then, otherwise execution in step S205.
Step S205 judges that the charging type is the USB charging, execution in step S206.
USB_D+ is high level and USB_D-when being low level, and perhaps WALL_S1 is low level and WALL_S2 when being high level, judges that the charger that inserts is USB Host, and the charging type is the USB charging.
Step S206, CHG_5V_EN is set to high level, execution in step S207.
Step S207, platform USB charging.
Realize charging to terminal by the USB mode.
Step S208 judges that the charging type is the wall charging, execution in step S209.
When the level of USB_D+ and USB_D-equates, when perhaps the level of WALL_S1 and WALL_S2 equates, judge that the charger that inserts is the wall charger, the charging type is the wall charging.
Step S209, CHG_5V_EN is set to low level, execution in step S210.
Step S210, large current charge.
Insert line voltage, terminal is carried out the charging of big electric current.
According to the OTG function that is used for terminal of the embodiment of the invention and the executed in parallel method of charge function, by the GPIO interfacing equipment is set in terminal, and arrange at the GPIO interfacing equipment that USB inserts recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface, thereby can insert the type that recognition interface is judged the data line that terminal inserts by USB, and realize identification to the charging type according to described USB anode interface and USB negative pole interface, therefore can realize OTG function and charge function simultaneously by the GPIO interfacing equipment, thereby realized the executed in parallel of OTG function and charge function, thereby can solve owing to can't use the problem of OTG function during charging that the flying power deficiency of terminal causes.Of the present invention for terminal the OTG function and the executed in parallel method of charge function can carry out wall charging and USB charging to terminal with the common USB data line, the parallel or USB that can carry out wall charging and OTG function simultaneously again when using the OTG data line charges and the walking abreast of OTG function.The present invention can realize the judgement of charging type is not needed to carry out data transmission by the height of the level of corresponding interface.
Below with reference to the terminal 1000 of Fig. 3 to Fig. 9 description according to the embodiment of the invention.
As shown in Figure 3, the terminal 1000 that provides of the embodiment of the invention comprises IO mouth female seat 100, universal input/output interface GPIO interfacing equipment 200 and control module 300.Wherein, IO mouth female seat 100 is used for inserting data line, GPIO interfacing equipment 200 is provided with USB and inserts recognition interface USB_ID, first wall fills recognition interface WALL_S1, second wall fills recognition interface WALL_S2, USB anode interface USB_D+ and USB negative pole interface USB_D-, control module 300 links to each other with GPIO interfacing equipment 200, be used for inserting the type that recognition interface USB_ID judges the data line that terminal inserts according to the USB of terminal, and according to the type of the data line of judging, first wall fills recognition interface WALL_S1, second wall fills recognition interface WALL_S2, USB anode interface USB_D+ and USB negative pole interface USB_D-judge the charging type.
As shown in Figure 4, GPIO interfacing equipment 200 comprises 30 pins, is the IO mouth of 30pin, thereby the Interface design of charging that can compatible terminal guarantees to have enough pins as compatible design simultaneously.Particularly, the pin one of GPIO interfacing equipment 200 is GND, pin two 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 the TMDS clock signal-, pin 9 is TMDS signal shielding line all the time, pin one 0 be the TMDS clock signal+, pin one 1 is GND, pin one 2 is TMDS data 0-, pin one 3 is TMDS data 0 shielding lines, pin one 4 is TMDS data 0+, pin one 5 and pin one 6 are GND, pin one 7 is TMDS data 1-, pin one 8 is TMDS data 1 shielding lines, pin one 9 is TMDS data 1+, pin two 0 is TMDS data 2-, pin two 1 is TMDS data 2 shielding lines, pin two 2 is TMDS data 2+, pin two 3, pin two 4 and pin two 8 are USB_VBUS, pin two 5 is USB_D-, pin two 6 is USB_ID, pin two 7 is USB_D+, pin two 9 is WALL_S1, pin 30 is WALL_S2.
Wherein, WALL_S1 and WALL_S2 simulate USB_D+ and the USB_D-of USB interface respectively.
As shown in Figure 5, control module 300 comprises first detecting unit 310 and first judging unit 320, and wherein, first detecting unit 310 is for detection of the level of USB_ID, and first judging unit 320 is used for judging according to the testing result of first detecting unit 310.
Particularly, first detecting unit 310 detects the level of USB_ID, and the type of the data line that inserts according to the electrical level judging of USB_ID.If USB_ID is high level, then first judging unit 320 judges that the type of the data line that terminal inserts is the usb data line, i.e. the general data line.USB_ID is that the OTG function is not opened in high level explanation, then can realize identification to the charging type by USB_D+ and USB_D-.Fig. 6 shows the synoptic diagram that external connection line is the USB line.At this moment, USB_D+ and USB_D-are not taken by the OTG interface, can realize usb communication function and charge function.
In one embodiment of the invention, control module 300 also comprises second detecting unit 330 and second judging unit 340, wherein, second detecting unit 330 is used for judging that at first judging unit 320 type of the data line that IO mouth female seat inserts detects USB anode interface and USB negative pole interface when being the usb data line that second judging unit 340 is used for judging the charging type according to USB anode interface and USB negative pole interface.
Particularly, when second detecting unit 330 is the usb data line in the type of judging the data line that IO mouth female seat 100 inserts, detect USB_D+ and USB_D-.Second judging unit 340 is judged the charging type according to USB_D+ and USB_D-.If USB_D+ and USB_D-short circuit, then second judging unit 340 judges that the charger that inserts is the wall charger, and the charging type is the wall charging.If USB_D+ is high level and USB_D-when being low level, then second judging unit 340 judges that what insert be the main equipment of USB, and the charging type is that USB charges.
Fig. 7 shows the synoptic diagram that external connection line is the OTG line.At this moment, the USB_ID pin is directly connected to ground, and the power supply that triggers OTG_5V enables.OTG_5V is connected on the USB_VUSB pin of OTG interface, to outside power devices.But USB_D+ and USB_D-are occupied owing to this moment, can only realize the OTG function, can't realize usb communication function and charge function.
When first detecting unit 310 detects USB_ID and is low level, i.e. USB_ID ground connection, then the first judging unit piece 320 judges that the type of the data line that terminals insert is OTG and charging (OTG+WALL charge) data line.USB_ID is that low level explanation OTG function is opened, and this moment, USB_D+ and USB_D-were occupied, can not realize identification to the charging type by above-mentioned USB_D+ and USB_D-.Fig. 8 shows the circuit diagram of OTG interface and charging inlet parallel line connected mode.OTG_5V is connected to the USB_VBUS of OTG interface, and USB_D+ and USB_D-are connected respectively to D+ and the D-of OTG interface, and USB_ID pin ground connection is triggered the OTG_5V power supply and enabled.Thereby when inserting external unit, power to external unit, external unit can normally be used.The USB_VBUS pin of GPIO interfacing equipment 200 is connected to the USB_VBUS pin of charging inlet, and the WALL_S1 of GPIO interfacing equipment 200 and WALL_S2 are connected respectively to USB_D-and the USB_D+ of charging inlet.
When second detecting unit 330 is OTG and charging data line in the type of judging the data line that IO mouth female seat 100 inserts, detect WALL_S1 and WALL_S2.Second judging unit 340 is judged the charging type according to WALL_S1 and WALL_S2.
When if charging inlet is connected on the wall charger by the USB line, USB_D+ and USB_D-be by short circuit, makes WALL_S1 and WALL_S2 short circuit, i.e. WALL_S1=WALL_S2, and second judging unit 340 judges that the charging types are the wall charging.If WALL_S1 is low level and WALL_S2 is high level, then second judging unit 340 judges that the charging type is the USB charging.
In one embodiment of the invention, the GPIO interfacing equipment also comprises pull-up resistor R1 and pull down resistor R2.Wherein, pull-up resistor R1 links to each other with the pin of WALL_S2 and the internal electric source VCC of GPIO interfacing equipment 200 respectively.As shown in Figure 9, pull down resistor R2 respectively with internally the linking to each other of WALL_S1 and GPIO interfacing equipment 200.By pull-up resistor R1 and pull down resistor R2, WALL_S1 and WALL_S2 are respectively low level and high level under idle pulley.When charging inlet connected the main equipment (USB Host) of USB, WALL_S1 was that low level and WALL_S2 are high level, and second judging unit 340 judges that the charging type is the USB charging.
In one embodiment of the invention, after second judging unit 340 judged that the charging type is the wall charging, CHG_5V_EN was set to low level, and terminal is inserted line voltage, thereby terminal is carried out the charging of big electric current.After second judging unit 340 judged that the charging types are the USB charging, CHG_5V_EN was set to high level, realized charging to terminal by the USB mode.
Terminal according to the embodiment of the invention, by the GPIO interfacing equipment is set in terminal, and arrange at the GPIO interfacing equipment that USB inserts recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface, thereby can insert the type that recognition interface is judged the data line that terminal inserts by USB, and realize identification to the charging type according to described USB anode interface and USB negative pole interface, therefore can realize OTG function and charge function simultaneously by the GPIO interfacing equipment, thereby realized the executed in parallel of OTG function and charge function, thereby can solve owing to can't use the problem of OTG function during charging that the flying power deficiency of terminal causes.Terminal of the present invention can be carried out wall charging and USB charging with the common USB data line, can carry out the parallel of the parallel of wall charging and OTG function or USB charging and OTG function again when using the OTG data line simultaneously.The present invention can realize the judgement of charging type is not needed to carry out data transmission by the height of the level of corresponding interface.
Describe and to be understood that in the process flow diagram or in this any process of otherwise describing or method, expression comprises module, fragment or the part of code of the executable instruction of the step that one or more is used to realize specific logical function or process, and the scope of preferred implementation of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by opposite order, carry out function, this should be understood by the embodiments of the invention person of ordinary skill in the field.
In process flow diagram the expression or in this logic of otherwise describing and/or step, for example, can be considered to the sequencing tabulation for the executable instruction that realizes logic function, may be embodied in any computer-readable medium, use for instruction execution system, device or equipment (as the computer based system, comprise that the system of processor or other can be from the systems of instruction execution system, device or equipment instruction fetch and execution command), or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, storage, communication, propagation or transmission procedure be for instruction execution system, device or equipment or the device that uses in conjunction with these instruction execution systems, device or equipment.The example more specifically of computer-readable medium (non-exhaustive list) comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random-access memory (ram), ROM (read-only memory) (ROM), can wipe and to edit ROM (read-only memory) (EPROM or flash memory), fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium even can be paper or other the suitable media that to print described program thereon, because can be for example by paper or other media be carried out optical scanning, then edit, decipher or handle to obtain described program in the electronics mode with other suitable methods in case of necessity, then it is stored in the computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, a plurality of steps or method can realize with being stored in the storer and by software or firmware that suitable instruction execution system is carried out.For example, if realize with hardware, the same in another embodiment, in the available following technology well known in the art each or their combination realize: have for the discrete logic of data-signal being realized the logic gates of logic function, special IC with suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that and realize that all or part of step that above-described embodiment method is carried is to instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, this program comprises one of step or its combination of method embodiment when carrying out.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing module, also can be that the independent physics in each unit exists, and also can be integrated in the module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, also can adopt the form of software function module to realize.If described integrated module realizes with the form of software function module and during as independently production marketing or use, also can be stored in the computer read/write memory medium.
The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, concrete feature, structure, material or characteristics that the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means in conjunction with this embodiment or example description are contained at least one embodiment of the present invention or the example.In this manual, the schematic statement to above-mentioned term not necessarily refers to identical embodiment or example.And concrete feature, structure, material or the characteristics of description can be with the suitable manner combination in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment that scope of the present invention is by claims and be equal to and limit.

Claims (11)

1. one kind is used for the OTG function of terminal and the executed in parallel method of charge function, it is characterized in that, comprises the steps:
USB according to terminal inserts the type that recognition interface is judged the data line that terminal inserts, wherein, described terminal is provided with general input and output GPIO interfacing equipment, and described GPIO interfacing equipment is provided with described USB access recognition interface and first wall fills recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface;
If the type of the data line that terminal inserts is OTG and charging data line, detects then that described first wall fills recognition interface and described second wall fills recognition interface, and fill recognition interface and described second wall according to described first wall and fill recognition interface and judge the charging type;
If the type of the data line that terminal inserts is the usb data line, then detects described USB anode interface and described USB negative pole interface, and judge the charging type according to described USB anode interface and described USB negative pole interface.
2. executed in parallel method as claimed in claim 1 is characterized in that, described USB according to terminal inserts the type that recognition interface is judged the data line that terminal inserts, and comprises the steps:
When described USB access recognition interface was low level, the type of judging the data line that described terminal inserts was OTG and charging data line;
When described USB access recognition interface is high level, judge that the type of the data line that described terminal inserts is the usb data line.
3. executed in parallel method as claimed in claim 2 is characterized in that, when the type of the data line that inserts when described terminal is OTG and charging data line,
If described first wall fills recognition interface and described second wall fills the recognition interface short circuit, judge that described charging type is the wall charging;
If described first wall fill recognition interface be low level and described second wall to fill recognition interface be high level, judge that described charging type is the USB charging.
4. executed in parallel method as claimed in claim 1 is characterized in that, when the type of the data line that inserts when described terminal is the usb data line,
If described USB anode interface and described USB negative pole interface short circuit judge that described charging type is the wall charging;
If described USB anode interface is that high level and described USB negative pole interface are low level, judge that described charging type is the USB charging.
5. a terminal is characterized in that, comprising:
IO mouth female seat is used for inserting data line;
General input and output GPIO interfacing equipment, described GPIO interfacing equipment are provided with USB and insert that recognition interface, described first wall fill recognition interface, second wall fills recognition interface, USB anode interface and USB negative pole interface;
Control module, described control module links to each other with described GPIO interfacing equipment, be used for inserting the type that recognition interface is judged the data line that terminal inserts according to described USB, and according to the type of the data line of judging, described first wall fill recognition interface, described second wall fills recognition interface, described USB anode interface and described USB negative pole interface and judges the charging type.
6. terminal as claimed in claim 1 is characterized in that, described control module comprises: first detecting unit and first judging unit, wherein:
Described first detecting unit detects the level that described USB inserts recognition interface;
Described first judging unit judges that according to the testing result of first detecting unit when described USB access recognition interface was low level, then described control module judged that the type of the data line that described IO mouth female seat inserts is OTG and charging data line; When described USB access recognition interface was high level, then described control module judged that the type of the data line that described IO mouth female seat inserts is the usb data line.
7. terminal as claimed in claim 6 is characterized in that, described control module also comprises second detecting unit and second judging unit, wherein:
When the type of the data line that described second detecting unit inserts in the described IO mouth of described first judgment unit judges female seat is OTG and charging data line, detect that described first wall fills recognition interface and described second wall fills recognition interface;
Described second judging unit fills recognition interface according to described first wall and described second wall fills recognition interface judgement charging type.
8. terminal as claimed in claim 7 is characterized in that,
Described second judging unit detects described first wall at described second detecting unit and fills and judge that described charging type is the wall charging when recognition interface and described second wall fill the recognition interface short circuit;
Described second judging unit detects described first wall at described second detecting unit, and to fill recognition interface be that low level and described second wall judge that described charging type is the USB charging when filling recognition interface for high level.
9. terminal as claimed in claim 8 is characterized in that, described GPIO interfacing equipment also comprises:
Pull-up resistor, an end of described pull-up resistor fill recognition interface with described first wall and link to each other, and the other end links to each other with power supply;
Pull down resistor, an end of described pull down resistor fill recognition interface with described second wall and link to each other, and the other end links to each other with signal ground.
10. terminal as claimed in claim 6 is characterized in that,
Described second detecting unit also is used for detecting described USB anode interface and described USB negative pole interface when the type of the data line of the described IO mouth of described first judgment unit judges female seat access is the usb data line;
Described second judging unit also is used for judging the charging type according to described USB anode interface and described USB negative pole interface.
11. terminal as claimed in claim 10 is characterized in that,
Described second judging unit judges that described charging type is the wall charging when described second detecting unit detects described USB anode interface and described USB negative pole interface short circuit;
It is that high level and described USB negative pole interface judge that described charging type is the USB charging during for low level that described second judging unit detects described USB anode interface at described second detecting unit.
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 true CN103186483A (en) 2013-07-03
CN103186483B 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)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978300A (en) * 2015-07-16 2015-10-14 广东欧珀移动通信有限公司 Mobile terminal as well as detecting method and device for connection of mobile terminal and external equipment
CN105068954A (en) * 2015-08-25 2015-11-18 广东欧珀移动通信有限公司 Terminal interface communication method and apparatus
CN105515115A (en) * 2016-01-15 2016-04-20 广东欧珀移动通信有限公司 Method of mobile terminal for charging other mobile terminals and charging device
CN105954614A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Method and device for prompting data line type, and terminal device
CN106026228A (en) * 2016-05-26 2016-10-12 维沃移动通信有限公司 Charging USB cable, adapter and mobile terminal
CN106233271A (en) * 2014-12-25 2016-12-14 华为技术有限公司 The identification system of a kind of USB OTG equipment and device
CN106484126A (en) * 2016-09-12 2017-03-08 广东欧珀移动通信有限公司 A kind of OTG function open method and terminal
CN106571657A (en) * 2016-09-28 2017-04-19 上海创功通讯技术有限公司 Terminal, converter and connection conversion system and method
CN106684955A (en) * 2015-11-11 2017-05-17 小米科技有限责任公司 Charger, electronic equipment and charging method
CN107145456A (en) * 2017-04-10 2017-09-08 硅谷数模半导体(北京)有限公司 Methods, devices and systems of the identification equipment from connection
CN107632266A (en) * 2017-09-08 2018-01-26 奇酷互联网络科技(深圳)有限公司 The test system and method for testing of mobile terminal, mobile terminal
CN107632949A (en) * 2017-09-30 2018-01-26 广东欧珀移动通信有限公司 Data wire identification circuit, method and terminal
CN108072775A (en) * 2017-11-06 2018-05-25 广东欧珀移动通信有限公司 The test device of mobile terminal
WO2018094894A1 (en) * 2016-11-23 2018-05-31 华为技术有限公司 Detection circuit and detection method for on-the-go device, and terminal
CN108446246A (en) * 2018-02-27 2018-08-24 努比亚技术有限公司 A kind of implementation method, device and the computer storage media of OTG functions
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
CN110544963A (en) * 2018-05-29 2019-12-06 青岛海信移动通信技术股份有限公司 electronic equipment switching circuit

Citations (5)

* 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
US20090130874A1 (en) * 2007-11-16 2009-05-21 Sony Ericsson Mobile Communications Ab Multipurpose universal serial bus cable
CN201260086Y (en) * 2008-08-01 2009-06-17 青岛海信移动通信技术股份有限公司 Mobile terminal and charging detection device thereof
US20110314201A1 (en) * 2009-09-19 2011-12-22 Huizhou Tcl Mobile Communication Co., Ltd Method and device for identifying universal serial bus (usb) insertion or charger insertion of mobile terminal

Patent Citations (5)

* 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
US20090130874A1 (en) * 2007-11-16 2009-05-21 Sony Ericsson Mobile Communications Ab Multipurpose universal serial bus cable
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
US20110314201A1 (en) * 2009-09-19 2011-12-22 Huizhou Tcl Mobile Communication Co., Ltd Method and device for identifying universal serial bus (usb) insertion or charger insertion of mobile terminal

Cited By (34)

* 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
CN106233271A (en) * 2014-12-25 2016-12-14 华为技术有限公司 The identification system of a kind of USB OTG equipment and device
CN104978300A (en) * 2015-07-16 2015-10-14 广东欧珀移动通信有限公司 Mobile terminal as well as detecting method and device for connection of mobile terminal and external 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
CN105068954A (en) * 2015-08-25 2015-11-18 广东欧珀移动通信有限公司 Terminal interface communication method and apparatus
CN106684955B (en) * 2015-11-11 2019-10-15 小米科技有限责任公司 Charger, electronic equipment and charging method
CN106684955A (en) * 2015-11-11 2017-05-17 小米科技有限责任公司 Charger, electronic equipment and charging method
CN105515115A (en) * 2016-01-15 2016-04-20 广东欧珀移动通信有限公司 Method of mobile terminal for charging other mobile terminals and charging device
CN105515115B (en) * 2016-01-15 2018-03-16 广东欧珀移动通信有限公司 Mobile terminal is the method and charging device of other mobile terminals charging
WO2017185679A1 (en) * 2016-04-28 2017-11-02 乐视控股(北京)有限公司 Method and apparatus for prompting type of data cable, and terminal device
CN105954614A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Method and device for prompting data line type, and terminal device
CN106026228A (en) * 2016-05-26 2016-10-12 维沃移动通信有限公司 Charging USB cable, adapter and mobile terminal
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
CN106571657A (en) * 2016-09-28 2017-04-19 上海创功通讯技术有限公司 Terminal, converter and connection conversion system and method
CN106571657B (en) * 2016-09-28 2020-03-06 上海创功通讯技术有限公司 Terminal, converter, and connection conversion system and method
CN108475247B (en) * 2016-11-23 2021-03-23 华为技术有限公司 Detection circuit, detection method and terminal of plug-and-play equipment
CN108475247A (en) * 2016-11-23 2018-08-31 华为技术有限公司 A kind of detection circuit of PnP device, detection method and terminal
WO2018094894A1 (en) * 2016-11-23 2018-05-31 华为技术有限公司 Detection circuit and detection method for on-the-go device, and terminal
CN113220617A (en) * 2016-11-23 2021-08-06 荣耀终端有限公司 Detection circuit, detection method and terminal of plug-and-play equipment
CN113220617B (en) * 2016-11-23 2022-10-18 荣耀终端有限公司 Detection circuit, detection method and terminal of plug-and-play device
CN107145456B (en) * 2017-04-10 2021-05-04 硅谷数模半导体(北京)有限公司 Method, device and system for identifying self-connection of equipment
CN107145456A (en) * 2017-04-10 2017-09-08 硅谷数模半导体(北京)有限公司 Methods, devices and systems of the identification equipment from connection
CN107632266A (en) * 2017-09-08 2018-01-26 奇酷互联网络科技(深圳)有限公司 The test system and method for testing of mobile terminal, mobile terminal
CN107632949B (en) * 2017-09-30 2019-10-25 Oppo广东移动通信有限公司 Data line identification circuit, method and terminal
CN107632949A (en) * 2017-09-30 2018-01-26 广东欧珀移动通信有限公司 Data wire identification circuit, method and terminal
CN108072775A (en) * 2017-11-06 2018-05-25 广东欧珀移动通信有限公司 The test device of mobile terminal
CN108446246A (en) * 2018-02-27 2018-08-24 努比亚技术有限公司 A kind of implementation method, device and the computer storage media of OTG functions
CN108446246B (en) * 2018-02-27 2021-09-21 努比亚技术有限公司 Method and device for realizing OTG function
CN110544963A (en) * 2018-05-29 2019-12-06 青岛海信移动通信技术股份有限公司 electronic equipment switching circuit
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

Also Published As

Publication number Publication date
CN103186483B (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN103186483A (en) Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same
CN101694889B (en) Intelligent charging method and device
US20160004287A1 (en) Portable electronic device and power management method thereof
CN102684270B (en) Method for identifying type of universal serial bus (USB) chargers and USB device
KR101043842B1 (en) Physical device(phy) support of the usb2.0 link power management addendum using a ulpi phy interface standard
CN103444258B (en) Mobile terminal and its method that connects
TWI460594B (en) Adaptive usb charging method and system
US8762746B1 (en) Power management in electronic devices
KR101318512B1 (en) Dedicated power supply apparatus, terminal, power supply system, and power supply method
CN106571657B (en) Terminal, converter, and connection conversion system and method
WO2013168289A1 (en) Electronic device and control method therefor
EP2539805B1 (en) Systems and methods for hot plug gpu power control
US8200852B2 (en) Multi-mode dongle for peripheral devices and associated methods
CN107038138A (en) USB power delivery apparatus and the system including it
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
EP2711803A2 (en) Host apparatus and method of charging user terminal apparatus
CN106230070B (en) Charging method and device
US20150046727A1 (en) Feeding method and electronic apparatus
US20200117633A1 (en) Methods and apparatus to enable status change detection in a low power mode of a microcontroller unit
CN106712179A (en) Method and device realizing reverse charging
CN107658916A (en) Cue circuit and electronic equipment
CN208848137U (en) Mainboard with charging function
US6262562B1 (en) Increased battery capacity utilizing multiple smart batteries

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