CN106802872A - A kind of method and terminal that equipment room charging is carried out by USB interface - Google Patents

A kind of method and terminal that equipment room charging is carried out by USB interface Download PDF

Info

Publication number
CN106802872A
CN106802872A CN201611169800.1A CN201611169800A CN106802872A CN 106802872 A CN106802872 A CN 106802872A CN 201611169800 A CN201611169800 A CN 201611169800A CN 106802872 A CN106802872 A CN 106802872A
Authority
CN
China
Prior art keywords
data wire
equipment
terminal
usb interface
short circuit
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.)
Pending
Application number
CN201611169800.1A
Other languages
Chinese (zh)
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.)
Huaqin Telecom Technology Co Ltd
Original Assignee
Huaqin Telecom Technology 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 Huaqin Telecom Technology Co Ltd filed Critical Huaqin Telecom Technology Co Ltd
Priority to CN201611169800.1A priority Critical patent/CN106802872A/en
Publication of CN106802872A publication Critical patent/CN106802872A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • G06F13/4077Precharging or discharging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The present embodiments relate to charging technique field, more particularly to a kind of method and terminal that equipment room charging is carried out by USB interface, including:First equipment is detected after USB interface is connected with the second equipment, it is determined that it is second equipment charge to need;First equipment is in the first data wire and the second data wire short circuit in detecting the USB interface, electric current to second equipment output more than first threshold, the first threshold is that the type based on the USB interface pre-sets, it can be seen that, when the first equipment determines to need for the second equipment charge, can be by the way that the first data wire in USB interface and the second data wire short circuit will be stated, with the electric current to the output of the second equipment more than first threshold, so as to lift the charging rate that the first equipment is the second equipment, therefore, the charging rate that terminal is external equipment can be lifted.

Description

A kind of method and terminal that equipment room charging is carried out by USB interface
Technical field
The present embodiments relate to charging technique field, more particularly to a kind of equipment room charging is carried out by USB interface Method and terminal.
Background technology
In the prior art, terminal is to external equipment when being charged, according to BC1.2 (Battery Charging Specification Revison, battery charging specifications) agreement regulation, external equipment support USB2.0 when, terminal institute it is defeated The charging current for going out no more than 500mA, and when external equipment supports USB3.0, the charging current that terminal is exported is not more than 900mA, it can be seen that even if equipment to be charged possesses the ability of large current charge, according to the regulation of BC1.2 agreements, terminal The charging current for being exported cannot be greater than 900mA, and this have impact on charging rate of the terminal to external equipment.
The content of the invention
The embodiment of the present invention provides a kind of method and terminal that equipment room charging is carried out by USB interface, is used to realize carrying Rise charging rate of the terminal to external equipment.
The present invention implements to provide a kind of method for carrying out equipment room charging by USB interface, including:
First equipment is detected after USB interface is connected with the second equipment, it is determined that it is second equipment charge to need;
First equipment in the first data wire and the second data wire short circuit in detecting the USB interface, to institute Electric current of the second equipment output more than first threshold is stated, the first threshold is that the type based on the USB interface pre-sets 's.
Preferably, the USB interface is OTG, first equipment is terminal;
The determination needs to be second equipment charge, including:
The terminal when it is determined that ID pins in the OTG interfaces are grounded, it is determined that it is second equipment charge to need;
Before first equipment is to second equipment electric current of the output more than the standard usb interface electric current, also wrap Include:
The terminal according to terminal self-operating state or according to user indicate, it is determined that first data wire with it is described When second data wire does not have data transfer, by first data wire and the second data wire short circuit.
Preferably, the terminal is according to terminal self-operating state, by first data wire and second data wire Short circuit, including:
The terminal detects the electricity of itself, when the electricity of itself is detected higher than Second Threshold, by the described first number According to line and the second data wire short circuit;Or
The terminal detects the power consumption of itself, when the power consumption of itself is detected less than three threshold values, by the described first number According to line and the second data wire short circuit;Or
The terminal detects the temperature of itself, when the temperature of itself is detected less than four threshold values, by the described first number According to line and the second data wire short circuit.
Preferably, first equipment is personal computer PC, second equipment is terminal;
The first data wire and the second data wire short circuit in the USB interface, are accomplished by the following way:
The terminal is indicated according to user, by the first data wire in the USB interface and the second data wire short circuit.
The embodiment of the present invention provides a kind of terminal with USB interface, including:Processor is electrically connected with the processor Charging module, switching switch;
There is power pins, the first data wire pin, the second data wire pin and grounding pin in the USB interface;
The first data wire pin is electrically connected by the first data wire with the processor, the second data wire pin Electrically connected with the processor by the second data wire, the switching switch is located at first data wire and second data Between line;
The power pins and the grounding pin are electrically connected with the charging module respectively;
The processor, for control it is described switching switch working condition, and detect first data wire with During the second data wire short circuit, control the charging module output more than the electric current of first threshold, the first threshold is based on institute State what the type of USB interface pre-set.
Preferably, also including ID pins in the USB interface;
The processor is used for when the USB interface connection external equipment is detected and the ID pins and the ground connection During pin short circuit, it is determined that needing to be charged for the external equipment.
Preferably, also including:Detection module;
The detection module, for detecting the terminal status information of itself;
The processor, be additionally operable to according to the detection module detect terminal itself status information, control described in cut Change the working condition of switch.
Preferably,
The detection module, specifically at least one in the following status information for detecting the terminal or any group Close:The electricity of itself is detected, the power consumption of itself is detected and is detected the temperature of itself.
Preferably, also including:Receiver module;
The receiver module, the control instruction for receiving user input;
The processor, is additionally operable to the control instruction according to the user input, controls the work shape of the switching switch State.
Above-described embodiment provides a kind of method that equipment room charging is carried out by USB interface, including:First equipment is detected After USB interface is connected with the second equipment, it is determined that it is second equipment charge to need;First equipment is detecting When stating the first data wire and the second data wire short circuit in USB interface, the electricity to second equipment output more than first threshold Stream, the first threshold is that the type based on the USB interface pre-sets, it can be seen that determine to need in the first equipment During for the second equipment charge, can be by the way that the first data wire in USB interface and the second data wire short circuit will be stated, with to the second equipment Output more than first threshold electric current, i.e., when the first equipment determines to need for the second equipment charge, by that will state USB interface in The first data wire and the second data wire short circuit, carry out quick charge with to the second equipment such that it is able to which lifting the first equipment is The charging rate of the second equipment, therefore, it is possible to lift the charging rate that terminal is external equipment.
A kind of terminal with USB interface that above-described embodiment is provided, including:Processor is electrically connected with the processor Charging module, switching switch;In the USB interface have power pins, the first data wire pin, the second data wire pin and Grounding pin;The first data wire pin is electrically connected by the first data wire with the processor, and second data wire draws Pin is electrically connected by the second data wire with the processor, and the switching switch is located at first data wire and second number According between line;The power pins and the grounding pin are electrically connected with the charging module respectively;The processor, for controlling The working condition of the system switching switch, and when first data wire and the second data wire short circuit is detected, control is described More than the electric current of first threshold, the first threshold is that the type based on the USB interface pre-sets for charging module output, As can be seen that the working condition of switching switch can be controlled by processor, whether to control the first data wire and the second data wire Short circuit is carried out, and when the first data wire and the second data wire carry out short circuit, is exported to the second equipment by controlling charging module When carrying out short circuit more than the electric current of first threshold, i.e. the first data wire and the second data wire, by controlling charging module to second Equipment carries out quick charge such that it is able to lifts the charging rate that the first equipment is the second equipment, is therefore, it is possible to lift terminal The charging rate of external equipment.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description Accompanying drawing is briefly introduced.
Fig. 1 is a kind of method flow schematic diagram that equipment room charging is carried out by USB interface provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of terminal with USB interface provided in an embodiment of the present invention;
Fig. 3 be it is provided in an embodiment of the present invention another shown by the method flow that USB interface carries out equipment room charging It is intended to.
Specific embodiment
In order that the purpose of the present invention, technical scheme and beneficial effect become more apparent, below in conjunction with accompanying drawing and implementation Example, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair It is bright, it is not intended to limit the present invention.
Fig. 1 illustrates a kind of method that equipment room charging is carried out by USB interface provided in an embodiment of the present invention Schematic flow sheet, as shown in figure 1, the method may include:
S101, the first equipment are detected after USB interface is connected with the second equipment, it is determined that needing to be filled for the second equipment Electricity.
S102, the first equipment set in the first data wire and the second data wire short circuit in detecting USB interface to second More than the electric current of first threshold, the first threshold is that the type based on the USB interface pre-sets for standby output.
First equipment is after detecting and being connected with the second equipment by USB interface, it is determined that need during for the second equipment charge, The first data wire and the second data wire in USB interface can be carried out short circuit, to realize that the first equipment is big to the output of the second equipment In the electric current of first threshold, that is, realize the first equipment to the second equipment quick charge.In above-mentioned steps S102, the first equipment exists When detecting the first data wire and the second data wire short circuit in USB interface, the electricity to the output of the second equipment more than first threshold During stream, when usb type is USB2.0, now, first threshold can be 500mA, i.e., when usb type is USB2.0 When, the first equipment, can be big to the output of the second equipment in the first data wire and the second data wire short circuit in detecting USB interface In the electric current of 500mA;When usb type is USB3.0, now, first threshold can be 900mA, i.e., when USB interface class When type is USB3.0, the first equipment, can be to second in the first data wire and the second data wire short circuit in detecting USB interface Equipment electric current of the output more than 900mA.
Optionally, it is easier to charge in order that obtaining equipment room, USB interface can also be OTG interfaces (On-The-Go, a key Copy).
Optional first equipment can be terminal, and the first equipment can also be personal computer PC.When the first equipment is for eventually During end, the second equipment can also be terminal, and when the first equipment is personal computer PC, the second equipment can also be terminal.
When USB interface is OTG interfaces, and the first equipment and the second equipment are when being terminal, when the first equipment passes through OTG After interface is connected with the second equipment, whether the first equipment can be grounded by the ID pins detected in OTG interfaces, judge whether needs Be the second equipment charge, i.e., when the ID pins that the first equipment is detected in OTG interfaces are grounded, can be true according to host negotiation protocol Fixed first equipment needs to be the second equipment charge, otherwise, it determines the first equipment need not be the second equipment charge.
ID pins ground connection in the first equipment detects OTG interfaces, it is the second equipment charge to determine that the first equipment needs When, the first equipment can be indicated according to self-operating state or according to user, it is determined that the first data wire in the OTG interfaces with When second data wire does not have data transfer, the first data wire and the second data wire are carried out into short circuit, with realize the first equipment to Electric current of the second equipment output more than first threshold.
Used as a kind of implementation method, during user uses the first equipment, user can be by the menu of the first equipment " quickly being charged to charging equipment " pattern is opened or closed, so that the first equipment is indicated according to user, by the first data Line and the second data wire carry out short circuit, to realize electric current of first equipment to the output of the second equipment more than first threshold, so that real Existing first equipment is to the second equipment quick charge.
As a kind of implementation method, after the first equipment is connected by OTG interfaces with the second equipment, and when the first equipment When detecting the ID pins ground connection in OTG interfaces, the first equipment can also be determined the need for according to the electricity service condition of itself First data wire in OTG interfaces and the second data wire are carried out into short circuit, so as to the electricity to the output of the second equipment more than first threshold Stream.
Specifically, after the first equipment is connected by OTG interfaces with the second equipment, and when the first equipment detects OTG When ID pins in interface are grounded, the first equipment can detect the electricity of itself, when the electricity that the first equipment detects itself is higher than During Second Threshold, the first data wire in OTG interfaces and the second data wire are carried out into short circuit automatically, and when the first equipment is detected certainly When the electricity of body is less than five threshold values, the automatic short circuit for disconnecting the first data wire and the second data wire in OTG interfaces.
For example, the first equipment is mobile phone A, the second equipment is mobile phone B, and mobile phone A and mobile phone B carried out by OTG interfaces During connection, mobile phone A detects ID pins ground connection in OTG interfaces, and the ID pins that mobile phone B is detected in OTG interfaces are hanging, because This, according to host negotiation protocol, it may be determined that mobile phone A is main frame, mobile phone B is peripheral hardware, i.e., mobile phone A can be charged for mobile phone B, And when mobile phone A detects the electricity of itself higher than 60%, mobile phone A can be by by the first data wire of OTG interfaces and second Data wire carries out short circuit, to realize mobile phone A as mobile phone B quick charge, and works as mobile phone A and detects the electricity of itself less than 10% When, mobile phone A disconnects the first data wire of OTG interfaces and the short circuit of the second data wire, so that the electricity allowed based on charge protocol Flow for mobile phone B charges.
Because when terminal is in standby mode, now the power consumption of terminal only has ten a few to tens of milliamperes, and works as terminal and exist Connection Wi-Fi (Wireless Fidelity, wireless emulation) networks or viewing HD video or connection 4G (the 4th Generation communication system, forth generation communication system) network play big game when, power consumption can reach several Hundred milliamperes, therefore, after the first equipment is connected by OTG interfaces with the second equipment, and when the first equipment detects OTG interfaces In ID pins be grounded when, the first equipment can be also determined the need for the first data wire in OTG interfaces according to the power consumption of itself Short circuit is carried out with the second data wire, so as to the electric current to the output of the second equipment more than first threshold.
Specifically, after the first equipment is connected by OTG interfaces with the second equipment, and when the first equipment detects OTG When ID pins in interface are grounded, the first equipment also can detect the power consumption of itself, when the first equipment detects the low in energy consumption of itself When three threshold values, the first data wire and the second data wire in OTG interfaces are carried out into short circuit automatically, and when the detection of the first equipment When to the power consumption of itself being higher than six threshold values, the automatic short circuit for disconnecting the first data wire and the second data wire in OTG interfaces.
For example, the first equipment is mobile phone C, the second equipment is mobile phone D, and mobile phone C and mobile phone D carried out by OTG interfaces During connection, mobile phone C detects ID pins ground connection in OTG interfaces, and the ID pins that mobile phone D is detected in OTG interfaces are hanging, because This, according to host negotiation protocol, it may be determined that mobile phone C is main frame, mobile phone D can be charged for peripheral hardware, i.e. mobile phone C for mobile phone D, When mobile phone C detects the power consumption of itself less than 100 MAHs, mobile phone C can be by by the first data wire of OTG interfaces and second Data wire carries out short circuit, to realize mobile phone C as mobile phone D quick charges, and works as mobile phone C and detects the power consumption of itself higher than 500 millis Ampere-hour, mobile phone C disconnects the first data wire of OTG interfaces and the short circuit of the second data wire, so that allowed based on charge protocol Electric current is that mobile phone D charges, and works as mobile phone C and detect the power consumption of itself again less than 100 MAHs, and mobile phone C can be by by OTG First data wire and the second data wire of interface carry out short circuit, are again mobile phone D quick charges.
Again because the temperature of terminal is a parameter of easy measurement, therefore, when the first equipment passes through OTG interfaces and second After equipment connection, and when the first equipment detects ID pins in OTG interfaces and is grounded, the first equipment can also according to itself Temperature determines the need for for the first data wire in OTG interfaces and the second data wire carrying out short circuit, so as to be exported to the second equipment More than the electric current of first threshold.
Specifically, after the first equipment is connected by OTG interfaces with the second equipment, and when the first equipment detects OTG When ID pins in interface are grounded, the first equipment also can detect the temperature of itself, when the temperature that the first equipment detects itself is low When four threshold values, the first data wire and the second data wire in OTG interfaces are carried out into short circuit automatically, and when the detection of the first equipment When to the temperature of itself being higher than four threshold values, the automatic short circuit for disconnecting the first data wire and the second data wire in OTG interfaces.
For example, the first equipment is mobile phone E, the second equipment is mobile phone F, and mobile phone E and mobile phone F carried out by OTG interfaces During connection, mobile phone E detects ID pins ground connection in OTG interfaces, and the ID pins that mobile phone F is detected in OTG interfaces are hanging, because This, according to host negotiation protocol, it may be determined that mobile phone E is main frame, mobile phone F can be charged for peripheral hardware, i.e. mobile phone E for mobile phone F, When mobile phone E detects the temperature of itself less than 40 DEG C, mobile phone E can be counted by by the first data wire of OTG interfaces and second Short circuit is carried out according to line, to realize mobile phone E quickly for mobile phone F charges, and when mobile phone E detects the temperature of itself higher than 40 DEG C, Mobile phone E disconnects the first data wire of OTG interfaces and the short circuit of the second data wire, so as to be based on the electric current that charge protocol is allowed Mobile phone F charges, and when mobile phone E detects the temperature of itself less than 40 DEG C again, and mobile phone E can be by by the of OTG interfaces One data wire and the second data wire carry out short circuit, are again mobile phone F quick charges.
It should be noted that when the first equipment be personal computer PC, the second equipment be terminal when, by the second equipment according to User indicates, and the first data wire and the second data wire in USB interface are carried out into short circuit, i.e. terminal indicates according to user, with reality The first data wire and the second data wire in existing USB interface carry out short circuit.
According to the above it can be seen that, it can be seen that the first equipment determine need for the second equipment charge when, can lead to The first data wire and the second data wire short circuit that will be stated in USB interface are crossed, with the electricity to the output of the second equipment more than first threshold Stream, i.e., when the first equipment determines to need for the second equipment charge, by the way that the first data wire in USB interface and the second number will be stated According to line short circuit, quick charge is carried out with to the second equipment such that it is able to lift the charging rate that the first equipment is the second equipment, because This, can lift the charging rate that terminal is external equipment.
Based on identical technology design, the embodiment of the present invention also provides a kind of terminal with USB interface.
Fig. 2 illustrates a kind of structural representation of terminal with USB interface provided in an embodiment of the present invention, such as Shown in Fig. 2, the terminal may include:Charging module 202, switching switch 203 that processor 201 is electrically connected with processor 201;
The USB interface has power pins 21, the first data wire pin 22, the second data wire pin 23, grounding pin 24;
First data wire pin 22 is electrically connected by the first data wire 26 with processor 201, and the second data wire pin 23 leads to The second data wire 27 is crossed to be electrically connected with processor 201, switching switch 203 be located at the first data wire 26 and the second data wire 27 it Between;
Power pins 21 and grounding pin 24 are electrically connected with charging module 202 respectively;
Treatment 201, the working condition for controlling switching switch 203, and detecting the first data wire 26 and the second number During according to 27 short circuit of line, electric current of control charging module 202 output more than first threshold.
Preferably, may also include ID pins 25 in USB interface;
Processor 201 is used for when the USD interfaces connection external equipment is detected and ID pins 25 and grounding pin 24 During short circuit, it is determined that needing to be charged for external equipment.
Preferably, also including detection module 204;
Detection module 204, the status information for detecting terminal itself;
Processor 201, is additionally operable to the status information of terminal itself detected according to detection module, control switching switch 203 working condition.
Preferably, detection module 204, specifically at least one in the following status information for detecting terminal or any group Close:The electricity of itself is detected, the power consumption of itself is detected and is detected the temperature of itself.
Preferably, also including:Receiver module 205;
Receiver module 205, the control instruction for receiving user input;
Processor 201, is additionally operable to the control instruction according to the user input, the working condition of control switching switch 203.
A kind of terminal with USB interface that above-described embodiment is provided, including:Processor is electrically connected with the processor Charging module, switching switch;In the USB interface have power pins, the first data wire pin, the second data wire pin and Grounding pin;The first data wire pin is electrically connected by the first data wire with the processor, and second data wire draws Pin is electrically connected by the second data wire with the processor, and the switching switch is located at first data wire and second number According between line;The power pins and the grounding pin are electrically connected with the charging module respectively;The processor, for controlling The working condition of the system switching switch, and when first data wire and the second data wire short circuit is detected, control is described More than the electric current of first threshold, the first threshold is that the type based on the USB interface pre-sets for charging module output, As can be seen that the working condition of switching switch can be controlled by processor, whether to control the first data wire and the second data wire Short circuit is carried out, and when the first data wire and the second data wire carry out short circuit, is exported to the second equipment by controlling charging module When carrying out short circuit more than the electric current of first threshold, i.e. the first data wire and the second data wire, by controlling charging module to second Equipment carries out quick charge such that it is able to lifts the charging rate that the first equipment is the second equipment, is therefore, it is possible to lift terminal The charging rate of external equipment.
It is the terminal shown in Fig. 2 below based on the first equipment, is set by USB interface to provided in an embodiment of the present invention The method charged between standby, carries out detailed explanation.
Fig. 3 illustrate it is provided in an embodiment of the present invention another equipment room charging is carried out by USB interface Method flow schematic diagram.
S301, the first equipment are connected by USB interface with external equipment.
S302, the first equipment judge whether to need to be charged for external equipment, if so, then going to step S303, otherwise, go to Step S305.
Specifically, the first equipment can be by detecting whether short circuit judges for the ID pins 25 of USB interface and grounding pin 24 Whether need to be charged for external equipment, i.e., when the first equipment detects the ID pins 25 of USB interface with 24 short circuit of grounding pin, It is determined that need to be charged for external equipment, conversely, determination need not charge for external equipment.
S303, the processor 201 of the first equipment are closed switch 203 is switched, to realize the first data wire of the first equipment 26 and the short circuit of the second data wire 27.
Specifically, the first equipment state of itself that the processor 201 of the first equipment can be detected according to detection module 204 Information, switching switch 203 is closed, to realize first data wire 26 and the short circuit of the second data wire 27 of the first equipment;First sets The control command of the user input that standby processor 201 is received also dependent on receiver module 205, switching switch 203 is closed.
The electric current of S304, the first equipment control charging module 202 to external equipment output more than first threshold.
Specifically, when usb type is USB2.0, the controllable charging module 202 of the first equipment is defeated to external equipment Go out the electric current more than 500mA;When usb type is USB3.0, the controllable charging module 202 of the first equipment is to external equipment Electric current of the output more than 900mA.
S305, the processor 201 of the first equipment disconnect switch 203 is switched.
Specifically, the first equipment state of itself that the processor 201 of the first equipment can be detected according to detection module 204 Information, switching switch 203 is disconnected;The user input that the processor 201 of the first equipment is received also dependent on receiver module 205 Control command, switching switch 203 is disconnected.
The electric current of S306, the first equipment control charging module 202 to external equipment output less than or equal to first threshold.
Specifically, when usb type is USB2.0, the controllable charging module 202 of the first equipment is defeated to external equipment Go out the big electric current less than or equal to 500mA;When usb type is USB3.0, can the controllable charging module 202 of the first equipment To external equipment electric current of the output less than or equal to 900mA.
To sum up, above-described embodiment provides a kind of method that equipment room charging is carried out by USB interface, including:First equipment Detect after USB interface is connected with the second equipment, it is determined that it is second equipment charge to need;First equipment is in inspection When measuring the first data wire and the second data wire short circuit in the USB interface, the first threshold is more than to second equipment output The electric current of value, the first threshold is that the type based on the USB interface pre-sets, it can be seen that true in the first equipment Surely need during for the second equipment charge, can be by the way that the first data wire in USB interface and the second data wire short circuit will be stated, with to The output of two equipment is more than the electric current of first threshold, i.e., when the first equipment determines to need for the second equipment charge, by that will state USB The first data wire and the second data wire short circuit in interface, carry out quick charge such that it is able to lift first with to the second equipment Equipment is the charging rate of the second equipment, therefore, it is possible to lift the charging rate that terminal is external equipment.
A kind of terminal with USB interface that above-described embodiment is provided, including:Processor is electrically connected with the processor Charging module, switching switch;In the USB interface have power pins, the first data wire pin, the second data wire pin and Grounding pin;The first data wire pin is electrically connected by the first data wire with the processor, and second data wire draws Pin is electrically connected by the second data wire with the processor, and the switching switch is located at first data wire and second number According between line;The power pins and the grounding pin are electrically connected with the charging module respectively;The processor, for controlling The working condition of the system switching switch, and when first data wire and the second data wire short circuit is detected, control is described More than the electric current of first threshold, the first threshold is that the type based on the USB interface pre-sets for charging module output, As can be seen that the working condition of switching switch can be controlled by processor, whether to control the first data wire and the second data wire Short circuit is carried out, and when the first data wire and the second data wire carry out short circuit, is exported to the second equipment by controlling charging module When carrying out short circuit more than the electric current of first threshold, i.e. the first data wire and the second data wire, by controlling charging module to second Equipment carries out quick charge such that it is able to lifts the charging rate that the first equipment is the second equipment, is therefore, it is possible to lift terminal The charging rate of external equipment.
In the embodiment of the present invention, terminal can be wireless terminal, wireless terminal can refer to provide a user with voice and/or The equipment of data connectivity, portable equipment with wireless connecting function or is connected to its elsewhere of radio modem Reason equipment.Wireless terminal can be through wireless access network (for example, RAN, Radio Access Network) and one or more cores Heart net is communicated, and wireless terminal can be mobile terminal, such as mobile phone (or being " honeycomb " phone) and with it is mobile eventually The computer at end, for example, it may be portable, pocket, hand-held, built-in computer or vehicle-mounted mobile device, it Language and/or data are exchanged with wireless access network.For example, PCS (PCS, Personal Communication Service) phone, wireless phone, Session initiation Protocol (SIP) phone, WLL (WLL, Wireless Local Loop) stand, the equipment such as personal digital assistant (PDA, Personal Digital Assistant).Wireless terminal is referred to as Subscri er unit (Subscriber Unit), subscriber station (Subscriber Station), movement station (Mobile Station), Mobile station (Mobile), distant station (Remote Station), access point (Access Point), remote terminal (Remote Terminal), access terminal (Access Terminal), user terminal (User Terminal), user agent (User Agent), user equipment (User Device) or subscriber's installation (User Equipment).
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method or computer program product. Therefore, the present invention can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.And, the present invention can be used to be can use in one or more computers for wherein including computer usable program code and deposited The shape of the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices The device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described Property concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellent Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without deviating from essence of the invention to the present invention God and scope.So, if these modifications of the invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising these changes and modification.

Claims (9)

1. a kind of method that equipment room charging is carried out by USB interface, it is characterised in that including:
First equipment is detected after USB interface is connected with the second equipment, it is determined that it is second equipment charge to need;
First equipment in the first data wire and the second data wire short circuit in detecting the USB interface, to described More than the electric current of first threshold, the first threshold is that the type based on the USB interface pre-sets to the output of two equipment.
2. the method for claim 1, it is characterised in that the USB interface is OTG, first equipment is terminal;
The determination needs to be second equipment charge, including:
The terminal when it is determined that ID pins in the OTG interfaces are grounded, it is determined that it is second equipment charge to need;
Before first equipment is to second equipment electric current of the output more than the standard usb interface electric current, also include:
The terminal is indicated according to terminal self-operating state or according to user, it is determined that first data wire and described second When data wire does not have data transfer, by first data wire and the second data wire short circuit.
3. method as claimed in claim 2, it is characterised in that the terminal according to terminal self-operating state, by described One data wire and the second data wire short circuit, including:
The terminal detects the electricity of itself, when the electricity of itself is detected higher than Second Threshold, by first data wire With the second data wire short circuit;Or
The terminal detects the power consumption of itself, when the power consumption of itself is detected less than three threshold values, by first data wire With the second data wire short circuit;Or
The terminal detects the temperature of itself, when the temperature of itself is detected less than four threshold values, by first data wire With the second data wire short circuit.
4. the method for claim 1, it is characterised in that first equipment is personal computer PC, and described second sets Standby is terminal;
The first data wire and the second data wire short circuit in the USB interface, are accomplished by the following way:
The terminal is indicated according to user, by the first data wire in the USB interface and the second data wire short circuit.
5. a kind of terminal with USB interface, it is characterised in that including:The charging mould that processor is electrically connected with the processor Block, switching switch;
There is power pins, the first data wire pin, the second data wire pin and grounding pin in the USB interface;
The first data wire pin is electrically connected by the first data wire with the processor, and the second data wire pin passes through Second data wire is electrically connected with the processor, the switching switch be located at first data wire and second data wire it Between;
The power pins and the grounding pin are electrically connected with the charging module respectively;
The processor, for controlling the working condition of the switching switch, and is detecting first data wire and second During data wire short circuit, control the charging module output more than the electric current of first threshold, the first threshold is based on the USB What the type of interface pre-set.
6. terminal as claimed in claim 5, it is characterised in that also include ID pins in the USB interface;
The processor is used for when the USB interface connection external equipment is detected and the ID pins and the grounding pin During short circuit, it is determined that needing to be charged for the external equipment.
7. terminal as claimed in claim 5, it is characterised in that also include:Detection module;
The detection module, for detecting the terminal status information of itself;
The processor, is additionally operable to the status information of the terminal itself according to detection module detection, controls the switching to open The working condition of pass.
8. terminal as claimed in claim 7, it is characterised in that
The detection module, specifically at least one in the following status information for detecting the terminal or any combination:Inspection The electricity of itself is surveyed, the power consumption of itself is detected and is detected the temperature of itself.
9. terminal as claimed in claim 5, it is characterised in that also include:Receiver module;
The receiver module, the control instruction for receiving user input;
The processor, is additionally operable to the control instruction according to the user input, controls the working condition of the switching switch.
CN201611169800.1A 2016-12-16 2016-12-16 A kind of method and terminal that equipment room charging is carried out by USB interface Pending CN106802872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611169800.1A CN106802872A (en) 2016-12-16 2016-12-16 A kind of method and terminal that equipment room charging is carried out by USB interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611169800.1A CN106802872A (en) 2016-12-16 2016-12-16 A kind of method and terminal that equipment room charging is carried out by USB interface

Publications (1)

Publication Number Publication Date
CN106802872A true CN106802872A (en) 2017-06-06

Family

ID=58984538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611169800.1A Pending CN106802872A (en) 2016-12-16 2016-12-16 A kind of method and terminal that equipment room charging is carried out by USB interface

Country Status (1)

Country Link
CN (1) CN106802872A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391418A (en) * 2017-09-12 2017-11-24 刘宇泽 A kind of data capsule based on USBHUB technologies
CN107832243A (en) * 2017-11-14 2018-03-23 广东欧珀移动通信有限公司 OTG equipment current-limiting apparatus, method and electronic equipment
CN108710593A (en) * 2018-05-24 2018-10-26 环旭电子股份有限公司 A kind of method of supplying power to and device based on Type-C connectors
CN109918327A (en) * 2019-03-27 2019-06-21 深圳传音通讯有限公司 OTG reversely charging electric current improvement method and OTG mobile phone
CN112928787A (en) * 2019-12-06 2021-06-08 北京小米移动软件有限公司 Charging circuit, electronic equipment, charging control method and device
CN113836065A (en) * 2021-08-31 2021-12-24 浙江地芯引力科技有限公司 One-to-many data line circuit and data line
CN116707048A (en) * 2022-09-06 2023-09-05 荣耀终端有限公司 OTG-based charging control method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102301305A (en) * 2011-06-09 2011-12-28 华为终端有限公司 Method and system for powering USB device
CN103178583A (en) * 2013-03-25 2013-06-26 成都西可科技有限公司 Mobile phone USB (Universal Serial Bus) interface charging system supporting charging for other mobile devices and charging realization method of mobile phone USB interface charging system
US20140181350A1 (en) * 2012-12-20 2014-06-26 Research In Motion Limited Method and Apparatus Pertaining to Universal Serial Bus-Based Charging
CN106026247A (en) * 2016-06-17 2016-10-12 上海与德通讯技术有限公司 Charging equipment and charging method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102301305A (en) * 2011-06-09 2011-12-28 华为终端有限公司 Method and system for powering USB device
US20140181350A1 (en) * 2012-12-20 2014-06-26 Research In Motion Limited Method and Apparatus Pertaining to Universal Serial Bus-Based Charging
CN103178583A (en) * 2013-03-25 2013-06-26 成都西可科技有限公司 Mobile phone USB (Universal Serial Bus) interface charging system supporting charging for other mobile devices and charging realization method of mobile phone USB interface charging system
CN106026247A (en) * 2016-06-17 2016-10-12 上海与德通讯技术有限公司 Charging equipment and charging method thereof

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391418A (en) * 2017-09-12 2017-11-24 刘宇泽 A kind of data capsule based on USBHUB technologies
CN107832243A (en) * 2017-11-14 2018-03-23 广东欧珀移动通信有限公司 OTG equipment current-limiting apparatus, method and electronic equipment
CN108710593A (en) * 2018-05-24 2018-10-26 环旭电子股份有限公司 A kind of method of supplying power to and device based on Type-C connectors
CN108710593B (en) * 2018-05-24 2021-10-15 环旭电子股份有限公司 Power supply method and device based on Type-C connector
CN109918327A (en) * 2019-03-27 2019-06-21 深圳传音通讯有限公司 OTG reversely charging electric current improvement method and OTG mobile phone
CN112928787A (en) * 2019-12-06 2021-06-08 北京小米移动软件有限公司 Charging circuit, electronic equipment, charging control method and device
CN113836065A (en) * 2021-08-31 2021-12-24 浙江地芯引力科技有限公司 One-to-many data line circuit and data line
CN116707048A (en) * 2022-09-06 2023-09-05 荣耀终端有限公司 OTG-based charging control method and related device

Similar Documents

Publication Publication Date Title
CN106802872A (en) A kind of method and terminal that equipment room charging is carried out by USB interface
CN106537720B (en) Charging method and electronic device
CN103080868B (en) Charging port
KR102158288B1 (en) Method for charging battery and an electronic device thereof
CN107465240A (en) A kind of intelligent movable power supplies and carry out the method for usb data communication with it
CN105896655B (en) Method for charging for electronic equipment and electronic equipment
CN107707000B (en) OTG power supply and wireless charging compatible circuit, related method and terminal equipment
CN105893304A (en) Terminal supporting dual network data transmission and realization method thereof
EP2860638B1 (en) Serial communication over communication control pin
KR20170002665A (en) Power adaptor, terminal and charging system
JP2009011153A (en) Device and method for detecting power supply
CN106655381B (en) Wireless charging method and device
CN107546803A (en) A kind of wireless charging device, wireless charging system and method
CN104467109B (en) Method for supplying power to electronic equipment and electronic equipment
CN102868820A (en) Mobile terminal, primary data communication device and mobile terminal charging system and method
CN111416412B (en) Charging control method and device and terminal equipment
CN106786904A (en) Charging system of selection, device and charging equipment
CN107681709A (en) For sending the method for electric power and supporting its electronic equipment
CN107294172A (en) Terminal device, power supply adaptor and charge control method
CN104617643B (en) Charging method, charging equipment, power supply unit and charging system
CN109254210B (en) Electronic equipment port type detection method and device, detection circuit and electronic equipment
CN108599290A (en) A kind of charge protection method, device, terminal device and storage medium
CN105048018B (en) The charging method and device of a kind of terminal with data exchanging function
CN107681730A (en) A kind of battery, terminal device, charging system, the recognition methods of battery and device
CN109275058B (en) Dual mode earphone system, bluetooth device and cable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170606