CN106340780A - Terminal device and control method thereof - Google Patents

Terminal device and control method thereof Download PDF

Info

Publication number
CN106340780A
CN106340780A CN201610840041.0A CN201610840041A CN106340780A CN 106340780 A CN106340780 A CN 106340780A CN 201610840041 A CN201610840041 A CN 201610840041A CN 106340780 A CN106340780 A CN 106340780A
Authority
CN
China
Prior art keywords
usb interface
state
signal pins
external equipment
terminal unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610840041.0A
Other languages
Chinese (zh)
Inventor
张哲�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN201610840041.0A priority Critical patent/CN106340780A/en
Publication of CN106340780A publication Critical patent/CN106340780A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R29/00Coupling parts for selective co-operation with a counterpart in different ways to establish different circuits, e.g. for voltage selection, for series-parallel selection, programmable connectors
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/66Structural association with built-in electrical component
    • H01R13/665Structural association with built-in electrical component with built-in electronic circuit
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/66Structural association with built-in electrical component
    • H01R13/70Structural association with built-in electrical component with built-in switch

Landscapes

  • Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a terminal device and a control method thereof. The terminal device comprises a USB interface and a USB controller. The USB interface comprises two signal pins. The control method comprises the following steps of receiving a switching instruction, switching the connection states of the two signal pins between a USB standard downstream port SDP state and a dedicated charging port DCP state according to the switching instruction, wherein the SDP state is a state that the two signal pins and a USB controller are connected, and the DCP state is a state that the two signal pins are in a mutual short connection. The connection state of the two signal pins of the USB interface are switched between the SDP state and the DCP state, the switching of the USB interface between SDP and DCP types is realized, when switching to the DCP type, terminal equipment can supply power outward with large current, the charging speed is raised, and the technical problem of a slow charging speed in outward charging of the terminal equipment is solved.

Description

Terminal unit and its control method
Technical field
The present invention relates to electronic technology field, especially relate to a kind of terminal unit and its control method.
Background technology
USB (universal serial bus) (universal serial bus, usb) is powered and its Serial Communication Function for portable equipment Equally, have become as a kind of standard application.Nowadays, usb powers and has spread over battery charging, AC adapter and other power supply The application of form.The significant effect bringing of popularization of application is the charging of portable equipment and power supply can exchange plug and suitable Orchestration.All compared using the framework of private adapter accordingly, with respect to past every kind of device, current solution allows to adopt Multiple power sources are charged.
, in usb2.0mini interface, have 5 pins (pin) taking usb2.0 as a example, comprising:
A pair of power pins: vbus/gnd
A pair of signal pins: d+/d-
One principal and subordinate identifies pin: uid
Two usb interface equipments need to connect by supporting the usb data wire of otg (on-the-go).This data wire is only The uid having one end is effective it is assumed that when uid live end is connected with equipment a, indicating that equipment a is main frame;The corresponding other end Equipment b, be slave.After determining principal and subordinate, main frame passes through the voltage signal that vbus (positive pole) output meets usb specification;Slave After being activated by vbus voltage signal, you can type detection is carried out to the interface of main frame according to usb related protocol (bc1.2).
The type of HPI mainly has 4 kinds (sometimes also having subdivision), i.e. " sdp/dcp/cdp/ is other ".Wherein, sdp (standard downstream port) is usb standard down port it is simply that " the usb data-interface " generally said, and dcp (dedicated charging port) is special charging port it is simply that " the standard charger interface " generally said.Sdp interface Interior (as pc machine usb interface), what d+/d- connected is usb controller, carries out data transmit-receive;And (i.e. standard charging in dcp interface Device), d+/d- is short circuit, is served only for identifying interface type.
The Handshake Protocol that slave can be specified by bc1.2, detects which type the interface of main frame belongs to.If main Machine is sdp equipment, then at most can only absorb 500ma electric current according to usb specification slave.And if main frame is dcp equipment, slave is extremely It is allowed to less absorb 1.8a electric current.
At present, mobile terminal (as smart mobile phone) adopts usb interface mostly as the passage of power supply, data input output, Follow usb associated protocol specification.As shown in figure 1, when mobile terminal is charged to slave as otg main frame, mobile terminal First pass through the single-ended uid signal identification of usb data wire and go out host identities, then pass through power management integrated circuit (power Management ic, pmic) 5v voltage is exported from vbus to slave;After slave receives vbus signal, by detect d+/ D- state judging HPI type, because the d+/d- of mobile terminal is attached on usb controller carry out data transmission , therefore sdp equipment can be determined as by slave, from the absorption electric current limiting itself of chance active, according to most 500ma specifications Absorb electric current from vbus.Even if that is, otg main frame possesses very strong load capacity, bigger charging electricity also cannot be provided Stream.However, in the case that present battery capacity generally alreadys exceed 3000mah, the current specification charging of 500ma is extremely slow Slowly, substantially there is no any practical value.
In sum, during existing terminal unit supplying power for outside, supply current is little, and charging rate is extremely slow.
Content of the invention
The main object of the present invention externally supplies it is intended to solve terminal unit for providing a kind of terminal unit and its control method When electric, supply current is little, the slow technical problem of charging rate.
To achieve these objectives, the present invention propose terminal unit control method, described terminal unit include usb interface and Usb controller, described usb interface includes two signal pins, the method comprising the steps of:
Receive switching command;
According to described switching command, by the connection status of described two signal pins in usb standard down port sdp state and Switch between the dcp state of special charging port;
Wherein, described sdp state is the state that described two signal pins are connected with described usb controller, described dcp state State for the mutual short circuit of described two signal pins.
Further, the described connection status by described two signal pins switches between sdp state and dcp state Step include:
Judge whether described usb interface is connected to external equipment;
When described usb interface is connected to external equipment, judge described terminal unit whether just in supplying power for outside;When described Terminal unit, just in supplying power for outside, first stops the connection of described usb interface and described external equipment, more described two signals are drawn The connection status of foot switches over operation;
When described usb interface does not connect external equipment, directly the connection status of described two signal pins is cut Change operation.
Further, the described connection stopping described usb interface and described external equipment, then to described two signal pins The step that connection status switches over operation includes:
Prompting user temporarily disconnects the connection of described usb interface and described external equipment;
After described usb interface is disconnected with described external equipment, the connection status of described two signal pins is carried out Handover operation.
Further, described prompting user temporarily disconnects the step bag that described usb interface is connected with described external equipment Include: send prompting user and temporarily disconnect the voice messaging that described usb interface is connected with described external equipment.
Further, described prompting user temporarily disconnects the step bag that described usb interface is connected with described external equipment Include: display reminding user temporarily disconnects Word message and/or the picture letter that described usb interface is connected with described external equipment Breath.
Further, described usb interface also includes power pins, and described terminal unit also includes power module, described elder generation Stop the connection of described usb interface and described external equipment, then operation is switched over to the connection status of described two signal pins Step include:
Disconnect the connection of described power pins and described power module;
Operation is switched over to the connection status of described two signal pins;
Recover the connection of described power pins and described power module.
Further, methods described also includes: is series between described power pins and described power module by controlling The disconnection of second switch and closure, to realize the connection disconnecting with recovering described power pins and described power module.
Further, the step that the described connection status to described two signal pins switches over operation includes:
Obtain the current connection status of described two signal pins;
If current connection status is sdp state, the connection status of described two signal pins is switched to dcp state;
If current connection status is dcp state, the connection status of described two signal pins is switched to sdp state.
Further, the step that the described connection status to described two signal pins switches over operation includes:
Judge described switching command for the first instruction or the second instruction;
When described switching command is the first instruction, the connection status of described two signal pins is switched to from dcp state Sdp state;
When described switching command is the second instruction, the connection status of described two signal pins is switched to from sdp state Dcp state.
Further, the step that the described connection status to described two signal pins switches over operation includes:
By switching between the first position and the second position to the first switch being connected to described two signal pins To realize the switching of the connection status to described two signal pins;When described first switch is switched to described primary importance, institute State two signal pins to be connected with described usb controller;When described first switch is switched to the described second position, described two signals The mutual short circuit of pin.
Further, described first switch is double-point double-throw switch.
The present invention proposes a kind of terminal unit simultaneously, and described terminal unit includes usb interface and usb controller, described usb Interface includes two signal pins, also includes:
Receiver module, for receiving switching command;
Handover module, for according to described switching command, by the connection status of described two signal pins in usb standard down Switch between port sdp state and special charging port dcp state;
Wherein, described sdp state is the state that described two signal pins are connected with described usb controller, described dcp state State for the mutual short circuit of described two signal pins.
Further, described handover module includes:
Judging unit, for judging whether described usb interface is connected to external equipment;Outside described usb interface is connected to During portion's equipment, continue to judge described terminal unit whether just in supplying power for outside;
Switch unit, for when described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, First stop the connection of described usb interface and described external equipment, then behaviour is switched over to the connection status of described two signal pins Make;When described usb interface does not connect external equipment, directly behaviour is switched over to the connection status of described two signal pins Make.
Further, described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, point out user temporary transient Disconnect the connection of described usb interface and described external equipment;After described usb interface is disconnected with described external equipment, right The connection status of described two signal pins switches over operation.
Further, described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, by sound-producing device Send prompting user and temporarily disconnect the voice messaging that described usb interface is connected with described external equipment.
Further, described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, by show screen display Show that prompting user temporarily disconnects Word message and/or the image information that described usb interface is connected with described external equipment.
Further, described usb interface also includes power pins, and described terminal unit also includes power module, described cuts Change unit to be used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, disconnect described power supply Pin and the connection of described power module;Operation is switched over to the connection status of described two signal pins;Recover described power supply Pin and the connection of described power module.
Further, described switch unit is used for:
By controlling disconnection and the closure of the second switch being series between described power pins and described power module, come Realize the connection disconnecting with recovering described power pins and described power module.
Further, described switch unit is used for:
Obtain the current connection status of described two signal pins;If current connection status is sdp state, by described two The connection status of signal pins switches to dcp state;If current connection status is dcp state, by described two signal pins Connection status switch to sdp state.
Further, described switch unit is used for:
Judge described switching command for the first instruction or the second instruction;When described switching command is the first instruction, will The connection status of described two signal pins switches to sdp state from dcp state;When described switching command is the second instruction, will The connection status of described two signal pins switches to dcp state from sdp state.
Further, described switch unit is used for:
By switching between the first position and the second position to the first switch being connected to described two signal pins To realize the switching of the connection status to described two signal pins;When described first switch is switched to described primary importance, institute State two signal pins to be connected with described usb controller;When described first switch is switched to the described second position, described two signals The mutual short circuit of pin.
A kind of control method of terminal unit that the embodiment of the present invention is provided, by by usb interface two signal pins Connection status switches between sdp state and dcp state it is achieved that usb interface is cut between sdp and dcp two types Change, when switching to dcp type, terminal unit just can be improve charging rate, solved terminal with high current supplying power for outside Charging rate slow technical problem when equipment externally charges.Meanwhile, when being switched to dcp type, due to two signal pins with Usb controller has been disconnected connection, is therefore physically disconnected the usb data cube computation of terminal unit, now provides only charging work( Can, improve safety.
Brief description
Fig. 1 is the circuit connection diagram that in prior art, mobile terminal is connected with slave as main frame;
Fig. 2 is the flow chart of the control method of the terminal unit of first embodiment of the invention;
Fig. 3 is the particular flow sheet of step s12 in Fig. 2;
Fig. 4 is the idiographic flow of the step that in the embodiment of the present invention, the connection status of two signal pins is switched over operation Figure;
Fig. 5 is in the embodiment of the present invention, the connection status of two signal pins is switched over the step of operation another concrete Flow chart;
Fig. 6 is that the mobile terminal of the control method of the application embodiment of the present invention connects as the circuit that main frame is connected with slave Schematic diagram;
Fig. 7 is the module diagram of the terminal unit of second embodiment of the invention;
Fig. 8 is the module diagram of the handover module in Fig. 7.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Embodiments of the invention are described below in detail, the example of described embodiment is shown in the drawings, wherein from start to finish The element that same or similar label represents same or similar element or has same or like function.Below with reference to attached The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " " used herein, " Individual ", " described " and " being somebody's turn to do " may also comprise plural form.It is to be further understood that arranging used in the description of the present invention Diction " inclusion " refers to there is described feature, integer, step, operation, element and/or assembly, but it is not excluded that existing or adding Other features one or more, integer, step, operation, element, assembly and/or their group.It should be understood that when we claim unit Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or can also exist Intermediary element.Additionally, " connection " used herein or " coupling " can include wirelessly connecting or wirelessly coupling.Used herein arrange Diction "and/or" includes one or more associated list the whole of item or any cell and combines with whole.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, and all terms used herein (include technology art Language and scientific terminology), there is the general understanding identical meaning with the those of ordinary skill in art of the present invention.Also should Be understood by, those terms defined in such as general dictionary it should be understood that have with the context of prior art in The consistent meaning of meaning, and unless by specific definitions as here, otherwise will not use idealization or excessively formal implication To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal unit " had both included wireless communication The equipment of number receptor, it only possesses the equipment of the wireless signal receiver of non-emissive ability, includes receiving and transmitting hardware again Equipment, its have can on bidirectional communication link, execute two-way communication reception and transmitting hardware equipment.This equipment May include that honeycomb or other communication equipments, it has single line display or multi-line display or does not have multi-line to show The honeycomb of device or other communication equipments;Pcs (personal communications service, PCS Personal Communications System), it can With combine voice, data processing, fax and/or its communication ability;Pda (personal digital assistant, personal Digital assistants), it can include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day Go through and/or gps (global positioning system, global positioning system) receptor;Conventional laptop and/or palm Type computer or other equipment, its have and/or include the conventional laptop of radio frequency receiver and/or palmtop computer or its His equipment." terminal " used herein above, " terminal unit " they can be portable, can transport, be arranged on the vehicles (aviation, Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth And/or any other position operation in space." terminal " used herein above, " terminal unit " can also be communication terminal, on Network termination, music/video playback terminal, for example, can be pda, mid (mobile internet device, mobile Internet Equipment) and/or there is mobile phone or the equipment such as intelligent television, Set Top Box of music/video playing function.
In the embodiment of the present invention, the connection status of two signal pins of usb interface includes sdp state and dcp state.Its In, sdp state is the state that two signal pins are connected with usb controller, and now usb interface is sdp type;Dcp state is two Signal pins are dcp type in the state of the mutual short circuit in rear end, now usb interface.
With reference to Fig. 2, the control method of the terminal unit of first embodiment of the invention is proposed, described terminal unit is that have The terminal unit of usb interface, particularly supports the terminal unit of usb otg function.Described terminal unit includes usb interface, usb Controller and power module, described power module can include pmic and battery it is also possible to only include battery, and usb interface includes A pair of signal pins and a pair of power pins.Alternatively, under default conditions, two signal pins are connected with usb controller, two power supplys Pin is connected with power module.Described terminal unit can be the mobile terminals such as mobile phone, flat board or PC (pc), the terminal such as notebook computer, can also be other electronic equipments.
The control method of described terminal unit comprises the following steps:
S100, reception switching command.
Described switching command can be that user is directed to the operation of the Touch screen that terminal unit is made, button operation, high up in the air Gesture motion, voice command, rock the instruction of the predetermined registration operation such as the operation of terminal unit, when user makes the instruction of aforementioned predetermined registration operation When, terminal unit then receives switching command.
For example, terminal unit shows handoff options or switching icon on screen, when user's Touch screen selects accordingly When handoff options or click switching icon, terminal unit then receives switching command.
S200, according to switching command, by the connection status of usb interface two signal pins between sdp state and dcp state Switch over.
In the embodiment of the present invention, the state that sdp state is connected with usb controller for usb interface two signal pins, dcp shape State is the state of the mutual short circuit of usb interface two signal pins.When the connection status of two signal pins is dcp state, if this When terminal unit as main frame, slave is powered it is possible to slave provide high current, greatly improve charging rate.
In the embodiment of the present invention, the idiographic flow of step s200 can be as shown in figure 3, comprise the following steps:
S210, judge whether usb interface is connected to external equipment.When usb interface does not connect external equipment, enter step Rapid s220;When usb interface is connected to external equipment, enter step s230.
After terminal unit receives switching command, detect the connection status of usb interface first, judge whether usb interface connects Connect external equipment.The detection mode of the connection status of usb interface can adopt the detection mode of prior art, and here is not gone to live in the household of one's in-laws on getting married State.
S220, the direct connection status to two signal pins switch over operation.
When usb interface is detected and not connecting external equipment, the terminal unit then direct connection shape to two signal pins State switches over operation.
S230, judge terminal unit whether just in supplying power for outside.When terminal unit is just in supplying power for outside, execution step s240;When terminal unit does not have supplying power for outside, terminate flow process, not respond.
When usb interface is detected and being connected to external equipment, whether terminal unit then continues detection terminal equipment right Outer power supply.
It is alternatively possible to by detecting whether power pins or power module just judge that in output current terminal unit is No just in supplying power for outside, it is determined that terminal unit is just in supplying power for outside when just in output current.
It is alternatively possible to whether be currently that otg main frame judges whether terminal externally supplies by detection terminal equipment Electricity, when terminal unit is connected with slave as main frame it is determined that terminal unit just in supplying power for outside, for example, works as terminal unit When the uid live end of usb data wire is detected and being connected (the uid pin as usb interface detects useful signal) with the machine, then really Determining the machine is main frame.
In the embodiment of the present invention, when terminal unit does not have supplying power for outside, then not execute handover operation, terminate flow process. Alternatively, in other embodiments, in this case, terminal unit can continue to execute handover operation, or regards concrete feelings Condition decides whether to continue executing with handover operation.The present invention is without limitation.
The connection of s240, first termination usb interface and external equipment, then behaviour is switched over to the connection status of two signal pins Make.
When terminal unit is detected just in supplying power for outside, terminal unit then stops usb interface and external equipment first Connect, then operation is switched over to the connection status of two signal pins.
Alternatively, terminal unit can point out user temporarily to disconnect the connection of usb interface and external equipment, when detecting After usb interface and external equipment disconnect, immediately operation is switched over to the connection status of two signal pins.Wherein, usb connects Mouthful disconnect with external equipment, can be physically disconnect or circuit logic on disconnect.Terminal unit User can be pointed out by the combination of one of modes such as voice, interface display, luminous, vibrations or at least two.
For example, terminal unit sends and points out user temporarily to disconnect the voice messaging that usb interface is connected with external equipment, institute State voice messaging such as " data wire please be reconnect ", " please first disconnecting rear re-attached ", " please again plugging data wire ", Etc..
And for example, terminal unit display reminding user temporarily disconnect the Word message that usb interface is connected with external equipment and/ Or image information, described Word message as " data wire please be reconnect ", " please first disconnecting rear re-attached ", " please weigh New plug data wire ", etc., described image information such as video data line is inserted into the picture of usb interface after first extracting usb interface Content.
Alternatively, terminal unit can also disconnect the connection of usb interface and external equipment automatically.Alternatively, terminal unit Disconnect the connection of power pins and the power module of usb interface first, stop external output current so that usb interface with External equipment disconnects;Then operation is switched over to the connection status of two signal pins;Then power pins and electricity are recovered The connection of source module, so that usb interface is reconnected with external equipment.
In the embodiment of the present invention, a second switch of having connected between power pins and power module, this second switch can To connect two power pins or one of power pins (as connected the positive pole pin of power pins).Terminal unit passes through control Make disconnection and the closure of this second switch, to realize the connection disconnecting with recovering power pins and power module.This second switch Can be without limitation for the switch of single-pole single-throw switch (SPST) or other forms, the present invention.
Additionally, it will be understood by those skilled in the art that can also be come automatically using other technologies means of the prior art Disconnect the connection of usb interface and external equipment, numerous to list herein repeat.
In the embodiment of the present invention, when the connection status to two signal pins switches over operation, following two can be adopted The mode of kind:
As shown in figure 4, the idiographic flow that the connection status of two signal pins is switched over operation can include following walking Rapid:
The current connection status of s201, acquisition two signal pins.
When two signal pins are connected with usb controller, illustrate that the current connection status of two signal pins is sdp state, Enter step s302;When two signal pins are in the mutual short circuit in rear end, illustrate that the current connection status of two signal pins is dcp shape State, enters step s303.
If the current connection status of s202 is sdp state, the connection status of two signal pins is switched to dcp state.
If current connection status is sdp state, by two signal pins in the mutual short circuit in rear end, so that two signals The connection status of pin switches to dcp state from sdp state.
If the current connection status of s203 is dcp state, the connection status of two signal pins is switched to sdp state.
If current connection status is dcp state, two signal pins are connected with usb controller, so that two The connection status of signal pins switches to sdp state from dcp state.
As shown in figure 5, the idiographic flow that the connection status of two signal pins is switched over operation can include following walking Rapid:
S301, judge switching command be first instruction or second instruction.
First instruction, for needing connection status switches to the instruction of sdp state;Second instruction, for needing to connect shape State switches to the instruction of dcp state.
S302, when switching command be first instruction when, the connection status of two signal pins is switched to sdp from dcp state State.
Alternatively, when current connection status is originally as sdp state, then keep sdp state constant.
S303, when switching command be second instruction when, the connection status of two signal pins is switched to dcp from sdp state State.
Alternatively, when current connection status is originally as dcp state, then keep dcp state constant.
In the embodiment of the present invention, a first switch is connected on two signal pins of usb interface, this first switch can be Toggle between one position and the second position, terminal unit can by first switch primary importance and the second position it Between switch over the switching to realize the connection status to two signal pins.When first switch is switched to primary importance, two letters Number pin is connected with usb controller, and now the connection status of two signal pins is sdp state;When first switch is switched to second During position, the mutual short circuit of two signal pins, now the connection status of two signal pins is dcp state.
This first switch can be a double-point double-throw switch or two single-pole double-throw switch (SPDT)s, each hilted broadsword Commutator connects signal pins, or can also be without limitation for the switch of other forms, the present invention.
In an alternative embodiment, terminal unit only just carries out two in the case that usb interface does not connect external equipment The switching of the connection status of signal pins.In further embodiments, terminal unit is only connected to external equipment in usb interface In the case of just carry out the switching of the connection status of two signal pins, or only just carry out two signals in terminal unit supplying power for outside The switching of the connection status of pin, etc..
The control method of the terminal unit of the embodiment of the present invention, by existing the connection status of usb interface two signal pins Switch between sdp state and dcp state it is achieved that usb interface switches between sdp and dcp two types, when switching to During dcp type, terminal unit just can improve charging rate with high current supplying power for outside, solve terminal unit and externally fill Charging rate slow technical problem when electric.Meanwhile, when being switched to dcp type, due to two signal pins with usb controller It is disconnected connection, be therefore physically disconnected usb data cube computation, now provide only charge function, improve safety.
As shown in fig. 6, being applied to an example of mobile terminal for the control method of the embodiment of the present invention, in Fig. 6 mobile eventually End is connected with slave as otg main frame.Main frame has a usb interface, and usb interface includes a pair of power pins vbus and gnd, and one To signal pins d+ and d-, this usb interface is connected with slave by usb data wire.Main frame also includes first switch s1, second opens Close s2, usb controller, pmic, battery and central processing unit (central processing unit, cpu), usb controller with Cpu is electrically connected with, and pmic is electrically connected with battery and cpu respectively.Vbus pin passes through second switch s2 and pmic and is electrically connected with, Signal pins d+ and d- connect first switch s1, and first switch s1 can switch between primary importance 1 and the second position 2.Generally , first switch s1 is in primary importance 1 by default so that signal pins d+ and d- are electrically connected by first switch s1 Connect usb controller, now the connection status of signal pins is sdp state, second switch s2 closes by default simultaneously, That is, main frame is sdp equipment by default;When first switch s1 is in the second position 2, signal pins d+ will be made With d- in rear end short circuit, now the connection status of signal pins is dcp state, and now main frame is dcp equipment.
When mobile terminal is charged to slave as otg main frame, it is single-ended that mobile terminal first passes through usb data wire Uid signal identification goes out host identities, then exports 5v voltage from vbus to slave by pmic;Slave receives vbus signal Afterwards, HPI type is judged by the connection status of detection signal pin d+/d-.When first switch s1 is in primary importance During 1 connection usb controller, slave identification main frame is sdp equipment, is powered with small current (as 500ma), and keeps usb number According to connection;When first switch s1 is in the second position 2 and makes signal pins d+ and d- in rear end short circuit, slave identification main frame is Dcp equipment, is powered with high current (as 1.8a).
Assume currently just to power with small current, when main frame receives switching command, disconnect second switch s2 first, now Slave detects vbus invalidating signal, then stop absorbing electric current, and terminate usb data cube computation;Then mian engine changeover first switch So that signal pins d+/d- are in short circuit state, the connection status of signal pins switches to dcp state to s1, by usb interface mould It is intended to be dcp type;Last main frame closure second switch s2 is (if it is necessary, pmic can improve output in advance, it is to avoid cannot Load bigger electric current), now slave detects vbus signal effectively, starts new testing process, the interface of main frame is detected After dcp type, then it is charged with high current.
Assume currently just to power with high current, when main frame receives switching command, disconnect second switch s2 first, now Slave detects vbus invalidating signal, stops absorbing electric current, main frame is disconnected with slave;Then mian engine changeover first switch So that signal pins d+/d- are connected with usb controller, the connection status of signal pins switches to sdp state to s1, by usb interface It is modeled as sdp type;Last main frame closes second switch s2, and now slave detects vbus signal effectively, starts new detection Flow process, interface main frame is detected is sdp type, then be charged with small current, and keep usb data cube computation.
Using the control method of the embodiment of the present invention, mobile terminal can be modeled as dcp type so that connecting with mobile terminal The slave connecing can absorb high current and be charged, and when solving terminal unit supplying power for outside, supply current is little, charging rate pole Its slow technical problem, greatly improves the charging rate of external charging.When only needing external transmission data, mobile whole End can switch back into sdp type so that mobile terminal can flexibly switch as needed between sdp type and dcp type again, Meet the various functions of mobile terminal, improve Consumer's Experience.Meanwhile, when being switched to dcp type, due to two signal pins It is disconnected with usb controller and is connected, be therefore physically disconnected the usb data cube computation of mobile terminal, now provide only charging Function, improves safety.
With reference to Fig. 7, the terminal unit of second embodiment of the invention is proposed, described terminal unit includes usb interface, usb control Device processed, power module, receiver module and handover module, described power module can include pmic and battery it is also possible to only include Battery, usb interface includes a pair of signal pins (positive pole and negative pole) and a pair of power pins (positive pole and negative pole).Alternatively, write from memory Recognize under state, two signal pins are connected with usb controller, two power pins are connected with power module.Wherein:
Receiver module: for receiving switching command.
Described switching command can be that user is directed to the operation of the Touch screen that terminal unit is made, button operation, high up in the air Gesture motion, voice command, rock the instruction of the predetermined registration operation such as the operation of terminal unit, when user makes the instruction of aforementioned predetermined registration operation When, receiver module then receives switching command.
For example, terminal unit shows handoff options or switching icon on screen, when user's Touch screen selects accordingly When handoff options or click switching icon, receiver module then receives switching command.
Handover module: for according to switching command, by the connection status of two signal pins sdp state and dcp state it Between switch over.
In the embodiment of the present invention, the state that sdp state is connected with usb controller for usb interface two signal pins, dcp shape State is the state of the mutual short circuit of usb interface two signal pins.When the connection status of two signal pins is dcp state, if this When terminal unit as main frame, slave is powered it is possible to slave provide high current, greatly improve charging rate.
In the embodiment of the present invention, when receiving switching command, it is outer that handover module first determines whether whether usb interface is connected to Portion's equipment;When usb interface does not connect external equipment, directly operation is switched over to the connection status of two signal pins;When When usb interface is connected to external equipment, whether judge terminal unit just in supplying power for outside, when terminal unit is just in supplying power for outside When, first stop the connection of usb interface and external equipment, then operation is switched over to the connection status of two signal pins.
Specifically, as shown in figure 8, handover module includes judging unit and switch unit, wherein:
Judging unit: for judging whether usb interface is connected to external equipment, when usb interface is connected to external equipment, Continue to judge terminal unit whether just in supplying power for outside.
Alternatively, judge module can be by detecting whether power pins or power module just judge end in output current End equipment whether just in supplying power for outside, it is determined that terminal unit is just in supplying power for outside when just in output current.
Alternatively, whether judge module can be currently just whether otg main frame judge terminal by detection terminal equipment In supplying power for outside, when terminal unit is connected with slave as main frame it is determined that terminal unit is just in supplying power for outside, for example, when When the uid live end of usb data wire is detected and being connected (the uid pin as usb interface detects useful signal) with the machine, judge Module then determines that the machine is main frame.
Switch unit: for when usb interface be connected to external equipment and terminal unit just in supplying power for outside when, first stop Usb interface and the connection of external equipment, then operation is switched over to the connection status of two signal pins;When usb interface does not connect When connecing external equipment, directly operation is switched over to the connection status of two signal pins.
In the embodiment of the present invention, switch unit can disconnect the connection of usb interface and external equipment automatically.Alternatively, cut Change unit and disconnect the power pins of usb interface and the connection of power module first, stop external output current, so that usb Interface is disconnected with external equipment;Then operation is switched over to the connection status of two signal pins;Then recover power supply to draw Foot and the connection of power module, so that usb interface is reconnected with external equipment.
It is alternatively possible to the second switch s2 that connects between power pins and power module, s2 is permissible for this second switch Connect two power pins or one of power pins (as connected the positive pole pin of power pins).Terminal unit passes through to control The disconnection of this second switch s2 and closure, to realize the connection disconnecting with recovering power pins and power module.This second switch S2 can be without limitation for the switch of single-pole single-throw switch (SPST) or other forms, the present invention.
Additionally, it will be understood by those skilled in the art that switch unit can also be come using other modes of the prior art Automatically disconnect the connection of usb interface and external equipment, numerous to list herein repeat.
It is also possible to omit second switch s2 in an alternative embodiment, usb is temporarily disconnected by switch unit prompting user and connects Mouthful with the connection of external equipment, after usb interface is detected and external equipment disconnects, the connection to two signal pins immediately State switches over operation.Wherein, usb interface and external equipment disconnect, can be physically disconnect or Disconnect in circuit logic.Switch unit can by one of modes such as voice, interface display, luminous, vibrations or extremely Few two kinds of combination is pointing out user.
For example, switch unit is sent by sound-producing device (as speaker) and points out user temporarily to disconnect usb interface and outside The voice messaging of the connection of equipment, described voice messaging as " data wire please be reconnect ", " again connect again after please first disconnecting Connect ", " please again plugging data wire ", etc..
And for example, switch unit temporarily disconnects what usb interface was connected with external equipment by display screen display reminding user Word message and/or image information, described Word message such as " data wire please be reconnect ", " after please first disconnecting again again Connection ", " please again plugging data wire ", etc., described image information such as video data line is inserted into after first extracting usb interface The image content of usb interface.
In one embodiment, switch unit switches over operation in the following manner to the connection status of two signal pins: Obtain the current connection status of two signal pins;If current connection status is sdp state, by the connection shape of two signal pins State switches to dcp state;If current connection status is dcp state, the connection status of two signal pins is switched to sdp shape State.
In another embodiment, switch unit switches over behaviour to the connection status of two signal pins in the following manner Make: judge switching command for the first instruction or the second instruction;When switching command is the first instruction, by the company of two signal pins The state that connects switches to sdp state from dcp state;When switching command be second instruction when, by the connection status of two signal pins from Sdp state switches to dcp state.
In the embodiment of the present invention, first switch s1 is connected on two signal pins of usb interface, this first switch s1 can Toggle between primary importance 1 and the second position 2, switch unit by first switch s1 in primary importance 1 and second The switching to realize the connection status to two signal pins is switched between position 2.When first switch s1 is switched to first When putting 1, two signal pins are connected with usb controller, and now the connection status of two signal pins is sdp state;Work as first switch When s1 is switched to the second position 2, the mutual short circuit of two signal pins, now the connection status of two signal pins is dcp state.
This first switch s1 can be a double-point double-throw switch or two single-pole double-throw switch (SPDT)s, and each is single Double-pole double throw switch connects signal pins, or can also be without limitation for the switch of other forms, the present invention.
In an alternative embodiment, handover module only just carries out two in the case that usb interface does not connect external equipment The switching of the connection status of signal pins.In further embodiments, handover module is only connected to external equipment in usb interface In the case of just carry out the switching of the connection status of two signal pins, or only just carry out two signals in terminal unit supplying power for outside The switching of the connection status of pin, etc..
The terminal unit of the embodiment of the present invention, can be the mobile terminals such as mobile phone, flat board or PC (pc), the terminal such as notebook computer, can also be other electronic equipments.
The terminal unit of the embodiment of the present invention, by by the connection status of usb interface two signal pins in sdp state and Switch between dcp state it is achieved that usb interface switches between sdp and dcp two types, when switching to dcp type When, terminal unit just can improve charging rate with high current supplying power for outside, solve and charge when terminal unit externally charges Slow-paced technical problem.Meanwhile, when being switched to dcp type, due to two signal pins and the usb controller company of being disconnected Connect, be therefore physically disconnected the usb data cube computation of terminal unit, now provide only charge function, improve safety.
It should be understood that the terminal unit that above-described embodiment provides belongs to same with the control method embodiment of terminal unit One design, it implements the technical characteristic that process refers in embodiment of the method, and embodiment of the method in apparatus embodiments all Corresponding applicable, repeat no more here.
It will be understood by those skilled in the art that the present invention includes relating to execute in operation described herein Or multinomial equipment.These equipment can specially design for required purpose and manufacture, or can also include general-purpose computations Known device in machine.These equipment have and are stored in its interior computer program, and these computer programs optionally activate Or reconstruct.Such computer program can be stored in equipment (for example, computer) computer-readable recording medium or be stored in and be suitable to Storage e-command is simultaneously coupled in any kind of medium of bus respectively, and described computer-readable medium includes but is not limited to (read-only memory read-only deposits for any kind of disk (including floppy disk, hard disk, CD, cd-rom and magneto-optic disk), rom Reservoir), ram (random access memory, random access memory), eprom (erasable programmable read- Only memory, Erarable Programmable Read only Memory), eeprom (electrically erasable programmable Read-only memory, EEPROM), flash memory, magnetic card or light card.It is, it is readable Medium include being stored in the form of can reading by equipment (for example, computer) or transmission information any medium.
Those skilled in the art of the present technique be appreciated that can be realized with computer program instructions these structure charts and/or Each frame in block diagram and/or flow graph and the combination of the frame in these structure charts and/or block diagram and/or flow graph.This technology is led Field technique personnel be appreciated that can by these computer program instructions be supplied to general purpose computer, special purpose computer or other The processor of programmable data processing method is realizing, thus the process by computer or other programmable data processing methods Device is executing the scheme specified in the frame of structure chart disclosed by the invention and/or block diagram and/or flow graph or multiple frame.
Those skilled in the art of the present technique be appreciated that the various operations having discussed in the present invention, method, in flow process Step, measure, scheme can be replaced, changed, combined or deleted.Further, there is discussed in the present invention each Kind of operation, method, other steps in flow process, measure, scheme can also be replaced, changed, reset, decomposed, combined or deleted. Further, of the prior art have and the step in the various operations disclosed in the present invention, method, flow process, measure, scheme Can also be replaced, changed, reset, decomposed, combined or deleted.
The preferred embodiments of the present invention above by reference to brief description, not thereby limit to the interest field of the present invention.This Skilled person, without departing from the scope of the present invention and essence, can have multiple flexible programs to realize the present invention, for example as one The feature of individual embodiment can be used for another embodiment and obtains another embodiment.All institutes within the technology design with the present invention Any modification, equivalent and the improvement made, all should be within the interest field of the present invention.

Claims (10)

1. a kind of control method of terminal unit, described terminal unit includes usb interface and usb controller, described usb interface bag Include two signal pins it is characterised in that the method comprising the steps of:
Receive switching command;
According to described switching command, by the connection status of described two signal pins in usb standard down port sdp state and special Switch between charging port dcp state;
Wherein, described sdp state is the state that described two signal pins are connected with described usb controller, and described dcp state is institute State the state of the mutual short circuit of two signal pins.
2. terminal unit according to claim 1 control method it is characterised in that described by described two signal pins The step that connection status switches between sdp state and dcp state includes:
Judge whether described usb interface is connected to external equipment;
When described usb interface is connected to external equipment, judge described terminal unit whether just in supplying power for outside;When described terminal Equipment, just in supplying power for outside, first stops the connection of described usb interface and described external equipment, then to described two signal pins Connection status switches over operation;
When described usb interface does not connect external equipment, directly behaviour is switched over to the connection status of described two signal pins Make.
3. terminal unit according to claim 2 control method it is characterised in that described termination described usb interface with The connection of described external equipment, then the connection status of described two signal pins is switched over the step of operation include:
Prompting user temporarily disconnects the connection of described usb interface and described external equipment;
After described usb interface is disconnected with described external equipment, the connection status of described two signal pins is switched over Operation.
4. the control method of terminal unit according to claim 3 is it is characterised in that described prompting user temporarily disconnects institute State the step that usb interface is connected with described external equipment to include: send prompting user temporarily disconnect described usb interface with described The voice messaging of the connection of external equipment.
5. the control method of terminal unit according to claim 3 is it is characterised in that described prompting user temporarily disconnects institute State the step that usb interface is connected with described external equipment to include: display reminding user temporarily disconnect described usb interface with described The Word message of the connection of external equipment and/or image information.
6. it is characterised in that including usb interface and usb controller, described usb interface includes two signals and draws a kind of terminal unit Foot is it is characterised in that also include:
Receiver module, for receiving switching command;
Handover module, for according to described switching command, by the connection status of described two signal pins in usb standard down port Switch between sdp state and special charging port dcp state;
Wherein, described sdp state is the state that described two signal pins are connected with described usb controller, and described dcp state is institute State the state of the mutual short circuit of two signal pins.
7. terminal unit according to claim 6 is it is characterised in that described handover module includes:
Judging unit, for judging whether described usb interface is connected to external equipment;Set when described usb interface is connected to outside When standby, continue to judge described terminal unit whether just in supplying power for outside;
Switch unit, for when described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, first in The only connection of described usb interface and described external equipment, then operation is switched over to the connection status of described two signal pins;When When described usb interface does not connect external equipment, directly operation is switched over to the connection status of described two signal pins.
8. terminal unit according to claim 7 is it is characterised in that described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, point out user temporarily disconnect Described usb interface and the connection of described external equipment;After described usb interface is disconnected with described external equipment, to described The connection status of two signal pins switches over operation.
9. terminal unit according to claim 8 is it is characterised in that described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, sent by sound-producing device Prompting user temporarily disconnects the voice messaging that described usb interface is connected with described external equipment.
10. terminal unit according to claim 8 is it is characterised in that described switch unit is used for:
When described usb interface be connected to external equipment and described terminal unit just in supplying power for outside when, shown by display screen and carry Show that user temporarily disconnects Word message and/or the image information that described usb interface is connected with described external equipment.
CN201610840041.0A 2016-09-21 2016-09-21 Terminal device and control method thereof Pending CN106340780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610840041.0A CN106340780A (en) 2016-09-21 2016-09-21 Terminal device and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610840041.0A CN106340780A (en) 2016-09-21 2016-09-21 Terminal device and control method thereof

Publications (1)

Publication Number Publication Date
CN106340780A true CN106340780A (en) 2017-01-18

Family

ID=57839141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610840041.0A Pending CN106340780A (en) 2016-09-21 2016-09-21 Terminal device and control method thereof

Country Status (1)

Country Link
CN (1) CN106340780A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107359661A (en) * 2017-07-31 2017-11-17 上海与德科技有限公司 Charger, charging system and charging method
CN107579551A (en) * 2017-07-31 2018-01-12 上海与德科技有限公司 Terminal, charger, charging system and charging method
CN109286838A (en) * 2017-07-20 2019-01-29 青岛海信电器股份有限公司 Electric terminal equipment, television terminal, signal input circuit and method
CN109933471A (en) * 2019-03-05 2019-06-25 歌尔科技有限公司 Method, apparatus, computer readable storage medium are surveyed in Android device and its production
CN111404227A (en) * 2020-03-30 2020-07-10 维沃移动通信有限公司 Charging method, OTG cable and electronic equipment
CN112181880A (en) * 2020-09-09 2021-01-05 深圳拔越软件有限公司 Method and device for controlling switching of USB channel

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156524A (en) * 2011-02-11 2011-08-17 威盛电子股份有限公司 Adaptive universal serial bus charging method and system
CN102820682A (en) * 2011-06-09 2012-12-12 中兴通讯股份有限公司 Device and method for communicating through universal serial bus (USB) interface and charging external device
CN103178583A (en) * 2013-03-25 2013-06-26 成都西可科技有限公司 Mobile phone USB (Universal Serial Bus) interface charging system supporting charging for other mobile devices and charging realization method of mobile phone USB interface charging system
WO2013127071A1 (en) * 2012-02-29 2013-09-06 华硕科技(苏州)有限公司 Computer device and method for converting working mode of universal serial bus connector of the computer device
US20140095899A1 (en) * 2012-10-02 2014-04-03 Dell Products L.P. Information handling system adaptive high performance power delivery

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156524A (en) * 2011-02-11 2011-08-17 威盛电子股份有限公司 Adaptive universal serial bus charging method and system
CN102820682A (en) * 2011-06-09 2012-12-12 中兴通讯股份有限公司 Device and method for communicating through universal serial bus (USB) interface and charging external device
WO2013127071A1 (en) * 2012-02-29 2013-09-06 华硕科技(苏州)有限公司 Computer device and method for converting working mode of universal serial bus connector of the computer device
US20140095899A1 (en) * 2012-10-02 2014-04-03 Dell Products L.P. Information handling system adaptive high performance power delivery
CN103178583A (en) * 2013-03-25 2013-06-26 成都西可科技有限公司 Mobile phone USB (Universal Serial Bus) interface charging system supporting charging for other mobile devices and charging realization method of mobile phone USB interface charging system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286838A (en) * 2017-07-20 2019-01-29 青岛海信电器股份有限公司 Electric terminal equipment, television terminal, signal input circuit and method
CN109286838B (en) * 2017-07-20 2021-08-31 海信视像科技股份有限公司 Electronic terminal device, television terminal, signal input circuit and method
CN107359661A (en) * 2017-07-31 2017-11-17 上海与德科技有限公司 Charger, charging system and charging method
CN107579551A (en) * 2017-07-31 2018-01-12 上海与德科技有限公司 Terminal, charger, charging system and charging method
CN109933471A (en) * 2019-03-05 2019-06-25 歌尔科技有限公司 Method, apparatus, computer readable storage medium are surveyed in Android device and its production
CN111404227A (en) * 2020-03-30 2020-07-10 维沃移动通信有限公司 Charging method, OTG cable and electronic equipment
CN112181880A (en) * 2020-09-09 2021-01-05 深圳拔越软件有限公司 Method and device for controlling switching of USB channel

Similar Documents

Publication Publication Date Title
CN106340780A (en) Terminal device and control method thereof
EP3800761B1 (en) Battery control system and method, and electronic device
KR101920236B1 (en) Method for charging battery and an electronic device thereof
JP6884266B2 (en) Mobile devices, peripheral devices, and how to charge them
US8898485B2 (en) Power transfer between devices
CN110829523B (en) Electronic equipment and reverse charging method
CN102577021B (en) Mobile terminal device, power supply system, and power supply method and power supply program for mobile terminal device
CN102810880B (en) Power supply control method, power supply control device and electronic device
EP2493051A2 (en) Wireless charging of mobile device
CN106655316B (en) Charging circuit and terminal device
CN107465227B (en) Electronic equipment and control method thereof
GB2537991A (en) System and method for providing power through a reverse local data transfer connection
CN101601001A (en) A plurality of connections to single serial interface
KR102052443B1 (en) System for performing charging and data communication
KR20130122266A (en) System and apparatus and method for performing charging in host mode
CN109921481A (en) To the OTG equipment and method of supplying power to of communication object power supply when USB is communicated
CN101853970A (en) Method and device for charging through universal serial bus (USB) interface
CN110191215B (en) Terminal and processing method
KR20090084488A (en) Method and apparatus for checking device connecting with potable device
US9252618B2 (en) Terminals, terminal systems and charging/discharging methods thereof
CN106502558A (en) Terminal device and its method of operating and operation device
EP2784901B1 (en) Universal serial bus chargers and charging management methods
CN112166422A (en) Mobile terminal
CN106774769B (en) Terminal working mode switching method and device and handheld terminal
CN111433756A (en) Terminal and Type C interface anti-corrosion method

Legal Events

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

Application publication date: 20170118