CN109800198A - A kind of USB port connects three equipment and realizes the autonomous switching circuits of hardware - Google Patents

A kind of USB port connects three equipment and realizes the autonomous switching circuits of hardware Download PDF

Info

Publication number
CN109800198A
CN109800198A CN201910044735.7A CN201910044735A CN109800198A CN 109800198 A CN109800198 A CN 109800198A CN 201910044735 A CN201910044735 A CN 201910044735A CN 109800198 A CN109800198 A CN 109800198A
Authority
CN
China
Prior art keywords
vbus
usb
coma
equipment
hanging
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.)
Granted
Application number
CN201910044735.7A
Other languages
Chinese (zh)
Other versions
CN109800198B (en
Inventor
杨荣仕
顾金霞
李朝阳
王晓波
朱敏
王诚
程广茂
石磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huace Navigation Technology Ltd
Original Assignee
Shanghai Huace Navigation Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huace Navigation Technology Ltd filed Critical Shanghai Huace Navigation Technology Ltd
Priority to CN201910044735.7A priority Critical patent/CN109800198B/en
Publication of CN109800198A publication Critical patent/CN109800198A/en
Application granted granted Critical
Publication of CN109800198B publication Critical patent/CN109800198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

Three equipment are connect the present invention provides a kind of USB port and realize the autonomous switching circuit of hardware, and default conditions confirmation: in usb protocol, USB does main equipment, and ID is necessary for low, and supplying power for outside;When doing from equipment, ID is hanging or high level, is powered by main equipment;PC usually only does at end main equipment, and VBUS 5V, ID are hanging or are high level;USB flash disk, it usually needs OTG line is connected with other equipment, ID be it is low, VBUS is hanging;When default conditions, COMA does not connect USB flash disk and PC, and the ID1 of COMA is high level by internal system 5V pull-up, VBUS is low level by internal system drop-down, ID and VBUS makes the ID2 low level of system CPU by logical AND gate, while the VBUS of COMA makes USB switch remain to COMB, connects B device;It realizes and is communicated with B device;The VBUS continued power of B device, ID be it is hanging, realize autonomous master-slave swap, realize time-sharing communication from one main equipment of equipment with two.

Description

A kind of USB port connects three equipment and realizes the autonomous switching circuits of hardware
Technical field
The present invention relates to Design of Digital Circuit field and automation control areas, and in particular to a kind of USB port connects three and sets It is standby to realize the autonomous switching circuit of hardware.
Background technique
Existing USB technology is very mature, and USB port expansion technique is also mature, but the interface expanded is typically only capable to do Main equipment cannot be done from equipment.A kind of situation as such:
(1) only one USB OTG interface, it is desirable that connect on computers, do from equipment;
(2) connecting USB flash disk can communicate with USB flash disk, do main equipment;(USB flash disk and computer are same interface, are named as COMA);
(3) it in USB flash disk of getting along well, computer connection, needs to communicate with B device, does main equipment;
(4) when connecting with computer, USB flash disk, B device, communication object can only be automatically switched by hardware.
Summary of the invention
In order to solve above-mentioned insufficient defect, three equipment are connect the present invention provides a kind of USB port and realize that hardware is independently cut Change circuit, the main purpose of invention solves in embedded system, a USB interface by hardware automatic switchover master slave mode and Change communication object;That is USB interface realizes autonomous master-slave swap by hardware logic electric circuit, with two from setting A standby main equipment realizes time-sharing communication.
Three equipment, which are connect, the present invention provides a kind of USB port realizes the autonomous switching circuit of hardware, default conditions confirmation: In usb protocol, USB does main equipment, and ID is necessary for low, and supplying power for outside;When doing from equipment, ID is hanging or high level, You Zhushe Available electricity;PC usually only does at end main equipment, and VBUS 5V, ID are hanging or are high level;USB flash disk, it usually needs OTG line is set with other It is standby to be connected, ID be it is low, VBUS is hanging;When default conditions, COMA does not connect USB flash disk and PC, and the ID1 of COMA is pulled up by internal system 5V For high level, VBUS is made the low electricity of ID2 of system CPU by internal system drop-down for low level, ID and VBUS by logical AND gate It is flat, while the VBUS of COMA makes USB switch remain to COMB, connects B device;It realizes and is communicated with B device;The VBUS of B device continues Power supply, ID is hanging.
Above-mentioned circuit, wherein when connecing the end PC, the ID1 and VBUS of COMA are high level, it two is determined by logical AND gate The ID2 for determining system CPU is high level, and CPU is done from equipment, while the VBUS of COMA makes USB switching to COMA;Realization system CPU and PC is independently communicated.
Above-mentioned circuit, wherein when connecing USB flash disk, it is low level that the ID1 of COMA is drawn by OTG line, while ID1 loads USB Switch is opened, and system is USB flash disk power supply, and the VBUS of COMA is high level therewith, and the ID1 and VBUS of COMA is made by logical AND gate The ID2 of CPU is low level, and CPU does main equipment, and at this moment the VBUS of COMA makes USB switching to COMA;Realize system CPU master From identity switching and USB flash disk communication.
Three equipment, which are connect, the present invention provides a kind of USB port realizes that the autonomous switching circuit of hardware has the advantages that One USB interface automatically switches master slave mode and change communication object by hardware;That is a USB interface passes through hard Part logic circuit realizes autonomous master-slave swap, realizes time-sharing communication from one main equipment of equipment with two.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, the present invention and its feature, outer Shape and advantage will become more apparent upon.Identical label indicates identical part in all the attached drawings.Not deliberately proportionally Draw attached drawing, it is preferred that emphasis is show the gist of the present invention.
Fig. 1 is default conditions schematic diagram of the invention.
Fig. 2 connects the end PC working condition schematic diagram for of the invention.
Fig. 3 is the schematic diagram for connecing USB flash disk working condition of the invention.
Fig. 4 is the whole circuit diagram of the present invention.
Specific embodiment
In the following description, a large amount of concrete details are given so as to provide a more thorough understanding of the present invention.So And it is obvious to the skilled person that the present invention may not need one or more of these details and be able to Implement.In other examples, in order to avoid confusion with the present invention, for some technical characteristics well known in the art not into Row description.
In order to thoroughly understand the present invention, detailed step and detailed structure will be proposed in following description, so as to Illustrate technical solution of the present invention.Presently preferred embodiments of the present invention is described in detail as follows, however other than these detailed descriptions, this Invention can also have other embodiments.
Referring to Fig.1 shown in-Fig. 4, a kind of USB port provided by the invention connects three equipment and realizes the autonomous switching circuits of hardware, Default conditions confirmation: in usb protocol, USB does main equipment, and ID is necessary for low, and supplying power for outside;When doing from equipment, ID is hanging Or high level, it is powered by main equipment;PC usually only does at end main equipment, and VBUS 5V, ID are hanging or are high level;USB flash disk usually needs Want OTG line to be connected with other equipment, ID be it is low, VBUS is hanging;When default conditions, COMA does not meet USB flash disk and PC, the ID1 of COMA Be high level by internal system 5V pull-up, VBUS is low level by internal system drop-down, ID and VBUS made by logical AND gate be The ID2 of system CPU is low level, while the VBUS of COMA makes USB switch remain to COMB, connects B device;It realizes and is communicated with B device; The VBUS continued power of B device, ID be it is hanging, when connecing the end PC, the ID1 and VBUS of COMA are high level, it two passes through logic ID2 with door decision systems CPU is high level, and CPU is done from equipment, while the VBUS of COMA makes USB switching to COMA;It is real Existing system CPU is independently communicated with PC, and when connecing USB flash disk, it is low level that the ID1 of COMA is drawn by OTG line, while ID1 opens USB load It closes and opens, system is USB flash disk power supply, and the VBUS of COMA is high level therewith, and the ID1 and VBUS of COMA makes CPU by logical AND gate ID2 be low level, CPU does main equipment, and at this moment the VBUS of COMA makes USB switching to COMA;Realize system CPU principal and subordinate body Part switching and USB flash disk communication.
A specific embodiment presented below
Embodiment 1, referring to Fig.1 shown in-Fig. 4, in the present invention, default conditions confirmation:
In usb protocol, USB does main equipment, and ID is necessary for low, and supplying power for outside.When doing from equipment, ID is hanging or high electricity It is flat, it is powered by main equipment;
PC usually only does at end main equipment, and VBUS 5V, ID are hanging or are high level;
USB flash disk, it usually needs OTG line is connected with other equipment, ID be it is low, VBUS is hanging.
When default conditions, COMA does not connect USB flash disk and PC, and the ID1 of COMA is high level by internal system 5V pull-up, and VBUS is by being The internal drop-down of system makes the ID2 low level of system CPU, while the VBUS of COMA for low level, ID and VBUS by logical AND gate So that USB switch is remained to COMB, connects B device.It realizes and is communicated with B device.The VBUS continued power of B device, ID are hanging.
When connecing the end PC, the ID1 and VBUS of COMA are high level (computer decisions), it two passes through logical AND gate decision systems The ID2 of CPU is high level, and CPU is done from equipment, while the VBUS of COMA makes USB switching to COMA;Realize system CPU with PC is independently communicated;
When connecing USB flash disk, it is low level that the ID1 of COMA is drawn by OTG line, while ID1 opens USB load switch, system U Disk power supply, the VBUS of COMA is high level therewith, and the ID1 and VBUS of COMA make the ID2 low level of CPU by logical AND gate, CPU does main equipment, and at this moment the VBUS of COMA makes USB switching to COMA;Realize that the switching of system CPU principal and subordinate identity and USB flash disk are logical News.The present invention can be realized a USB interface by hardware logic electric circuit, realize autonomous master-slave swap, with two from equipment one A main equipment realizes time-sharing communication;Such as: products application is on high accuracy positioning navigation neceiver, specific embodiment: one In a embedded system, CPU has a USB interface, can decide or from equipment.One logical AND gate SN74LVC1G08DVBT; One USB switch FSUSB42MUX;One load switch RT9706;The mode of connection is as shown in schematic diagram, as shown in Figure 4.
Presently preferred embodiments of the present invention is described above.It is to be appreciated that the invention is not limited to above-mentioned Particular implementation, devices and structures not described in detail herein should be understood as gives reality with the common mode in this field It applies;Anyone skilled in the art, without departing from the scope of the technical proposal of the invention, all using the disclosure above Methods and technical content many possible changes and modifications are made to technical solution of the present invention, or be revised as equivalent variations etc. Embodiment is imitated, this is not affected the essence of the present invention.Therefore, anything that does not depart from the technical scheme of the invention, foundation Technical spirit of the invention any simple modifications, equivalents, and modifications made to the above embodiment, still fall within the present invention In the range of technical solution protection.

Claims (3)

1. a kind of USB port connects three equipment and realizes the autonomous switching circuit of hardware, which is characterized in that default conditions confirmation: being assisted in USB In view, USB does main equipment, and ID is necessary for low, and supplying power for outside;When doing from equipment, ID is hanging or high level, is supplied by main equipment Electricity;PC usually only does at end main equipment, and VBUS 5V, ID are hanging or are high level;USB flash disk, it usually needs OTG line and other equipment phase Even, ID is low, and VBUS is hanging;When default conditions, COMA does not connect USB flash disk and PC, and the ID1 of COMA is height by internal system 5V pull-up Level, VBUS are made the ID2 low level of system CPU by internal system drop-down for low level, ID and VBUS by logical AND gate, together When COMA VBUS make USB switch remain to COMB, connect B device;It realizes and is communicated with B device;The VBUS continued power of B device, ID is hanging.
2. a kind of USB port as described in claim 1 connects three equipment and realizes the autonomous switching circuit of hardware, which is characterized in that when When connecing the end PC, the ID1 and VBUS of COMA is high level, its two ID2 for passing through logical AND gate decision systems CPU is high level, CPU It does from equipment, while the VBUS of COMA makes USB switching to COMA;Realize that system CPU is independently communicated with PC.
3. a kind of USB port as claimed in claim 2 connects three equipment and realizes the autonomous switching circuit of hardware, which is characterized in that when When connecing USB flash disk, it is low level that the ID1 of COMA is drawn by OTG line, while ID1 opens USB load switch, and system is USB flash disk power supply, with The VBUS of COMA be high level, the ID1 and VBUS of COMA make the ID2 low level of CPU by logical AND gate, and CPU, which decides, to be set Standby, at this moment the VBUS of COMA makes USB switching to COMA;Realize the switching of system CPU principal and subordinate identity and USB flash disk communication.
CN201910044735.7A 2019-01-17 2019-01-17 Circuit for realizing independent switching of hardware by connecting three devices through USB (universal serial bus) ports Active CN109800198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910044735.7A CN109800198B (en) 2019-01-17 2019-01-17 Circuit for realizing independent switching of hardware by connecting three devices through USB (universal serial bus) ports

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910044735.7A CN109800198B (en) 2019-01-17 2019-01-17 Circuit for realizing independent switching of hardware by connecting three devices through USB (universal serial bus) ports

Publications (2)

Publication Number Publication Date
CN109800198A true CN109800198A (en) 2019-05-24
CN109800198B CN109800198B (en) 2023-05-09

Family

ID=66559590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910044735.7A Active CN109800198B (en) 2019-01-17 2019-01-17 Circuit for realizing independent switching of hardware by connecting three devices through USB (universal serial bus) ports

Country Status (1)

Country Link
CN (1) CN109800198B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569208A (en) * 2019-08-02 2019-12-13 武汉精立电子技术有限公司 Control circuit, signal control device, signal control method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102991538A (en) * 2012-12-26 2013-03-27 北京科信华技术有限公司 Device and method for automatically switching point-to-point communication
CN105824771A (en) * 2015-10-28 2016-08-03 维沃移动通信有限公司 Electronic device and master-slave switching method and apparatus thereof
US20160232122A1 (en) * 2013-10-22 2016-08-11 Allgo Embedded Systems Private Limited Universal serial bus (usb) hub for switching downstream ports between host mode and slave mode
US20170039155A1 (en) * 2015-08-07 2017-02-09 Xiaomi Inc. Interface circuit, method and device for state switching
CN107977331A (en) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 A kind of control method, device and terminal
CN108021522A (en) * 2017-12-14 2018-05-11 威创集团股份有限公司 USB device master slave mode switching circuit

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102991538A (en) * 2012-12-26 2013-03-27 北京科信华技术有限公司 Device and method for automatically switching point-to-point communication
US20160232122A1 (en) * 2013-10-22 2016-08-11 Allgo Embedded Systems Private Limited Universal serial bus (usb) hub for switching downstream ports between host mode and slave mode
US20170039155A1 (en) * 2015-08-07 2017-02-09 Xiaomi Inc. Interface circuit, method and device for state switching
CN105824771A (en) * 2015-10-28 2016-08-03 维沃移动通信有限公司 Electronic device and master-slave switching method and apparatus thereof
CN107977331A (en) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 A kind of control method, device and terminal
CN108021522A (en) * 2017-12-14 2018-05-11 威创集团股份有限公司 USB device master slave mode switching circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569208A (en) * 2019-08-02 2019-12-13 武汉精立电子技术有限公司 Control circuit, signal control device, signal control method and system

Also Published As

Publication number Publication date
CN109800198B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN107430420B (en) The low-power TYPE-C receiver inhibited with high idle noise and DC level
US8521929B2 (en) Virtual serial port management system and method
US8711153B2 (en) Methods and apparatuses for configuring and operating graphics processing units
US7895386B2 (en) USB interface provided with host/device function and its control method
CN107077183A (en) The low-power of Type C connector subsystems is realized
CN102567238B (en) Interface switching control method, portable terminal device, portable mobile equipment and input equipment
US9652427B2 (en) Processor module, micro-server, and method of using processor module
WO2015168385A1 (en) Port disconnect charging function for usb hub
TW201807592A (en) USB multi-host endpoint reflector hub
CN101566870A (en) Computer system and control method thereof
KR20160144401A (en) Systems for enabling modular mobile electronic devices
CN100478935C (en) PCIE channel expansion device, system and its collocation method
CN106104504A (en) The system and method disconnecting detection on the double mode port of usb hub
CN109800198A (en) A kind of USB port connects three equipment and realizes the autonomous switching circuits of hardware
TW201327126A (en) Auto-detection control device and method thereof
CN211506485U (en) High-performance intensive computing blade and blade server
CN204480237U (en) A kind of connector, universal serial bus device and intelligent terminal
CN203720584U (en) Mini-size COM Express processor module based on ARM processor
CN110008163A (en) Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface
CN103869883B (en) One kind extension mainboard and expansion system
CN103218278B (en) Automatic detection and control device and automatic detection control method thereof
CN208432937U (en) A kind of computer module and mainboard
CN113472576A (en) Bandwidth allocation method of OCP network card and related device
CN209388295U (en) A kind of usb circuit and electronic equipment for realizing while charging and powering
CN202948445U (en) Universal serial bus (USB) interface expansion circuit

Legal Events

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