WO2018195992A1 - Control method, usb system and electronic apparatus - Google Patents

Control method, usb system and electronic apparatus Download PDF

Info

Publication number
WO2018195992A1
WO2018195992A1 PCT/CN2017/082596 CN2017082596W WO2018195992A1 WO 2018195992 A1 WO2018195992 A1 WO 2018195992A1 CN 2017082596 W CN2017082596 W CN 2017082596W WO 2018195992 A1 WO2018195992 A1 WO 2018195992A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
signal line
circuit
switching circuit
usb
Prior art date
Application number
PCT/CN2017/082596
Other languages
French (fr)
Chinese (zh)
Inventor
孟祥沾
方文钊
郑德恩
滕翔
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2017/082596 priority Critical patent/WO2018195992A1/en
Priority to CN201780004893.9A priority patent/CN108513656B/en
Publication of WO2018195992A1 publication Critical patent/WO2018195992A1/en

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/4004Coupling between buses
    • G06F13/4009Coupling between buses with data restructuring
    • G06F13/4018Coupling between buses with data restructuring with data-width conversion
    • 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
    • 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
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a control method, a USB system, and an electronic device.
  • USB interface In the related art, a USB interface is widely used. Many USB devices belong to OTG devices, and can be used as both USB and USB slaves. For different usage scenarios, the USB standard defines different interface types. Popular interfaces include standard A interface, Mini interface, and Micro interface. However, an interface can only match one type of USB data cable. Thus, the integrated USB host slave and the type of interface, the user's device often brings many uses due to the mismatch of data lines and interface types. inconvenient.
  • Embodiments of the present invention provide a control method, a USB system, and an electronic device.
  • a control method of an embodiment of the present invention is for controlling a USB system
  • the USB system includes an embedded circuit, a USB controller, and a plurality of interfaces
  • the embedded circuit includes a switching circuit
  • the switching circuit connects the plurality of interfaces
  • the switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
  • a USB system includes an embedded circuit, a USB controller, a plurality of interfaces, a main controller, and a memory
  • the embedded circuit includes a switching circuit
  • the switching circuit connects the plurality of interfaces
  • the main A controller is coupled to the switching circuit
  • the memory is for storing instructions
  • the main controller is configured to execute the instructions to:
  • the switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
  • the body, the USB system is mounted on the body.
  • the control method, the USB system and the electronic device of the embodiments of the present invention can realize a USB system by extending different types of interfaces and establishing corresponding links according to device access states of multiple interfaces. With technical effects with various USB functions and interfaces.
  • FIG. 1 is a schematic flow chart of a control method according to an embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of a USB system according to an embodiment of the present invention.
  • FIG. 3 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing a connection relationship between signal lines and ground lines of a plurality of interfaces according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram showing a connection relationship of power lines of a plurality of interfaces according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram showing a connection relationship of state lines of a plurality of interfaces according to an embodiment of the present invention.
  • FIG. 7 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 8 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 9 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 10 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 11 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 12 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • FIG. 13 is another schematic flowchart of a control method according to an embodiment of the present invention.
  • 15 is a schematic block diagram of an electronic device according to an embodiment of the present invention.
  • USB system 10 embedded circuit 11, switching circuit 112, first switching circuit 1122, second switching circuit 1124, third switching circuit 1126, fourth switching circuit 1128, voltage output circuit 114, first voltage detecting circuit 1162, The two voltage detecting circuit 1164, the USB controller 12, the interface 13, the preset interface 131, the first interface 132, the second interface 134, the third interface 136, the main controller 14, the memory 15, the body 40, and the electronic device 100.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include one or more of the described features either explicitly or implicitly.
  • the meaning of "a plurality" is two or more unless specifically defined otherwise.
  • the terms “installation”, “connected”, and “connected” should be understood broadly, and may be a fixed connection, for example, or It is a detachable connection, or is integrally connected; it may be directly connected or indirectly connected through an intermediate medium, and may be an internal connection of two elements or an interaction relationship of two elements.
  • installation should be understood broadly, and may be a fixed connection, for example, or It is a detachable connection, or is integrally connected; it may be directly connected or indirectly connected through an intermediate medium, and may be an internal connection of two elements or an interaction relationship of two elements.
  • the "on" or “below” of the second feature may include direct contact of the first and second features, and may also include the first sum, unless otherwise specifically defined and defined.
  • the second feature is not in direct contact but through additional features between them.
  • the first feature “above”, “above” and “above” the second feature includes the first feature directly above and above the second feature, or merely indicating that the first feature level is higher than the second feature.
  • the first feature “below”, “below” and “below” the second feature includes the first feature directly below and below the second feature, or merely the first feature level being less than the second feature.
  • a control method of an embodiment of the present invention is used to control the USB system 10.
  • the USB system 10 includes an embedded circuit 11, a USB controller 12, and a plurality of interfaces 13.
  • the embedded circuit 11 includes a switching circuit 112.
  • the switching circuit 112 connects the plurality of interfaces 13.
  • the control method includes the following steps:
  • S11 polling the plurality of interfaces 13 to determine device access status of the plurality of interfaces 13;
  • the switch circuit 112 When it is determined that one of the interfaces 13 of the plurality of interfaces 13 has device access, the switch circuit 112 is used to establish a link between the USB controller 12 and the interface 13 where the device is accessed.
  • the USB system 10 of the embodiment of the present invention includes an embedded circuit 11, a USB controller 12, a plurality of interfaces 13, a main controller 14, and a memory 15.
  • the embedded circuit 11 includes a switching circuit 112.
  • the switching circuit 112 connects the plurality of interfaces 13.
  • the main controller 14 is connected to the switching circuit 112.
  • the memory 15 is used to store instructions.
  • the main controller 14 is configured to execute instructions to: poll the plurality of interfaces 13 to determine device access states of the plurality of interfaces 13; and utilize the switching circuit 112 when it is determined that one of the interfaces 13 of the plurality of interfaces 13 has device access A link is established between the USB controller 12 and the interface 13 where the device is connected. That is to say, step S11 and step S13 can be implemented by the main controller 14.
  • the control method and the USB system 10 of the embodiments of the present invention can realize a USB system 10 by extending a plurality of interfaces 13 of different types and establishing corresponding links according to device access states of the plurality of interfaces 13.
  • the USB controller 12 of the embodiment of the present invention has an OTG function, and the USB system 10 can be either a USB host or a USB slave.
  • the plurality of interfaces 13 include a preset interface 131.
  • the control method further includes the steps of:
  • S14 Establish a link between the USB controller 12 and the preset interface 131 by using the switching circuit 112 when it is determined that there is no device access in the plurality of interfaces 13.
  • the plurality of interfaces 13 includes a preset interface 131.
  • the main controller 14 is further configured to execute an instruction to establish a link of the USB controller 12 and the preset interface 131 by using the switching circuit 112 when it is determined that none of the interfaces 13 have device access. That is to say, step S14 can be implemented by the main controller 14.
  • the plurality of interfaces 13 may include a standard A female port, a MiniAB female port, a MicroAB female port, and the like, wherein the standard A female port may be used as the preset interface 131.
  • the USB system 10 establishes a link between the USB controller 12 and the standard A female port by default.
  • the plurality of interfaces 13 includes a first interface 132, a second interface 134, and a third interface 136.
  • the embedded circuit 11 also includes a voltage output circuit 114 and a voltage detection circuit.
  • the first interface 132, the second interface 134, and the ground GND of the third interface 136 are connected in common.
  • the signal lines D+/D- of the first interface 132, the second interface 134, and the third interface 136 are respectively connected to the signal line D+/D- of the USB controller 12 through the switching circuit 112.
  • the power supply pins Vbus of the first interface 132, the second interface 134, and the third interface 136 are connected to the voltage output circuit 114 through the switching circuit 112, respectively.
  • the power pin Vbus of the second interface 134 and the third interface 136 respectively The voltage detecting circuit is connected through the switching circuit 112.
  • the state pin IDs of the second interface 134 and the third interface 136 are respectively connected to the voltage detecting circuit through the switching circuit 112.
  • USB interface 13 is generally divided into a standard A interface, a Mini interface, and a Micro interface.
  • the working process of the control method is described by taking the first interface 132 as the standard A female port, the second interface 134 as the MiniAB female port, and the third interface 136 as the MicroAB female port as an example.
  • the plurality of interfaces 13 may include a greater number of interfaces, and the types of the first interface 132, the second interface 134, and the third interface 136 are not limited to the above three interface types.
  • the switching circuit 112 is a switching switch, an analog switch, or other switching element or chip having a switching connection function.
  • the switching circuit 112 includes a first switching circuit 1122, a second switching circuit 1124, a third switching circuit 1126, and a fourth switching circuit 1128.
  • the voltage detection circuit includes a first voltage detection circuit 1162 and a second voltage detection circuit 1164.
  • the signal line D+/D- of the USB controller 12 is switched to turn on the signal line D+/D- of the first interface 132, the second interface 134, and the third interface 136 through the first switching circuit 1122, and the first interface 132 and the second interface
  • the ground line GND of the 134 and the third interface 136 are connected together and then grounded (as shown in FIG. 4).
  • the voltage output circuit 114 switches the power supply pin Vbus of the first interface 132, the second interface 134, and the third interface 136 through the second switching circuit 1124.
  • the first voltage detecting circuit 1162 switches the power supply pin Vbus of the second interface 134 and the third interface 136 through the third switching circuit 1126 (as shown in FIG. 5).
  • the second voltage detecting circuit 1164 switches the state pin IDs of the second interface 134 and the third interface 136 to be turned on by the fourth switching circuit 1128 (as shown in FIG. 6). It will be appreciated that in some embodiments, the second voltage detection circuit 1164 can include two sub-detection circuits, each sub-detection circuit corresponding to detecting the voltage of one interface 13.
  • the USB controller 12 connects the first interface 132, the second interface 134, and the first switching circuit 1122.
  • the third interface 136, and which interface 13 the USB controller 12 is conducting to establish a link depends on the device access status of the interface 13. For example, when the first interface 132 has device access, the first switching circuit 1122 switches the USB controller 12 and the first interface 132 to be turned on, so that the circuit between the USB controller 12 and the first interface 132 is turned on, and the circuit is established.
  • the link while the USB controller 12 and the second interface 134 and the third interface 136 are not conducting, but the second interface 134 and the third interface 136 are still connected to the USB controller 12 via the first switching circuit 1122.
  • voltage output circuit 114 outputs a voltage of 4.4-5.25 volts. Preferably, voltage output circuit 114 outputs a 5V voltage to interface 13.
  • step S14 specifically includes the steps of:
  • the control method further includes the steps of:
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the preset interface 131.
  • the main controller 14 is further configured to execute an instruction to: when the plurality of interfaces 13 are determined to have no device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 The signal line D+/D- to the preset interface 131 is turned on.
  • the main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to supply power to the power pin Vbus of the preset interface 131. That is, step S142 and step S15 can be implemented by the main controller 14.
  • the first interface 132 can be used as the preset interface 131.
  • the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112.
  • Line D+/D-, control voltage output circuit 114 supplies power to power supply pin Vbus of first interface 132.
  • the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136 of the embodiment of the present invention are respectively connected to the voltage output circuit 114 through the switching circuit 112. Therefore, the main controller 14 controls the voltage by using the switching circuit 112.
  • the output circuit 114 supplies power to the power supply pin Vbus of one of the interfaces 13.
  • step S13 specifically includes the steps of:
  • the switching circuit 112 is used to switch the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the first interface 132;
  • the control method further includes the steps of:
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132.
  • the main controller 14 is further configured to execute an instruction to: when the first interface 132 is determined to have device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 to be turned on. The signal line D+/D- to the first interface 132.
  • the main controller 14 is also operative to execute instructions to: control the voltage output circuit 114 to supply power to the power pin Vbus of the first interface 132. That is, step S131 and step S16 can be implemented by the main controller 14.
  • the USB system 10 acts as a USB host, and the signal line D+/D- of the USB controller 12 is switched to the signal line of the first interface 132 by using the switching circuit 112. D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132, and the states of the second interface 134 and the third interface 136 are no longer queried.
  • the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D of the first interface 132. -.
  • the second switching circuit 1124 switches the voltage output circuit 114 to the power supply pin Vbus of the first interface 132.
  • the USB controller 12 when the preset interface 131 is the first interface 132, in the initial state, the USB controller 12 The signal line D+/D- is connected to the first interface 132 through the switching circuit 112, and the voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132. If it is determined that the first interface 132 has device access, it is only required to remain The connection of the USB controller 12 to the first interface 132 is sufficient.
  • step S11 specifically includes the steps of:
  • S111 detecting, by using a voltage detecting circuit, a level state of a power pin Vbus of the second interface 134;
  • Step S13 specifically includes the steps of:
  • the main controller 14 is further configured to execute an instruction to: detect a level state of the power pin Vbus of the second interface 134 by using a voltage detecting circuit; and detect a power pin Vbus of the second interface 134 when detecting When there is a high level input, it is determined that the second interface 134 has device access; and when it is determined that the second interface 134 has device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 to the first The signal line D+/D- of the second interface 134. That is, step S111, step S112, and step S132 can be implemented by the main controller 14.
  • the second interface 134 is connected as an interface of the USB slave to
  • the interface of the other USB host switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the second interface 134 by the switching circuit 112, and is in the USB slave (ie, the USB system 10)
  • the state of the first interface 132 and the third interface 136 is no longer queried until the other USB host (ie, the device accessing the second interface 134) is disconnected.
  • the third switching circuit 1126 switches the first voltage detecting circuit 1162 to the power pin Vbus of the second interface 134.
  • the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the second interface 134.
  • step S11 specifically includes the steps of:
  • S113 detecting, by using a voltage detecting circuit, a level state of a power pin Vbus of the third interface 136;
  • Step S13 specifically includes the steps of:
  • the main controller 14 is further configured to execute an instruction to: detect a level state of the power pin Vbus of the third interface 136 by using a voltage detecting circuit; and detect a power pin Vbus of the third interface 136 when detecting When there is a high level input, it is determined that the third interface 136 has device access; and when it is determined that the third interface 136 has device access, the switching circuit 112 is used to switch the signal line D+/D- of the USB controller 12 to the first The signal line D+/D- of the triple interface 136. That is, step S113, step S114, and step S133 can be implemented by the main controller 14.
  • the third interface 136 is connected as an interface of the USB slave to
  • the interface 13 of the other USB host switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the third interface 136 by the switching circuit 112, and the USB slave (ie, the USB system) 10)
  • the state of the first interface 132 and the second interface 134 is no longer queried until the other USB host (ie, the device accessing the third interface 136) is disconnected.
  • the third switching circuit 1126 switches the first voltage detecting circuit 1162 to the power pin Vbus of the third interface 136.
  • the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the third interface 136.
  • step S11 specifically includes the steps of:
  • S115 detecting, by using a voltage detecting circuit, a level state of a state pin ID of the second interface 134;
  • the control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132 and the second interface 134 in turn;
  • S118 Polling the first interface 132 and the second interface 134 to determine device access states of the first interface 132 and the second interface 134;
  • Step S13 specifically includes the steps of:
  • the control method further includes the steps of:
  • the control voltage output circuit 114 maintains the power supply pin Vbus to the first interface 132 or the second interface 134. powered by.
  • the main controller 14 is further configured to execute an instruction to: detect a level state of a state pin ID of the second interface 134 using a voltage detection circuit; and detect a state pin ID of the second interface 134 when detecting
  • the signal line D+/D- of the USB controller 12 is alternately switched on to the signal line D+/D- of the first interface 132 and the second interface 134 by the switching circuit 112 at a predetermined cycle; the control voltage The output circuit 114 accordingly alternately supplies power to the power pins Vbus of the first interface 132 and the second interface 134; polling the first interface 132 and the second interface 134 to determine device access status of the first interface 132 and the second interface 134 And when it is determined that the first interface 132 or the second interface 134 has device access, the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line of the first interface 132 or the second interface 134.
  • the main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power supply pin Vbus of the first interface 132 or the second interface 134. That is, step S115, step S116, step S117, step S118, step S134, and step S17 can be implemented by the main controller 14.
  • the signal line D+/D- of the USB controller 12 is switched by the switching circuit 112.
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly to the signal line D+/D- of the first interface 132, and detects the device access status of the first interface 132 when the first interface is detected.
  • the connection between the current USB controller 12 and the first interface 132 is maintained, the control voltage output circuit 114 maintains power supply to the first interface 132, and the USB host (ie, the USB system 10) and the other The state of the second interface 134 and the third interface 136 is no longer queried until the USB slave (ie, the device accessing the first interface 132) is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the second interface 134 by the switching circuit 112.
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the second interface 134 correspondingly, detects the device access status of the second interface 134, and when detecting that the second interface 134 has device access, Keeping the current USB controller 12 connected to the second interface 134, the control voltage output circuit 114 keeps supplying power to the second interface 134, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the third interface 136 is no longer queried until the device of the second interface 134 is disconnected.
  • the USB host ie, the USB system 10
  • another USB slave ie, accessing the first The state of the first interface 132 and the third interface 136 is no longer queried until the device of the second interface 134 is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112.
  • the line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
  • the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the second interface 134.
  • the first switching circuit 1122 turns the signal line D+/D- of the USB controller 12 in turn to the signal line D+/D- of the first interface 132 and the second interface 134 in a predetermined cycle.
  • the second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132 and the second interface 134.
  • the first switching circuit 1122 keeps the signal line D+/D ⁇ of the USB controller 12 on the signal line D+ of the first interface 132 or the second interface 134. /D-.
  • the second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132 or the second interface 134.
  • step S11 specifically includes the steps of:
  • S119 detecting, by using a voltage detecting circuit, a level state of a state pin ID of the third interface 136;
  • the control voltage output circuit 114 alternately supplies power to the power pin Vbus of the first interface 132 and the third interface 136 in turn;
  • S122 polling the first interface 132 and the third interface 136 to determine device access states of the first interface 132 and the third interface 136;
  • Step S13 specifically includes the steps of:
  • the control method further includes the steps of:
  • the control voltage output circuit 114 maintains power supply to the power pin Vbus of the first interface 132 or the third interface 136.
  • the main controller 14 is further configured to execute an instruction to: detect a level state of a state pin ID of the third interface 136 using a voltage detection circuit; and detect a state pin ID of the third interface 136 when detecting
  • the signal line D+/D- of the USB controller 12 is alternately switched to the signal line D+/D- of the first interface 132 and the third interface 136 by the switching circuit 112 at a predetermined cycle; the control voltage The output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132 and the third interface 136 in turn; polling the first interface 132 and the third interface 136 to determine device access status of the first interface 132 and the third interface 136 And when it is determined that the first interface 132 or the third interface 136 has device access, the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line of the first interface 132 or the third interface 136.
  • the main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power supply pin Vbus of the first interface 132 or the third interface 136. That is, step S119, step S120, step S121, step S122, step S135, And step S18 can be implemented by the main controller 14.
  • the signal line D+/D- of the USB controller 12 is switched by the switching circuit 112.
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly to the signal line D+/D- of the first interface 132, and detects the device access status of the first interface 132 when the first interface is detected.
  • the connection between the current USB controller 12 and the first interface 132 is maintained, the control voltage output circuit 114 maintains power supply to the first interface 132, and the USB host (ie, the USB system 10) and the other The state of the second interface 134 and the third interface 136 is no longer queried until the USB slave (ie, the device accessing the first interface 132) is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the third interface 136 by the switching circuit 112.
  • the control voltage output circuit 114 supplies power to the power pin Vbus of the third interface 136 correspondingly, and detects the device access status of the third interface 136. When it is detected that the third interface 136 has device access, then Keeping the current USB controller 12 connected to the third interface 136, the control voltage output circuit 114 keeps supplying power to the third interface 136, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the second interface 134 is no longer queried until the device of the three interface 136 is disconnected.
  • the USB host ie, the USB system 10
  • another USB slave ie, accessing the first The state of the first interface 132 and the second interface 134 is no longer queried until the device of the three interface 136 is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112.
  • the line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
  • the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the third interface 136.
  • the first switching circuit 1122 turns the signal line D+/D ⁇ of the USB controller 12 into the first interface 132 and the first cycle in a predetermined cycle.
  • the second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132 and the third interface 136.
  • the first switching circuit 1122 keeps the signal line D+/D ⁇ of the USB controller 12 on the signal line D+ of the first interface 132 or the third interface 136. /D-.
  • the second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132 or the third interface 136.
  • step S11 specifically includes the steps of:
  • S123 detecting, by using a voltage detecting circuit, a level state of a state pin ID of the second interface 134 and the third interface 136;
  • the control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136 in turn;
  • S126 polling the first interface 132, the second interface 134, and the third interface 136 to determine device access states of the first interface 132, the second interface 134, and the third interface 136;
  • Step S13 specifically includes the steps of:
  • the control method further includes the steps of:
  • the control voltage output circuit 114 maintains power supply to the power pin Vbus of the first interface 132, the second interface 134, or the third interface 136.
  • the main controller 14 is further configured to execute instructions to: detect a level state of a state pin ID of the second interface 134 and the third interface 136 using a voltage detection circuit; when detecting the second interface 134 When the state pin ID of the third interface 136 has a low level input, the signal line D+/D- of the USB controller 12 is alternately switched to the first interface 132 and the second interface by the switching circuit 112 at a predetermined cycle.
  • the control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136; polling the first interface 132
  • the second interface 134 and the third interface 136 determine device access states of the first interface 132, the second interface 134, and the third interface 136; and when it is determined that the first interface 132, the second interface 134, or the third interface 136 exists
  • the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line D+/D- of the first interface 132, the second interface 134 or the third interface 136.
  • the main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power pin Vbus of the first interface 132, the second interface 134, or the third interface 136. That is, step S123, step S124, step S125, step S126, step S136, and step S19 can be implemented by the main controller 14.
  • the signal line D+ of the USB controller 12 is used by the switching circuit 112.
  • the control voltage output circuit 114 correspondingly supplies power to the power pin Vbus of the first interface 132, detecting the device access status of the first interface 132, when When it is detected that the first interface 132 has device access, the connection between the current USB controller 12 and the first interface 132 is maintained, and the control voltage output circuit 114 keeps supplying power to the first interface 132, and the USB host (ie, the USB system) 10) No longer querying the second interface 134 before disconnecting from another USB slave (ie, the device accessing the first interface 132) And the state of the third interface 136.
  • the USB host ie, the USB system
  • the signal of the USB controller 12 is switched to the signal of the second interface 134 by the switching circuit 112.
  • the line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the second interface 134 correspondingly, detects the device access status of the second interface 134, and when detecting that the second interface 134 has device access, Keeping the current USB controller 12 connected to the second interface 134, the control voltage output circuit 114 keeps supplying power to the second interface 134, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the third interface 136 is no longer queried until the device of the second interface 134 is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the third interface 136 by the switching circuit 112.
  • the line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the third interface 136 correspondingly, and detects the device access status of the third interface 136.
  • the control voltage output circuit 114 keeps supplying power to the third interface 136, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the second interface 134 is no longer queried until the device of the three interface 136 is disconnected.
  • the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112.
  • the line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
  • the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the second interface 134 and the third interface 136.
  • the first switching circuit 1122 turns the signal line D+/D ⁇ of the USB controller 12 into turns in a predetermined cycle.
  • the second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132, the second interface 134, and the third interface 136.
  • the first switching circuit 1122 keeps the signal line D+/D- of the USB controller 12 on the first interface 132 and the second interface. 134 or the signal line D+/D- of the third interface 136.
  • the second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132, the second interface 134, or the third interface 136.
  • the predetermined period is 2-3 seconds.
  • the detection can be quickly detected and the connection of the USB controller 12 to the interface 13 can be established or maintained.
  • USB system 10 includes control buttons.
  • the control method also includes the following steps:
  • S20 Receive an input of the control button and establish a link of the USB controller 12 and one of the interfaces 13 according to the input of the control button.
  • the USB system 10 includes control buttons.
  • the main controller 14 is operative to execute instructions to: receive an input of a control button and establish a link of the USB controller 12 with one of the interfaces 13 based on the input of the control button. That is to say, step S20 can be implemented by the main controller 14.
  • the link of the USB controller 12 to one of the interfaces 13 can be established according to the input of the control button.
  • the input of the control button can be input by the user.
  • an electronic device 100 includes the USB system 10 and the body 40 of any of the above embodiments.
  • the USB system 10 is mounted on the body 40.
  • the electronic device 100 of the embodiment of the present invention includes a Pad, a mobile phone, a notebook computer, a camera, a video camera, a printer, or other electronic device having a USB interface 13.
  • the body 40 can be the body of the electronic device 100.
  • control method and the USB system 10 is also applicable to the electronic device 100 of the embodiment of the present invention, and details are not described herein again.
  • a "computer readable medium” can be any A device that stores, communicates, propagates, or transmits a program for use in an instruction execution system, apparatus, or device, or in conjunction with such an instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (control methods) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the embodiments of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Power Sources (AREA)
  • Information Transfer Systems (AREA)

Abstract

Disclosed is a control method, which is used to control a USB system (10). The USB system (10) comprises an embedded circuit (11), a USB controller (12) and multiple interfaces (13), wherein the embedded circuit (11) comprises a switching circuit (112); and the switching circuit (112) is connected to the multiple interfaces (13). The control method comprises the following steps: (S11) polling multiple interfaces to determine a device access state of the multiple interfaces; and (S12) when it is determined that there is a device accessing one of the multiple of interfaces, using a switching circuit to establish a link between a USB controller and the interface. In addition, further disclosed are a USB system (10) and an electronic apparatus (100).

Description

控制方法、USB系统和电子装置Control method, USB system and electronic device 技术领域Technical field
本发明涉及电子技术领域,特别涉及一种控制方法、USB系统和电子装置。The present invention relates to the field of electronic technologies, and in particular, to a control method, a USB system, and an electronic device.
背景技术Background technique
在相关技术中,USB接口被广泛使用。很多USB设备属于OTG设备,既可以做USB主机,又可以做USB从机。针对不同的使用场景,USB标准定义了不同的接口类型,流行的接口有标准A接口、Mini接口和Micro接口。但是,一种接口只能匹配一种USB数据线,这样,综合USB的主机从机之分和接口的类型之分,用户的设备往往由于数据线和接口类型的不匹配带来使用中的诸多不便。In the related art, a USB interface is widely used. Many USB devices belong to OTG devices, and can be used as both USB and USB slaves. For different usage scenarios, the USB standard defines different interface types. Popular interfaces include standard A interface, Mini interface, and Micro interface. However, an interface can only match one type of USB data cable. Thus, the integrated USB host slave and the type of interface, the user's device often brings many uses due to the mismatch of data lines and interface types. inconvenient.
发明内容Summary of the invention
本发明实施方式提供一种控制方法、USB系统和电子装置。Embodiments of the present invention provide a control method, a USB system, and an electronic device.
本发明实施方式的控制方法,用于控制USB系统,所述USB系统包括嵌入式电路、USB控制器和多个接口,所述嵌入式电路包括切换电路,所述切换电路连接所述多个接口,所述控制方法包括以下步骤:A control method of an embodiment of the present invention is for controlling a USB system, the USB system includes an embedded circuit, a USB controller, and a plurality of interfaces, the embedded circuit includes a switching circuit, and the switching circuit connects the plurality of interfaces The control method includes the following steps:
轮询所述多个接口以确定所述多个接口的设备接入状态;和Polling the plurality of interfaces to determine device access status of the plurality of interfaces; and
当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路。The switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
本发明实施方式的USB系统,包括嵌入式电路、USB控制器、多个接口、主控制器和存储器,所述嵌入式电路包括切换电路,所述切换电路连接所述多个接口,所述主控制器连接所述切换电路,所述存储器用于存储指令,所述主控制器用于执行所述指令以实现:A USB system according to an embodiment of the present invention includes an embedded circuit, a USB controller, a plurality of interfaces, a main controller, and a memory, the embedded circuit includes a switching circuit, and the switching circuit connects the plurality of interfaces, the main A controller is coupled to the switching circuit, the memory is for storing instructions, and the main controller is configured to execute the instructions to:
轮询所述多个接口以确定所述多个接口的设备接入状态;和Polling the plurality of interfaces to determine device access status of the plurality of interfaces; and
当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路。The switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
本发明实施方式的电子装置,包括:An electronic device according to an embodiment of the present invention includes:
本发明实施方式的USB系统;和a USB system of an embodiment of the present invention; and
本体,所述USB系统安装在所述本体上。The body, the USB system is mounted on the body.
本发明实施方式的控制方法、USB系统和电子装置,可通过扩展不同种类的多个接口,并根据多个接口的设备接入状态建立相应的链路,从而实现了一个USB系统可 以具有各种USB功能和接口的技术效果。The control method, the USB system and the electronic device of the embodiments of the present invention can realize a USB system by extending different types of interfaces and establishing corresponding links according to device access states of multiple interfaces. With technical effects with various USB functions and interfaces.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。The additional aspects and advantages of the invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明的上述和/或附加的方面和优点可以从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the appended claims
图1是本发明实施方式的控制方法的流程示意图;1 is a schematic flow chart of a control method according to an embodiment of the present invention;
图2是本发明实施方式的USB系统的模块示意图;2 is a schematic block diagram of a USB system according to an embodiment of the present invention;
图3是本发明实施方式的控制方法的另一流程示意图;3 is another schematic flowchart of a control method according to an embodiment of the present invention;
图4是本发明实施方式的多个接口的信号线和地线的连接关系示意图;4 is a schematic diagram showing a connection relationship between signal lines and ground lines of a plurality of interfaces according to an embodiment of the present invention;
图5是本发明实施方式的多个接口的电源线的连接关系示意图;5 is a schematic diagram showing a connection relationship of power lines of a plurality of interfaces according to an embodiment of the present invention;
图6是本发明实施方式的多个接口的状态线的连接关系示意图;6 is a schematic diagram showing a connection relationship of state lines of a plurality of interfaces according to an embodiment of the present invention;
图7是本发明实施方式的控制方法的另一流程示意图;7 is another schematic flowchart of a control method according to an embodiment of the present invention;
图8是本发明实施方式的控制方法的另一流程示意图;8 is another schematic flowchart of a control method according to an embodiment of the present invention;
图9是本发明实施方式的控制方法的另一流程示意图;9 is another schematic flowchart of a control method according to an embodiment of the present invention;
图10是本发明实施方式的控制方法的另一流程示意图;FIG. 10 is another schematic flowchart of a control method according to an embodiment of the present invention; FIG.
图11是本发明实施方式的控制方法的另一流程示意图;11 is another schematic flowchart of a control method according to an embodiment of the present invention;
图12是本发明实施方式的控制方法的另一流程示意图;FIG. 12 is another schematic flowchart of a control method according to an embodiment of the present invention; FIG.
图13是本发明实施方式的控制方法的另一流程示意图;13 is another schematic flowchart of a control method according to an embodiment of the present invention;
图14是本发明实施方式的控制方法的另一流程示意图;14 is another schematic flowchart of a control method according to an embodiment of the present invention;
图15是本发明实施方式的电子装置的模块示意图;15 is a schematic block diagram of an electronic device according to an embodiment of the present invention;
主要元件及符号说明:Description of main components and symbols:
USB系统10、嵌入式电路11、切换电路112、第一切换电路1122、第二切换电路1124、第三切换电路1126、第四切换电路1128、电压输出电路114、第一电压检测电路1162、第二电压检测电路1164、USB控制器12、接口13、预设接口131、第一接口132、第二接口134、第三接口136、主控制器14、存储器15、本体40、电子装置100。 USB system 10, embedded circuit 11, switching circuit 112, first switching circuit 1122, second switching circuit 1124, third switching circuit 1126, fourth switching circuit 1128, voltage output circuit 114, first voltage detecting circuit 1162, The two voltage detecting circuit 1164, the USB controller 12, the interface 13, the preset interface 131, the first interface 132, the second interface 134, the third interface 136, the main controller 14, the memory 15, the body 40, and the electronic device 100.
具体实施方式detailed description
下面详细描述本发明的实施方式,实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过 参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements having the same or similar functions. Passed below The embodiments described with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
在本发明的实施方式的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明的实施方式和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的实施方式的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的实施方式的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the embodiments of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "previous" "," "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc. The orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is merely for the convenience of describing the embodiments and the simplified description of the present invention, and does not indicate or imply that the device or component referred to has a specific orientation, The orientation configuration and operation are therefore not to be construed as limiting the embodiments of the invention. Moreover, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" or "second" may include one or more of the described features either explicitly or implicitly. In the description of the embodiments of the present invention, the meaning of "a plurality" is two or more unless specifically defined otherwise.
在本发明的实施方式的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明的实施方式中的具体含义。In the description of the embodiments of the present invention, it should be noted that the terms "installation", "connected", and "connected" should be understood broadly, and may be a fixed connection, for example, or It is a detachable connection, or is integrally connected; it may be directly connected or indirectly connected through an intermediate medium, and may be an internal connection of two elements or an interaction relationship of two elements. For those skilled in the art, the specific meanings of the above terms in the embodiments of the present invention can be understood on a case-by-case basis.
在本发明的实施方式中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。In the embodiments of the present invention, the "on" or "below" of the second feature may include direct contact of the first and second features, and may also include the first sum, unless otherwise specifically defined and defined. The second feature is not in direct contact but through additional features between them. Moreover, the first feature "above", "above" and "above" the second feature includes the first feature directly above and above the second feature, or merely indicating that the first feature level is higher than the second feature. The first feature "below", "below" and "below" the second feature includes the first feature directly below and below the second feature, or merely the first feature level being less than the second feature.
下文的公开提供了许多不同的实施方式或例子用来实现本发明的实施方式的不同结构。为了简化本发明的实施方式的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明的实施方式可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。此外,本发明的实施方式提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of embodiments of the present invention. In order to simplify the disclosure of embodiments of the present invention, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the invention. In addition, the embodiments of the present invention may repeat reference numerals and/or reference letters in different examples, which are for the purpose of simplicity and clarity, and do not in themselves indicate the relationship between the various embodiments and/or arrangements discussed. . Moreover, embodiments of the present invention provide examples of various specific processes and materials, but one of ordinary skill in the art will recognize the use of other processes and/or the use of other materials.
请参阅图1,本发明实施方式的控制方法用于控制USB系统10。USB系统10包括嵌入式电路11、USB控制器12和多个接口13。嵌入式电路11包括切换电路112。 切换电路112连接多个接口13。控制方法包括以下步骤:Referring to FIG. 1, a control method of an embodiment of the present invention is used to control the USB system 10. The USB system 10 includes an embedded circuit 11, a USB controller 12, and a plurality of interfaces 13. The embedded circuit 11 includes a switching circuit 112. The switching circuit 112 connects the plurality of interfaces 13. The control method includes the following steps:
S11:轮询多个接口13以确定多个接口13的设备接入状态;和S11: polling the plurality of interfaces 13 to determine device access status of the plurality of interfaces 13; and
S13:当确定多个接口13的其中一个接口13存在设备接入时利用切换电路112建立USB控制器12与存在设备接入的接口13的链路。S13: When it is determined that one of the interfaces 13 of the plurality of interfaces 13 has device access, the switch circuit 112 is used to establish a link between the USB controller 12 and the interface 13 where the device is accessed.
请参阅图2,本发明实施方式的USB系统10包括嵌入式电路11、USB控制器12、多个接口13、主控制器14和存储器15。嵌入式电路11包括切换电路112。切换电路112连接多个接口13。主控制器14连接切换电路112。存储器15用于存储指令。主控制器14用于执行指令以实现:轮询多个接口13以确定多个接口13的设备接入状态;和当确定多个接口13的其中一个接口13存在设备接入时利用切换电路112建立USB控制器12与存在设备接入的接口13的链路。也即是说,步骤S11和步骤S13可由主控制器14实现。Referring to FIG. 2, the USB system 10 of the embodiment of the present invention includes an embedded circuit 11, a USB controller 12, a plurality of interfaces 13, a main controller 14, and a memory 15. The embedded circuit 11 includes a switching circuit 112. The switching circuit 112 connects the plurality of interfaces 13. The main controller 14 is connected to the switching circuit 112. The memory 15 is used to store instructions. The main controller 14 is configured to execute instructions to: poll the plurality of interfaces 13 to determine device access states of the plurality of interfaces 13; and utilize the switching circuit 112 when it is determined that one of the interfaces 13 of the plurality of interfaces 13 has device access A link is established between the USB controller 12 and the interface 13 where the device is connected. That is to say, step S11 and step S13 can be implemented by the main controller 14.
本发明实施方式的控制方法和USB系统10,可通过扩展不同种类的多个接口13,并根据多个接口13的设备接入状态建立相应的链路,从而实现了一个USB系统10可以具有各种USB功能和接口13的技术效果。The control method and the USB system 10 of the embodiments of the present invention can realize a USB system 10 by extending a plurality of interfaces 13 of different types and establishing corresponding links according to device access states of the plurality of interfaces 13. The technical effects of the USB function and interface 13.
可以理解,本发明实施方式的USB控制器12具有OTG功能,USB系统10既可以做USB主机,也可以做USB从机。It can be understood that the USB controller 12 of the embodiment of the present invention has an OTG function, and the USB system 10 can be either a USB host or a USB slave.
请参阅图3,在某些实施方式中,多个接口13包括预设接口131。控制方法还包括步骤:Referring to FIG. 3, in some embodiments, the plurality of interfaces 13 include a preset interface 131. The control method further includes the steps of:
S14:当确定多个接口13均不存在设备接入时利用切换电路112建立USB控制器12与预设接口131的链路。S14: Establish a link between the USB controller 12 and the preset interface 131 by using the switching circuit 112 when it is determined that there is no device access in the plurality of interfaces 13.
在某些实施方式中,多个接口13包括预设接口131。主控制器14还用于执行指令以实现:当确定多个接口13均不存在设备接入时利用切换电路112建立USB控制器12与预设接口131的链路。也即是说,步骤S14可由主控制器14实现。In some embodiments, the plurality of interfaces 13 includes a preset interface 131. The main controller 14 is further configured to execute an instruction to establish a link of the USB controller 12 and the preset interface 131 by using the switching circuit 112 when it is determined that none of the interfaces 13 have device access. That is to say, step S14 can be implemented by the main controller 14.
例如,多个接口13可以包括标准A母口、MiniAB母口、MicroAB母口等,其中,可以将标准A母口作为预设接口131。当标准A母口、MiniAB母口和MicroAB母口均不存在设备接入时,USB系统10默认建立USB控制器12与标准A母口的链路。For example, the plurality of interfaces 13 may include a standard A female port, a MiniAB female port, a MicroAB female port, and the like, wherein the standard A female port may be used as the preset interface 131. When there is no device access in the standard A female port, the MiniAB female port and the MicroAB female port, the USB system 10 establishes a link between the USB controller 12 and the standard A female port by default.
请参阅图4-6,在某些实施方式中,多个接口13包括第一接口132、第二接口134和第三接口136。嵌入式电路11还包括电压输出电路114和电压检测电路。第一接口132、第二接口134和第三接口136的地线GND共接。第一接口132、第二接口134和第三接口136的信号线D+/D-分别通过切换电路112连接USB控制器12的信号线D+/D-。第一接口132、第二接口134和第三接口136的电源引脚Vbus分别通过切换电路112连接电压输出电路114。第二接口134和第三接口136的电源引脚Vbus分别 通过切换电路112连接电压检测电路。第二接口134和第三接口136的状态引脚ID分别通过切换电路112连接电压检测电路。Referring to FIGS. 4-6, in some embodiments, the plurality of interfaces 13 includes a first interface 132, a second interface 134, and a third interface 136. The embedded circuit 11 also includes a voltage output circuit 114 and a voltage detection circuit. The first interface 132, the second interface 134, and the ground GND of the third interface 136 are connected in common. The signal lines D+/D- of the first interface 132, the second interface 134, and the third interface 136 are respectively connected to the signal line D+/D- of the USB controller 12 through the switching circuit 112. The power supply pins Vbus of the first interface 132, the second interface 134, and the third interface 136 are connected to the voltage output circuit 114 through the switching circuit 112, respectively. The power pin Vbus of the second interface 134 and the third interface 136 respectively The voltage detecting circuit is connected through the switching circuit 112. The state pin IDs of the second interface 134 and the third interface 136 are respectively connected to the voltage detecting circuit through the switching circuit 112.
可以理解,常用的USB接口13一般分为标准A接口、Mini接口和Micro接口。作为例子,本发明实施方式以第一接口132为标准A母口、第二接口134为MiniAB母口、第三接口136为MicroAB母口为例来说明控制方法的工作过程。当然,在其他实施方式中,多个接口13可以包括更多个数的接口,第一接口132、第二接口134和第三接口136的类型也不限于为上述三种接口类型。It can be understood that the commonly used USB interface 13 is generally divided into a standard A interface, a Mini interface, and a Micro interface. As an example, the working process of the control method is described by taking the first interface 132 as the standard A female port, the second interface 134 as the MiniAB female port, and the third interface 136 as the MicroAB female port as an example. Of course, in other embodiments, the plurality of interfaces 13 may include a greater number of interfaces, and the types of the first interface 132, the second interface 134, and the third interface 136 are not limited to the above three interface types.
在某些实施方式中,切换电路112为切换开关、模拟开关或其他具有切换连接功能的开关元件或芯片。In some embodiments, the switching circuit 112 is a switching switch, an analog switch, or other switching element or chip having a switching connection function.
本发明实施方式中,切换电路112包括第一切换电路1122、第二切换电路1124、第三切换电路1126和第四切换电路1128。电压检测电路包括第一电压检测电路1162和第二电压检测电路1164。USB控制器12的信号线D+/D-通过第一切换电路1122切换接通第一接口132、第二接口134和第三接口136的信号线D+/D-,第一接口132、第二接口134和第三接口136的地线GND共接在一起然后接地(如图4所示)。电压输出电路114通过第二切换电路1124切换接通第一接口132、第二接口134和第三接口136的电源引脚Vbus。第一电压检测电路1162通过第三切换电路1126切换接通第二接口134和第三接口136的电源引脚Vbus(如图5所示)。第二电压检测电路1164通过第四切换电路1128切换接通第二接口134和第三接口136的状态引脚ID(如图6所示)。可以理解,在某些实施方式中,第二电压检测电路1164可包括两个子检测电路,每个子检测电路对应检测一个接口13的电压。In the embodiment of the present invention, the switching circuit 112 includes a first switching circuit 1122, a second switching circuit 1124, a third switching circuit 1126, and a fourth switching circuit 1128. The voltage detection circuit includes a first voltage detection circuit 1162 and a second voltage detection circuit 1164. The signal line D+/D- of the USB controller 12 is switched to turn on the signal line D+/D- of the first interface 132, the second interface 134, and the third interface 136 through the first switching circuit 1122, and the first interface 132 and the second interface The ground line GND of the 134 and the third interface 136 are connected together and then grounded (as shown in FIG. 4). The voltage output circuit 114 switches the power supply pin Vbus of the first interface 132, the second interface 134, and the third interface 136 through the second switching circuit 1124. The first voltage detecting circuit 1162 switches the power supply pin Vbus of the second interface 134 and the third interface 136 through the third switching circuit 1126 (as shown in FIG. 5). The second voltage detecting circuit 1164 switches the state pin IDs of the second interface 134 and the third interface 136 to be turned on by the fourth switching circuit 1128 (as shown in FIG. 6). It will be appreciated that in some embodiments, the second voltage detection circuit 1164 can include two sub-detection circuits, each sub-detection circuit corresponding to detecting the voltage of one interface 13.
需要说明的是,本发明实施方式所说的接通,是指连接和导通,例如,请参图4,USB控制器12通过第一切换电路1122连接第一接口132、第二接口134和第三接口136,而USB控制器12是与哪个接口13导通以建立链路,则取决于接口13的设备接入状态。例如,当第一接口132存在设备接入时,第一切换电路1122切换接通USB控制器12和第一接口132,使得USB控制器12与第一接口132之间的电路导通,建立了链路,而USB控制器12与第二接口134和第三接口136的电路不导通,但第二接口134和第三接口136仍通过第一切换电路1122连接USB控制器12。It should be noted that the "on" refers to the connection and the conduction. For example, referring to FIG. 4, the USB controller 12 connects the first interface 132, the second interface 134, and the first switching circuit 1122. The third interface 136, and which interface 13 the USB controller 12 is conducting to establish a link, depends on the device access status of the interface 13. For example, when the first interface 132 has device access, the first switching circuit 1122 switches the USB controller 12 and the first interface 132 to be turned on, so that the circuit between the USB controller 12 and the first interface 132 is turned on, and the circuit is established. The link, while the USB controller 12 and the second interface 134 and the third interface 136 are not conducting, but the second interface 134 and the third interface 136 are still connected to the USB controller 12 via the first switching circuit 1122.
在一个例子中,电压输出电路114向外输出4.4-5.25V电压。较佳地,电压输出电路114向接口13输出5V电压。In one example, voltage output circuit 114 outputs a voltage of 4.4-5.25 volts. Preferably, voltage output circuit 114 outputs a 5V voltage to interface 13.
请参阅图7,在某些实施方式中,步骤S14具体包括步骤:Referring to FIG. 7, in some embodiments, step S14 specifically includes the steps of:
S142:当确定多个接口13均不存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到预设接口131的信号线D+/D-; S142: When it is determined that there is no device access in the plurality of interfaces 13, the switching circuit 112 is used to switch the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the preset interface 131;
控制方法还包括步骤:The control method further includes the steps of:
S15:控制电压输出电路114向预设接口131的电源引脚Vbus供电。S15: The control voltage output circuit 114 supplies power to the power pin Vbus of the preset interface 131.
在某些实施方式中,主控制器14进一步用于执行指令以实现:当确定多个接口13均不存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到预设接口131的信号线D+/D-。主控制器14还用于执行指令以实现:控制电压输出电路114向预设接口131的电源引脚Vbus供电。也即是说,步骤S142和步骤S15可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: when the plurality of interfaces 13 are determined to have no device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 The signal line D+/D- to the preset interface 131 is turned on. The main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to supply power to the power pin Vbus of the preset interface 131. That is, step S142 and step S15 can be implemented by the main controller 14.
例如,可以将第一接口132作为预设接口131。当第一接口132、第二接口134和第三接口136均不存在设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114向第一接口132的电源引脚Vbus供电。For example, the first interface 132 can be used as the preset interface 131. When there is no device access in the first interface 132, the second interface 134, and the third interface 136, the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112. Line D+/D-, control voltage output circuit 114 supplies power to power supply pin Vbus of first interface 132.
可以理解,本发明实施方式的第一接口132、第二接口134和第三接口136的电源引脚Vbus分别通过切换电路112连接电压输出电路114,因此,主控制器14利用切换电路112控制电压输出电路114向其中一个接口13的电源引脚Vbus供电。It can be understood that the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136 of the embodiment of the present invention are respectively connected to the voltage output circuit 114 through the switching circuit 112. Therefore, the main controller 14 controls the voltage by using the switching circuit 112. The output circuit 114 supplies power to the power supply pin Vbus of one of the interfaces 13.
请参阅图8,在某些实施方式中,步骤S13具体包括步骤:Referring to FIG. 8, in some embodiments, step S13 specifically includes the steps of:
S131:当确定第一接口132存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-;S131: When it is determined that the first interface 132 has device access, the switching circuit 112 is used to switch the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the first interface 132;
控制方法还包括步骤:The control method further includes the steps of:
S16:控制电压输出电路114向第一接口132的电源引脚Vbus供电。S16: The control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132.
在某些实施方式中,主控制器14进一步用于执行指令以实现:当确定第一接口132存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-。主控制器14还用于执行指令以实现:控制电压输出电路114向第一接口132的电源引脚Vbus供电。也即是说,步骤S131和步骤S16可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: when the first interface 132 is determined to have device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 to be turned on. The signal line D+/D- to the first interface 132. The main controller 14 is also operative to execute instructions to: control the voltage output circuit 114 to supply power to the power pin Vbus of the first interface 132. That is, step S131 and step S16 can be implemented by the main controller 14.
具体地,当确定第一接口132存在设备接入时,USB系统10做USB主机,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114向第一接口132的电源引脚Vbus供电,不再查询第二接口134和第三接口136的状态。Specifically, when it is determined that the first interface 132 has device access, the USB system 10 acts as a USB host, and the signal line D+/D- of the USB controller 12 is switched to the signal line of the first interface 132 by using the switching circuit 112. D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132, and the states of the second interface 134 and the third interface 136 are no longer queried.
在本发明实施方式中,当确定第一接口132存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-。第二切换电路1124将电压输出电路114切换接通到第一接口132的电源引脚Vbus。In the embodiment of the present invention, when it is determined that the first interface 132 has device access, the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D of the first interface 132. -. The second switching circuit 1124 switches the voltage output circuit 114 to the power supply pin Vbus of the first interface 132.
可以理解,当预设接口131为第一接口132时,在初始状态下,USB控制器12的 信号线D+/D-通过切换电路112连接到第一接口132,电压输出电路114向第一接口132的电源引脚Vbus供电,若此时确定第一接口132存在设备接入,则只需保持当前USB控制器12与第一接口132的连接即可。It can be understood that when the preset interface 131 is the first interface 132, in the initial state, the USB controller 12 The signal line D+/D- is connected to the first interface 132 through the switching circuit 112, and the voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132. If it is determined that the first interface 132 has device access, it is only required to remain The connection of the USB controller 12 to the first interface 132 is sufficient.
另外,确定接口13是否存在设备接入可参USB领域相关技术,在此不再详细展开。In addition, determining whether the interface 13 has access to the device in the USB field is not disclosed in detail.
请参阅图9,在某些实施方式中,步骤S11具体包括步骤:Referring to FIG. 9, in some embodiments, step S11 specifically includes the steps of:
S111:利用电压检测电路检测第二接口134的电源引脚Vbus的电平状态;和S111: detecting, by using a voltage detecting circuit, a level state of a power pin Vbus of the second interface 134; and
S112:当检测到第二接口134的电源引脚Vbus有高电平输入时确定第二接口134存在设备接入;S112: determining that the second interface 134 has device access when detecting that the power pin Vbus of the second interface 134 has a high level input;
步骤S13具体包括步骤:Step S13 specifically includes the steps of:
S132:当确定第二接口134存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-。S132: When it is determined that the second interface 134 has device access, the signal line D+/D- of the USB controller 12 is switched to the signal line D+/D- of the second interface 134 by the switching circuit 112.
在某些实施方式中,主控制器14进一步用于执行指令以实现:利用电压检测电路检测第二接口134的电源引脚Vbus的电平状态;当检测到第二接口134的电源引脚Vbus有高电平输入时确定第二接口134存在设备接入;和当确定第二接口134存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-。也即是说,步骤S111、步骤S112和步骤S132可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: detect a level state of the power pin Vbus of the second interface 134 by using a voltage detecting circuit; and detect a power pin Vbus of the second interface 134 when detecting When there is a high level input, it is determined that the second interface 134 has device access; and when it is determined that the second interface 134 has device access, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 to the first The signal line D+/D- of the second interface 134. That is, step S111, step S112, and step S132 can be implemented by the main controller 14.
具体地,当检测到第二接口134的电源引脚Vbus有高电平输入时,说明用户希望USB系统10做USB从机,也即是说,第二接口134作为USB从机的接口连接至另一USB主机的接口,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-,且在USB从机(即USB系统10)与另一个USB主机(即接入第二接口134的设备)断开连接之前,不再查询第一接口132和第三接口136的状态。Specifically, when it is detected that the power pin Vbus of the second interface 134 has a high level input, it indicates that the user wants the USB system 10 to be a USB slave, that is, the second interface 134 is connected as an interface of the USB slave to The interface of the other USB host switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the second interface 134 by the switching circuit 112, and is in the USB slave (ie, the USB system 10) The state of the first interface 132 and the third interface 136 is no longer queried until the other USB host (ie, the device accessing the second interface 134) is disconnected.
在本发明实施方式中,第三切换电路1126将第一电压检测电路1162切换接通到第二接口134的电源引脚Vbus。当确定第二接口134存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-。In the embodiment of the present invention, the third switching circuit 1126 switches the first voltage detecting circuit 1162 to the power pin Vbus of the second interface 134. When it is determined that the second interface 134 has device access, the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the second interface 134.
请参阅图10,在某些实施方式中,步骤S11具体包括步骤:Referring to FIG. 10, in some embodiments, step S11 specifically includes the steps of:
S113:利用电压检测电路检测第三接口136的电源引脚Vbus的电平状态;和S113: detecting, by using a voltage detecting circuit, a level state of a power pin Vbus of the third interface 136; and
S114:当检测到第三接口136的电源引脚Vbus有高电平输入时确定第三接口136存在设备接入;S114: determining that the third interface 136 has device access when detecting that the power pin Vbus of the third interface 136 has a high level input;
步骤S13具体包括步骤: Step S13 specifically includes the steps of:
S133:当确定第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-。S133: When it is determined that the third interface 136 has device access, the signal line D+/D- of the USB controller 12 is switched to the signal line D+/D- of the third interface 136 by the switching circuit 112.
在某些实施方式中,主控制器14进一步用于执行指令以实现:利用电压检测电路检测第三接口136的电源引脚Vbus的电平状态;当检测到第三接口136的电源引脚Vbus有高电平输入时确定第三接口136存在设备接入;和当确定第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-。也即是说,步骤S113、步骤S114和步骤S133可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: detect a level state of the power pin Vbus of the third interface 136 by using a voltage detecting circuit; and detect a power pin Vbus of the third interface 136 when detecting When there is a high level input, it is determined that the third interface 136 has device access; and when it is determined that the third interface 136 has device access, the switching circuit 112 is used to switch the signal line D+/D- of the USB controller 12 to the first The signal line D+/D- of the triple interface 136. That is, step S113, step S114, and step S133 can be implemented by the main controller 14.
具体地,当检测到第三接口136的电源引脚Vbus有高电平输入时,说明用户希望USB系统10做USB从机,也即是说,第三接口136作为USB从机的接口连接至另一USB主机的接口13,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-,且在USB从机(即USB系统10)与另一个USB主机(即接入第三接口136的设备)断开连接之前,不再查询第一接口132和第二接口134的状态。Specifically, when it is detected that the power pin Vbus of the third interface 136 has a high level input, it indicates that the user wants the USB system 10 to be a USB slave, that is, the third interface 136 is connected as an interface of the USB slave to The interface 13 of the other USB host switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the third interface 136 by the switching circuit 112, and the USB slave (ie, the USB system) 10) The state of the first interface 132 and the second interface 134 is no longer queried until the other USB host (ie, the device accessing the third interface 136) is disconnected.
在本发明实施方式中,第三切换电路1126将第一电压检测电路1162切换接通到第三接口136的电源引脚Vbus。当确定第三接口136存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-。In the embodiment of the present invention, the third switching circuit 1126 switches the first voltage detecting circuit 1162 to the power pin Vbus of the third interface 136. When it is determined that the third interface 136 has device access, the first switching circuit 1122 switches the signal line D+/D- of the USB controller 12 to the signal line D+/D- of the third interface 136.
请参阅图11,在某些实施方式中,步骤S11具体包括步骤:Referring to FIG. 11, in some embodiments, step S11 specifically includes the steps of:
S115:利用电压检测电路检测第二接口134的状态引脚ID的电平状态;S115: detecting, by using a voltage detecting circuit, a level state of a state pin ID of the second interface 134;
S116:当检测到第二接口134的状态引脚ID有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接口132和第二接口134的信号线D+/D-;S116: When it is detected that the state pin ID of the second interface 134 has a low level input, the signal line D+/D- of the USB controller 12 is alternately switched on to the first interface 132 by using the switching circuit 112 at a predetermined cycle. Signal line D+/D- of the second interface 134;
S117:控制电压输出电路114相应地轮流向第一接口132和第二接口134的电源引脚Vbus供电;和S117: The control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132 and the second interface 134 in turn;
S118:轮询第一接口132和第二接口134以确定第一接口132和第二接口134的设备接入状态;S118: Polling the first interface 132 and the second interface 134 to determine device access states of the first interface 132 and the second interface 134;
步骤S13具体包括步骤:Step S13 specifically includes the steps of:
S134:当确定第一接口132或第二接口134存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132或第二接口134的信号线D+/D-;S134: When it is determined that the first interface 132 or the second interface 134 has device access, the signal line D+/D− of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line of the first interface 132 or the second interface 134. D+/D-;
控制方法还包括步骤:The control method further includes the steps of:
S17:控制电压输出电路114保持向第一接口132或第二接口134的电源引脚Vbus 供电。S17: The control voltage output circuit 114 maintains the power supply pin Vbus to the first interface 132 or the second interface 134. powered by.
在某些实施方式中,主控制器14进一步用于执行指令以实现:利用电压检测电路检测第二接口134的状态引脚ID的电平状态;当检测到第二接口134的状态引脚ID有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接口132和第二接口134的信号线D+/D-;控制电压输出电路114相应地轮流向第一接口132和第二接口134的电源引脚Vbus供电;轮询第一接口132和第二接口134以确定第一接口132和第二接口134的设备接入状态;和当确定第一接口132或第二接口134存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132或第二接口134的信号线D+/D-。主控制器14还用于执行指令以实现:控制电压输出电路114保持向第一接口132或第二接口134的电源引脚Vbus供电。也即是说,步骤S115、步骤S116、步骤S117、步骤S118、步骤S134、和步骤S17可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: detect a level state of a state pin ID of the second interface 134 using a voltage detection circuit; and detect a state pin ID of the second interface 134 when detecting When there is a low level input, the signal line D+/D- of the USB controller 12 is alternately switched on to the signal line D+/D- of the first interface 132 and the second interface 134 by the switching circuit 112 at a predetermined cycle; the control voltage The output circuit 114 accordingly alternately supplies power to the power pins Vbus of the first interface 132 and the second interface 134; polling the first interface 132 and the second interface 134 to determine device access status of the first interface 132 and the second interface 134 And when it is determined that the first interface 132 or the second interface 134 has device access, the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line of the first interface 132 or the second interface 134. D+/D-. The main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power supply pin Vbus of the first interface 132 or the second interface 134. That is, step S115, step S116, step S117, step S118, step S134, and step S17 can be implemented by the main controller 14.
具体地,当检测到第二接口134的状态引脚ID有低电平输入时,说明用户希望USB系统10做主机,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,当检测到第一接口132有设备接入时,则保持当前USB控制器12与第一接口132的连接,控制电压输出电路114保持向第一接口132供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第一接口132的设备)断开连接之前,不再查询第二接口134和第三接口136的状态。当在预定周期(例如2秒)内未检测到第一接口132有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-,控制电压输出电路114相应地向第二接口134的电源引脚Vbus供电,检测第二接口134的设备接入状态,当检测到第二接口134有设备接入时,则保持当前USB控制器12与第二接口134的连接,控制电压输出电路114保持向第二接口134供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第二接口134的设备)断开连接之前,不再查询第一接口132和第三接口136的状态。当在预定周期(例如2秒)内未检测到第二接口134有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,如此重复操作。Specifically, when it is detected that the status pin ID of the second interface 134 has a low level input, indicating that the user wants the USB system 10 to be the host, the signal line D+/D- of the USB controller 12 is switched by the switching circuit 112. The control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly to the signal line D+/D- of the first interface 132, and detects the device access status of the first interface 132 when the first interface is detected. When there is a device access, the connection between the current USB controller 12 and the first interface 132 is maintained, the control voltage output circuit 114 maintains power supply to the first interface 132, and the USB host (ie, the USB system 10) and the other The state of the second interface 134 and the third interface 136 is no longer queried until the USB slave (ie, the device accessing the first interface 132) is disconnected. When the device access of the first interface 132 is not detected within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the second interface 134 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the second interface 134 correspondingly, detects the device access status of the second interface 134, and when detecting that the second interface 134 has device access, Keeping the current USB controller 12 connected to the second interface 134, the control voltage output circuit 114 keeps supplying power to the second interface 134, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the third interface 136 is no longer queried until the device of the second interface 134 is disconnected. When the second interface 134 is not detected to have device access within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
在本发明实施方式中,第四切换电路1128将第二电压检测电路1164切换接通到第二接口134的状态引脚ID。当检测到第二接口134的状态引脚ID有低电平输入时, 第一切换电路1122将USB控制器12的信号线D+/D-以预定周期轮流切换接通到第一接口132和第二接口134的信号线D+/D-。第二切换电路1124将电压输出电路114轮流切换接通到第一接口132和第二接口134的电源引脚Vbus。当确定第一接口132或第二接口134存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-保持接通第一接口132或第二接口134的信号线D+/D-。第二切换电路1124将电压输出电路114保持接通到第一接口132或第二接口134的电源引脚Vbus。In the embodiment of the present invention, the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the second interface 134. When it is detected that the state pin ID of the second interface 134 has a low level input, The first switching circuit 1122 turns the signal line D+/D- of the USB controller 12 in turn to the signal line D+/D- of the first interface 132 and the second interface 134 in a predetermined cycle. The second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132 and the second interface 134. When it is determined that the first interface 132 or the second interface 134 has device access, the first switching circuit 1122 keeps the signal line D+/D− of the USB controller 12 on the signal line D+ of the first interface 132 or the second interface 134. /D-. The second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132 or the second interface 134.
请参阅图12,在某些实施方式中,步骤S11具体包括步骤:Referring to FIG. 12, in some embodiments, step S11 specifically includes the steps of:
S119:利用电压检测电路检测第三接口136的状态引脚ID的电平状态;S119: detecting, by using a voltage detecting circuit, a level state of a state pin ID of the third interface 136;
S120:当检测到第三接口136的状态引脚ID有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接口132和第三接口136的信号线D+/D-;S120: When it is detected that the state pin ID of the third interface 136 has a low level input, the signal line D+/D- of the USB controller 12 is alternately switched on to the first interface 132 by using the switching circuit 112 at a predetermined cycle. Signal line D+/D- of the third interface 136;
S121:控制电压输出电路114相应地轮流向第一接口132和第三接口136的电源引脚Vbus供电;和S121: The control voltage output circuit 114 alternately supplies power to the power pin Vbus of the first interface 132 and the third interface 136 in turn;
S122:轮询第一接口132和第三接口136以确定第一接口132和第三接口136的设备接入状态;S122: polling the first interface 132 and the third interface 136 to determine device access states of the first interface 132 and the third interface 136;
步骤S13具体包括步骤:Step S13 specifically includes the steps of:
S135:当确定第一接口132或第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132或第三接口136的信号线D+/D-;S135: When it is determined that the first interface 132 or the third interface 136 has device access, the signal line D+/D− of the USB controller 12 is kept on the signal line of the first interface 132 or the third interface 136 by using the switching circuit 112. D+/D-;
控制方法还包括步骤:The control method further includes the steps of:
S18:控制电压输出电路114保持向第一接口132或第三接口136的电源引脚Vbus供电。S18: The control voltage output circuit 114 maintains power supply to the power pin Vbus of the first interface 132 or the third interface 136.
在某些实施方式中,主控制器14进一步用于执行指令以实现:利用电压检测电路检测第三接口136的状态引脚ID的电平状态;当检测到第三接口136的状态引脚ID有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接口132和第三接口136的信号线D+/D-;控制电压输出电路114相应地轮流向第一接口132和第三接口136的电源引脚Vbus供电;轮询第一接口132和第三接口136以确定第一接口132和第三接口136的设备接入状态;和当确定第一接口132或第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132或第三接口136的信号线D+/D-。主控制器14还用于执行指令以实现:控制电压输出电路114保持向第一接口132或第三接口136的电源引脚Vbus供电。也即是说,步骤S119、步骤S120、步骤S121、步骤S122、步骤S135、 和步骤S18可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute an instruction to: detect a level state of a state pin ID of the third interface 136 using a voltage detection circuit; and detect a state pin ID of the third interface 136 when detecting When there is a low level input, the signal line D+/D- of the USB controller 12 is alternately switched to the signal line D+/D- of the first interface 132 and the third interface 136 by the switching circuit 112 at a predetermined cycle; the control voltage The output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132 and the third interface 136 in turn; polling the first interface 132 and the third interface 136 to determine device access status of the first interface 132 and the third interface 136 And when it is determined that the first interface 132 or the third interface 136 has device access, the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line of the first interface 132 or the third interface 136. D+/D-. The main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power supply pin Vbus of the first interface 132 or the third interface 136. That is, step S119, step S120, step S121, step S122, step S135, And step S18 can be implemented by the main controller 14.
具体地,当检测到第三接口136的状态引脚ID有低电平输入时,说明用户希望USB系统10做主机,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,当检测到第一接口132有设备接入时,则保持当前USB控制器12与第一接口132的连接,控制电压输出电路114保持向第一接口132供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第一接口132的设备)断开连接之前,不再查询第二接口134和第三接口136的状态。当在预定周期(例如2秒)内未检测到第一接口132有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-,控制电压输出电路114相应地向第三接口136的电源引脚Vbus供电,检测第三接口136的设备接入状态,当检测到第三接口136有设备接入时,则保持当前USB控制器12与第三接口136的连接,控制电压输出电路114保持向第三接口136供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第三接口136的设备)断开连接之前,不再查询第一接口132和第二接口134的状态。当在预定周期(例如2秒)内未检测到第三接口136有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,如此重复操作。Specifically, when it is detected that the status pin ID of the third interface 136 has a low level input, indicating that the user wants the USB system 10 to be the host, the signal line D+/D- of the USB controller 12 is switched by the switching circuit 112. The control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly to the signal line D+/D- of the first interface 132, and detects the device access status of the first interface 132 when the first interface is detected. When there is a device access, the connection between the current USB controller 12 and the first interface 132 is maintained, the control voltage output circuit 114 maintains power supply to the first interface 132, and the USB host (ie, the USB system 10) and the other The state of the second interface 134 and the third interface 136 is no longer queried until the USB slave (ie, the device accessing the first interface 132) is disconnected. When the device access of the first interface 132 is not detected within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the third interface 136 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the third interface 136 correspondingly, and detects the device access status of the third interface 136. When it is detected that the third interface 136 has device access, then Keeping the current USB controller 12 connected to the third interface 136, the control voltage output circuit 114 keeps supplying power to the third interface 136, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the second interface 134 is no longer queried until the device of the three interface 136 is disconnected. When the third interface 136 is not detected to have device access within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
在本发明实施方式中,第四切换电路1128将第二电压检测电路1164切换接通到第三接口136的状态引脚ID。当检测到第三接口136的状态引脚ID有低电平输入时,第一切换电路1122将USB控制器12的信号线D+/D-以预定周期轮流切换接通到第一接口132和第三接口136的信号线D+/D-。第二切换电路1124将电压输出电路114轮流切换接通到第一接口132和第三接口136的电源引脚Vbus。当确定第一接口132或第三接口136存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-保持接通第一接口132或第三接口136的信号线D+/D-。第二切换电路1124将电压输出电路114保持接通到第一接口132或第三接口136的电源引脚Vbus。In the embodiment of the present invention, the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the third interface 136. When it is detected that the state pin ID of the third interface 136 has a low level input, the first switching circuit 1122 turns the signal line D+/D− of the USB controller 12 into the first interface 132 and the first cycle in a predetermined cycle. The signal line D+/D- of the triple interface 136. The second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132 and the third interface 136. When it is determined that the first interface 132 or the third interface 136 has device access, the first switching circuit 1122 keeps the signal line D+/D− of the USB controller 12 on the signal line D+ of the first interface 132 or the third interface 136. /D-. The second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132 or the third interface 136.
请参阅图13,在某些实施方式中,步骤S11具体包括步骤:Referring to FIG. 13, in some embodiments, step S11 specifically includes the steps of:
S123:利用电压检测电路检测第二接口134和第三接口136的状态引脚ID的电平状态;S123: detecting, by using a voltage detecting circuit, a level state of a state pin ID of the second interface 134 and the third interface 136;
S124:当检测到第二接口134和第三接口136的状态引脚ID均有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接 口132、第二接口134和第三接口136的信号线D+/D-;S124: When it is detected that the state pin IDs of the second interface 134 and the third interface 136 have a low level input, the switching circuit 112 switches the signal line D+/D- of the USB controller 12 in turn by a predetermined period. To the first Signal line D+/D- of port 132, second interface 134 and third interface 136;
S125:控制电压输出电路114相应地轮流向第一接口132、第二接口134和第三接口136的电源引脚Vbus供电;和S125: The control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136 in turn;
S126:轮询第一接口132、第二接口134和第三接口136以确定第一接口132、第二接口134和第三接口136的设备接入状态;S126: polling the first interface 132, the second interface 134, and the third interface 136 to determine device access states of the first interface 132, the second interface 134, and the third interface 136;
步骤S13具体包括步骤:Step S13 specifically includes the steps of:
S136:当确定第一接口132、第二接口134或第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132、第二接口134或第三接口136的信号线D+/D-;S136: When it is determined that the first interface 132, the second interface 134, or the third interface 136 has device access, the signal line D+/D− of the USB controller 12 is kept on the first interface 132 and the second by using the switching circuit 112. Signal line D+/D- of interface 134 or third interface 136;
控制方法还包括步骤:The control method further includes the steps of:
S19:控制电压输出电路114保持向第一接口132、第二接口134或第三接口136的电源引脚Vbus供电。S19: The control voltage output circuit 114 maintains power supply to the power pin Vbus of the first interface 132, the second interface 134, or the third interface 136.
在某些实施方式中,主控制器14进一步用于执行指令以实现:利用电压检测电路检测第二接口134和第三接口136的状态引脚ID的电平状态;当检测到第二接口134和第三接口136的状态引脚ID均有低电平输入时,利用切换电路112以预定周期将USB控制器12的信号线D+/D-轮流切换接通到第一接口132、第二接口134和第三接口136的信号线D+/D-;控制电压输出电路114相应地轮流向第一接口132、第二接口134和第三接口136的电源引脚Vbus供电;轮询第一接口132、第二接口134和第三接口136以确定第一接口132、第二接口134和第三接口136的设备接入状态;和当确定第一接口132、第二接口134或第三接口136存在设备接入时,利用切换电路112将USB控制器12的信号线D+/D-保持接通第一接口132、第二接口134或第三接口136的信号线D+/D-。主控制器14还用于执行指令以实现:控制电压输出电路114保持向第一接口132、第二接口134或第三接口136的电源引脚Vbus供电。也即是说,步骤S123、步骤S124、步骤S125、步骤S126、步骤S136、和步骤S19可由主控制器14实现。In some embodiments, the main controller 14 is further configured to execute instructions to: detect a level state of a state pin ID of the second interface 134 and the third interface 136 using a voltage detection circuit; when detecting the second interface 134 When the state pin ID of the third interface 136 has a low level input, the signal line D+/D- of the USB controller 12 is alternately switched to the first interface 132 and the second interface by the switching circuit 112 at a predetermined cycle. 134 and signal line D+/D- of the third interface 136; the control voltage output circuit 114 alternately supplies power to the power pins Vbus of the first interface 132, the second interface 134, and the third interface 136; polling the first interface 132 The second interface 134 and the third interface 136 determine device access states of the first interface 132, the second interface 134, and the third interface 136; and when it is determined that the first interface 132, the second interface 134, or the third interface 136 exists When the device is accessed, the signal line D+/D- of the USB controller 12 is kept turned on by the switching circuit 112 to the signal line D+/D- of the first interface 132, the second interface 134 or the third interface 136. The main controller 14 is also operative to execute instructions to enable the control voltage output circuit 114 to maintain power to the power pin Vbus of the first interface 132, the second interface 134, or the third interface 136. That is, step S123, step S124, step S125, step S126, step S136, and step S19 can be implemented by the main controller 14.
具体地,当检测到第二接口134和第三接口136的状态引脚ID有低电平输入时,说明用户希望USB系统10做主机,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,当检测到第一接口132有设备接入时,则保持当前USB控制器12与第一接口132的连接,控制电压输出电路114保持向第一接口132供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第一接口132的设备)断开连接之前,不再查询第二接口134 和第三接口136的状态。当在预定周期(例如2秒)内未检测到第一接口132有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第二接口134的信号线D+/D-,控制电压输出电路114相应地向第二接口134的电源引脚Vbus供电,检测第二接口134的设备接入状态,当检测到第二接口134有设备接入时,则保持当前USB控制器12与第二接口134的连接,控制电压输出电路114保持向第二接口134供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第二接口134的设备)断开连接之前,不再查询第一接口132和第三接口136的状态。当在预定周期(例如2秒)内未检测到第二接口134有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第三接口136的信号线D+/D-,控制电压输出电路114相应地向第三接口136的电源引脚Vbus供电,检测第三接口136的设备接入状态,当检测到第三接口136有设备接入时,则保持当前USB控制器12与第三接口136的连接,控制电压输出电路114保持向第三接口136供电即可,且在USB主机(即USB系统10)与另一个USB从机(即接入第三接口136的设备)断开连接之前,不再查询第一接口132和第二接口134的状态。当在预定周期(例如2秒)内未检测到第三接口136有设备接入时,则利用切换电路112将USB控制器12的信号线D+/D-切换接通到第一接口132的信号线D+/D-,控制电压输出电路114相应地向第一接口132的电源引脚Vbus供电,检测第一接口132的设备接入状态,如此重复操作。Specifically, when it is detected that the status pin ID of the second interface 134 and the third interface 136 has a low level input, indicating that the user wants the USB system 10 to be the host, the signal line D+ of the USB controller 12 is used by the switching circuit 112. /D-switching to the signal line D+/D- of the first interface 132, the control voltage output circuit 114 correspondingly supplies power to the power pin Vbus of the first interface 132, detecting the device access status of the first interface 132, when When it is detected that the first interface 132 has device access, the connection between the current USB controller 12 and the first interface 132 is maintained, and the control voltage output circuit 114 keeps supplying power to the first interface 132, and the USB host (ie, the USB system) 10) No longer querying the second interface 134 before disconnecting from another USB slave (ie, the device accessing the first interface 132) And the state of the third interface 136. When the device access of the first interface 132 is not detected within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the second interface 134 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the second interface 134 correspondingly, detects the device access status of the second interface 134, and when detecting that the second interface 134 has device access, Keeping the current USB controller 12 connected to the second interface 134, the control voltage output circuit 114 keeps supplying power to the second interface 134, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the third interface 136 is no longer queried until the device of the second interface 134 is disconnected. When the second interface 134 is not detected to have device access within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the third interface 136 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the third interface 136 correspondingly, and detects the device access status of the third interface 136. When it is detected that the third interface 136 has device access, then Keeping the current USB controller 12 connected to the third interface 136, the control voltage output circuit 114 keeps supplying power to the third interface 136, and the USB host (ie, the USB system 10) and another USB slave (ie, accessing the first The state of the first interface 132 and the second interface 134 is no longer queried until the device of the three interface 136 is disconnected. When the third interface 136 is not detected to have device access within a predetermined period (for example, 2 seconds), the signal of the USB controller 12 is switched to the signal of the first interface 132 by the switching circuit 112. The line D+/D-, the control voltage output circuit 114 supplies power to the power pin Vbus of the first interface 132 correspondingly, detects the device access state of the first interface 132, and repeats the operation.
在本发明实施方式中,第四切换电路1128将第二电压检测电路1164切换接通到第二接口134和第三接口136的状态引脚ID。当检测到第二接口134和第三接口136的状态引脚ID均有低电平输入时,第一切换电路1122将USB控制器12的信号线D+/D-以预定周期轮流切换接通到第一接口132、第二接口134和第三接口136的信号线D+/D-。第二切换电路1124将电压输出电路114轮流切换接通到第一接口132、第二接口134和第三接口136的电源引脚Vbus。当确定第一接口132、第二接口134或第三接口136存在设备接入时,第一切换电路1122将USB控制器12的信号线D+/D-保持接通第一接口132、第二接口134或第三接口136的信号线D+/D-。第二切换电路1124将电压输出电路114保持接通到第一接口132、第二接口134或第三接口136的电源引脚Vbus。In the embodiment of the present invention, the fourth switching circuit 1128 switches the second voltage detecting circuit 1164 to the state pin ID of the second interface 134 and the third interface 136. When it is detected that the state pin IDs of the second interface 134 and the third interface 136 have a low level input, the first switching circuit 1122 turns the signal line D+/D− of the USB controller 12 into turns in a predetermined cycle. Signal lines D+/D- of the first interface 132, the second interface 134, and the third interface 136. The second switching circuit 1124 turns the voltage output circuit 114 in turn to the power supply pin Vbus of the first interface 132, the second interface 134, and the third interface 136. When it is determined that the first interface 132, the second interface 134, or the third interface 136 has device access, the first switching circuit 1122 keeps the signal line D+/D- of the USB controller 12 on the first interface 132 and the second interface. 134 or the signal line D+/D- of the third interface 136. The second switching circuit 1124 maintains the voltage output circuit 114 to the power supply pin Vbus of the first interface 132, the second interface 134, or the third interface 136.
在某些实施方式中,预定周期为2-3秒。In certain embodiments, the predetermined period is 2-3 seconds.
如此,当其中一个接口13存在设备接入时,能够迅速得到检测,并建立或保持USB控制器12与该接口13的连接。Thus, when one of the interfaces 13 has device access, the detection can be quickly detected and the connection of the USB controller 12 to the interface 13 can be established or maintained.
请参阅图14,在某些实施方式中,USB系统10包括控制按键。控制方法还包括以下步骤: Referring to Figure 14, in some embodiments, USB system 10 includes control buttons. The control method also includes the following steps:
S20:接收控制按键的输入并根据控制按键的输入建立USB控制器12与其中一个接口13的链路。S20: Receive an input of the control button and establish a link of the USB controller 12 and one of the interfaces 13 according to the input of the control button.
在某些实施方式中,USB系统10包括控制按键。主控制器14用于执行指令以实现:接收控制按键的输入并根据控制按键的输入建立USB控制器12与其中一个接口13的链路。也即是说,步骤S20可由主控制器14实现。In some embodiments, the USB system 10 includes control buttons. The main controller 14 is operative to execute instructions to: receive an input of a control button and establish a link of the USB controller 12 with one of the interfaces 13 based on the input of the control button. That is to say, step S20 can be implemented by the main controller 14.
如此,当多个接口13均处于准备做主机的状态时,可以根据控制按键的输入建立USB控制器12与其中一个接口13的链路。该控制按键的输入可以为用户输入。Thus, when the plurality of interfaces 13 are all in a state ready for the host, the link of the USB controller 12 to one of the interfaces 13 can be established according to the input of the control button. The input of the control button can be input by the user.
可以理解,上述各实施方式中的控制方法和USB系统10中,当USB控制器12与已经与多个接口13中的其中一个接口13建立链路后,不会再查询其他接口13的状态,因此,其他接口13的的动作不会对已经建立链路的接口13产生干扰,可靠性高。It can be understood that, in the control method and the USB system 10 in the foregoing embodiments, when the USB controller 12 establishes a link with one of the interfaces 13 and the interface 13, the state of the other interfaces 13 is not queried. Therefore, the action of the other interface 13 does not cause interference to the interface 13 on which the link has been established, and the reliability is high.
请参阅图15,本发明实施方式的电子装置100包括上述任一实施方式的USB系统10和本体40。USB系统10安装在本体40上。Referring to FIG. 15, an electronic device 100 according to an embodiment of the present invention includes the USB system 10 and the body 40 of any of the above embodiments. The USB system 10 is mounted on the body 40.
本发明实施方式的电子设备100包括Pad、移动电话、笔记本电脑、照相机、摄像机、打印机或其他具有USB接口13的电子设备。本体40可为电子装置100的机身。The electronic device 100 of the embodiment of the present invention includes a Pad, a mobile phone, a notebook computer, a camera, a video camera, a printer, or other electronic device having a USB interface 13. The body 40 can be the body of the electronic device 100.
需要说明的是,上述对控制方法和USB系统10的解释说明也适用于本发明实施方式的电子装置100,此处不再赘述。It should be noted that the above description of the control method and the USB system 10 is also applicable to the electronic device 100 of the embodiment of the present invention, and details are not described herein again.
在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiment", "example", "specific example" or "some examples", etc. Particular features, structures, materials or features described in the manner or examples are included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理模块的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、 存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(控制方法),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processing module, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer readable medium" can be any A device that stores, communicates, propagates, or transmits a program for use in an instruction execution system, apparatus, or device, or in conjunction with such an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (control methods) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本发明的实施方式的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the embodiments of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
此外,在本发明的各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
尽管上面已经示出和描述了本发明的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施实施进行变化、修改、替换和变型。 Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. Implementations are subject to change, modification, substitution, and variation.

Claims (36)

  1. 一种控制方法,用于控制USB系统,其特征在于,所述USB系统包括嵌入式电路、USB控制器和多个接口,所述嵌入式电路包括切换电路,所述切换电路连接所述多个接口,所述控制方法包括以下步骤:A control method for controlling a USB system, wherein the USB system includes an embedded circuit, a USB controller, and a plurality of interfaces, the embedded circuit includes a switching circuit, and the switching circuit connects the plurality of An interface, the control method comprising the following steps:
    轮询所述多个接口以确定所述多个接口的设备接入状态;和Polling the plurality of interfaces to determine device access status of the plurality of interfaces; and
    当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路。The switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
  2. 如权利要求1所述的控制方法,其特征在于,所述多个接口包括预设接口,所述控制方法还包括步骤:The control method according to claim 1, wherein the plurality of interfaces comprise preset interfaces, and the controlling method further comprises the steps of:
    当确定所述多个接口均不存在设备接入时利用所述切换电路建立所述USB控制器与所述预设接口的链路。And establishing, by the switching circuit, a link between the USB controller and the preset interface when it is determined that none of the multiple interfaces have device access.
  3. 如权利要求2所述的控制方法,其特征在于,所述多个接口包括第一接口、第二接口和第三接口,所述嵌入式电路还包括电压输出电路和电压检测电路,所述第一接口、所述第二接口和所述第三接口的地线共接,所述第一接口、所述第二接口和所述第三接口的信号线分别通过所述切换电路连接所述USB控制器的信号线,所述第一接口、所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压输出电路,所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压检测电路,所述第二接口和所述第三接口的状态引脚分别通过所述切换电路连接所述电压检测电路。The control method according to claim 2, wherein the plurality of interfaces comprise a first interface, a second interface, and a third interface, the embedded circuit further comprising a voltage output circuit and a voltage detecting circuit, the The ground lines of an interface, the second interface, and the third interface are connected in common, and the signal lines of the first interface, the second interface, and the third interface are respectively connected to the USB through the switching circuit a signal line of the controller, the power pins of the first interface, the second interface, and the third interface are respectively connected to the voltage output circuit by the switching circuit, the second interface and the third The power pins of the interface are respectively connected to the voltage detecting circuit through the switching circuit, and the state pins of the second interface and the third interface are respectively connected to the voltage detecting circuit through the switching circuit.
  4. 如权利要求3所述的控制方法,其特征在于,所述当确定所述多个接口均不存在设备接入时利用所述切换电路建立所述USB控制器与所述预设接口的链路的步骤具体包括步骤:The control method according to claim 3, wherein the determining, by the switching circuit, establishing a link between the USB controller and the preset interface when determining that the plurality of interfaces do not have device access The steps specifically include the steps:
    当确定所述多个接口均不存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述预设接口的信号线;When it is determined that there is no device access in the multiple interfaces, the switching circuit is used to switch the signal line of the USB controller to the signal line of the preset interface;
    所述控制方法还包括步骤:The control method further includes the steps of:
    控制所述电压输出电路向所述预设接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the preset interface.
  5. 如权利要求3所述的控制方法,其特征在于,所述当确定所述多个接口的其中 一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The control method according to claim 3, wherein said determining said plurality of interfaces The step of using the switching circuit to establish a link between the USB controller and the interface accessed by the device when the device is accessed by the interface includes the following steps:
    当确定所述第一接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第一接口的信号线;When it is determined that the first interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the first interface;
    所述控制方法还包括步骤:The control method further includes the steps of:
    控制所述电压输出电路向所述第一接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the first interface.
  6. 如权利要求3所述的控制方法,其特征在于,所述轮询所述多个接口以确定所述多个接口的设备接入状态的步骤具体包括步骤:The control method according to claim 3, wherein the step of polling the plurality of interfaces to determine a device access status of the plurality of interfaces comprises the steps of:
    利用所述电压检测电路检测所述第二接口的电源引脚的电平状态;和Using the voltage detecting circuit to detect a level state of a power pin of the second interface; and
    当检测到所述第二接口的电源引脚有高电平输入时确定所述第二接口存在设备接入;Determining that the second interface has device access when detecting that the power pin of the second interface has a high level input;
    所述当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The step of using the switching circuit to establish a link between the USB controller and the interface that is accessed by the device when the interface of the interface is determined to be:
    当确定所述第二接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第二接口的信号线。When it is determined that the second interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the second interface.
  7. 如权利要求3所述的控制方法,其特征在于,所述轮询所述多个接口以确定所述多个接口的设备接入状态的步骤具体包括步骤:The control method according to claim 3, wherein the step of polling the plurality of interfaces to determine a device access status of the plurality of interfaces comprises the steps of:
    利用所述电压检测电路检测所述第三接口的电源引脚的电平状态;和Using the voltage detecting circuit to detect a level state of a power pin of the third interface; and
    当检测到所述第三接口的电源引脚有高电平输入时确定所述第三接口存在设备接入;Determining that the third interface has device access when detecting that the power pin of the third interface has a high level input;
    所述当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The step of using the switching circuit to establish a link between the USB controller and the interface that is accessed by the device when the interface of the interface is determined to be:
    当确定所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第三接口的信号线。When it is determined that the third interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the third interface.
  8. 如权利要求3所述的控制方法,其特征在于,所述轮询所述多个接口以确定所述多个接口的设备接入状态的步骤具体包括步骤:The control method according to claim 3, wherein the step of polling the plurality of interfaces to determine a device access status of the plurality of interfaces comprises the steps of:
    利用所述电压检测电路检测所述第二接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the second interface;
    当检测到所述第二接口的状态引脚有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第二接口的信号 线;When detecting that the status pin of the second interface has a low level input, using the switching circuit to switch the signal line of the USB controller in turn to the first interface and the first Two-interface signal line;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第二接口的电源引脚供电;和Controlling the voltage output circuit to alternately supply power to the power pins of the first interface and the second interface; and
    轮询所述第一接口和所述第二接口以确定所述第一接口和所述第二接口的设备接入状态;Polling the first interface and the second interface to determine device access status of the first interface and the second interface;
    所述当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The step of using the switching circuit to establish a link between the USB controller and the interface that is accessed by the device when the interface of the interface is determined to be:
    当确定所述第一接口或所述第二接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口或所述第二接口的信号线;When it is determined that the first interface or the second interface has device access, the signal line of the USB controller is kept connected to the signal line of the first interface or the second interface by using the switching circuit ;
    所述控制方法还包括步骤:The control method further includes the steps of:
    控制所述电压输出电路保持向所述第一接口或所述第二接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the second interface.
  9. 如权利要求3所述的控制方法,其特征在于,所述轮询所述多个接口以确定所述多个接口的设备接入状态的步骤具体包括步骤:The control method according to claim 3, wherein the step of polling the plurality of interfaces to determine a device access status of the plurality of interfaces comprises the steps of:
    利用所述电压检测电路检测所述第三接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the third interface;
    当检测到所述第三接口的状态引脚有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第三接口的信号线;When detecting that the status pin of the third interface has a low level input, switching the signal line of the USB controller to the first interface and the first by using the switching circuit in a predetermined cycle Three-interface signal line;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第三接口的电源引脚供电;和Controlling the voltage output circuit to alternately supply power to the power pins of the first interface and the third interface; and
    轮询所述第一接口和所述第三接口以确定所述第一接口和所述第三接口的设备接入状态;Polling the first interface and the third interface to determine device access states of the first interface and the third interface;
    所述当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The step of using the switching circuit to establish a link between the USB controller and the interface that is accessed by the device when the interface of the interface is determined to be:
    当确定所述第一接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口或所述第三接口的信号线;When it is determined that the first interface or the third interface has device access, the signal line of the USB controller is kept connected to the signal line of the first interface or the third interface by using the switching circuit ;
    所述控制方法还包括步骤:The control method further includes the steps of:
    控制所述电压输出电路保持向所述第一接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the third interface.
  10. 如权利要求3所述的控制方法,其特征在于,所述轮询所述多个接口以确定所述多个接口的设备接入状态的步骤具体包括步骤:The control method according to claim 3, wherein the step of polling the plurality of interfaces to determine a device access status of the plurality of interfaces comprises the steps of:
    利用所述电压检测电路检测所述第二接口和所述第三接口的状态引脚的电平状 态;Using the voltage detecting circuit to detect the level of the status pins of the second interface and the third interface state;
    当检测到所述第二接口和第三接口的状态引脚均有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口、所述第二接口和所述第三接口的信号线;When it is detected that the status pins of the second interface and the third interface have a low level input, the switching circuit is used to switch the signal line of the USB controller in turn to the first a signal line of the interface, the second interface, and the third interface;
    控制所述电压输出电路相应地轮流向所述第一接口、所述第二接口和所述第三接口的电源引脚供电;和Controlling the voltage output circuit to alternately supply power to the power pins of the first interface, the second interface, and the third interface; and
    轮询所述第一接口、所述第二接口和所述第三接口以确定所述第一接口、所述第二接口和所述第三接口的设备接入状态;Polling the first interface, the second interface, and the third interface to determine device access states of the first interface, the second interface, and the third interface;
    所述当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路的步骤具体包括步骤:The step of using the switching circuit to establish a link between the USB controller and the interface that is accessed by the device when the interface of the interface is determined to be:
    当确定所述第一接口、所述第二接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口、所述第二接口或所述第三接口的信号线;When it is determined that the first interface, the second interface, or the third interface has device access, the switching circuit is used to keep the signal line of the USB controller connected to the first interface, a signal line of the second interface or the third interface;
    所述控制方法还包括步骤:The control method further includes the steps of:
    控制所述电压输出电路保持向所述第一接口、所述第二接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface, the second interface, or the third interface.
  11. 如权利要求8-10任意一项所述的控制方法,其特征在于,所述预定周期为2-3秒。The control method according to any one of claims 8 to 10, wherein the predetermined period is 2-3 seconds.
  12. 如权利要求1所述的控制方法,其特征在于,所述USB系统包括控制按键,所述控制方法还包括以下步骤:The control method according to claim 1, wherein the USB system comprises a control button, and the control method further comprises the following steps:
    接收所述控制按键的输入并根据所述控制按键的输入建立所述USB控制器与其中一个所述接口的链路。Receiving an input of the control button and establishing a link of the USB controller to one of the interfaces according to an input of the control button.
  13. 一种USB系统,包括嵌入式电路、USB控制器、多个接口、主控制器和存储器,所述嵌入式电路包括切换电路,所述切换电路连接所述多个接口,所述主控制器连接所述切换电路,所述存储器用于存储指令,所述主控制器用于执行所述指令以实现:A USB system includes an embedded circuit, a USB controller, a plurality of interfaces, a main controller, and a memory, the embedded circuit includes a switching circuit, the switching circuit is connected to the plurality of interfaces, and the main controller is connected The switching circuit, the memory is configured to store an instruction, and the main controller is configured to execute the instruction to implement:
    轮询所述多个接口以确定所述多个接口的设备接入状态;和Polling the plurality of interfaces to determine device access status of the plurality of interfaces; and
    当确定所述多个接口的其中一个所述接口存在设备接入时利用所述切换电路建立所述USB控制器与存在设备接入的所述接口的链路。 The switch circuit is used to establish a link between the USB controller and the interface accessed by the presence device when it is determined that one of the interfaces of the plurality of interfaces has device access.
  14. 如权利要求13所述的USB系统,其特征在于,所述多个接口包括预设接口,所述主控制器还用于执行所述指令以实现:The USB system of claim 13, wherein the plurality of interfaces comprise preset interfaces, and the main controller is further configured to execute the instructions to:
    当确定所述多个接口均不存在设备接入时利用所述切换电路建立所述USB控制器与所述预设接口的链路。And establishing, by the switching circuit, a link between the USB controller and the preset interface when it is determined that none of the multiple interfaces have device access.
  15. 如权利要求14所述的USB系统,其特征在于,所述多个接口包括第一接口、第二接口和第三接口,所述嵌入式电路还包括电压输出电路和电压检测电路,所述主控制器连接所述电压输出电路和所述电压检测电路,所述第一接口、所述第二接口和所述第三接口的地线共接,所述第一接口、所述第二接口和所述第三接口的信号线分别通过所述切换电路连接所述USB控制器的信号线,所述第一接口、所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压输出电路,所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压检测电路,所述第二接口和所述第三接口的状态引脚分别通过所述切换电路连接所述电压检测电路。The USB system according to claim 14, wherein said plurality of interfaces comprise a first interface, a second interface, and a third interface, said embedded circuit further comprising a voltage output circuit and a voltage detecting circuit, said main The controller is connected to the voltage output circuit and the voltage detecting circuit, and the grounding of the first interface, the second interface, and the third interface are connected, the first interface, the second interface, and The signal lines of the third interface are respectively connected to the signal lines of the USB controller through the switching circuit, and the power pins of the first interface, the second interface, and the third interface respectively pass the switching The circuit is connected to the voltage output circuit, and the power pins of the second interface and the third interface are respectively connected to the voltage detecting circuit through the switching circuit, and the states of the second interface and the third interface are The feet are respectively connected to the voltage detecting circuit through the switching circuit.
  16. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    当确定所述多个接口均不存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述预设接口的信号线;When it is determined that there is no device access in the multiple interfaces, the switching circuit is used to switch the signal line of the USB controller to the signal line of the preset interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路向所述预设接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the preset interface.
  17. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    当确定所述第一接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第一接口的信号线;When it is determined that the first interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the first interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路向所述第一接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the first interface.
  18. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    利用所述电压检测电路检测所述第二接口的电源引脚的电平状态; Using the voltage detecting circuit to detect a level state of a power pin of the second interface;
    当检测到所述第二接口的电源引脚有高电平输入时确定所述第二接口存在设备接入;和Determining that the second interface has device access when detecting that the power pin of the second interface has a high level input; and
    当确定所述第二接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第二接口的信号线。When it is determined that the second interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the second interface.
  19. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    利用所述电压检测电路检测所述第三接口的电源引脚的电平状态;Using the voltage detecting circuit to detect a level state of a power pin of the third interface;
    当检测到所述第三接口的电源引脚有高电平输入时确定所述第三接口存在设备接入;和Determining that the third interface has device access when detecting that the power pin of the third interface has a high level input; and
    当确定所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第三接口的信号线。When it is determined that the third interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the third interface.
  20. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    利用所述电压检测电路检测所述第二接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the second interface;
    当检测到所述第二接口的状态引脚有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第二接口的信号线;When detecting that the status pin of the second interface has a low level input, using the switching circuit to switch the signal line of the USB controller in turn to the first interface and the first Signal line of the two interfaces;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第二接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface and the second interface in turn;
    轮询所述第一接口和所述第二接口以确定所述第一接口和所述第二接口的设备接入状态;和Polling the first interface and the second interface to determine device access status of the first interface and the second interface; and
    当确定所述第一接口或所述第二接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口或所述第二接口的信号线;When it is determined that the first interface or the second interface has device access, the signal line of the USB controller is kept connected to the signal line of the first interface or the second interface by using the switching circuit ;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口或所述第二接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the second interface.
  21. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    利用所述电压检测电路检测所述第三接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the third interface;
    当检测到所述第三接口的状态引脚有低电平输入时,利用所述切换电路以预定周 期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第三接口的信号线;When the status pin of the third interface is detected to have a low level input, the switching circuit is utilized for a predetermined period Switching the signal line of the USB controller to the signal line of the first interface and the third interface in turn;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第三接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface and the third interface in turn;
    轮询所述第一接口和所述第三接口以确定所述第一接口和所述第三接口的设备接入状态;和Polling the first interface and the third interface to determine device access status of the first interface and the third interface; and
    当确定所述第一接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口或所述第三接口的信号线;When it is determined that the first interface or the third interface has device access, the signal line of the USB controller is kept connected to the signal line of the first interface or the third interface by using the switching circuit ;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the third interface.
  22. 如权利要求15所述的USB系统,其特征在于,所述主控制器进一步用于执行所述指令以实现:The USB system of claim 15 wherein said main controller is further operative to execute said instructions to:
    利用所述电压检测电路检测所述第二接口和所述第三接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the second interface and the third interface;
    当检测到所述第二接口和第三接口的状态引脚均有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口、所述第二接口和所述第三接口的信号线;When it is detected that the status pins of the second interface and the third interface have a low level input, the switching circuit is used to switch the signal line of the USB controller in turn to the first a signal line of the interface, the second interface, and the third interface;
    控制所述电压输出电路相应地轮流向所述第一接口、所述第二接口和所述第三接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface, the second interface, and the third interface in turn;
    轮询所述第一接口、所述第二接口和所述第三接口以确定所述第一接口、所述第二接口和所述第三接口的设备接入状态;和Polling the first interface, the second interface, and the third interface to determine device access states of the first interface, the second interface, and the third interface; and
    当确定所述第一接口、所述第二接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口、所述第二接口或所述第三接口的信号线;When it is determined that the first interface, the second interface, or the third interface has device access, the switching circuit is used to keep the signal line of the USB controller connected to the first interface, a signal line of the second interface or the third interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口、所述第二接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface, the second interface, or the third interface.
  23. 如权利要求20-22任意一项所述的USB系统,其特征在于,所述预定周期为2-3秒。 A USB system according to any of claims 20-22, wherein said predetermined period is 2-3 seconds.
  24. 如权利要求13所述的USB系统,其特征在于,所述USB系统包括控制按键,所述主控制器用于执行所述指令以实现:The USB system of claim 13 wherein said USB system includes a control button, said host controller for executing said instructions to:
    接收所述控制按键的输入并根据所述控制按键的输入建立所述USB控制器与其中一个所述接口的链路。Receiving an input of the control button and establishing a link of the USB controller to one of the interfaces according to an input of the control button.
  25. 一种电子装置,其特征在于,包括:An electronic device, comprising:
    权利要求13所述的USB系统;和The USB system of claim 13; and
    本体,所述USB系统安装在所述本体上。The body, the USB system is mounted on the body.
  26. 如权利要求25所述的电子装置,其特征在于,所述多个接口包括预设接口,所述主控制器还用于执行所述指令以实现:The electronic device according to claim 25, wherein the plurality of interfaces comprise a preset interface, and the main controller is further configured to execute the instructions to:
    当确定所述多个接口均不存在设备接入时利用所述切换电路建立所述USB控制器与所述预设接口的链路。And establishing, by the switching circuit, a link between the USB controller and the preset interface when it is determined that none of the multiple interfaces have device access.
  27. 如权利要求26所述的电子装置,其特征在于,所述多个接口包括第一接口、第二接口和第三接口,所述嵌入式电路还包括电压输出电路和电压检测电路,所述主控制器连接所述电压输出电路和所述电压检测电路,所述第一接口、所述第二接口和所述第三接口的地线共接,所述第一接口、所述第二接口和所述第三接口的信号线分别通过所述切换电路连接所述USB控制器的信号线,所述第一接口、所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压输出电路,所述第二接口和所述第三接口的电源引脚分别通过所述切换电路连接所述电压检测电路,所述第二接口和所述第三接口的状态引脚分别通过所述切换电路连接所述电压检测电路。The electronic device according to claim 26, wherein said plurality of interfaces comprise a first interface, a second interface, and a third interface, said embedded circuit further comprising a voltage output circuit and a voltage detecting circuit, said main The controller is connected to the voltage output circuit and the voltage detecting circuit, and the grounding of the first interface, the second interface, and the third interface are connected, the first interface, the second interface, and The signal lines of the third interface are respectively connected to the signal lines of the USB controller through the switching circuit, and the power pins of the first interface, the second interface, and the third interface respectively pass the switching The circuit is connected to the voltage output circuit, and the power pins of the second interface and the third interface are respectively connected to the voltage detecting circuit through the switching circuit, and the states of the second interface and the third interface are The feet are respectively connected to the voltage detecting circuit through the switching circuit.
  28. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    当确定所述多个接口均不存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述预设接口的信号线;When it is determined that there is no device access in the multiple interfaces, the switching circuit is used to switch the signal line of the USB controller to the signal line of the preset interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路向所述预设接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the preset interface.
  29. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现: The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    当确定所述第一接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第一接口的信号线;When it is determined that the first interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the first interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路向所述第一接口的电源引脚供电。The voltage output circuit is controlled to supply power to a power pin of the first interface.
  30. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    利用所述电压检测电路检测所述第二接口的电源引脚的电平状态;Using the voltage detecting circuit to detect a level state of a power pin of the second interface;
    当检测到所述第二接口的电源引脚有高电平输入时确定所述第二接口存在设备接入;和Determining that the second interface has device access when detecting that the power pin of the second interface has a high level input; and
    当确定所述第二接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第二接口的信号线。When it is determined that the second interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the second interface.
  31. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    利用所述电压检测电路检测所述第三接口的电源引脚的电平状态;Using the voltage detecting circuit to detect a level state of a power pin of the third interface;
    当检测到所述第三接口的电源引脚有高电平输入时确定所述第三接口存在设备接入;和Determining that the third interface has device access when detecting that the power pin of the third interface has a high level input; and
    当确定所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线切换接通到所述第三接口的信号线。When it is determined that the third interface has device access, the switching circuit is used to switch the signal line of the USB controller to the signal line of the third interface.
  32. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    利用所述电压检测电路检测所述第二接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the second interface;
    当检测到所述第二接口的状态引脚有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第二接口的信号线;When detecting that the status pin of the second interface has a low level input, using the switching circuit to switch the signal line of the USB controller in turn to the first interface and the first Signal line of the two interfaces;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第二接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface and the second interface in turn;
    轮询所述第一接口和所述第二接口以确定所述第一接口和所述第二接口的设备接入状态;和Polling the first interface and the second interface to determine device access status of the first interface and the second interface; and
    当确定所述第一接口或所述第二接口存在设备接入时,利用所述切换电路将所述 USB控制器的信号线保持接通所述第一接口或所述第二接口的信号线;When it is determined that the first interface or the second interface has device access, the switching circuit is used to a signal line of the USB controller keeps on a signal line of the first interface or the second interface;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口或所述第二接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the second interface.
  33. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    利用所述电压检测电路检测所述第三接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the third interface;
    当检测到所述第三接口的状态引脚有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口和所述第三接口的信号线;When detecting that the status pin of the third interface has a low level input, switching the signal line of the USB controller to the first interface and the first by using the switching circuit in a predetermined cycle Three-interface signal line;
    控制所述电压输出电路相应地轮流向所述第一接口和所述第三接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface and the third interface in turn;
    轮询所述第一接口和所述第三接口以确定所述第一接口和所述第三接口的设备接入状态;和Polling the first interface and the third interface to determine device access status of the first interface and the third interface; and
    当确定所述第一接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口或所述第三接口的信号线;When it is determined that the first interface or the third interface has device access, the signal line of the USB controller is kept connected to the signal line of the first interface or the third interface by using the switching circuit ;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface or the third interface.
  34. 如权利要求27所述的电子装置,其特征在于,所述主控制器进一步用于执行所述指令以实现:The electronic device of claim 27, wherein the main controller is further configured to execute the instructions to:
    利用所述电压检测电路检测所述第二接口和所述第三接口的状态引脚的电平状态;Using the voltage detecting circuit to detect a level state of a status pin of the second interface and the third interface;
    当检测到所述第二接口和第三接口的状态引脚均有低电平输入时,利用所述切换电路以预定周期将所述USB控制器的信号线轮流切换接通到所述第一接口、所述第二接口和所述第三接口的信号线;When it is detected that the status pins of the second interface and the third interface have a low level input, the switching circuit is used to switch the signal line of the USB controller in turn to the first a signal line of the interface, the second interface, and the third interface;
    控制所述电压输出电路相应地轮流向所述第一接口、所述第二接口和所述第三接口的电源引脚供电;Controlling, by the voltage output circuit, to supply power to the power pins of the first interface, the second interface, and the third interface in turn;
    轮询所述第一接口、所述第二接口和所述第三接口以确定所述第一接口、所述第二接口和所述第三接口的设备接入状态;和Polling the first interface, the second interface, and the third interface to determine device access states of the first interface, the second interface, and the third interface; and
    当确定所述第一接口、所述第二接口或所述第三接口存在设备接入时,利用所述切换电路将所述USB控制器的信号线保持接通所述第一接口、所述第二接口或所述第 三接口的信号线;When it is determined that the first interface, the second interface, or the third interface has device access, the switching circuit is used to keep the signal line of the USB controller connected to the first interface, Second interface or said Three-interface signal line;
    所述主控制器还用于执行所述指令以实现:The main controller is further configured to execute the instructions to:
    控制所述电压输出电路保持向所述第一接口、所述第二接口或所述第三接口的电源引脚供电。The voltage output circuit is controlled to maintain power to a power pin of the first interface, the second interface, or the third interface.
  35. 如权利要求32-34任意一项所述的电子装置,其特征在于,所述预定周期为2-3秒。The electronic device according to any one of claims 32 to 34, wherein the predetermined period is 2-3 seconds.
  36. 如权利要求35所述的电子装置,其特征在于,所述USB系统包括控制按键,所述主控制器用于执行所述指令以实现:38. The electronic device of claim 35, wherein the USB system comprises a control button, the host controller for executing the instruction to:
    接收所述控制按键的输入并根据所述控制按键的输入建立所述USB控制器与其中一个所述接口的链路。 Receiving an input of the control button and establishing a link of the USB controller to one of the interfaces according to an input of the control button.
PCT/CN2017/082596 2017-04-28 2017-04-28 Control method, usb system and electronic apparatus WO2018195992A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/082596 WO2018195992A1 (en) 2017-04-28 2017-04-28 Control method, usb system and electronic apparatus
CN201780004893.9A CN108513656B (en) 2017-04-28 2017-04-28 Control method, USB system and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/082596 WO2018195992A1 (en) 2017-04-28 2017-04-28 Control method, usb system and electronic apparatus

Publications (1)

Publication Number Publication Date
WO2018195992A1 true WO2018195992A1 (en) 2018-11-01

Family

ID=63375235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/082596 WO2018195992A1 (en) 2017-04-28 2017-04-28 Control method, usb system and electronic apparatus

Country Status (2)

Country Link
CN (1) CN108513656B (en)
WO (1) WO2018195992A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527721A (en) * 2020-12-04 2021-03-19 苏州华兴源创科技股份有限公司 Integrated circuit bus interface control device, method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200700995A (en) * 2005-06-29 2007-01-01 High Tech Comp Corp Cradle for connecting to portable electronic apparatus
CN101101582A (en) * 2006-07-03 2008-01-09 泰金宝电通股份有限公司 Expansion module and expansion method of general serial bus connection port
CN101901201A (en) * 2010-08-06 2010-12-01 中兴通讯股份有限公司 Method and device for realizing USB OTG function on electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4318075B2 (en) * 2003-08-29 2009-08-19 富士フイルム株式会社 USB function device
CN102778918B (en) * 2011-05-09 2016-08-24 国家电网公司 Portable electron device
US9959239B2 (en) * 2015-10-16 2018-05-01 Dell Products L.P. Secondary data channel communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200700995A (en) * 2005-06-29 2007-01-01 High Tech Comp Corp Cradle for connecting to portable electronic apparatus
CN101101582A (en) * 2006-07-03 2008-01-09 泰金宝电通股份有限公司 Expansion module and expansion method of general serial bus connection port
CN101901201A (en) * 2010-08-06 2010-12-01 中兴通讯股份有限公司 Method and device for realizing USB OTG function on electronic equipment

Also Published As

Publication number Publication date
CN108513656A (en) 2018-09-07
CN108513656B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US10042801B2 (en) System for detecting universal serial bus (USB) device and method thereof
RU2682911C2 (en) Reversible connector for accessory devices
JP5301512B2 (en) Power saving apparatus and power saving method thereof
US20100199112A1 (en) Information processing apparatus and power supply control method
US20130219087A1 (en) High-definition multimedia interface (hdmi) receiver apparatuses, hdmi systems using the same, and control methods therefor
US20110060850A1 (en) Mobile device of supporting uart and usb communication using same connector and operating method there-of
JP6714469B2 (en) Electronic device and control method thereof
US10725939B2 (en) Host-detecting USB hub
JP6517327B2 (en) Method and apparatus for controlling the mode of a device
CN109478176B (en) Method, device and system for identifying opposite terminal equipment by USB Type-C port equipment
US10565145B2 (en) Felxconnect disconnect detection
CN108228509B (en) USB interface switching device and electronic equipment
US11011945B2 (en) Systems and methods for wireless charging and wired data transfer
US9331492B2 (en) Detection control device and method thereof
US20190213159A1 (en) Universal serial bus type-c interface circuit and pin bypass method thereof
US20130244455A1 (en) Processing device and processing system
WO2018195992A1 (en) Control method, usb system and electronic apparatus
CN110800168B (en) Method and apparatus for changing impedance of terminal included in connector
TWI510928B (en) Peripheral apapratus and control method thereof
US8205108B2 (en) Method and module for power detection and peripheral apparatus using the same
KR20110015742A (en) Method for power supply using usb interface and portable terminal using the same
JP6916629B2 (en) Electronics and control methods
JP2018185664A (en) Control system, electronic apparatus, and control method
US10235311B2 (en) Data acquisition system, electronic device, and data acquisition terminal
WO2021262143A1 (en) Input/output ports

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17907150

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17907150

Country of ref document: EP

Kind code of ref document: A1