Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The data line and the charging device provided by the embodiment of the present application are described in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Please refer to fig. 1, fig. 2 and fig. 3, wherein fig. 1 is a circuit diagram of a charging apparatus according to an embodiment of the present disclosure; fig. 2 is a circuit diagram of a charger provided by an embodiment of the present application; fig. 3 is a circuit diagram of a data line provided in an embodiment of the present application.
Data line 2 that this application embodiment provided and charger 1 between pass through Type-A interface connection to constitute the battery charging outfit that this application embodiment provided. And the CC pin has been set up in the above-mentioned Type-A interface increase for it matches to handshake through the CC signal between data line 2 and the charger 1.
In this embodiment, as in the data line shown in fig. 3 and fig. 4, the Type-C interface 22 is connected to the first Type-a interface 21 through the cable 23, and the connection relationship between each pin in the Type-C interface 22 and the first Type-a interface 21 and each wire in the cable is specifically the connection relationship shown in the following table 1:
TABLE 1
The data line 2 provided by the embodiment of the application can be connected with the matched charger 1 and is successfully matched with the matched charger, so that the CC wiring in the data line is communicated, namely the first CC pin, the second CC pin and the fourth CC pin are communicated, and the PD communication signal transmitted based on the CC wiring supports the PD charging (or called as PD protocol charging) function.
In a specific implementation, if the charging device provided in this embodiment of the present application is connected to a device to be charged that supports PD charging, the PD charging processing unit 13 is communicated with a charging module of the device to be charged through the CC trace, and the non-PD charging processing unit 14 can also be communicated with the charging module of the device to be charged through the D + trace and the D-trace.
At this time, the non-PD charging processing unit 14 can perform non-PD charging on the device to be charged based on the communication signal transmitted through the D + trace and the D-trace, and the PD charging processing unit 13 can perform PD charging on the device to be charged based on the communication signal transmitted through the CC trace, where a specific charging mode may be determined according to a charging protocol negotiation with the device to be charged, or determined according to a preset priority.
In addition, if the charging device provided in this embodiment of the application is connected to a device to be charged that does not support PD charging, the PD charging processing unit 13 is disconnected from the charging module of the device to be charged, and the non-PD charging processing unit 14 can also be connected to the charging module of the device to be charged through the D + trace and the D-trace, so that the non-PD charging processing unit 14 performs non-PD charging on the device to be charged through the communication signal that can be transmitted through the D + trace and the D-trace.
In addition, when the data line 2 provided in the embodiment of the present application is connected to a mismatched charger, the CC trace in the data line may be disconnected, so that PD charging communication is not supported, and at this time, the non-PD charging processing unit 14 performs non-PD charging (or referred to as D +/D-protocol charging) on the device to be charged based on the communication signal transmitted through the D + pin and the D-pin.
The charging device provided by the embodiment of the application comprises the data line 2 provided by the embodiment of the application and the charger 1 matched with the data line 2.
It should be noted that the charging device provided in the embodiment of the present application supports a PD charging function and a non-PD charging function, and specifically, whether to connect the CC trace or disconnect the CC trace may be determined according to the configuration of the device to be charged.
Specifically, as shown in fig. 1 and fig. 2, the charger 1 provided in the embodiment of the present application includes: the second Type-a interface 11, the control unit 12, the switching unit, the PD charging processing unit 13, and the non-PD charging processing unit 14, where the second Type-a interface 11 includes a fourth CC pin, a D + pin, a D-pin, a VBUS pin, and a GND pin, the fourth CC pin is connected to the first CC pin, and the second Type-a interface 11 is connected to the D + pin, the D-pin, the VBUS pin, and the GND pin in the first Type-a interface 21 of the data line 2 in a one-to-one correspondence;
the switching unit is connected with the control unit 12, the PD charging processing unit 13 and the fourth CC pin, and the D + pin and the D-pin in the second Type-a interface 11 are connected with the non-PD charging processing unit 14;
when the control unit 12 determines that the charger 1 matches the data line 2 based on the identification information transmitted by the fourth CC pin, the single bus controller (also referred to as a one wire control IC)24 controls the switch module to connect the first CC pin and the CC1 pin (i.e. to connect the CC trace in the data line 2), and disconnect the first CC pin and the single bus controller 24, and the control unit 12 further controls the switching unit to disconnect the control unit 12 and the fourth CC pin, and connect the fourth CC pin and the PD charging processing unit 13.
When the charger 1 shown in fig. 2 is connected to the data line 2 shown in fig. 3 and the Type-C of the data line 2 is connected to the device to be charged via the interface 22, the data line 2 in the charging device is matched with the charger 1, so as to communicate the CC wiring. At this time, the PD charging processing unit 13 in the charger 1 sends a PD charging negotiation signal to the device to be charged via the CC wire, and the following two cases can be distinguished:
situation one
When the device to be charged supports the PD charging function, the device to be charged feeds back the PD charging negotiation signal to the PD charging processing unit 13 through the CC trace, at this time, the control unit 12 in the charger 1 can control the single-bus controller 24 to keep the CC trace communicated based on the PD charging negotiation signal received by the PD charging processing unit 13, and the control unit 12 in the charger 1 can also keep the PD charging processing unit 13 and the CC trace communicated based on the PD charging negotiation signal, and execute PD charging.
The control Unit 12 may be a Microcontroller Unit (MCU) or the like, and is not particularly limited herein. The charger 1 further includes a switching unit, which can connect the CC pin in the charger 1 to the control unit 12, or to the PD charging processing unit 13, or disconnect both the control unit 12 and the PD charging processing unit 13.
Specifically, as shown in fig. 2, the switching unit is a switching switch SW 1.
Situation two
When the device to be charged does not support the PD charging function, the device to be charged does not feed back the PD charging negotiation signal to the PD charging processing unit 13 through the CC routing, at this time, the control unit 12 in the charger 1 can control the single bus controller 24 to disconnect the CC routing based on that the PD charging processing unit 13 does not receive the fed back PD charging negotiation signal, and the control unit 12 in the charger 1 can also control the PD charging processing unit 13 to disconnect from the CC routing based on that the PD charging negotiation signal is obtained without the CC routing, and execute non-PD charging.
The non-PD charging processing unit 14 may be understood as: and the charging unit is used for carrying out charging negotiation with the equipment to be charged through the communication signals transmitted on the D + pin and the D-pin. The PD charging processing unit 14 may also be referred to as: a D +/D-charging processing unit, the non-PD charging processing unit 14 supporting a communication protocol of communication signals transmitted via the D + pin and the D-pin.
In application, when the charging device provided in the embodiment of the present application is connected to a device to be charged that does not support PD charging, the charging device may perform non-PD charging negotiation communication with the device to be charged that does not support PD charging via the D + pin and the D-pin, where a process of performing non-PD charging negotiation communication with the device to be charged that does not support PD charging via the D + pin and the D-pin is the same as a D +/D-charging mode in the prior art, and is not described here again.
In one embodiment, the matching process between the data line 2 and the charger 1 may be: when the data line 2 is connected to a power supply, the single bus controller 24 is powered on to initialize the identification information so that the control unit 12 in the charger 1 can obtain the identification information from the single bus controller 24 through the CC pin, and if the identification information obtained by the control unit 12 through the CC pin matches with the identification information pre-stored in the control unit 12, the control unit 12 sends a control signal to the single bus controller 24 so that the single bus controller 24 determines that the charger 1 is the first charger when receiving the control signal.
The identification information may be a character string, and the matching success may be that the acquired character string is the same as or corresponds to a character string pre-configured by the single bus controller 24.
Only one signal trace (i.e., CC trace) needs to be connected between the single bus controller 24 and the control unit 12, so that the control process and the data interaction process can be implemented.
In the present embodiment, the control unit 12 can acquire the identification information pre-stored in the single bus controller 24, and the control unit 12 performs matching to obtain a matching result, so that the control logic of the single bus controller 24 can be simplified, and the data interaction process between the single bus controller 24 and the control unit 12 can be simplified.
Of course, in a specific implementation, the single bus controller 24 in the data line 2 can also obtain the identification information pre-stored in the control unit 12 in the charger 1 through the CC pin, match the obtained identification information with the identification information pre-configured by the single bus controller 24, determine that the data line 2 is connected with the charger 1 matched with each other when the matching is successful, and feed back a control signal of the successful matching to the control unit 12, so that the control unit 12 controls the switching unit to communicate the PD charging processing unit 13 with the CC wiring, which is not specifically limited herein.
In the present embodiment, the single bus controller 24 can acquire the identification information to the control unit 12 through the CC routing, and the single bus controller 24 performs matching to obtain a matching result.
Referring to fig. 1 and 3, the data line 2 includes: a first Type-A interface 21, a Type-C interface 22, a single bus controller 24 and a switch module (including switches SW2, SW3, SW4 and SW 5);
the first Type-a interface 21 and the Type-C interface 22 both include a D + pin, a D-pin, a VBUS pin, and a GND pin, and the D + pin, the D-pin, the VBUS pin, and the GND pin in the first Type-a interface 21 and the Type-C interface 22 are connected in a one-to-one correspondence, the first Type-a interface 21 further includes a first CC pin, and the Type-C interface 22 further includes a second CC pin (such as the CC1 pin shown in fig. 1 and 3);
the switch module is connected with the first CC pin, the single bus controller 24 and the CC1 pin in the Type-C interface 22;
when the data line 2 is connected with the charger 1, if the charger 1 is a first charger, the switch module is controlled by the single bus controller 24 to connect the first CC pin and the CC1 pin and disconnect the first CC pin and the single bus controller 24; if the charger 1 is the second charger, the switch module is controlled by the single bus controller 24 to connect the first CC pin with the single bus controller 24 and disconnect the first CC pin and the CC1 pin;
when the single bus controller 24 is communicated with the first CC pin, the single bus controller 24 determines that the charger 1 is the first charger when the charger 1 is matched with the data line 2 based on the identification information transmitted by the first CC pin; when the single bus controller 24 determines that the charger 1 is not matched with the data line 2 based on the identification information transmitted through the first CC pin, the charger 1 is the second charger.
The data line that this application embodiment provided, including first Type-A interface, single bus controller and switch module, wherein, single bus controller can confirm whether the charger that the data line is connected is the first charger of mutual matching according to the identification information of transmission on the first CC pin, and is confirming the data line with when first charger is connected, control switch module communicates first CC pin and second CC pin, communicates promptly CC in the data line is walked the line to can walk the transmission PD signal of charging through this CC, in order to realize the PD function of charging.
As an alternative implementation, as shown in fig. 3, the Type-C interface 22 further includes a third CC pin (e.g., the CC2 pin shown in fig. 1 and fig. 3), and the data line 2 is further provided with a first resistor Rp;
when the data line 2 is connected with the second charger, the switch module is also used for connecting the CC2 pin with the VBUS pin through the first resistor Rp under the control of the single bus controller 24).
Specifically, the first resistance Rp may be a resistance of 56K Ω (kilo-ohm).
In this embodiment, when the pin CC2 is connected to the VBUS pin through the first resistor Rp, an electrical signal can be transmitted to the device to be charged through the pin CC2, so that the device to be charged triggers the non-PD charging function based on the electrical signal, that is, the device to be charged performs non-PD charging negotiation communication with the charger through the D + pin and the D-pin.
As an alternative embodiment. As shown in fig. 3, the switch module includes a first switch SW2, a second switch SW4, a third switch SW3, a fourth switch SW5, a second resistor R1, a third resistor R2, a fourth resistor R3, and a fifth resistor R4;
a first end of the second resistor R1, a first end of the third resistor R2, a first end of the fourth resistor R3 and a first end of the fifth resistor R4 are all connected with the VBUS pin in the data line 2, a second end of the second resistor R1 is connected with a first end of the single-bus controller 24, a second end of the third resistor R2 is connected with a second end of the single-bus controller 24, a second end of the fourth resistor R3 is connected with a third end of the single-bus controller 24, and a second end of the fifth resistor R4 is connected with a first end of the first switch SW 2;
a second terminal (terminal a shown in fig. 1) of the single-bus controller 24 is connected to a control terminal of the first switch SW2, a second terminal of the first switch SW2 is connected to a ground terminal, a first terminal (terminal C shown in fig. 1) of the first switch SW2 is further connected to a control terminal of the third switch SW3 and a control terminal of the fourth switch SW5, a first terminal of the third switch SW3 is connected to the VBUS pin in the data line 2, a second terminal of the third switch SW3 is connected to a second terminal of the first resistor Rp, a first terminal of the fourth switch SW5 is connected to the first CC pin, and a second terminal of the fourth switch SW5 is connected to the CC1 pin;
a third terminal (shown as terminal B in fig. 1) of the single-bus controller 24 is connected to a control terminal of a second switch SW4, a first terminal of a second switch SW4 is connected to the first CC pin, and a second terminal of a second switch SW4 is connected to the first terminal of the single-bus controller 24;
the single-bus controller 24 is configured to control a switching state of the first switch SW2 through the second terminal of the single-bus controller 24, and control a switching state of the second switch SW4 through the third terminal of the single-bus controller 24 after controlling the switching state of the first switch SW 2;
when the first switch SW2 is open, the third switch SW3 is closed, and the fourth switch SW5 is open;
when the first switch SW2 is closed, the third switch SW3 is open and the fourth switch SW5 is closed.
In a specific implementation, the first switch SW2, the second switch SW4, the third switch SW3 and the fourth switch SW5 may be analog signal controlled switches (e.g., transistors, etc.), and at this time, the single bus controller 24 sends corresponding analog signals to the first switch SW2 and the second switch SW4 respectively to control the switching states of the first switch SW2 and the second switch SW 4.
In addition, when the first switch SW2 is closed, the control terminal of the third switch SW3 is grounded through the first switch SW2, so that the third switch SW3 can be controlled to be opened.
In addition, when the first switch SW2 is closed, the control terminal of the fourth switch SW5 is grounded through the first switch SW2, and thus the fourth switch SW5 may be controlled to be turned off.
Accordingly, when the first switch SW2 is turned off, the control terminal of the third switch SW3 is pulled up to the VBUS pin through the fifth resistor R4, so that a voltage can be provided to the control terminal of the third switch SW3 through the VBUS pin to control the third switch SW3 to be turned on.
In addition, when the first switch SW2 is closed, the control terminal of the fourth switch SW5 is pulled up to the VBUS pin through the fifth resistor R4, so that a voltage can be provided to the control terminal of the fourth switch SW5 through the VBUS pin to control the fourth switch SW5 to be connected.
In this embodiment, the switch module is configured as an analog circuit to simplify the control logic of the single bus controller 24.
In addition, after the switch state of the first switch SW2 is adjusted, the switch state of the second switch SW4 is adjusted, so that the single bus controller 24 can control the switch state of the first switch SW2 according to whether a CC signal is transmitted on a CC wire or not under the condition that the single bus controller is connected with the CC wire.
As an optional implementation manner, the control unit 12 stores second identification information in advance, and when the first identification information acquired through the fourth CC pin matches the second identification information, the control unit 12 sends a first control instruction to the single bus controller 24 through the fourth CC pin, sends a second control instruction to the single bus controller 24 through the fourth CC pin after sending the first control instruction for a first preset time, and controls the switching unit to disconnect the control unit 12 from the fourth CC pin and connect the fourth CC pin with the PD charging processing unit 13;
the single bus controller 24 controls the switch module to connect the first CC pin and the CC1 pin in response to the first control instruction, and the single bus controller 24 controls the switch module to disconnect the first CC pin and the single bus controller 24 in response to the second control instruction.
In this embodiment, the control unit 12 in the charger 1 may send the first control instruction to the single bus controller 24, and then send the second control instruction, so as to adjust the switching state of the first switch SW2, and then adjust the switching state of the second switch SW4, thereby avoiding setting a timer and the like in the single bus controller 24, simplifying the structure of the data line 2, and avoiding setting a control module with a complicated structure and a large volume on the data line 2.
Optionally, the first switch SW2, the second switch SW4 and the fourth switch SW5 are NMOS transistors, and the third switch SW3 is a PMOS transistor.
In a specific implementation, before the data line 2 is powered on and matched with the charger 1, the first terminal of the single-bus controller 24 is pulled up to the VBUS pin through the second resistor R1, the second terminal of the single-bus controller 24 is pulled up to the VBUS pin through the third resistor R2, and the third terminal of the single-bus controller 24 is pulled up to the VBUS pin through the fourth resistor R3, so that the control terminal of the first switch SW2 and the control terminal of the second switch SW4 have a high level, so that the first switch SW2 is closed, the second switch SW4 is closed, and at this time, the control terminal of the third switch SW3 and the control terminal of the fourth switch SW5 are grounded through the first switch SW2, so that the control terminal of the third switch SW3 and the control terminal of the fourth switch SW5 have a low level, so that the third switch SW3 is open, and the fourth switch SW5 is closed.
In this embodiment, after the data line 2 is powered on and successfully matched with the charger 1, the single bus controller 24 is configured to output a first low level signal through the second terminal of the single bus controller 24 in response to the first control instruction, and the single bus controller 24 is further configured to output a second low level signal through the third terminal of the single bus controller 24 in response to the second control instruction.
Specifically, when the single bus controller 24 outputs a low signal to the control terminal of the first switch SW2, the first switch SW2, which is an NMOS transistor, is turned off. At this time, the control terminal of the third switch SW3 is pulled up to the VBUS pin through the fifth resistor R4, so that the control terminal of the third switch SW3 has a high signal, and the third switch SW3, which is a PMOS transistor, is turned off. In addition, the control terminal of the fourth switch SW5 also has a high signal, so that the fourth switch SW5, which is an NMOS transistor, is closed.
In addition, the single bus controller 24 also outputs a low signal to the control terminal of the second switch SW4 after a preset time after outputting the low signal to the control terminal of the first switch SW2, thereby turning off the second switch SW4, which is an NMOS transistor.
In this way, it is achieved that when the data line 2 is powered on and successfully matched with the charger 1, the CC trace is connected, and the CC trace is disconnected from both the VBUS pin and the single bus controller 24.
In addition, after the data line 2 is powered on and the matching with the charger 1 fails, the single bus controller 24 outputs a high level to the control terminal of the first switch SW2 to close the first switch SW2, which is an NMOS transistor, at which time the control terminal of the third switch SW3 and the control terminal of the fourth switch SW5 are both grounded via the first switch SW2, so that the third switch SW3, which is a PMOS transistor, is closed, and the fourth switch SW5, which is an NMOS transistor, is opened.
And the single bus controller 24 also outputs a high level signal to the control terminal of the second switch SW4, thereby closing the second switch SW4 which is an NMOS transistor.
In this way, it is realized that, when the data line 2 is powered on and is not matched with the charger 1, the CC wire is disconnected, and the CC wire is communicated with the VBUS pin and the single bus controller 24, so that the device to be charged can trigger the non-PD charging communication according to the electrical signal received on the CC pin.
It should be noted that, in a state where the data line is not connected to the power supply or the device to be charged is not connected, the second switch SW4 and the fourth switch SW5 are both in a closed state, and the first switch SW2 and the third switch SW3 are in an open state, so that the single bus controller 24 is connected to the CC wire, and thus, the control command sent by the control unit 12 in the charger 1 can be received through the CC pin.
It should be noted that, in the specific implementation, the switch module may further include a digital signal control switch, for example: a switch group, etc., which are not specifically described herein.
As an alternative embodiment, as shown in fig. 5, the D + pin, the D-pin, the VBUS pin, and the GND pin in the first Type-a interface 21 are located at a first side of the first Type-a interface 21, the first CC pin is located at a second side of the first Type-a interface 21, and the first side and the second side are located at two opposite sides of the first Type-a interface 21.
Of course, the distribution positions of the pins in the first Type-a interface 21 may also be exchanged or changed, which is not specifically limited herein, and the structures and operation principles of the VBUS pin and the GND pin are the same as those of the VBUS pin and the GND pin in the prior art, which are not specifically described herein.
In this embodiment, the CC pin is disposed at the second side of the first Type-a interface 21, so that the structure and the position distribution of the GND pin, the D + pin, the D-pin and the VBUS pin on the first side of the first Type-a interface 21 are the same as those of the Type-a interface in the prior art, and the data line provided in this embodiment of the present application can be connected to a charger having a conventional Type-a interface.
Of course, in the case that the data line 2 provided in the embodiment of the present application is connected to a charger provided with a conventional Type-a interface, since the CC pin is not provided in the conventional Type-a interface, the CC pin in the first Type-a interface 21 cannot transmit identification information, and at this time, the charging device only supports a fast charging mode of transmitting a charging signal through the D + pin and the D-pin.
Correspondingly, as shown in fig. 6, the distribution positions of the pins in the second Type-a interface in the charger 1 provided in the embodiment of the present application correspond to the distribution positions of the pins in the first Type-a interface 21 shown in fig. 5 one to one, and the data line having the conventional Type-a interface can be compatible, which is described herein again.
In operation, in the case that the charger 1 provided in the embodiment of the present application is connected to a data line provided with a conventional Type-a interface, since the CC pin is not provided in the conventional Type-a interface, the CC pin in the second Type-a interface cannot transmit identification information, and at this time, the charging device only supports a fast charging mode of transmitting a charging signal through the D + pin and the D-pin.
It should be noted that the charger 1 provided in the embodiment of the present application can also be connected to a conventional data line, and can perform non-PD charging on a device to be charged, as shown in fig. 7, a specific description is given below by taking a workflow when the charger 1 is connected to the conventional data line or connected to the data line 2 as shown in fig. 3 as an example:
and step 701, judging whether the charger 1 is connected with a power supply.
The charger 1 is the charger 1 provided in the embodiments of the present application.
If the determination result in this step is yes, step 702 is executed, otherwise, the process may continue to wait until the charger 1 is connected to the power supply.
Step 702, determine whether to connect the standard data line 2.
The data line 2 of the standard configuration is the data line 2 provided in the embodiment of the present application.
If the determination result in this step is yes, step 703 is executed, otherwise step 704 may be executed.
In a specific implementation, when it is detected that the charger 1 is connected to the power source but not any data line, the waiting may be continued until the charger 1 is connected to the data line.
And 703, starting the single bus controller, and initializing identification information and control signals of a second end and a third end of the single bus controller.
Here, initializing the identification information may be understood as reading pre-stored identification information for reading by the control unit 12 within the charger 1.
The control signals of the second terminal and the third terminal of the initial single-bus controller can be understood as follows: the single bus controller outputs electrical signals through the second and third terminals thereof to turn on the first switch SW2, the second switch SW4 and the third switch SW3 and turn off the fourth switch SW 5.
Note that, at this time, the control unit 12 in the charger 1 is connected to the fourth CC pin.
Step 705, the control unit 12 communicates with the single bus controller 24 via the CC trace.
Specifically, the control unit 12 reads the identification information pre-stored in the single bus controller 24 through the CC trace.
Step 706, determining whether the data line 2 is successfully matched with the charger 1.
This step is specifically that the control unit 12 determines whether the identification information stored in advance thereof matches the identification information read from the single bus controller 24.
If the determination result in this step is yes, step 708 is executed, otherwise step 707 may be executed.
Step 707, SW1 connects the CC pin to the control unit 12, SW2, SW3 and SW4 are on, and SW5 is off.
At this time, SW1 disconnects the CC pin from the PD charging processing unit 13, thereby disconnecting the PD charging channel, and only enables the non-PD charging processing unit 14 to perform charging communication with the device to be charged via the D + pin and the D-pin to perform the non-PD charging function.
Steps 708, SW1 connect the CC pin with the PD charging processing unit 13, SW2, SW3 and SW4 are off, and SW5 is on.
At this time, the SW1 disconnects the CC pin from the control unit 12, and the CC communication channel is communicated, so that the PD charging processing unit 14 can perform charging communication with the device to be charged via the CC wire to perform the PD charging function.
And step 709, the charger 1 communicates with the device to be charged through the data line, if the device to be charged supports PD charging, PD charging is performed, and if the device to be charged does not support PD charging, D +/D-protocol charging is performed.
And step 704, the charger cannot read the matched identification information and judges that the data line is connected with the non-standard data line.
And step 710, charging according to a D +/D-protocol.
Through the process, when the charger 1 provided by the embodiment of the application is connected with the standard data line 2, the PD charging function and the non-PD charging function can be realized, and when the charger is connected with the non-standard data line, the non-PD charging function can be realized.
Correspondingly, the data line 2 provided in the embodiment of the present application can also be connected to a conventional charger, and can perform non-PD charging on a device to be charged, as shown in fig. 8, a specific description is given below by taking an example of a work flow when the data line 2 is connected to the conventional data line or connected to the charger 1 shown in fig. 2:
step 801, judging whether the non-standard charger is connected with a power supply.
The non-standard charger is not the charger 1 provided in the embodiment of the present application, and may be any charger having a Type-a interface.
If the determination result in this step is yes, step 802 is executed, otherwise, the process may continue to wait until the charger 1 is connected to the power supply.
And step 802, judging whether the standard data line 2 is connected.
The data line 2 of the standard configuration is the data line 2 provided in the embodiment of the present application.
If the determination result in this step is yes, step 804 is executed, otherwise step 803 may be executed.
And step 803, charging according to the D +/D-protocol.
The above process of performing the D +/D-protocol charging is the same as the process of performing the D +/D-protocol charging in the prior art, and is not described herein again.
And step 804, starting the single bus controller, and initializing the identification information and control signals of a second end and a third end of the single bus controller.
The initialization identification information may be understood as reading pre-stored identification information for the charger to read.
The control signals of the second terminal and the third terminal of the initial single-bus controller can be understood as follows: the single bus controller outputs electrical signals through the second and third terminals thereof to turn on the first switch SW2, the second switch SW4 and the third switch SW3 and turn off the fourth switch SW 5.
Step 805, pairing fails.
It should be noted that there is no CC pin in the conventional charger, so that the identification information in the single bus controller 24 is not actively acquired through the CC pin, and a control instruction is not sent to the single bus controller 24 through the CC pin, so that the data line 2 and the charger fail to be matched.
Step 806, the first switch SW2, the second switch SW4 and the third switch SW3 remain on, the fourth switch SW5 remains off and the D +/D-protocol charging is performed.
Through the process, when the data line 2 provided by the embodiment of the application is connected with a non-standard charger, a non-PD charging function can be realized.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and electronic devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may include performing functions in a substantially simultaneous manner or in a reverse order depending on the functionality involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.