CN107516919B - A kind of charging method and charger - Google Patents
A kind of charging method and charger Download PDFInfo
- Publication number
- CN107516919B CN107516919B CN201710743050.2A CN201710743050A CN107516919B CN 107516919 B CN107516919 B CN 107516919B CN 201710743050 A CN201710743050 A CN 201710743050A CN 107516919 B CN107516919 B CN 107516919B
- Authority
- CN
- China
- Prior art keywords
- voltage
- multiplexing port
- port
- fast charge
- multiplexing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/00032—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
- H02J7/00036—Charger exchanging data with battery
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/00032—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
- H02J7/00034—Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/00032—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
- H02J7/00045—Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
Abstract
The present invention provides a kind of charging method and charger, this method comprises: detecting that the charger is connect via first multiplexing port and second multiplexing port with mobile terminal, the voltage of first multiplexing port and the voltage of second multiplexing port are obtained;The fast charge agreement that the mobile terminal is supported is judged according to the voltage of the voltage of first multiplexing port and second multiplexing port;If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then charge according to the first fast charge agreement to the mobile terminal;If it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then charge according to the second fast charge agreement to the mobile terminal.The compatibility of charger can be improved in the embodiment of the present invention.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of charging method and chargers.
Background technique
Continuous with mobile terminals such as smart phone, tablet computer and video cameras is popularized, to the continuation of the journey energy of mobile terminal
The requirement of power is growing day by day.In order to improve the cruising ability of mobile terminal, the capacity of battery is increasing, the charging time of battery
Also increasingly longer.In order to shorten the charging time of mobile terminal, fast charge technology is produced.
Fast charge technology more common at present includes that low-pressure direct fills technology and high-voltage charging technology, the core skill of fast charge technology
Art includes building the communication protocol based on mobile terminal and charger, so that charger can be real-time according to the request of mobile terminal
The adjustment for carrying out output voltage, exporting electric current.Due to the fast charge agreement difference that different fast charge technologies use, and different fast charges is assisted
View cannot be compatible, therefore is only just able to achieve using matched charger in mobile terminal charging process and is quickly filled
Electricity.
In the prior art, compatibility poor problem when charging for charger, not yet proposes effective solution at present
Scheme.
Summary of the invention
The embodiment of the present invention provides a kind of charging method and charger, and compatibility is poor when solving charger charging asks
Topic.
In a first aspect, the embodiment of the invention provides a kind of charging method, it is applied to charger, the charger includes the
One multiplexing port and the second multiplexing port, this method comprises:
Detect that the charger is connect via first multiplexing port and second multiplexing port with mobile terminal,
Obtain the voltage of first multiplexing port and the voltage of second multiplexing port;
The mobile terminal branch is judged according to the voltage of the voltage of first multiplexing port and second multiplexing port
The fast charge agreement held;
If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then according to the first fast charge agreement
It charges to the mobile terminal;
If it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to the second fast charge agreement
It charges to the mobile terminal.
Second aspect, the embodiment of the present invention also provide a kind of charger.The charger includes the first multiplexing port and second
Multiplexing port, the charger further include:
Obtain module, for detect the charger via first multiplexing port and second multiplexing port with
Mobile terminal connection, obtains the voltage of first multiplexing port and the voltage of second multiplexing port;
Judgment module, for judging institute according to the voltage of first multiplexing port and the voltage of second multiplexing port
State the fast charge agreement of mobile terminal support;
First charging module, for if it is determined that the mobile terminal support fast charge agreement be the first fast charge agreement, then press
It charges according to the first fast charge agreement to the mobile terminal;
Second charging module, for if it is determined that the mobile terminal support fast charge agreement be the second fast charge agreement, then press
It charges according to the second fast charge agreement to the mobile terminal.
The third aspect, the embodiment of the present invention also provide a kind of charger, including processor and are stored in the processor
In memory module and the computer program that can run on the processor, when the computer program is executed by the processor
The step of realizing above-mentioned charging method.
Fourth aspect, the embodiment of the present invention also provide a kind of computer readable storage medium, the computer-readable storage
Computer program is stored on medium, the computer program realizes above-mentioned charging method when being executed by processor the step of.
In this way, detecting that the charger is answered via first multiplexing port and described second in the embodiment of the present invention
It is connect with port with mobile terminal, obtains the voltage of first multiplexing port and the voltage of second multiplexing port;According to
The voltage of the voltage of first multiplexing port and second multiplexing port judges the fast charge agreement that the mobile terminal is supported;
If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then according to the first fast charge agreement to the shifting
Dynamic terminal charge;If it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to second fast charge
Agreement charges to the mobile terminal.The embodiment of the present invention can be according to the voltage of the first multiplexing port and the second multiplexing port
Voltage judges the fast charge agreement that mobile terminal is supported, so that the fast charge agreement supported using mobile terminal is filled to mobile terminal
Electricity improves the compatibility of charger.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention
Attached drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention,
For those of ordinary skill in the art, without any creative labor, it can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the flow chart of charging method provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram that charger provided in an embodiment of the present invention is connected with mobile terminal;
Fig. 3 is the flow chart for the charging method that further embodiment of this invention provides;
Fig. 4 is the flow chart for the charging method that further embodiment of this invention provides;
Fig. 5 is the flow chart for the charging method that further embodiment of this invention provides;
Fig. 6 is the flow chart for the charging method that further embodiment of this invention provides;
Fig. 7 is one of the structure chart of charger provided in an embodiment of the present invention;
Fig. 8 is the two of the structure chart of charger provided in an embodiment of the present invention;
Fig. 9 is the three of the structure chart of charger provided in an embodiment of the present invention;
Figure 10 is the four of the structure chart of charger provided in an embodiment of the present invention;
Figure 11 is the five of the structure chart of charger provided in an embodiment of the present invention;
Figure 12 is the six of the structure chart of charger provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
For ease of description, below to the present embodiments relate to fast charge agreement be illustrated:
First fast charge agreement: it can be the fast charge agreement for supporting low-pressure direct to fill technology, for example, VOOC fast charge agreement etc..
Optionally, the first fast charge agreement can (Input/Output be inputted defeated in conjunction with transfering data by serial communication and I/O
Mouth carries out two kinds of functions of status monitoring out), and can be configured by software flexible and realize switching.It is entire logical in handshake communication
Road is serial interface communication mode, within communication interval, by the way that charger end TX signal is configured to I/O mouth mold formula.
Second fast charge agreement: can be the fast charge agreement for supporting high pressure fast charge technology, for example, Quick Charge fast charge is assisted
View etc..
Optionally, the handshake procedure of the second fast charge agreement can be such that
If mobile terminal supports the second fast charge agreement, mobile terminal starts the voltage that 0.325V is loaded on the port D+.When
After this voltage maintains 1.25s, charger will be switched off the short circuit of the port D+ and the port D-, and the voltage on the port D- will decline,
After mobile terminal detects the decline of the voltage on the port D-, into preparation (ready) state of the second fast charge agreement.Mobile terminal
The combinations of voltages of the port D+/D- is adjusted according to target voltage, for example, 9V, then the voltage being arranged on the port D+ is 3.3V, the port D-
On voltage be 0.6V, charger export 9v voltage to charge to mobile terminal.
The embodiment of the present invention provides a kind of charging method.This method is applied to charger, which includes the first multiplexing
Port and the second multiplexing port.It is the flow chart of charging method provided in an embodiment of the present invention referring to Fig. 1, Fig. 1, as shown in Figure 1,
The following steps are included:
Step 101 detects the charger via first multiplexing port and second multiplexing port and movement
Terminal connection, obtains the voltage of first multiplexing port and the voltage of second multiplexing port.
In the embodiment of the present invention, above-mentioned first multiplexing port can be multiplexed with support the first fast charge agreement first port and
Support the first port of the second fast charge agreement, the second multiplexing port can be multiplexed with the second port for supporting the first fast charge agreement and
Support the second port of the second fast charge agreement, for example, the first multiplexing port can be used as USB (Universal Serial Bus,
Universal serial bus) the port D+, can also be used as UART (Universal Asynchronous Receiver/
Transmitter, UART Universal Asynchronous Receiver Transmitter) the port TX, the second multiplexing port can be used as the port D- of USB, can also make
For the port RX of UART.
Referring to fig. 2, the port D+/TX of charger can connect to the port D+/RX of mobile terminal, the D-/RX of charger
Port can connect to the port D-/TX of mobile terminal.
In the embodiment of the present invention, above-mentioned mobile terminal can be mobile phone, tablet computer (Tablet Personal
Computer), laptop computer (Laptop Computer), personal digital assistant (personal digital
Assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, MID) or wearable device
(Wearable Device) etc..
Step 102 judges the shifting according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement that dynamic terminal is supported.
In the embodiment of the present invention, the first fast charge agreement can be the fast charge agreement for supporting low-pressure direct to fill technology, for example, VOOC
Fast charge agreement, the second fast charge agreement can be the fast charge agreement for supporting high pressure fast charge technology, for example, Quick Charge fast charge is assisted
View.
Optionally, in the embodiment of the present invention, the first multiplexing port of charger can be used as the port D+, charger when initial
The second multiplexing port it is initial when can be used as the port D-.After charger accesses power supply, the first multiplexing of detection end can be passed through
Mouthful and the second multiplexing port voltage, to judge fast charge agreement that mobile terminal is supported.For example, if the first multiplexing port and
The voltage feature of changing with time of second multiplexing port meets voltage when charging according to the first fast charge agreement and changes with time
Feature can then determine that mobile terminal supports the first fast charge agreement, if the voltage of the first multiplexing port and the second multiplexing port
The feature of changing with time meets voltage when charging according to the second fast charge agreement and changes with time situation, then can determine movement
Terminal supports the second fast charge agreement.
Step 103, if it is determined that the mobile terminal support fast charge agreement be the first fast charge agreement, then according to described first
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the first fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the first fast charge agreement, for example, can be UART by the D+/D- port switching of charger
TX/RX port mode, to realize the communication handshake and charging of charger and mobile terminal.
Step 104, if it is determined that the mobile terminal support fast charge agreement be the second fast charge agreement, then according to described second
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the second fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the second fast charge agreement, for example, charger can be according to the port D+/D- of mobile terminal
The corresponding voltage of voltage output to charge to mobile terminal.
In this way, the embodiment of the present invention is when judging that mobile terminal supports the first fast charge agreement, charger and mobile terminal
Can hold consultation charging according to the first fast charge agreement, judge mobile terminal support the second fast charge agreement when, charger and
Mobile terminal can hold consultation charging according to the second fast charge agreement, so that charger can be the shifting of supporting different fast charge agreements
Dynamic terminal charges, and improves the compatibility of charger.
It is the flow chart for the charging method that further embodiment of this invention provides referring to Fig. 3, Fig. 3.The embodiment of the present invention with it is upper
The difference of one embodiment is essentially consisted in be sentenced to according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement that the mobile terminal is supported of breaking is further limited, specifically, in the embodiment of the present invention, first multiplexing
Port and second multiplexing port are shorted, the voltage according to first multiplexing port and second multiplexing port
Voltage judges the fast charge agreement that the mobile terminal is supported, comprising: if the first voltage of first multiplexing port is greater than first
Predeterminated voltage then disconnects the short circuit of first multiplexing port and second multiplexing port;First multiplexing is detected respectively
The second voltage of the second voltage of port and second multiplexing port;If the second voltage of first multiplexing port and described
The second voltage of second multiplexing port is all larger than the second predeterminated voltage, it is determined that the mobile terminal supports the first fast charge association
View.
As shown in figure 3, charging method provided in an embodiment of the present invention the following steps are included:
Step 301 detects that charger is connect via the first multiplexing port and the second multiplexing port with mobile terminal, and institute
It states the first multiplexing port and second multiplexing port is shorted, obtain the first voltage of first multiplexing port.
Optionally, the first multiplexing port and the second multiplexing port can default short circuit, at the beginning of the first multiplexing port of charger
It can be used as the port D+ when the beginning, the second multiplexing port of charger can be used as the port D- when initial.The embodiment of the present invention can be with
After charger accesses power supply, BC1.2 (Battery Charging Specification Revision can be first passed through
1.2, battery Charging Specification revision 1.2) protocol detection charging port type, if DCP (Dedicated Charging
Port, special charging port), 303 are thened follow the steps, process otherwise can be terminated.
It, can be with the first voltage of the first multiplexing port of cycle detection, wherein the first multiplexing port in the embodiment of the present invention
First voltage can disconnect the first detected before multiplexing port for the first multiplexing port and the second multiplexing port
Voltage.
If step 302, the first voltage of first multiplexing port are greater than the first predeterminated voltage, it is multiple to disconnect described first
With the short circuit of port and second multiplexing port.
Above-mentioned first predeterminated voltage can be rationally arranged according to specific fast charge agreement, for example, above-mentioned first is default
Voltage can be 2V.
Specifically, if the first voltage of the first multiplexing port be greater than the first predeterminated voltage, disconnect the first multiplexing port and
The connection of second multiplexing port, and execute step 303.
Optionally, if the first voltage of first multiplexing port is greater than the first predeterminated voltage, described the is disconnected
The short circuit of one multiplexing port and second multiplexing port, comprising: if the first voltage of first multiplexing port is greater than first
Predeterminated voltage then judges that the first voltage of first multiplexing port is greater than whether duration of the first predeterminated voltage is greater than the
One preset duration;Determine that the first voltage of first multiplexing port is greater than the duration of the first predeterminated voltage in advance greater than first
If duration, the short circuit of first multiplexing port and second multiplexing port is disconnected.
In the embodiment of the present invention, above-mentioned first preset duration can be rationally arranged according to the actual situation, for example, first
Preset duration can be 3 seconds.Specifically, can continue when the first voltage of the first multiplexing port is greater than the first predeterminated voltage
Judge that the first voltage of the first multiplexing port is greater than whether duration of the first predeterminated voltage is greater than the first preset duration, and
When the duration that the first voltage of first multiplexing port is greater than the first predeterminated voltage is greater than the first preset duration, it is multiple to disconnect first
With the connection of port and the second multiplexing port, the first voltage for continuing to test the first multiplexing port otherwise can be returned.By upper
Mode is stated, can be reduced because interference etc. causes voltage dithering, so that the first voltage of the first multiplexing port is greater than first
A possibility that predeterminated voltage.
Specifically, may determine that first if the first voltage of the first multiplexing port is less than or equal to the first predeterminated voltage
Whether the first voltage of multiplexing port and the first voltage of the second multiplexing port are greater than third predeterminated voltage, or can return after
The first voltage of the first multiplexing port of continuous detection, it is not limited in the embodiment of the present invention.
Second electricity of step 303, the second voltage for detecting first multiplexing port respectively and second multiplexing port
Pressure.
In the embodiment of the present invention, the second voltage of the second voltage of the first multiplexing port and the second multiplexing port can be the
The voltage of one multiplexing port and the second multiplexing port the first multiplexing port detected after disconnecting and the second multiplexing end
The voltage of mouth.
If the second voltage of step 304, the second voltage of first multiplexing port and second multiplexing port is big
In the second predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
In the embodiment of the present invention, the second predeterminated voltage can be identical as the first predeterminated voltage, can also be with the first default electricity
Pressure is different, specifically, the second predeterminated voltage can also be rationally arranged according to the actual situation, for example, the second predeterminated voltage
For 2V.
Specifically, the second voltage in the first multiplexing port is greater than the second electricity of the second predeterminated voltage and the second multiplexing port
When pressure is also greater than the second predeterminated voltage, determines that mobile terminal supports the first fast charge agreement, otherwise can return to step 303.
Optionally, the first fast charge agreement can be the fast charge agreement for supporting low-pressure direct to fill technology, for example, VOOC fast charge is assisted
View, the second fast charge agreement can be the fast charge agreement for supporting high pressure fast charge technology, for example, Quick Charge fast charge agreement.
Step 305, if it is determined that the mobile terminal support fast charge agreement be the first fast charge agreement, then according to described first
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the first fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the first fast charge agreement, for example, can be UART by the D+/D- port switching of charger
TX/RX port mode, to realize the communication handshake and charging of charger and mobile terminal.
In this way, voltage and first multiplexing port of the embodiment of the present invention according to the first multiplexing port and the second multiplexing port
The fast charge agreement that situation determines that mobile terminal supported is changed over time with the voltage of the second multiplexing port, and is judging to move
When terminal supports the first fast charge agreement, charger and mobile terminal can hold consultation charging according to the first fast charge agreement.
Referring to fig. 4, Fig. 4 is the flow chart for the charging method that further embodiment of this invention provides.The embodiment of the present invention and the
The difference of one embodiment is essentially consisted in according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement for judging that the mobile terminal is supported is further limited.
As shown in figure 4, charging method provided in an embodiment of the present invention the following steps are included:
Step 401 detects that charger is connect via the first multiplexing port and the second multiplexing port with mobile terminal, and institute
It states the first multiplexing port and second multiplexing port is shorted, obtain the first voltage of first multiplexing port.
The step is with above-mentioned steps 301, and details are not described herein.
If step 402, the first voltage of first multiplexing port be less than or equal to the first predeterminated voltage, judgement described in
Whether the first voltage of the first multiplexing port and the first voltage of second multiplexing port are all larger than third predeterminated voltage, and institute
State the first multiplexing port first voltage and second multiplexing port first voltage be greater than third predeterminated voltage it is lasting when
Whether length is all larger than the second preset duration.
In the embodiment of the present invention, above-mentioned third predeterminated voltage can be rationally arranged according to the actual situation, for example, third
Predeterminated voltage can be 0.6V.Above-mentioned second preset duration can also be rationally arranged according to the actual situation, for example, second is pre-
If duration can be 1.25 seconds.
Specifically, can further sentence when the first voltage of the first multiplexing port is less than or equal to the first predeterminated voltage
Whether the first voltage of disconnected first multiplexing port and the first voltage of the second multiplexing port are all larger than third predeterminated voltage, first
When the first voltage of multiplexing port and the first voltage of the second multiplexing port are all larger than third predeterminated voltage, can further it judge
The duration that the first voltage of first multiplexing port and the first voltage of the second multiplexing port are all larger than third predeterminated voltage is
It is no to be greater than the second preset duration, third is all larger than in the first voltage of the first multiplexing port and the first voltage of the second multiplexing port
When the duration of predeterminated voltage is greater than the second preset duration, the first multiplexing port and second multiplexing port can be disconnected
Connection, otherwise can return to the first voltage for continuing to test the first multiplexing port, and judge the first voltage of the first multiplexing port
Whether the first predeterminated voltage is greater than.
The first voltage of step 403, the first voltage for determining first multiplexing port and second multiplexing port is equal
Greater than third predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than
The duration of third predeterminated voltage is all larger than the second preset duration, disconnects first multiplexing port and second multiplexing end
The short circuit of mouth.
The third electricity of step 404, the tertiary voltage for detecting first multiplexing port respectively and second multiplexing port
Pressure.
The embodiment of the present invention can be after disconnecting the connection of the first multiplexing port and the second multiplexing port, and detection first is multiple
With the tertiary voltage of port and the tertiary voltage of the second multiplexing port, wherein the tertiary voltage of the first multiplexing port and second is answered
It can be with the tertiary voltage of port equal in the first voltage of the first multiplexing port and the first voltage of second multiplexing port
Greater than third predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than
The duration of third predeterminated voltage is all larger than under conditions of the second preset duration, is disconnected the first multiplexing port and described second and is answered
With the voltage of the first multiplexing port detected after the connection of port and the voltage of the second multiplexing port.
If the tertiary voltage of step 405, first multiplexing port and the tertiary voltage of second multiplexing port are big
In the 4th predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
In the embodiment of the present invention, above-mentioned 4th predeterminated voltage can be rationally arranged according to the actual situation, for example, the 4th
Predeterminated voltage can be 2V.
Specifically, the embodiment of the present invention can be in the tertiary voltage of the first multiplexing port and the third electricity of the second multiplexing port
When pressure is all larger than four predeterminated voltages, determine that mobile terminal supports the first fast charge agreement, so as to execute the first fast charge agreement
Handshake logic.
Step 406, if it is determined that the mobile terminal support fast charge agreement be the first fast charge agreement, then according to described first
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the first fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the first fast charge agreement, for example, can be UART by the D+/D- port switching of charger
TX/RX port mode, to realize the communication handshake and charging of charger and mobile terminal.
In this way, voltage and first multiplexing port of the embodiment of the present invention according to the first multiplexing port and the second multiplexing port
The fast charge agreement that situation determines that mobile terminal supported is changed over time with the voltage of the second multiplexing port, and is judging to move
When terminal supports the first fast charge agreement, charger and mobile terminal can hold consultation charging according to the first fast charge agreement.
It is the flow chart for the charging method that further embodiment of this invention provides referring to Fig. 5, Fig. 5.The embodiment of the present invention and the
The difference of one embodiment is essentially consisted in according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement for judging that the mobile terminal is supported is further limited.
As shown in figure 5, charging method provided in an embodiment of the present invention the following steps are included:
Step 501 detects that charger is connect via the first multiplexing port and the second multiplexing port with mobile terminal, and institute
It states the first multiplexing port and second multiplexing port is shorted, obtain the first voltage of first multiplexing port.
The step is with above-mentioned steps 301, and details are not described herein.
If step 502, the first voltage of first multiplexing port be less than or equal to the first predeterminated voltage, judgement described in
Whether the first voltage of the first multiplexing port and the first voltage of second multiplexing port are all larger than third predeterminated voltage, and institute
State the first multiplexing port first voltage and second multiplexing port first voltage be greater than third predeterminated voltage it is lasting when
Whether length is all larger than the second preset duration.
In the embodiment of the present invention, above-mentioned third predeterminated voltage can be rationally arranged according to the actual situation, for example, third
Predeterminated voltage can be 0.6V.Above-mentioned second preset duration can also be rationally arranged according to the actual situation, for example, second is pre-
If duration can be 1.25 seconds.
The first voltage of step 503, the first voltage for determining first multiplexing port and second multiplexing port is equal
Greater than third predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than
The duration of third predeterminated voltage is all larger than the second preset duration, disconnects first multiplexing port and second multiplexing end
The short circuit of mouth.
The third electricity of step 504, the tertiary voltage for detecting first multiplexing port respectively and second multiplexing port
Pressure.
The embodiment of the present invention can be after disconnecting the connection of the first multiplexing port and the second multiplexing port, and detection first is multiple
With the tertiary voltage of port and the tertiary voltage of the second multiplexing port, wherein the tertiary voltage of the first multiplexing port and second is answered
It can be with the tertiary voltage of port equal in the first voltage of the first multiplexing port and the first voltage of second multiplexing port
Greater than third predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than
The duration of third predeterminated voltage is all larger than under conditions of the second preset duration, is disconnected the first multiplexing port and described second and is answered
With the voltage of the first multiplexing port detected after the connection of port and the voltage of the second multiplexing port.
If the tertiary voltage of step 505, first multiplexing port and the tertiary voltage of second multiplexing port are big
In the 4th predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
The embodiment of the present invention can be big in the tertiary voltage of the first multiplexing port and the tertiary voltage of the second multiplexing port
When four predeterminated voltages, determine that mobile terminal supports the first fast charge agreement, so as to execute shaking hands for the first fast charge agreement
Logic.
Step 506, if it is determined that the mobile terminal support fast charge agreement be the first fast charge agreement, then according to described first
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the first fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the first fast charge agreement, for example, can be UART by the D+/D- port switching of charger
TX/RX port mode, to realize the communication handshake and charging of charger and mobile terminal.
If being deposited in the tertiary voltage of step 507, first multiplexing port and the tertiary voltage of second multiplexing port
It is less than or equal to the 4th predeterminated voltage at least one, then judges whether the tertiary voltage of first multiplexing port is greater than the 5th
Predeterminated voltage and less than the 6th predeterminated voltage, and the tertiary voltage of second multiplexing port whether be greater than the 7th predeterminated voltage and
Less than the 8th predeterminated voltage.
In the embodiment of the present invention, the default electricity of above-mentioned 5th predeterminated voltage, the 6th predeterminated voltage, the 7th predeterminated voltage and the 8th
Pressure can be configured according to the actual situation, for example, the 5th predeterminated voltage can be 2V, the 6th predeterminated voltage can be
3.5V, the 7th predeterminated voltage can be 0.325V, and the 8th predeterminated voltage can be 1.2V.
Optionally, for above-mentioned steps 507, if the tertiary voltage of first multiplexing port is not more than the 5th predeterminated voltage
And/or be not less than the 6th predeterminated voltage, and/or, the tertiary voltage of second multiplexing port no more than the 7th predeterminated voltage and/
Or be not less than the 8th predeterminated voltage, then it returns and executes the tertiary voltage for detecting first multiplexing port respectively and described second multiple
The step of with the tertiary voltage of port.
For example, the tertiary voltage of the first multiplexing port is Vdp3, the tertiary voltage of the second multiplexing port is Vdm3, and the 5th is pre-
If voltage, the 6th predeterminated voltage, the 7th predeterminated voltage and the 8th predeterminated voltage are followed successively by V5, V6, V7 and V8, if Vdp3 and
Vdm3 be unsatisfactory for V5<Vdp3<V6 and V7<Vdm3<V8 namely Vdp3>=V 6, Vdp3≤V 5, Vdm3>=V8 and Vdm3≤
Meet at least one in V7, then returns and execute the tertiary voltage for detecting first multiplexing port respectively and second multiplexing end
The step of tertiary voltage of mouth, namely return to step 504.
If the tertiary voltage of step 508, first multiplexing port is greater than the 5th predeterminated voltage and less than the 6th default electricity
Pressure, and the tertiary voltage of second multiplexing port is greater than the 7th predeterminated voltage and less than the 8th predeterminated voltage, it is determined that it is described
Mobile terminal supports the second fast charge agreement.
For example, the tertiary voltage of the first multiplexing port is Vdp3, the tertiary voltage of the second multiplexing port is Vdm3, and the 5th is pre-
If voltage, the 6th predeterminated voltage, the 7th predeterminated voltage and the 8th predeterminated voltage are followed successively by V5, V6, V7 and V8, if V5 < Vdp3 < V6
And V7 < Vdm3 < V8, it is determined that mobile terminal supports the second fast charge agreement, holds so as to execute the charging of the second fast charge agreement
Hand logic;Otherwise the tertiary voltage of the tertiary voltage and the second multiplexing port that execute the first multiplexing port of detection can be returned, or
It is that can terminate process.
Step 509, if it is determined that the mobile terminal support fast charge agreement be the second fast charge agreement, then according to described second
Fast charge agreement charges to the mobile terminal.
In the embodiment of the present invention, if the fast charge agreement that mobile terminal is supported is the second fast charge agreement, charger and shifting
Dynamic terminal can hold consultation charging according to the second fast charge agreement, for example, charger can be according to the port D+/D- of mobile terminal
The corresponding voltage of voltage output to charge to mobile terminal.
In this way, the embodiment of the present invention according to the voltage and the first multiplexing port of the first multiplexing port and the second multiplexing port and
The voltage of second multiplexing port changes over time situation and determines the fast charge agreement that mobile terminal is supported, and is judging movement eventually
When the first fast charge agreement is supported at end, charger and mobile terminal can hold consultation charging according to the first fast charge agreement, judge
When mobile terminal supports the second fast charge agreement out, charger and mobile terminal can hold consultation according to the second fast charge agreement and fill
Electricity, so that charger can improve the compatibility of charger to support the mobile terminal of different fast charge agreements to charge.
It is the flow chart of charging method provided in an embodiment of the present invention referring to Fig. 6, Fig. 6.As shown in fig. 6, the present invention is implemented
Example provide charging method the following steps are included:
Step 601, charger access power supply.
In the embodiment of the present invention, charger and mobile terminal can be connected by the first multiplexing port and the second multiplexing port
It connects, and after charger accesses power supply, executes step 602.
Step 602, detection D+ port voltage Vdp1.
In the embodiment of the present invention, the first multiplexing port of charger can be used as USB (Universal Serial Bus,
Universal serial bus) the port D+, can also be used as UART (Universal Asynchronous Receiver/
Transmitter, UART Universal Asynchronous Receiver Transmitter) the port TX, the second multiplexing port can be used as the port D- of USB, can also make
For the port RX of UART.When initial, the first multiplexing port and the second multiplexing port of charger can work in D+/D- mode,
Namely first multiplexing port it is initial when as the port D+, as the port D- when the second multiplexing port is initial.In addition, the first multiplexing end
Mouth and the second multiplexing port are shorted.
The embodiment of the present invention can also first pass through BC1.2 protocol detection charging port type, if DCP (Dedicated
Charging Port, special charging port), then follow the steps 603.
Step 603, Vdp1 > V1?
Specifically, judging whether Vdp1 is greater than V1, wherein Vdp1, that is, above-mentioned first multiplexing port first voltage, V1 are
For the first above-mentioned predeterminated voltage, optionally, V1 can be 2V.In Vdp1 > V1, step 604 is executed, it is no to then follow the steps
609。
Step 604, Vdp1 > V1 duration be greater than T1?
Specifically, judging whether the duration of Vdp1 > V1 is greater than T1, wherein the first preset duration of T1, that is, above-mentioned, it can
Choosing, T1 can be 3 seconds.When the duration of Vdp1 > V1 being greater than T1, step 605 is executed, otherwise can be returned to step
602。
Step 605 disconnects the port D+ and the port D-.
Specifically, disconnecting the connection of the port D+ and the port D- when the duration of Vdp1 > V1 being greater than T1, and execute step
Rapid 606.
Step 606, the voltage Vdp2 and Vdm2 for detecting the port D+ and D-.Specifically, Vdp2 and Vdm2 are above-mentioned first
The second voltage of the second voltage of multiplexing port and the second multiplexing port.
Step 607, Vdp2 > V1 and Vdm2 > V1?
Specifically, judge whether Vdp2 > V1 and Vdm2 > V1, if Vdp2 > V1 and Vdm2 > V1,608 are thened follow the steps, it is no
Then return to step 606.
Step 608, into the first fast charge agreement charge mode.
In Vdp2 > V1 and Vdm2 > V1, determine that mobile terminal supports the first fast charge agreement, so that charger and movement are eventually
End according to the first fast charge agreement carries out charging of shaking hands, specifically, the first multiplexing port and the second multiplexing port of charger by D+/
D- pattern switching is TX/RX mode, the charging of shaking hands of Lai Shixian charger and mobile terminal.
Step 609, Vdp1 > V2 and Vdm1 > V2, and the duration is greater than T2?
Specifically, judge whether Vdp1 > V2 and Vdm1 > V2, and the duration of Vdp1 > V2 and Vdm1 > V2 are greater than T2,
In, the second preset duration of T2, that is, above-mentioned, optionally, T2 can be 1.25 seconds.In Vdp1 > V2 and Vdm1 > V2, and Vdp1 > V2
And the duration of Vdm1 > V2 be greater than T2 when, step 610 can be executed, otherwise can return to step 602.
Step 610 disconnects the port D+ and the port D-.
Specifically, in Vdp1 > V2 and Vdm1 > V2, and when the duration of Vdp1 > V2 and Vdm1 > V2 are greater than T2, D+ is disconnected
The connection of port and the port D-, and execute step 611.
Step 611, the voltage Vdp3 and Vdm3 for detecting the port D+ and D-.
Specifically, the third of Vdp3 and Vdm3, that is, above-mentioned first multiplexing port tertiary voltage and the second multiplexing port is electric
Pressure.
Step 612, Vdp3 > V1 and Vdm3 > V1?
Specifically, if Vdp3 > V1 and Vdm3 > V1,608 are thened follow the steps, it is no to then follow the steps 613.
Step 613, V3 < Vdp3 < V4 and V5 < Vdm3 < V6?
Specifically, V3, V4, V5 and V6 respectively indicate above-mentioned 5th predeterminated voltage, the 6th predeterminated voltage, the 7th predeterminated voltage
With the 8th predeterminated voltage.Optionally, V3 can be 2V, and V4 can be 3.5V, and V5 can be 0.325V, and V6 can be 1.2V.
In V3 < Vdp3 < V4 and V5 < Vdm3 < V6, it can determine that mobile terminal supports the second fast charge agreement, execute step
614, otherwise return to step 611.
Step 614, into the second fast charge agreement charge mode.
Specifically, charger can be according to the end D+ of mobile terminal if it is determined that mobile terminal supports the second fast charge agreement
Mouth and the corresponding voltage of voltage output of the port D- charge.
From the foregoing, it will be observed that in the embodiment of the present invention, when charger connects charging with mobile terminal, by judging charger
The combinations of voltages of the port D+/D- and timing judge fast charge agreement that mobile terminal is supported.If charger identifies mobile whole
The first fast charge agreement is supported at end, and charger realizes filling for charger and mobile terminal by D+/D- pattern switching is TX/RX mode
Electric handshake logic.If charger identifies that mobile terminal supports the second fast charge agreement, charger is according to the D+/D- of mobile terminal
Level combinations export corresponding voltage and charge, to improve the compatibility and versatility of charger.
It should be noted that charger is identifying that mobile terminal neither supports the first fast charge agreement, second is not also supported
When fast charge agreement, it can be charged using conventional charging modes (i.e. non-fast charge mode) to mobile terminal, charger is identifying
Mobile terminal had both supported the first fast charge agreement, when also supporting the second fast charge agreement, can choose any of them fast charge agreement
It charges to mobile terminal.In addition, charger is not limited to compatible first fast charge agreement and the second fast charge association in the embodiment of the present invention
More than two fast charge agreements can be compatible with by discussing two fast charge agreements namely charger.Moreover, provided in an embodiment of the present invention
Determine that the scheme of fast charge protocol type can also be applied to mobile terminal side according to the voltage situation that changes with time.
It is the structure chart of charger provided in an embodiment of the present invention referring to Fig. 7, Fig. 7.The charger includes the first multiplexing
Port and the second multiplexing port, as shown in fig. 7, charger 700 further include:
Module 701 is obtained, for detecting the charger via first multiplexing port and second multiplexing end
Mouth is connect with mobile terminal, obtains the voltage of first multiplexing port and the voltage of second multiplexing port;
Judgment module 702, for being sentenced according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement that the mobile terminal that breaks is supported;
First charging module 703, for if it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then
It charges according to the first fast charge agreement to the mobile terminal;
Second charging module 704, for if it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then
It charges according to the second fast charge agreement to the mobile terminal.
Optionally, first multiplexing port and second multiplexing port are shorted, referring to Fig. 8, the judgment module 702
Include:
First switching units 7021, if the first voltage for first multiplexing port is greater than the first predeterminated voltage,
Disconnect the short circuit of first multiplexing port and second multiplexing port;
First detection unit 7022, for detecting the second voltage and second multiplexing of first multiplexing port respectively
The second voltage of port;
First determination unit 7023, if second voltage and second multiplexing port for first multiplexing port
Second voltage is all larger than the second predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
Optionally, referring to Fig. 9, first switching units 7021 include:
Judgment sub-unit 70211 is sentenced if the first voltage for first multiplexing port is greater than the first predeterminated voltage
Break first multiplexing port first voltage be greater than the first predeterminated voltage duration whether be greater than the first preset duration;
Subelement 70212 is disconnected, for determining that the first voltage of first multiplexing port is greater than the first predeterminated voltage
Duration is greater than the first preset duration, then disconnects the short circuit of first multiplexing port and second multiplexing port.
Optionally, first multiplexing port and second multiplexing port are shorted, referring to Figure 10, the judgment module
702 include:
First judging unit 7024, if the first voltage for first multiplexing port is less than or equal to the first default electricity
Whether pressure, the then first voltage of the first voltage and second multiplexing port that judge first multiplexing port are all larger than third
Predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are default greater than third
Whether the duration of voltage is all larger than the second preset duration;
Second switching units 7025, for determine first multiplexing port first voltage and second multiplexing port
First voltage be all larger than third predeterminated voltage, and the first voltage of first multiplexing port and second multiplexing port
First voltage be greater than third predeterminated voltage duration be all larger than the second preset duration, then disconnect first multiplexing port and
The short circuit of second multiplexing port;
Second detection unit 7026, tertiary voltage and described second for detecting first multiplexing port respectively are multiplexed
The tertiary voltage of port;
Second determination unit 7027, if tertiary voltage and second multiplexing port for first multiplexing port
Tertiary voltage is all larger than the 4th predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
Optionally, referring to Figure 11, the judgment module 702 further include:
Second judgment unit 7028, if tertiary voltage and second multiplexing port for first multiplexing port
There are at least one to be less than or equal to the 4th predeterminated voltage in tertiary voltage, then judges the tertiary voltage of first multiplexing port
Whether fiveth predeterminated voltage is greater than and less than the 6th predeterminated voltage, and whether the tertiary voltage of second multiplexing port is greater than the
Seven predeterminated voltages and less than the 8th predeterminated voltage;
Third determination unit 7029, if the tertiary voltage for first multiplexing port is greater than the 5th predeterminated voltage and small
In the 6th predeterminated voltage, and the tertiary voltage of second multiplexing port is greater than the 7th predeterminated voltage and less than the 8th default electricity
Pressure, it is determined that the mobile terminal supports the second fast charge agreement.
Optionally, the second detection unit 7026 is also used to:
If the tertiary voltage of first multiplexing port is no more than the 5th predeterminated voltage and/or not less than the 6th default electricity
Pressure, and/or, the tertiary voltage of second multiplexing port no more than the 7th predeterminated voltage and/or is not less than the 8th predeterminated voltage,
Then detect the tertiary voltage of first multiplexing port and the tertiary voltage of second multiplexing port respectively again.
Charger 700 can be realized each process of the charging method of the embodiment of the method for Fig. 1, Fig. 3 to Fig. 6, and reach
Identical effect is to avoid repeating, and which is not described herein again.
The charger 700 of the embodiment of the present invention detects that the charger is multiple via described first by obtaining module 701
It is connect with port and second multiplexing port with mobile terminal, the voltage and described second for obtaining first multiplexing port are answered
With the voltage of port;Judgment module 702 is sentenced according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement that the mobile terminal that breaks is supported;First charging module 703 is if it is determined that the fast charge agreement that the mobile terminal is supported
For the first fast charge agreement, then charge according to the first fast charge agreement to the mobile terminal;Second charging module 704 if it is determined that
The fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to the second fast charge agreement to the mobile terminal
Charging.The embodiment of the present invention can judge mobile terminal institute according to the voltage of the first multiplexing port and the voltage of the second multiplexing port
The fast charge agreement of support improves charger to charge using the fast charge agreement that mobile terminal is supported to mobile terminal
Compatibility.
The embodiment of the present invention also provides a kind of charger, including processor and is stored in the memory module of the processor
And the computer program that can be run on the processor, the computer program realize above-mentioned when being executed by the processor
Each process of the charging method of one embodiment of the method, and identical technical effect can be reached, it is no longer superfluous here to avoid repeating
It states.
The embodiment of the present invention also provides a kind of computer readable storage medium, stores on the computer readable storage medium
There is computer program, the computer program realizes each process of above-mentioned charging method when being executed by processor, and can reach
To identical technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, it is such as read-only
Memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation
RAM), magnetic or disk etc..
It is the structure chart of charger provided in an embodiment of the present invention, as shown in figure 12, charger 1200 referring to Figure 12, Figure 12
It include: at least one processor 1201, the first multiplexing port 1202 and the second multiplexing port 1203, wherein the processor packet
Include memory module.Various components in charger 1200 are coupled by bus system 1204.It is understood that bus system
1204 for realizing the connection communication between these components.Bus system 1204 further includes power supply in addition to including data/address bus
Bus, control bus and status signal bus in addition.But for the sake of clear explanation, various buses are all designated as bus in Figure 12
System 1204.
In embodiments of the present invention, charger 1200 further include: be stored in memory module and can be on processor 1201
The computer program of operation, computer program realize following steps when being executed by processor 1201: detecting that the charger passes through
It is connect by first multiplexing port and second multiplexing port with mobile terminal, obtains the voltage of first multiplexing port
With the voltage of second multiplexing port;Sentenced according to the voltage of the voltage of first multiplexing port and second multiplexing port
The fast charge agreement that the mobile terminal that breaks is supported;If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement,
Then charge according to the first fast charge agreement to the mobile terminal;If it is determined that the fast charge agreement that the mobile terminal is supported is the
Two fast charge agreements then charge to the mobile terminal according to the second fast charge agreement.
The method that the embodiments of the present invention disclose can be applied in processor 1201, or real by processor 1201
It is existing.Processor 1201 may be a kind of IC chip, the processing capacity with signal.During realization, the above method
Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1201 or software form.Above-mentioned
Processor 1201 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated
Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application
Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing,
DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic
Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor,
In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
Optionally, first multiplexing port and second multiplexing port are shorted, and computer program is by processor 1201
It can also be achieved following steps when execution:
If the first voltage of first multiplexing port be greater than the first predeterminated voltage, disconnect first multiplexing port and
The short circuit of second multiplexing port;
The second voltage of first multiplexing port and the second voltage of second multiplexing port are detected respectively;
If it is pre- that the second voltage of first multiplexing port and the second voltage of second multiplexing port are all larger than second
If voltage, it is determined that the mobile terminal supports the first fast charge agreement.
Optionally, following steps be can also be achieved when computer program is executed by processor 1201:
If the first voltage of first multiplexing port is greater than the first predeterminated voltage, first multiplexing port is judged
Whether the duration that first voltage is greater than the first predeterminated voltage is greater than the first preset duration;
Determine that the first voltage of first multiplexing port is greater than first greater than the duration of the first predeterminated voltage and presets
Duration then disconnects the short circuit of first multiplexing port and second multiplexing port.
Optionally, first multiplexing port and second multiplexing port are shorted, and computer program is by processor 1201
It can also be achieved following steps when execution:
If the first voltage of first multiplexing port is less than or equal to the first predeterminated voltage, first multiplexing is judged
Whether the first voltage of port and the first voltage of second multiplexing port are all larger than third predeterminated voltage, and described first is multiple
Whether the duration for being greater than third predeterminated voltage with the first voltage of port and the first voltage of second multiplexing port is equal
Greater than the second preset duration;
The first voltage of the first voltage and second multiplexing port that determine first multiplexing port is all larger than third
Predeterminated voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are default greater than third
The duration of voltage is all larger than the second preset duration, then disconnects the short of first multiplexing port and second multiplexing port
It connects;
The tertiary voltage of first multiplexing port and the tertiary voltage of second multiplexing port are detected respectively;
If it is pre- that the tertiary voltage of the tertiary voltage of first multiplexing port and second multiplexing port is all larger than the 4th
If voltage, it is determined that the mobile terminal supports the first fast charge agreement.
Optionally, following steps be can also be achieved when computer program is executed by processor 1201:
If having at least one in the tertiary voltage of the tertiary voltage of first multiplexing port and second multiplexing port
It is a to be less than or equal to the 4th predeterminated voltage, then judge whether the tertiary voltage of first multiplexing port is greater than the 5th predeterminated voltage
And less than the 6th predeterminated voltage, and whether the tertiary voltage of second multiplexing port is greater than the 7th predeterminated voltage and less than the 8th
Predeterminated voltage;
If the tertiary voltage of first multiplexing port is greater than the 5th predeterminated voltage and less than the 6th predeterminated voltage, and described
The tertiary voltage of second multiplexing port is greater than the 7th predeterminated voltage and less than the 8th predeterminated voltage, it is determined that the mobile terminal branch
Hold the second fast charge agreement.
Optionally, following steps be can also be achieved when computer program is executed by processor 1201:
If the tertiary voltage of first multiplexing port is no more than the 5th predeterminated voltage and/or not less than the 6th default electricity
Pressure, and/or, the tertiary voltage of second multiplexing port no more than the 7th predeterminated voltage and/or is not less than the 8th predeterminated voltage,
Then return to the step for executing the tertiary voltage of the tertiary voltage and second multiplexing port that detect first multiplexing port respectively
Suddenly.
Charger 1200 can be realized each process that charger is realized in previous embodiment, to avoid repeating, here not
It repeats again.
The charger 1200 of the embodiment of the present invention detects the charger via first multiplexing port and described
Two multiplexing ports are connect with mobile terminal, obtain the voltage of first multiplexing port and the voltage of second multiplexing port;
The fast charge that the mobile terminal is supported is judged according to the voltage of the voltage of first multiplexing port and second multiplexing port
Agreement;If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then according to the first fast charge agreement pair
The mobile terminal charging;If it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to described the
Two fast charge agreements charge to the mobile terminal.The embodiment of the present invention can be multiplexed according to the voltage of the first multiplexing port and second
The voltage of port judges the fast charge agreement that mobile terminal is supported, so that the fast charge agreement supported using mobile terminal is to movement
Terminal charge improves the compatibility of charger.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit
It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code
Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of charging method is applied to charger, which is characterized in that the charger includes that the first multiplexing port and second are multiple
With port, which comprises
It detects that the charger is connect via first multiplexing port and second multiplexing port with mobile terminal, obtains
The voltage of the voltage of first multiplexing port and second multiplexing port;
Judge what the mobile terminal was supported according to the voltage of the voltage of first multiplexing port and second multiplexing port
Fast charge agreement;
If it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then according to the first fast charge agreement to institute
State mobile terminal charging;
If it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to the second fast charge agreement to institute
State mobile terminal charging;
First multiplexing port and second multiplexing port are shorted, the voltage and institute according to first multiplexing port
The voltage for stating the second multiplexing port judges the fast charge agreement that the mobile terminal is supported, comprising:
If the first voltage of first multiplexing port is less than or equal to the first predeterminated voltage, first multiplexing port is judged
First voltage and the first voltage of second multiplexing port whether be all larger than third predeterminated voltage, and first multiplexing end
Whether the duration that the first voltage of mouth and the first voltage of second multiplexing port are greater than third predeterminated voltage is all larger than
Second preset duration;
It is default that the first voltage of the first voltage and second multiplexing port that determine first multiplexing port is all larger than third
Voltage, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than third predeterminated voltage
Duration be all larger than the second preset duration, disconnect the short circuit of first multiplexing port and second multiplexing port;
The tertiary voltage of first multiplexing port and the tertiary voltage of second multiplexing port are detected respectively;
If the tertiary voltage of the tertiary voltage of first multiplexing port and second multiplexing port is all larger than the 4th default electricity
Pressure, it is determined that the mobile terminal supports the first fast charge agreement.
2. the method according to claim 1, wherein first multiplexing port and second multiplexing port are short
It connects, it is described to judge that the mobile terminal is supported according to the voltage of first multiplexing port and the voltage of second multiplexing port
Fast charge agreement, comprising:
If the first voltage of first multiplexing port is greater than the first predeterminated voltage, first multiplexing port and described is disconnected
The short circuit of second multiplexing port;
The second voltage of first multiplexing port and the second voltage of second multiplexing port are detected respectively;
If the second voltage of first multiplexing port and the second voltage of second multiplexing port are all larger than the second default electricity
Pressure, it is determined that the mobile terminal supports the first fast charge agreement.
3. if according to the method described in claim 2, it is characterized in that, the first voltage of first multiplexing port is greater than
First predeterminated voltage then disconnects the short circuit of first multiplexing port and second multiplexing port, comprising:
If the first voltage of first multiplexing port is greater than the first predeterminated voltage, the first of first multiplexing port is judged
Whether the duration that voltage is greater than the first predeterminated voltage is greater than the first preset duration;
Determine that the first voltage of first multiplexing port is greater than the first preset duration greater than the duration of the first predeterminated voltage,
Disconnect the short circuit of first multiplexing port and second multiplexing port.
4. the method according to claim 1, wherein the voltage according to first multiplexing port and described
The voltage of second multiplexing port judges the fast charge agreement that the mobile terminal is supported, further includes:
If it is small that there are at least one in the tertiary voltage of the tertiary voltage of first multiplexing port and second multiplexing port
In or be equal to the 4th predeterminated voltage, then judge whether the tertiary voltage of first multiplexing port is greater than the 5th predeterminated voltage and small
Whether it is greater than the 7th predeterminated voltage in the tertiary voltage of the 6th predeterminated voltage, and second multiplexing port and is preset less than the 8th
Voltage;
If the tertiary voltage of first multiplexing port is greater than the 5th predeterminated voltage and less than the 6th predeterminated voltage, and described second
The tertiary voltage of multiplexing port is greater than the 7th predeterminated voltage and less than the 8th predeterminated voltage, it is determined that the mobile terminal supports institute
State the second fast charge agreement.
5. a kind of charger, which is characterized in that the charger includes the first multiplexing port and the second multiplexing port, the charging
Device further include:
Module is obtained, for detecting the charger via first multiplexing port and second multiplexing port and movement
Terminal connection, obtains the voltage of first multiplexing port and the voltage of second multiplexing port;
Judgment module, for judging the shifting according to the voltage of first multiplexing port and the voltage of second multiplexing port
The fast charge agreement that dynamic terminal is supported;
First charging module, for if it is determined that the fast charge agreement that the mobile terminal is supported is the first fast charge agreement, then according to institute
The first fast charge agreement is stated to charge to the mobile terminal;
Second charging module, for if it is determined that the fast charge agreement that the mobile terminal is supported is the second fast charge agreement, then according to institute
The second fast charge agreement is stated to charge to the mobile terminal;
First multiplexing port and second multiplexing port are shorted, and the judgment module includes:
First judging unit is sentenced if the first voltage for first multiplexing port is less than or equal to the first predeterminated voltage
Whether the first voltage of first multiplexing port of breaking and the first voltage of second multiplexing port are all larger than the default electricity of third
Pressure, and the first voltage of first multiplexing port and the first voltage of second multiplexing port are greater than third predeterminated voltage
Whether duration is all larger than the second preset duration;
Second switching units, for determining the first voltage of first multiplexing port and the first electricity of second multiplexing port
Pressure is all larger than third predeterminated voltage, and the first voltage of the first voltage of first multiplexing port and second multiplexing port
Duration greater than third predeterminated voltage is all larger than the second preset duration, disconnects first multiplexing port and described second and answers
With the short circuit of port;
Second detection unit, for detect respectively first multiplexing port tertiary voltage and second multiplexing port
Three voltages;
Second determination unit, if for the tertiary voltage of first multiplexing port and the tertiary voltage of second multiplexing port
It is all larger than the 4th predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
6. charger according to claim 5, which is characterized in that first multiplexing port and second multiplexing port
It is shorted, the judgment module includes:
First switching units, if for first multiplexing port first voltage be greater than the first predeterminated voltage, disconnect described in
The short circuit of first multiplexing port and second multiplexing port;
First detection unit, for detect respectively first multiplexing port second voltage and second multiplexing port
Two voltages;
First determination unit, if for the second voltage of first multiplexing port and the second voltage of second multiplexing port
It is all larger than the second predeterminated voltage, it is determined that the mobile terminal supports the first fast charge agreement.
7. charger according to claim 6, which is characterized in that first switching units include:
Judgment sub-unit judges described the if the first voltage for first multiplexing port is greater than the first predeterminated voltage
Whether the duration that the first voltage of one multiplexing port is greater than the first predeterminated voltage is greater than the first preset duration;
Subelement is disconnected, the first voltage for determining first multiplexing port is big greater than the duration of the first predeterminated voltage
In the first preset duration, the short circuit of first multiplexing port and second multiplexing port is disconnected.
8. charger according to claim 5, which is characterized in that the judgment module further include:
Second judgment unit, if for the tertiary voltage of first multiplexing port and the tertiary voltage of second multiplexing port
Middle there are at least one to be less than or equal to the 4th predeterminated voltage, then judges whether the tertiary voltage of first multiplexing port is greater than
5th predeterminated voltage and less than the 6th predeterminated voltage, and whether the tertiary voltage of second multiplexing port is greater than the 7th default electricity
It presses and less than the 8th predeterminated voltage;
Third determination unit, if the tertiary voltage for first multiplexing port is greater than the 5th predeterminated voltage and pre- less than the 6th
If voltage, and the tertiary voltage of second multiplexing port is greater than the 7th predeterminated voltage and less than the 8th predeterminated voltage, it is determined that
The mobile terminal supports the second fast charge agreement.
9. a kind of charger, which is characterized in that including processor and be stored in the memory module of the processor and can be in institute
The computer program run on processor is stated, such as Claims 1-4 is realized when the computer program is executed by the processor
Any one of described in charging method the step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, the computer program realize the step of charging method according to any one of claims 1 to 4 when being executed by processor
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710743050.2A CN107516919B (en) | 2017-08-25 | 2017-08-25 | A kind of charging method and charger |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710743050.2A CN107516919B (en) | 2017-08-25 | 2017-08-25 | A kind of charging method and charger |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107516919A CN107516919A (en) | 2017-12-26 |
CN107516919B true CN107516919B (en) | 2019-03-01 |
Family
ID=60724290
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710743050.2A Active CN107516919B (en) | 2017-08-25 | 2017-08-25 | A kind of charging method and charger |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107516919B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108390430B (en) * | 2018-02-27 | 2020-02-21 | 维沃移动通信有限公司 | Charging converter and charging method |
CN113572210A (en) * | 2020-04-29 | 2021-10-29 | 北京小米移动软件有限公司 | Charging method, device, equipment and storage medium |
CN111864854B (en) * | 2020-08-03 | 2021-04-06 | 珠海智融科技有限公司 | Pin multiplexing circuit and working method thereof, and quick charging chip and working method thereof |
CN115017075B (en) * | 2021-11-02 | 2023-04-18 | 荣耀终端有限公司 | Configuration method of universal serial bus interface and related device |
CN116031964B (en) * | 2022-05-30 | 2023-12-22 | 荣耀终端有限公司 | Charging control method and terminal equipment |
CN117498508A (en) * | 2023-12-29 | 2024-02-02 | 深圳市卓芯微科技有限公司 | Quick charging method and device for mobile device, electronic device and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140335919A1 (en) * | 2013-05-10 | 2014-11-13 | Brian N. Stewart | Electronic charging device |
CN103986217B (en) * | 2014-05-30 | 2018-02-23 | 努比亚技术有限公司 | A kind of charger and its implementation for adaptively exporting different voltages |
CN105140583B (en) * | 2015-09-17 | 2018-01-30 | 珠海市一微半导体有限公司 | Fast charge method based on USB port |
CN105891736A (en) * | 2016-05-25 | 2016-08-24 | 东莞博力威新能源有限公司 | QC2.0 fast charge detection circuit and detection method |
CN106329625B (en) * | 2016-08-31 | 2019-12-10 | 宇龙计算机通信科技(深圳)有限公司 | charging method and device |
CN106684986A (en) * | 2016-12-26 | 2017-05-17 | 建荣半导体(深圳)有限公司 | Charging equipment and fast-charging protocol analytic method and system thereof |
-
2017
- 2017-08-25 CN CN201710743050.2A patent/CN107516919B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107516919A (en) | 2017-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107516919B (en) | A kind of charging method and charger | |
CN106356918B (en) | A kind of quick charge recognition methods and terminal device | |
CN106063076B (en) | Power supply adaptor, terminal and charging system | |
US9431841B2 (en) | Device to device charging via USB type-C interfaces | |
CN105576727B (en) | Method, device and system for quick charging | |
EP2854253B1 (en) | Charger, charging terminal, charging system and control method for charging | |
EP3832845A1 (en) | Terminal with two charging circuits | |
CN103618356B (en) | The charging system of a kind of mobile terminal and charging method thereof | |
US8949631B2 (en) | USB power supply method and device, and end device and system using the same | |
CN108988431B (en) | Multi-protocol charging device and multi-protocol charging method | |
CN104272216A (en) | Electronic device and control method therefor | |
WO2016019498A1 (en) | Methods, electronic devices, and charger apparatus for quick usb charging | |
CN106786979A (en) | The fast fill device and protocol identification and charging/discharging thereof of compatible various discharge and recharge agreements | |
CN105375544B (en) | A kind of low battery method for charging batteries and power management integrated circuit | |
CN104135057B (en) | terminal, charger and charging method | |
CN108988415A (en) | Fast charge method, power supply adaptor and mobile terminal | |
CN109687545A (en) | Charge control method, device, computer storage medium and mobile power source | |
CN107783630A (en) | Electronic installation and its control method and computer-readable recording medium | |
CN109217419B (en) | Quick charging system and method | |
CN105048018B (en) | The charging method and device of a kind of terminal with data exchanging function | |
CN104158251A (en) | Terminal, charger and charging method | |
CN107508354B (en) | A kind of charging method and mobile terminal | |
CN110518668A (en) | For the quick charging system and method for handheld device, handheld device | |
CN109861038B (en) | USB connection port capable of automatically switching connection mode and control method thereof | |
CN105226754B (en) | Battery charge/discharge control circuit and its control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |