CN108197057B - Portable equipment - Google Patents

Portable equipment Download PDF

Info

Publication number
CN108197057B
CN108197057B CN201711428275.5A CN201711428275A CN108197057B CN 108197057 B CN108197057 B CN 108197057B CN 201711428275 A CN201711428275 A CN 201711428275A CN 108197057 B CN108197057 B CN 108197057B
Authority
CN
China
Prior art keywords
vbus
signal
level
control
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711428275.5A
Other languages
Chinese (zh)
Other versions
CN108197057A (en
Inventor
陈国华
林荒明
樊胡兵
郭红
吴挺军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hytera Communications Corp Ltd
Original Assignee
Hytera Communications Corp 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 Hytera Communications Corp Ltd filed Critical Hytera Communications Corp Ltd
Priority to CN201711428275.5A priority Critical patent/CN108197057B/en
Publication of CN108197057A publication Critical patent/CN108197057A/en
Application granted granted Critical
Publication of CN108197057B publication Critical patent/CN108197057B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a portable device, comprising: the data interface is used for being electrically connected with external equipment through a data line and comprises a VBUS _ ID end, and the VBUS _ ID end receives an initial signal from the external equipment; the detection circuit is used for analyzing the initial signal to obtain an ID detection signal and a VBUS detection signal; the processor is used for respectively obtaining the ID control signal and the VBUS control signal according to the ID detection signal and the VBUS detection signal, and further controlling the interface controller to set the working mode of the portable equipment according to the ID control signal and the VBUS control signal. Through the mode, the invention can avoid the problem of disordered identification of external equipment in the prior art, also saves the resource of one pin, improves the utilization rate of a data interface, and avoids the increase of energy consumption caused by the continuous opening of an interface controller.

Description

Portable equipment
Technical Field
The invention relates to the technical field of data interfaces, in particular to portable equipment.
Background
Portable equipment such as handheld walkie-talkie often needs the external different type accessories, and its interface function is more, and too much of interface leads to the product design difficulty, and more functions of less interface collocation must be considered when designing the product.
Data interfaces, such as USB interfaces, are typically equipped with a VBUS pin, which is a power pin, and an ID pin, which is an identity ID pin, and the USB interface has an operation mode that identifies a host (host) and a Slave (Slave). When the ID pin is detected to be pulled low, the portable device is identified as the host. When the VBUS pin is detected to be 5V, the portable equipment is identified as a slave, and the VBUS pin and the ID pin are status signals given by external equipment and used for the portable equipment to identify.
The data interface in the prior art needs to occupy two pin positions to set the VBUS pin and the ID pin, occupies larger pin resources, and reduces the utilization rate of the data interface. And VBUS pin and ID pin direct access interface controller for interface controller need be in operating condition all the time and detect whether VBUS pin and ID pin have the signal, this leads to interface controller's consumption to increase on the one hand, and VBUS pin and ID pin direct access interface controller on the other hand can discern when adopting the external equipment of integrated PMU to be connected with this portable equipment electricity and make mistakes, thereby charges for the outside with the host computer mode automatically, leads to the system of external equipment to be unusual from this easily.
In summary, the data interface of the portable device in the prior art has the disadvantages of low utilization rate, high power consumption and confusion of the external device.
Disclosure of Invention
The invention mainly solves the technical problem of providing a portable device, which can improve the utilization rate of a data interface, reduce the power consumption of the portable device and avoid the confusion of the identification of external equipment.
In order to solve the technical problems, the invention adopts a technical scheme that: there is provided a portable device including: the data interface is used for being electrically connected with external equipment through a data line and comprises a VBUS _ ID end, and the VBUS _ ID end receives an initial signal from the external equipment; the detection circuit is used for analyzing the initial signal to obtain an ID detection signal and a VBUS detection signal; the processor is used for respectively obtaining the ID control signal and the VBUS control signal according to the ID detection signal and the VBUS detection signal, and further controlling the interface controller to set the working mode of the portable equipment according to the ID control signal and the VBUS control signal.
Wherein the portable device further comprises a first switching tube;
the interface controller comprises a first ID control pin and a first VBUS control pin;
the processor comprises an ID detection pin, a VBUS detection pin, a second ID control pin and a second VBUS control pin, wherein the ID detection pin is used for receiving an ID detection signal, the VBUS detection pin is used for receiving the VBUS detection signal, the second ID control pin is electrically connected with the first ID control pin, and the second VBUS control pin is electrically connected with the first VBUS control pin through a first switch tube.
The control end of the first switch tube is electrically connected with the second VBUS control pin, the input end of the first switch tube is electrically connected with the first signal power supply, and the output end of the first switch tube is electrically connected with the first VBUS control pin.
The detection circuit comprises a second switching tube and a third switching tube, wherein the second switching tube and the third switching tube respectively receive an initial signal, the second switching tube outputs an ID detection signal according to the initial signal, and the third switching tube outputs a VBUS detection signal according to the initial signal.
Wherein, the initial signal is a high voltage signal;
the ID detection signal and the VBUS detection signal output by the second switching tube and the third switching tube are both low level signals;
the processor obtains a high-level ID control signal and a low-level VBUS control signal respectively according to a low-level ID detection signal and a low-level VBUS detection signal respectively received by the ID detection pin and the VBUS detection pin, and outputs the high-level ID control signal and the low-level VBUS control signal respectively through the second ID control pin and the second VBUS control pin, so that the first ID control pin of the interface controller receives the high-level ID control signal, the conduction of the first switching tube is controlled through the low-level VBUS control signal, and the first VBUS control pin receives a first power supply voltage provided by a first signal power supply;
the interface controller controls the portable device to be in the slave mode according to the high level ID control signal and the first power voltage.
Wherein, the initial signal is a low voltage signal;
the ID detection signal and the VBUS detection signal output by the second switching tube and the third switching tube are both high-level signals;
the processor obtains a low-level ID control signal and a high-level VBUS control signal respectively according to a high-level ID detection signal and a high-level VBUS detection signal which are respectively received by the ID detection pin and the VBUS detection pin, and outputs the low-level ID control signal and the high-level VBUS control signal respectively through the second ID control pin and the second VBUS control pin, so that the first ID control pin of the interface controller receives the low-level ID control signal, and controls the first switching tube to be disconnected through the high-level VBUS control signal, and the first VBUS control pin is in a low potential state;
the interface controller controls the portable device to be in the host mode according to the low-level ID control signal and the low-level state of the first VBUS control pin.
Wherein, the initial signal is a suspension signal;
the ID detection signal output by the second switching tube is a low level signal, and the VBUS detection signal output by the third switching tube is a high level signal;
the processor obtains a high-level ID control signal and a high-level VBUS control signal respectively according to a low-level ID detection signal and a high-level VBUS detection signal which are respectively received by the ID detection pin and the VBUS detection pin, and outputs the high-level ID control signal and the high-level VBUS control signal through the second ID control pin and the second VBUS control pin respectively, so that the first ID control pin of the interface controller receives the high-level ID control signal, and controls the first switching tube to be disconnected through the high-level VBUS control signal, and the first VBUS control pin is in a low-potential state;
the interface controller controls the portable device to be in the current working mode according to the high-level ID control signal and the low-level state of the first VBUS control pin.
The portable device further comprises a first pull-down resistor, a second pull-down resistor, a first pull-up resistor and a second pull-up resistor; the control end of the second switch tube receives the initial signal, the control end of the second switch tube is further electrically connected with a second signal power supply through a first pull-up resistor, the input end of the second switch tube is electrically connected with the second signal power supply, and the output end of the second switch tube is electrically connected with the ground through a first pull-down resistor;
the control end of the third switching tube receives the initial signal, the input end of the third switching tube is electrically connected with the ground through a second pull-down resistor, and the output end of the third switching tube is electrically connected with a second signal power supply through a second pull-up resistor.
Wherein the portable device further comprises a diode disposed between the second signal power source and the first pull-up resistor.
The first switch tube and the second switch tube are P-type switch tubes, the third switch tube is N-type switch tube, the control end is grid, the input end is source, and the output end is drain.
The invention has the beneficial effects that: the present invention provides a portable device, which includes a data interface, a detection circuit, a processor and an interface controller, wherein the data interface is configured to be electrically connected to an external device through a data line, the data interface includes a VBUS _ ID terminal, the VBUS _ ID terminal receives an initial signal from the external device, the detection circuit is configured to parse the initial signal to obtain an ID detection signal and a VBUS detection signal, and the processor and the interface controller are configured to obtain the ID control signal and the VBUS control signal according to the ID detection signal and the VBUS detection signal, respectively, and further control the interface controller to set an operating mode of the portable device according to the ID control signal and the VBUS control signal. Therefore, the invention obtains the initial signal from the data port by setting the detection circuit, and avoids the VBUS _ ID end in the data port being directly and electrically connected with the interface controller, namely the VBUS _ ID end and the interface controller are isolated, thereby avoiding the problem of confusion of identification of the external device in the prior art. Furthermore, because the invention can carry out detection and analysis according to the acquired initial signal and then obtain the ID control signal and the VBUS control signal which can determine the working mode of the portable equipment through the processor, the invention can only set one pin, namely the VBUS _ ID end, thereby saving the resource of one pin and improving the utilization rate of a data interface compared with the prior art. Furthermore, the combination of the detection circuit and the processor can obtain the ID control signal and the VBUS control signal, and then the interface controller is controlled to set the working mode of the portable equipment according to the ID control signal and the VBUS control signal, so that the interface controller can be started again when receiving the corresponding control signal, and the problem that the interface controller is started all the time and the energy consumption is increased is avoided.
Drawings
Fig. 1 is a schematic structural diagram of a portable device according to an embodiment of the present invention;
fig. 2 is a schematic circuit configuration diagram of a detection circuit of the portable device shown in fig. 1.
Detailed Description
Referring to fig. 1, fig. 1 is a schematic structural diagram of a portable device according to an embodiment of the present invention. As shown in fig. 1, the portable device 10 of the present embodiment includes a data interface 11, a detection circuit 12, a processor 13, and an interface controller 14. The portable device 10 may be a handheld interphone, a mobile phone, a camera, etc.
The data Interface 11 is used to be electrically connected to the external device 200 through a data line 100, and the data Interface 11 may be a USB (Universal Serial Bus) data Interface, a VGA (Video Graphics Array) data Interface, a DVI (Digital Video Interface) data Interface, or an LPT (line print terminal) data Interface. USB data interfaces are widely used because they can transfer data, charge, and activate system functions. In this embodiment, the data interface 11 is taken as an example of the USB data interface unless otherwise specified. It should be understood that the illustration of a single USB data interface is not limiting of the other data interfaces encompassed by the present invention. When the data interface 11 is a USB data interface, it may include four ports, specifically, a VBUS _ ID port 111, a D-port 112, a D + port 113, and a GND port 114, where the VBUS _ ID port 111 is an operation mode port, and a specific operation mode is described in detail later. The D + terminal 112 and the D-terminal 113 are respectively a positive terminal and a negative terminal of data signal transmission, and the GND terminal 114 is a ground terminal.
The detection circuit 12 is configured to parse the initial signal VBUS _ ID to obtain an ID detection signal and a VBUS detection signal.
The processor 13 is configured to obtain an ID control signal and a VBUS control signal according to the ID detection signal and the VBUS detection signal, respectively, and further control the interface controller 14 to set an operating mode of the portable device according to the ID control signal and the VBUS control signal. The operation modes of the portable device 100 include a master mode, a slave mode, and a current operation mode. When it is detected that the ID pin (described later) of the controller 14 corresponding to the USB data interface is pulled down and the voltage detected by the VBUS pin (described later) is 0V, the portable device 100 recognizes a host mode in which the portable device 100 can charge the external device 200 electrically connected thereto. When it is detected that the VBUS control pin of the controller 14 corresponding to the USB data interface receives the voltage of 5V and the ID pin is pulled high, the portable device 100 is identified as the slave mode, and in this mode, the portable device 100 can be charged by the external device 200 electrically connected thereto, for example, when the external device 200 is a computer, the portable device 100 can be in the slave mode, and thus can be charged by the computer. When it is detected that the VBUS pin of the controller 14 corresponding to the USB data interface receives a voltage of 0V and the ID pin is pulled high, the portable device 100 recognizes the current operation mode. The current operation mode is an operation mode when the portable device 100 and the external device 200 are not electrically connected, and includes a case where a data line connecting the portable device 100 and the external device 200 is removed from the data interface 11.
Therefore, in this embodiment, by setting the detection circuit 12 to obtain the initial signal from the data port 11, it is avoided that the VBUS _ ID terminal in the data port 11 is directly electrically connected to the interface controller 14, i.e. the VBUS _ ID terminal and the interface controller 14 are isolated, thereby avoiding the problem of confusion of identification of external devices in the prior art. Further, since the embodiment can perform detection and analysis according to the acquired initial signal, and then obtain the ID control signal and the VBUS control signal that can determine the operating mode of the portable device 100 through the processor 13, the present invention can only set one pin, i.e., the VBUS _ ID terminal, so that resources of one pin are saved compared with the prior art, and the utilization rate of the data interface is improved. Further, since the ID control signal and the VBUS control signal can be obtained by combining the detection circuit 12 and the processor 13, and the interface controller 14 is controlled to set the operating mode of the portable device 100 according to the ID control signal and the VBUS control signal, the interface controller 14 can be turned on again when receiving the corresponding control signal, thereby avoiding the increase of energy consumption caused by the fact that the interface controller 14 is turned on all the time.
In this embodiment, the portable device 100 further includes a first switch tube T1, and the interface controller 14 includes a first ID control pin 141, a first VBUS control pin 142, a D-pin 143, a D + pin 144, and a GND pin 145. The processor 13 includes an ID detection pin 131, a VBUS detection pin 132, a second ID control pin 133, and a second VBUS control pin 134.
The D-pin 143, the D + pin 144 and the GND pin 145 are electrically connected to the D-terminal 112, the D + terminal 113 and the GND terminal 114 of the data interface 11, respectively. The first ID control pin 141 is electrically connected to the second ID control pin 133, the first VBUS control pin 142 is electrically connected to the second VBUS control pin 134 through a first switch tube T1, the ID detection pin 131 is configured to receive an ID detection signal, and the VBUS detection pin 132 is configured to receive a VBUS detection signal.
Specifically, the control terminal G1 of the first switch tube T1 is electrically connected to the second VBUS control pin 134, the input terminal S1 of the first switch tube T1 is electrically connected to the first signal power source V1, and the output terminal D1 of the first switch tube T1 is electrically connected to the first VBUS control pin 142. In this embodiment, the first signal power supply V1 may be 5V, i.e. a USB data interface charging voltage. In other embodiments, the data interface may be set to other types.
In this embodiment, the first switch transistor T1 is a PMOS transistor, wherein the control terminal G1 of the first switch transistor T1 is a gate of the PMOS transistor, the input terminal S1 of the first switch transistor T1 is a source of the PMOS transistor, and the output terminal D1 of the first switch transistor T1 is a drain of the PMOS transistor. Therefore, when the VBUS control signal outputted from the second VBUS control pin 134 is at a high level, the first switch T1 is turned off, the voltage of the first signal source V1 cannot be inputted to the first VBUS control pin 142, and the first VBUS control pin 142 receives a voltage of 0V. When the VBUS control signal outputted from the second VBUS control pin 134 is at a low level, the first switch tube T1 is turned on, and the voltage of the first signal source V1 is inputted to the first VBUS control pin 142 through the input terminal S1 and the output terminal D1 of the first switch tube T1.
In other embodiments, the first switch transistor T1 may also be an NMOS transistor. Similarly, the control end G1 of the first switch transistor T1 is the gate of the NMOS transistor, the input end S1 of the first switch transistor T1 is the source of the NMOS transistor, and the output end D1 of the first switch transistor T1 is the drain of the NMOS transistor. Therefore, when the VBUS control signal outputted from the second VBUS control pin 134 is at a high level, the first switch tube T1 is turned on, and the voltage of the first signal source V1 is inputted into the first VBUS control pin 142 through the input terminal S1 and the output terminal D1 of the first switch tube T1. When the VBUS control signal output from the second VBUS control pin 134 is at a low level, the first switch T1 is turned off, the voltage of the first signal source V1 cannot be input to the first VBUS control pin 142, and the first VBUS control pin 142 receives a voltage of 0V.
Referring to fig. 2, fig. 2 is a schematic circuit diagram of a detection circuit of the portable device shown in fig. 1. As shown in fig. 2, the detection circuit 12 includes a second switching tube T2 and a third switching tube T3. The second switch tube T2 and the third switch tube T3 respectively receive the initial signal, the second switch tube T2 outputs the ID detection signal according to the initial signal, and the third switch tube T3 outputs the VBUS detection signal according to the initial signal.
Further, the portable device 100 further includes a first pull-down resistor R2, a second pull-down resistor R8, a first pull-up resistor R6, and a second pull-up resistor R4. The control end G2 of the second switch tube T2 receives the initial signal, and the control end S2 of the second switch tube T2 is further electrically connected to the second signal power source V2 through the first pull-up resistor R6, the input end S2 of the second switch tube T2 is electrically connected to the second signal power source V2, and the output end D2 of the second switch tube T2 is electrically connected to ground through the first pull-down resistor R2.
The control terminal G3 of the third switch tube T3 receives the initial signal, and the control terminal G3 of the third switch tube T3 is electrically connected to ground through the second pull-down resistor R8, the input terminal S3 of the third switch tube T3 is electrically connected to ground, and the output terminal D3 of the third switch tube T3 is electrically connected to the second signal power supply V2 through the second pull-up resistor R4. Wherein, the second signal power supply V2 may be 3V.
Further, the portable device 100 further includes a diode D1, and the diode D1 is disposed between the second signal power source V2 and the first pull-up resistor R6. The diode D1 is used to prevent the initial signal voltage received at the control terminal G2 of the second switch tube T2 from flowing backwards to the second signal power supply V2 when the initial signal voltage is too large, and affecting the second signal power supply V2.
In this embodiment, the second switch transistor T2 is a PMOS transistor, and the third switch transistor T3 is an NMOS transistor. The control terminal G2 of the second switch tube T2 and the control terminal G3 of the third switch tube are gates, the input terminal S2 of the second switch tube T2 and the input terminal S3 of the third switch tube G3 are sources, and the output terminal D2 of the second switch tube T2 and the output terminal D3 of the third switch tube T3 are drains.
The initial signal may be a high voltage signal, a low voltage signal, and a floating signal corresponding to an operation mode of the portable device 100. Specifically, the initial signal corresponding to the master mode of the portable device 100 is a low voltage signal, the initial signal corresponding to the slave mode of the portable device 100 is a high voltage signal, and the initial signal corresponding to the current operating mode of the portable device 100 is a floating signal. The processor 13 of this embodiment may preset and store the above relationship. The specific relationship is shown in the following table:
table 1 operating mode of the portable device in relation to the signals:
mode of operation Initial signal ID detection signal VBUS detection signal ID control signal VBUS control signal
Host mode Low voltage signal 1 1 0 1
Slave mode High voltage signal 0 0 1 0
Current mode of operation Suspended signal 0 1 1 1
In the table, 1 indicates a high level signal, and 0 indicates a low level signal.
Specifically, if the initial signal is a high voltage signal, for example, 5V. The input terminal G2 of the second transistor T2 and the input terminal G3 of the third transistor T3 receive high voltage signals. When the second switch tube T2 is turned off and is in an off state, and the potential of the input/output terminal D2 is pulled low by the first pull-down resistor R2, the ID detection signal output from the second switch tube T2 is a low level signal. The third switch tube T3 is turned on at a high voltage level, so that the input terminal S3 and the output terminal D3 thereof are connected, and since the input terminal S3 is grounded, the voltage level of the output terminal D3 is pulled down to the ground voltage level, i.e., the VBUS detection signal output by the output terminal D3 is also a low-level signal.
The ID detection pin 131 and the VBUS detection pin 132 of the processor 13 respectively receive a low-level ID detection signal and a low-level VBUS detection signal, and further, the processor 13 processes the low-level ID detection signal and the low-level VBUS detection signal to respectively obtain a high-level ID control signal and a low-level VBUS control signal, and further, the high-level ID control signal and the low-level VBUS control signal are respectively output through the second ID control pin 133 and the second VBUS control pin 134, so that the first ID control pin 141 of the interface controller 14 receives the high-level ID control signal, and the low-level VBUS control signal controls the first switch tube T1 to be turned on, so that the first VBUS control pin 142 receives the first power voltage V1 provided by the first signal power supply.
The interface controller 14 controls the portable device to be in the slave mode according to the high level ID control signal and the first power voltage V1. In this mode, the portable device 100 can communicate data signals with the external device 200, and the external device 200 can also charge the portable device 100.
If the initial signal is a low voltage signal, the input terminal G2 of the second switch transistor T2 and the input terminal G3 of the third switch transistor T3 receive the low voltage signal. The second switch tube T2 is turned on at a low potential, and is electrically connected to the input terminal S2 and the output terminal D2 of the second signal power source V2, so that the ID detection signal inputted from the output terminal D2 is a high level signal. When the third switch tube T3 is turned off and is in an off state, the output terminal D3 is pulled high by the second pull-up resistor R4 electrically connected to the second signal power source V2, i.e., the output VBUS detection signal output by the output terminal D3 is a high level signal.
The ID detection pin 131 and the VBUS detection pin 132 of the processor 13 respectively receive the high-level ID detection signal and the high-level VBUS detection signal, and further process the high-level ID detection signal and the high-level VBUS detection signal to respectively obtain a low-level ID control signal and a high-level VBUS control signal, which are then respectively output through the second ID control pin 133 and the second VBUS control pin 134, so that the first ID control pin 141 of the interface controller 14 receives the low-level ID control signal, and the first switching tube T1 is controlled to be turned off through the high-level VBUS control signal, so that the first VBUS control pin 142 is in a low-level state.
The interface controller 14 controls the portable device 100 to the host mode according to the low level ID control signal and the low level state of the first VBUS control pin 142. In this mode, the portable device 100 can communicate the data signal with the external device 200, and the portable device 100 can also charge the external device 200.
If the initial signal is a floating signal, that is, an empty signal, that is, neither the control terminal G2 of the second switch tube T2 nor the control terminal G3 of the third switch tube T3 receives a signal, the control terminal G2 of the second switch tube T2 is electrically connected to the first pull-up resistor R6, so that the control terminal G2 is pulled high, which turns off the second switch tube T2, and is in an off state, the potential of the output terminal D2 is pulled low by the first pull-down resistor R2, which results in that the ID detection signal output by the second switch tube T2 is a low level signal; since the control terminal G3 of the third switching tube T3 is electrically connected to the second pull-down resistor R8 and is pulled down to the ground potential by the second pull-down resistor R8, the third switching tube T3 is also turned off, and is in an off state, the potential of the output terminal D3 of the third switching tube T3 is pulled up by the second pull-up resistor R4, and thus the VBUS detection signal output by the third switching tube T3 is a high level signal.
The ID detection pin 131 and the VBUS detection pin 132 of the processor 13 respectively receive the low-level ID detection signal and the high-level VBUS detection signal, and process the ID detection signal and the VBUS detection signal to respectively obtain a high-level ID control signal and a high-level VBUS control signal, and respectively output the high-level ID control signal and the high-level VBUS control signal through the second ID control pin 133 and the second VBUS control pin 134, so that the first ID control pin 141 of the interface controller 14 receives the high-level ID control signal, and the first switching tube T1 is controlled to be turned off by the high-level VBUS control signal, so that the first VBUS control pin 142 is in a low-potential state.
The interface controller 14 controls the portable device to be in the current operation mode according to the high ID control signal and the low state of the first VBUS control pin 142. In this mode, the portable device 100 does not perform operations such as data communication or charging with the external device 200 through the data interface 11.
In summary, the detection circuit is arranged to obtain the initial signal, and the initial signal is detected and analyzed, so that the ID control signal and the VBUS control signal that can determine the working mode of the portable device are obtained through the processor, and only one pin, namely, the VBUS _ ID end, can be arranged in the invention, thereby saving the resource of one pin and improving the utilization rate of the data interface; furthermore, the combination of the detection circuit and the processor can analyze the ID control signal and the VBUS control signal, and then the interface controller is controlled to set the working mode of the portable equipment according to the ID control signal and the VBUS control signal, so that the interface controller can be started again when receiving the corresponding control signal, and the problem that the interface controller is started all the time to increase energy consumption is avoided; in addition, because the VBUS _ ID terminal and the interface controller of the invention are isolated, the problem of confusion of external device identification in the prior art can be avoided.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A portable device, characterized in that the portable device comprises:
the data interface is used for being electrically connected with external equipment through a data line and comprises a VBUS _ ID end, and the VBUS _ ID end receives an initial signal from the external equipment;
the detection circuit is used for analyzing the initial signal to obtain an ID detection signal and a VBUS detection signal;
the processor is used for respectively obtaining an ID control signal and a VBUS control signal according to the ID detection signal and the VBUS detection signal, and further controlling the interface controller to set the working mode of the portable equipment according to the ID control signal and the VBUS control signal.
2. The portable device of claim 1, further comprising a first switch tube;
the interface controller comprises a first ID control pin and a first VBUS control pin;
the processor comprises an ID detection pin, a VBUS detection pin, a second ID control pin and a second VBUS control pin, wherein the ID detection pin is used for receiving the ID detection signal, the VBUS detection pin is used for receiving the VBUS detection signal, the second ID control pin is electrically connected with the first ID control pin, and the second VBUS control pin is electrically connected with the first VBUS control pin through the first switch tube.
3. The portable device of claim 2, wherein the control terminal of the first switch tube is electrically connected to the second VBUS control pin, the input terminal of the first switch tube is electrically connected to a first signal power source, and the output terminal of the first switch tube is electrically connected to the first VBUS control pin.
4. The portable apparatus of claim 3, wherein the detection circuit comprises a second switch tube and a third switch tube, wherein the second switch tube and the third switch tube respectively receive the initial signal, and the second switch tube outputs the ID detection signal according to the initial signal, and the third switch tube outputs the VBUS detection signal according to the initial signal.
5. The portable device of claim 4, wherein the initial signal is a high voltage signal;
the ID detection signal and the VBUS detection signal output by the second switching tube and the third switching tube are both low-level signals;
the processor obtains a high-level ID control signal and a low-level VBUS control signal according to the low-level ID detection signal and the low-level VBUS detection signal respectively received by the ID detection pin and the VBUS detection pin, and outputs the high-level ID control signal and the low-level VBUS control signal through the second ID control pin and the second VBUS control pin respectively, so that the first ID control pin of the interface controller receives the high-level ID control signal, and controls the first switching tube to be conducted through the low-level VBUS control signal, so that the first VBUS control pin receives a first power supply voltage provided by the first signal power supply;
and the interface controller controls the portable equipment to be in a slave mode according to the high-level ID control signal and the first power supply voltage.
6. The portable device of claim 4, wherein the initial signal is a low voltage signal;
the ID detection signal and the VBUS detection signal output by the second switching tube and the third switching tube are both high-level signals;
the processor obtains a low-level ID control signal and a high-level VBUS control signal according to the high-level ID detection signal and the high-level VBUS detection signal respectively received by the ID detection pin and the VBUS detection pin, and outputs the low-level ID control signal and the high-level VBUS control signal through the second ID control pin and the second VBUS control pin respectively, so that the first ID control pin of the interface controller receives the low-level ID control signal, and controls the first switching tube to be disconnected through the high-level VBUS control signal, so that the first VBUS control pin is in a low potential state;
and the interface controller controls the portable equipment to be in a host mode according to the low-level ID control signal and the low-level state of the first VBUS control pin.
7. The portable device of claim 4, wherein the initial signal is a floating signal;
the ID detection signal output by the second switching tube is a low level signal, and the VBUS detection signal output by the third switching tube is a high level signal;
the processor obtains a high-level ID control signal and a high-level VBUS control signal according to the low-level ID detection signal and the high-level VBUS detection signal respectively received by the ID detection pin and the VBUS detection pin, and outputs the high-level ID control signal and the high-level VBUS control signal through the second ID control pin and the second VBUS control pin respectively, so that the first ID control pin of the interface controller receives the high-level ID control signal, and controls the first switching tube to be switched off through the high-level VBUS control signal, so that the first VBUS control pin is in a low potential state;
and the interface controller controls the portable equipment to be in a current working mode according to the high-level ID control signal and the low-level state of the first VBUS control pin.
8. The portable device of claim 4, further comprising a first pull-down resistor, a second pull-down resistor, a first pull-up resistor, and a second pull-up resistor; the control end of the second switch tube receives the initial signal, the control end of the second switch tube is further electrically connected with a second signal power supply through the first pull-up resistor, the input end of the second switch tube is electrically connected with the second signal power supply, and the output end of the second switch tube is electrically connected with ground through the first pull-down resistor;
the control end of the third switching tube receives the initial signal, the input end of the third switching tube is electrically connected with the ground through the second pull-down resistor, and the output end of the third switching tube is electrically connected with the second signal power supply through the second pull-up resistor.
9. The portable device of claim 8, further comprising a diode disposed between the second signal supply and the first pull-up resistor.
10. The portable device of claim 8, wherein the first switch tube and the second switch tube are P-type switch tubes, the third switch tube is an N-type switch tube, and wherein the control terminal is a gate, the input terminal is a source, and the output terminal is a drain.
CN201711428275.5A 2017-12-25 2017-12-25 Portable equipment Active CN108197057B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711428275.5A CN108197057B (en) 2017-12-25 2017-12-25 Portable equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711428275.5A CN108197057B (en) 2017-12-25 2017-12-25 Portable equipment

Publications (2)

Publication Number Publication Date
CN108197057A CN108197057A (en) 2018-06-22
CN108197057B true CN108197057B (en) 2021-09-28

Family

ID=62584070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711428275.5A Active CN108197057B (en) 2017-12-25 2017-12-25 Portable equipment

Country Status (1)

Country Link
CN (1) CN108197057B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241015A (en) * 2019-12-31 2020-06-05 广州展讯信息科技有限公司 Master-slave CPU circuit structure, method and storage medium capable of realizing USB interface multiplexing
CN111339007B (en) * 2020-02-28 2021-10-08 深圳市广和通无线股份有限公司 USB device control method and device, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221546A (en) * 2007-01-12 2008-07-16 奇岩电子股份有限公司 Device for automatically detecting universal serial bus main unit or peripherals
CN104253459A (en) * 2013-06-28 2014-12-31 鸿富锦精密工业(深圳)有限公司 USB device with power supply mode switching function
US9395780B2 (en) * 2011-04-21 2016-07-19 Texas Instruments Incorporated USB bridge circuit gating RID—A and RID—GND for IDGND
CN206039739U (en) * 2016-09-18 2017-03-22 艾体威尔电子技术(北京)有限公司 HOSTUSB function sharing circuit that charges
CN206412603U (en) * 2017-01-23 2017-08-15 北京小米移动软件有限公司 Type C joints and connecting line

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080265838A1 (en) * 2007-04-24 2008-10-30 Saurabh Garg Battery charging using a USB-ID pin of a USB interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221546A (en) * 2007-01-12 2008-07-16 奇岩电子股份有限公司 Device for automatically detecting universal serial bus main unit or peripherals
US9395780B2 (en) * 2011-04-21 2016-07-19 Texas Instruments Incorporated USB bridge circuit gating RID—A and RID—GND for IDGND
CN104253459A (en) * 2013-06-28 2014-12-31 鸿富锦精密工业(深圳)有限公司 USB device with power supply mode switching function
CN206039739U (en) * 2016-09-18 2017-03-22 艾体威尔电子技术(北京)有限公司 HOSTUSB function sharing circuit that charges
CN206412603U (en) * 2017-01-23 2017-08-15 北京小米移动软件有限公司 Type C joints and connecting line

Also Published As

Publication number Publication date
CN108197057A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
US9548622B2 (en) Wirelessly charging a mobile device and utilizing the mobile device as a power source
US11101673B2 (en) Programmable gate driver control in USB power delivery
US9274577B2 (en) Adaptive USB charging method and system
CN106571657B (en) Terminal, converter, and connection conversion system and method
US10241935B2 (en) Portable device, cable assembly, and USB system
EP2698969B1 (en) Electronic device having usb interface and usb communication start method thereof
CN110829523B (en) Electronic equipment and reverse charging method
JP6813392B2 (en) Configurable and power-optimized integrated gate driver for USB power supply and Type-C SoC
US11100034B1 (en) Dual integrated gate-driver with reverse current fault protection for USB Type-C and USB power delivery
US20100052620A1 (en) Battery charger ic including built-in usb detection
US20170077743A1 (en) Charging circuit and terminal
US20070278999A1 (en) USB mini B power supply system for quickly charging USB mini B devices
US20160190847A1 (en) Electronic device and method for controlling power supply
US10804713B2 (en) Charge-discharge device and control method of the same
KR20140144277A (en) Electronic device and control method therefor
DE112020003962T5 (en) Gate driver for n-channel field effect transistor (NFET) with controlled gate-source voltage
CN107643998B (en) System for realizing OTG and charging dual functions based on intelligent module
CN108197057B (en) Portable equipment
US20130300213A1 (en) Identification circuit
US20150169491A1 (en) Electronic device using usb socket to load firmware and firmware loading method thereof
US9207697B2 (en) Control chip and connection module utilizing the same
DE102021121019A1 (en) GROUND AND SUPPLY WIRE COMPENSATION ARCHITECTURE FOR USB POWER DELIVERY SUBSYSTEM
US20160274650A1 (en) Interface supply circuit
US11862959B2 (en) Short circuit recovery in universal serial bus Type-C power delivery (USB-C/PD) systems based on resistors
CN218006532U (en) Circuit for determining master-slave device connection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant