CN211264156U - Master-slave mode automatic switching device for electronic equipment - Google Patents

Master-slave mode automatic switching device for electronic equipment Download PDF

Info

Publication number
CN211264156U
CN211264156U CN202020150642.0U CN202020150642U CN211264156U CN 211264156 U CN211264156 U CN 211264156U CN 202020150642 U CN202020150642 U CN 202020150642U CN 211264156 U CN211264156 U CN 211264156U
Authority
CN
China
Prior art keywords
usb interface
usb
resistor
master
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202020150642.0U
Other languages
Chinese (zh)
Inventor
王谊
王先全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wide Wing Communications Polytron Technologies Inc
Original Assignee
Shanghai Wide Wing Communications Polytron Technologies Inc
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 Shanghai Wide Wing Communications Polytron Technologies Inc filed Critical Shanghai Wide Wing Communications Polytron Technologies Inc
Priority to CN202020150642.0U priority Critical patent/CN211264156U/en
Application granted granted Critical
Publication of CN211264156U publication Critical patent/CN211264156U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The utility model provides an electronic equipment principal and subordinate mode automatic switching control equipment, automatic switching control equipment includes: the USB switching device comprises a first USB interface, a second USB interface, a USB switching module and a logic control module; the first USB interface is connected with the USB switching module and transmits data; the second USB interface is connected with the USB switching module and transmits data; the logic control module is connected with the second USB interface and generates a corresponding enabling signal and a master-slave control signal of the electronic equipment based on the working state of the second USB interface; the USB switching module is connected with the first USB interface, the second USB interface and the logic control module, and switches the connection between the first USB interface or the second USB interface and the electronic equipment based on the enabling signal. The USB _ ID pin state is controlled by detecting whether the second USB interface is externally connected with the electronic equipment or not, and a data channel is established through the USB switching module, so that the automatic switching of the USB master-slave mode is realized, and data collision is avoided.

Description

Master-slave mode automatic switching device for electronic equipment
Technical Field
The utility model relates to an electronic equipment technical field especially relates to electronic equipment principal and subordinate mode automatic switching control equipment.
Background
In some Customer Premises Equipment (CPE) devices, a Type AUSB interface is often connected, and the CPE devices are used as hosts for externally hanging USB devices. Since the USB interface defaults that the CPE device is the master device, when the CPE device is abnormally down and cannot be turned on, DEBUG analysis or forced flashing needs to be performed on the CPE device, which needs to connect the CPE device as a slave device to a PC through USB. In order to connect a PC conveniently, a set of MICRO USB interfaces needs to be configured in the CPE device, and many integrated platforms now only have a set of USB interfaces, and when the set of USB interfaces controls the CPE to be in the master device mode, the slave devices cannot be connected out at the same time. At present, the USB2.0OTG function can realize automatic switching of a single-port master-slave mode, but a Type-A interface and a Micro USB interface are configured in one port, the Type-AUSB is defaulted to master, and the Micro USB is defaulted to slave, so that master-slave mode conflict is often caused.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention is directed to an automatic switching device for master-slave mode of an electronic device.
The utility model provides an electronic equipment principal and subordinate auto-change over device, include:
the USB switching device comprises a first USB interface, a second USB interface, a USB switching module and a logic control module;
the first USB interface is connected with the USB switching module and transmits data;
the second USB interface is connected with the USB switching module and transmits data;
the logic control module is connected with the second USB interface and generates a corresponding enabling signal and a master-slave control signal of the electronic equipment based on the working state of the second USB interface;
the USB switching module is connected with the first USB interface, the second USB interface and the logic control module, and switches the connection between the first USB interface or the second USB interface and the electronic equipment based on the enabling signal.
Optionally, the electronic device master-slave mode automatic switching device further includes a power supply module, and the power supply module supplies power to the first USB interface and the logic control module.
Optionally, the logic control module includes a first switching tube, a second switching tube, a first resistor, a second resistor, a third resistor, a fourth resistor, and a diode; one end of the first resistor is connected with a power supply voltage, and the other end of the first resistor is connected with the drain electrode of the first switching tube; the grid electrode of the first switching tube is connected with the second USB interface, and the source electrode of the first switching tube is grounded; one end of the second resistor is connected with a power supply voltage, and the other end of the second resistor is connected with the drain electrode of the second switching tube; the grid electrode of the second switch tube is connected with the drain electrode of the first switch tube, and the source electrode of the second switch tube is grounded; the cathode of the diode is connected with the drain electrode of the second switching tube, and the anode of the diode outputs a master-slave control signal; one end of the third resistor is connected with the grid electrode of the first switching tube, and the other end of the third resistor is grounded through the fourth resistor; and the connection node of the third resistor and the fourth resistor outputs the enable signal.
Optionally, the first switching tube or the second switching tube includes a MOS tube.
Optionally, the Type of the first USB interface includes Type-a USB; the type of the second USB interface comprises Micro USB.
Optionally, the first USB interface is connected to a mobile electronic device.
Optionally, the second USB interface is connected to a PC device.
Optionally, the electronic device comprises a CPE device.
As above, the utility model provides an electronic equipment principal and subordinate mode automatic switching control equipment has following beneficial effect:
the state of a USB _ ID pin is controlled by adding a logic control module, so that electronic setting is switched between a master mode and a slave mode;
through adding the USB switching module, when one USB interface is in use, the other USB interface is suspended, so that mutual conflict is avoided;
through the double-port setting, the conflict between the master mode and the slave mode is avoided, and the debugging and the application of the equipment are facilitated.
Drawings
Fig. 1 is a schematic structural diagram of the automatic switching device for master-slave mode of the electronic device according to the present invention.
Fig. 2 is a schematic diagram of the logic control module according to the present invention.
Description of the element reference numerals
11 power supply module
12 first USB interface
13 second USB interface
14 USB switching module
15 logic control module
16 electronic device
151 first switch tube
152 second switching tube
153 first resistor
154 second resistance
155 third resistor
156 fourth resistor
157 diode
Detailed Description
The following description of the embodiments of the present invention is provided for illustrative purposes, and other advantages and effects of the present invention will be readily apparent to those skilled in the art from the disclosure herein. The present invention can also be implemented or applied through other different specific embodiments, and various details in the present specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
Please refer to fig. 1-2. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the invention in a schematic manner, and only the components related to the invention are shown in the drawings rather than being drawn according to the number, shape and size of the components in actual implementation, and the form, quantity and proportion of the components in actual implementation may be changed at will, and the layout of the components may be more complicated.
As shown in fig. 1, the utility model provides an electronic equipment principal and subordinate mode automatic switching control equipment connects in electronic equipment 16, and the device includes: a first USB interface 12, a second USB interface 13, a USB switching module 14 and a logic control module 15;
the first USB interface 12 is connected to the USB switching module 14 and transmits data;
the second USB interface 13 is connected to the USB switching module 14 and transmits data;
the logic control module 15 is connected to the second USB interface 13, and generates a corresponding enable signal EN and a master-slave control signal USB _ ID of the electronic device based on a working state of the second USB interface 13.
The USB switching module 14 is connected to the first USB interface 12, the second USB interface 13 and the logic control module 15, and switches the connection between the first USB interface 12 or the second USB interface 13 and the electronic device 16 based on the enable signal EN.
As an example, the automatic switching device for master-slave mode of the electronic device further includes a power supply module 11, and the power supply module 11 supplies power to the first USB interface 12 and the logic control module 15 through a power line VBUS 1.
As shown in fig. 2, the logic control module 15 includes a first switch tube 151, a second switch tube 152, a first resistor 153, a second resistor 154, a third resistor 155, a fourth resistor 156, and a diode 157; one end of the first resistor 153 is connected to a power voltage VBUS1, and the other end is connected to the drain of the first switch tube 151; the gate of the first switch tube 151 is connected to the second USB interface 13 through a detection signal VBUS2, and the source is grounded; one end of the second resistor 154 is connected to the power voltage VBUS1, and the other end is connected to the drain of the second switch tube 152; the gate of the second switch tube 152 is connected to the drain of the first switch tube 151, and the source is grounded; the anode of the diode 157 outputs a master-slave control signal USB _ ID, and the cathode of the diode 157 is connected to the drain of the second switch tube 152; one end of the third resistor 155 is connected to the gate of the first switch 151, and the other end is grounded via the fourth resistor 156; the connection node of the third resistor 155 and the fourth resistor 156 outputs the enable signal EN.
As an example, the first switch tube 151 and the second switch tube 152 include MOS tubes or other types of switch tubes.
By way of example, the Type of the first USB interface 12 includes Type-a USB or other Type of USB interface; the type of the second USB interface 13 includes Micro USB or other types of USB interfaces. In this embodiment, the first USB interface 12 is a Type-a USB, and the second USB interface 13 is a Micro USB.
As an example, the first USB interface 12 may be connected to a mobile electronic device, the second USB interface 13 may be connected to a PC device, and the electronic device 16 comprises a customer premises equipment CPE or other electronic device.
The utility model discloses still provide an adopt as above electronic equipment principal and subordinate mode automatic switching control equipment's principal and subordinate mode switching method, including following step:
judging whether the second USB interface is connected with the external equipment or not;
when the second USB interface is not connected with the external connection device, the electronic equipment is in a master mode;
when the second USB interface is connected with the external equipment, the electronic equipment is in a slave mode.
As an example, when the second USB interface is not connected to the external electronic device, the master/slave control signal of the electronic device is at a preset level, and the electronic device enters the master mode; and the first USB interface and the electronic equipment perform data transmission. When the second USB interface is connected with external electronic equipment, generating a detection signal, and adjusting the level of a master-slave control signal of the electronic equipment based on the detection signal so as to switch the electronic equipment into a slave mode; and generating an enabling signal based on the detection signal, and controlling the second USB interface to perform data transmission with the electronic equipment.
Specifically, the power module 11 supplies power to the first USB interface 12 and the logic control module 15 through the power voltage VBUS1, the second switching tube 152 is turned on, the master-slave control signal USB _ ID output by the logic control module 15 is grounded, the electronic device 16 is in a master mode, and the USB switching module 14 controls to be turned on with the third positive data line DP through the first positive data line DP1, and to be turned on with the third negative data line DM1 to establish connection between the first USB interface and the electronic device;
when the second USB interface 13 is connected to the external electronic device, the detection signal VBUS2 is input to the logic control module 15, the first switch 151 is turned on, the second switch 152 is turned off, the master/slave control signal USB _ ID is at a high level, the electronic device 16 is switched to the slave mode, and the enable signal EN controls the USB switching module 14 to connect the second USB interface to the electronic device, that is, the second positive data terminal DP2 and the third positive data terminal DP are turned on, and the second negative data terminal DM2 and the third negative data terminal DM are turned on.
The utility model controls the state of the USB _ ID pin by adding the logic control module, thereby switching the master-slave mode of the electronic equipment; through adding the USB switching module, when one USB interface is in use, the other USB interface is suspended, so that mutual conflict is avoided; through the double-port setting, the conflict between the master mode and the slave mode is avoided, and the debugging and the application of the equipment are facilitated.
To sum up, the utility model provides an electronic equipment principal and subordinate mode automatic switching control equipment, electronic equipment principal and subordinate mode automatic switching control equipment includes at least: the USB switching device comprises a first USB interface, a second USB interface, a USB switching module and a logic control module; the first USB interface is connected with the USB switching module and transmits data; the second USB interface is connected with the USB switching module and transmits data; the logic control module is connected with the second USB interface and generates a corresponding enabling signal and a master-slave control signal of the electronic equipment based on the working state of the second USB interface; the USB switching module is connected with the first USB interface, the second USB interface and the logic control module, and switches the connection between the first USB interface or the second USB interface and the electronic equipment based on the enabling signal. The utility model utilizes the logic relationship that the Type A interface and the Micro USB interface are inserted into different devices to judge and control the high and low levels of the master-slave control signal USB _ ID, thereby realizing that the slave modes of the Type A master mode and the Micro USB do not conflict, and facilitating the debugging and application of the devices; when the master-slave mode is switched, the USB data line of the CPE is correspondingly switched through the switch, when one USB interface is used, the other USB device is hung, mutual conflict is avoided, the OTG patch cord is saved, and the USB function of the electronic device is more sound.
Therefore, the utility model effectively overcomes various defects in the prior art and has high industrial utilization value. The above embodiments are merely illustrative of the principles and effects of the present invention, and are not to be construed as limiting the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which may be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (8)

1. An automatic switching device for master-slave mode of electronic equipment is characterized by at least comprising: the USB switching device comprises a first USB interface, a second USB interface, a USB switching module and a logic control module;
the first USB interface is connected with the USB switching module and transmits data;
the second USB interface is connected with the USB switching module and transmits data;
the logic control module is connected with the second USB interface and generates a corresponding enabling signal and a master-slave control signal of the electronic equipment based on the working state of the second USB interface;
the USB switching module is connected with the first USB interface, the second USB interface and the logic control module, and switches the connection between the first USB interface or the second USB interface and the electronic equipment based on the enabling signal.
2. The automatic switching device for master-slave mode of electronic equipment according to claim 1, further comprising a power module, wherein the power module supplies power to the first USB interface and the logic control module.
3. The automatic switching device for master-slave mode of electronic equipment according to claim 1, wherein the logic control module comprises a first switch tube, a second switch tube, a first resistor, a second resistor, a third resistor, a fourth resistor and a diode; one end of the first resistor is connected with a power supply voltage, and the other end of the first resistor is connected with the drain electrode of the first switching tube; the grid electrode of the first switching tube is connected with the second USB interface, and the source electrode of the first switching tube is grounded; one end of the second resistor is connected with a power supply voltage, and the other end of the second resistor is connected with the drain electrode of the second switching tube; the grid electrode of the second switch tube is connected with the drain electrode of the first switch tube, and the source electrode of the second switch tube is grounded; the cathode of the diode is connected with the drain electrode of the second switching tube, and the anode of the diode outputs a master-slave control signal; one end of the third resistor is connected with the grid electrode of the first switching tube, and the other end of the third resistor is grounded through the fourth resistor; and the connection node of the third resistor and the fourth resistor outputs the enable signal.
4. The automatic switching device for master-slave mode of electronic equipment according to claim 3, wherein the first switch tube or the second switch tube comprises a MOS tube.
5. The automatic switching device of master-slave mode of electronic equipment according to claim 1, wherein the Type of said first USB interface comprises Type-a USB; the type of the second USB interface comprises Micro USB.
6. The device for automatically switching between master mode and slave mode of an electronic device according to claim 1, wherein said first USB interface is connected to a mobile electronic device.
7. The automatic switching device for master-slave mode of electronic equipment according to claim 1, wherein said second USB interface is connected to PC equipment.
8. The device of claim 1, wherein the electronic equipment comprises CPE equipment.
CN202020150642.0U 2020-02-03 2020-02-03 Master-slave mode automatic switching device for electronic equipment Active CN211264156U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202020150642.0U CN211264156U (en) 2020-02-03 2020-02-03 Master-slave mode automatic switching device for electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202020150642.0U CN211264156U (en) 2020-02-03 2020-02-03 Master-slave mode automatic switching device for electronic equipment

Publications (1)

Publication Number Publication Date
CN211264156U true CN211264156U (en) 2020-08-14

Family

ID=71956982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202020150642.0U Active CN211264156U (en) 2020-02-03 2020-02-03 Master-slave mode automatic switching device for electronic equipment

Country Status (1)

Country Link
CN (1) CN211264156U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691569A (en) * 2020-12-31 2022-07-01 上海驷格生物科技有限公司 PCR instrument and data transmission method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691569A (en) * 2020-12-31 2022-07-01 上海驷格生物科技有限公司 PCR instrument and data transmission method thereof

Similar Documents

Publication Publication Date Title
CN105790356B (en) A kind of data line with charging circuit
CN106066840A (en) A kind of method switching electronic equipment master slave mode and a kind of electronic equipment
CN107643998B (en) System for realizing OTG and charging dual functions based on intelligent module
CN104809088A (en) Connecting device and control chip and control method thereof
CN211264156U (en) Master-slave mode automatic switching device for electronic equipment
CN103684407A (en) Otg device
CN210721443U (en) Data interface switching circuit and device
CN210006035U (en) USB and OTG function switching control circuit, device and mobile terminal
CN209659302U (en) A kind of interface gating circuit and communication equipment
CN110297789B (en) Method for realizing USB OTG function
CN103311766A (en) Mobile equipment switching device and working mode switching method thereof
CN113204202A (en) Automatic switching device and switching method for master-slave mode of electronic equipment
CN201188217Y (en) Computer host
CN214412881U (en) TypeC and HDMI two-in-one transmission display control circuit and device
CN111371198B (en) Single-live-wire power supply circuit, system and control method for LPWAN
CN204069292U (en) For the earphone keystroke testing circuit of electric terminal
CN207782827U (en) A kind of Portable network cable intelligent speed-measuring device
CN108572936B (en) USB interface control circuit
CN107733025B (en) USB and DC compatible double-charging circuit and operation method thereof
CN211063362U (en) Type-C fills data line soon
CN114238192B (en) Control circuit and control method for positive and negative short circuit of TYPEC
CN218006532U (en) Circuit for determining master-slave device connection
CN217821586U (en) USB switching circuit and USB switching device
CN213518241U (en) Circuit for switching DFP and UFP based on USB-C port
CN218569863U (en) Charging system with output short-circuit protection and insertion detection functions

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant