CN101299208B - Double-mode general-purpose serial bus equipment and control method thereof - Google Patents

Double-mode general-purpose serial bus equipment and control method thereof Download PDF

Info

Publication number
CN101299208B
CN101299208B CN2008101254692A CN200810125469A CN101299208B CN 101299208 B CN101299208 B CN 101299208B CN 2008101254692 A CN2008101254692 A CN 2008101254692A CN 200810125469 A CN200810125469 A CN 200810125469A CN 101299208 B CN101299208 B CN 101299208B
Authority
CN
China
Prior art keywords
mentioned
universal serial
serial bus
usb
bus
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
CN2008101254692A
Other languages
Chinese (zh)
Other versions
CN101299208A (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.)
Via Technologies Inc
Original Assignee
Via 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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CN2008101254692A priority Critical patent/CN101299208B/en
Publication of CN101299208A publication Critical patent/CN101299208A/en
Application granted granted Critical
Publication of CN101299208B publication Critical patent/CN101299208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Power Sources (AREA)

Abstract

The present invention provides a dual-mode universal serial bus (USB) device and control method thereof, wherein the USB device is used to transmit data between the equipments with universal serial bus interfaces. The dual-mode USB device includes an interface unit, for transmitting data; a judging unit, coupled to the interface unit for judging the USB device is a USB master equipment or a USB peripheral device; a device controller, for judging whether to supply the USB peripheral device or not according to the logical bit on the bus power supply pin; and a host controller controller, for judging the USB master equipment operates in a normal power supply mode or an over-current mode according to the logical bit on the bus power supply pin.

Description

Double-mode general-purpose serial bus equipment and control method thereof
Technical field
The present invention is relevant for a kind of dual-purpose universal serial bus device that can be used as main frame or peripherals relevant for USB (universal serial bus) (USB, Universal Serial Bus) equipment especially.
Background technology
Along with consumption electronic products, personal digital assistant (PDA for example, Personal Digital Assistant), mobile phone, digital camera, printer etc. popularizes, the high speed data transfer technology that is used between these equipment and the computing machine or between equipment and the equipment also more and more receives publicity, and wherein IEEE 1394 is two main standard of this type of transmission technology with USB (universal serial bus).IEEE 1394 supports the higher data transmission speed, but relatively complexity and price are higher, be mainly used on the product that needs high-speed communication, and USB (universal serial bus) is mainly used in the application of low speed data transmission, for example USB1.1 supports the transfer rate of 1.5Mbps and 12Mbps, so be widely used in the less demanding computer peripheral of transmission speed, for example keyboard, mouse etc.The release of USB 2.0 standards makes the transmission speed of USB reach 480Mbps, and end-to-end transmission (On-The-Go; Equipment and data transfer between devices when OTG) release of technology has realized not having main frame, for example digital camera can directly be connected with printer and photograph print, thereby expands USB The Application of Technology scope.
In order to support end-to-end transmission technology, newly-increased ID pin is played the part of main frame or peripherals in order to judgment device, and two equipment can negotiate agreement (host negotiation protocol by main frame after connecting; HNP) set (session request protocol with session request; SRP), change its role.Yet, realize that main frame negotiation agreement will need complicated instruction and state machine (state machines).
Summary of the invention
The present invention provides a kind of universal serial bus device, is used for transmitting data having between the equipment of USB (universal serial bus), comprising: interface unit, in order to the transmission data; Judging unit is coupled to above-mentioned interface unit, in order to when the enable signal that receives is logical zero, judges whether above-mentioned universal serial bus device is USB (universal serial bus) main control equipment or USB (universal serial bus) peripherals; Device controller when being above-mentioned USB (universal serial bus) peripherals when above-mentioned serial bus equipment, according to the logical bit on the bus power source pin, judges whether above-mentioned USB (universal serial bus) peripherals is powered; Console controller, when being above-mentioned USB (universal serial bus) main control equipment when above-mentioned universal serial bus device, according to the logical bit on the above-mentioned bus power source pin, judge whether above-mentioned USB (universal serial bus) main control equipment operates in the normal power supply pattern or the excess current incident takes place; And multiplexer, above-mentioned multiplexer is coupled to above-mentioned bus and determines pin and above-mentioned judging unit, in order to when the enable signal that receives is logical one, stop to transmit above-mentioned bus and determine that the logical bit of pin is to above-mentioned judging unit, and the software certification signal is sent to above-mentioned judging unit, cause the logical bit of above-mentioned judging unit, judge that above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment or above-mentioned USB (universal serial bus) peripherals according to above-mentioned software certification signal.。
The present invention also provides a kind of control method of universal serial bus device, wherein above-mentioned universal serial bus device comprises judging unit, console controller, device controller and interface unit, above-mentioned control method comprises: when the enable signal that receives is logical zero, whether determine the logical bit of pin according to bus, be USB (universal serial bus) main control equipment or USB (universal serial bus) peripherals by the above-mentioned universal serial bus device of above-mentioned judgment unit judges; When being above-mentioned USB (universal serial bus) main control equipment at above-mentioned universal serial bus device, by above-mentioned console controller, according to the logical bit on the bus power source pin, judge that above-mentioned USB (universal serial bus) main control equipment operates in the normal power supply pattern or the excess current incident takes place; When above-mentioned serial bus equipment is above-mentioned USB (universal serial bus) peripherals,,, judge whether above-mentioned USB (universal serial bus) peripherals is powered according to the logical bit on the above-mentioned bus power source pin by the said equipment controller; And when the enable signal that receives is logical one,, judge whether above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment or above-mentioned USB (universal serial bus) peripherals according to the logical bit of software certification signal.
Method and apparatus of the present invention does not need complicated instruction not need the introducing of state machine yet, can make and carry out high-speed data transmission between universal serial bus device and computing machine or the universal serial bus device.
For above and other objects of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and cooperate appended diagram, be described below in detail.
Description of drawings
Fig. 1 has set forth the universal serial bus device example according to one embodiment of the invention.
Fig. 2 has set forth the truth table of universal serial bus device according to one embodiment of the invention.
Embodiment
Figure 1 shows that an embodiment of universal serial bus device of the present invention.As shown in the figure, universal serial bus device 100, hereinafter to be referred as USB device 100, comprise usb host controller 10, USB device controller 20, judging unit 30, multiplexer 40, interface unit IFA 50, grounding pin GND, data transmission pin D+ and D-, confirm pin ID and bus power source pin Vbus.For example, universal serial bus device 100 can be transactional electronic product or consumption electronic products, for example personal digital assistant, mobile phone, digital camera, printer, audio player, recording pen, display, but be not limited to this.
Usb host controller 10 usefulness so that USB device 100 work as the USB main control equipment, and have interface unit IF1 12 and be coupled to judging unit 30, and USB device controller 20 usefulness so that USB device 100 as USB peripherals work, and have interface unit IF2 22 and be coupled to judging unit 30.Judging unit 30 is to be coupled between usb host controller 10, USB device controller 20, interface unit IFA 50 and the multiplexer 40, play the part of USB main control equipment or USB peripherals in order to judge USB device 100, and optionally usb host controller 10 or USB device controller 20 are coupled to interface unit IFA50, so that carry out data transmission.
Particularly, judging unit 30 is according to the logical bit of confirming pin ID, and judgement USB device 100 is played the part of USB main control equipment or USB peripherals.When judging unit 30 is judged USB device 100 and played the part of the USB main control equipment, then the interface unit IF1 12 of usb host controller 10 is coupled to the interface unit IFA 50 of USB device 100, so that carry out data transmission.On the contrary, when judging unit 30 is judged USB device 100 and played the part of USB peripherals, then the interface unit IF2 22 of USB device controller 20 is coupled to the interface unit IFB of USB device 100, so that carry out data transmission.
Multiplexer 40 is to be coupled to confirm between pin ID and the judging unit 30, in order to when receiving enable signal SWE, stop to transmit the logical bit of affirmation pin ID to judging unit 30, and software certification signal SWID is sent to judging unit 30, cause the logical bit of judging unit 30 according to software certification signal SWID, judgement USB device 100 is played the part of USB main control equipment or USB peripherals.For example, when enable signal SWE is logical zero, 40 logical bit that transmission can be confirmed pin ID of multiplexer make judging unit 30 according to the logical bit of confirming pin ID to judging unit 30, and judgement USB device 100 is played the part of USB main control equipment or USB peripherals.On the contrary, when enable signal SWE is logical one, 40 of multiplexers transmit software certification signal SWID and are sent to judging unit 30, make judging unit 30 according to the logical bit of software certification signal SWID, judge that USB device 100 plays the part of USB main control equipment or USB peripherals.In other words, after unaccounted another USB device is finished and is connected among USB device 100 and the figure, also enable signal SWE and software certification signal SWID be can pass through, USB device 100 and another USB device institute role changed.
Be noted that when USB device 100 is played the part of USB peripherals,, need the voltage on the wait bus power source pin Vbus that the 1.5k Ω resistance on the data transmission pin D+ is drawn high to noble potential (pull up), do not draw among the figure according to the standard of USB 2.0.Therefore, whether the logical bit on the bus power source pin Vbus is powered in order to the USB peripherals of judging USB device 100 and playing the part of.On the contrary, because the USB main control equipment is powered by power supply unit, usb host controller 10 does not need bus power source pin Vbus to judge whether power supply, so when USB device 100 is played the part of the USB main control equipment, bus power source pin Vbus can be used as traditional excess current (over current) indication pin, in order to indicate whether to take place excess current.
Therefore, when USB device 100 is played the part of the USB main control equipment, 10 of usb host controllers can be according to the logical bit on the bus power source pin Vbus, judge whether USB main control equipment behaviour the excess current incident takes place, and when USB device 100 is played the part of USB peripherals, 20 of USB device controllers can judge whether USB peripherals is powered according to the logical bit on the bus power source pin Vbus.
Fig. 2 is that a truth table is confirmed the logical bit of pin ID and the four kinds of states that logical bit constituted on the bus power source pin Vbus in order to expression.
When USB device 100 is preset as USB peripherals, confirm that pin ID can be logical one, so 30 of judging units can be coupled to interface unit IFA 50 with the interface unit IF2 22 of USB device controller 20, so that carry out data transmission.
Because USB device 100 plays the part of USB peripherals, according to the standard of USB 2.0, the 1.5k Ω resistance on the data transmission pin D+ need wait for that the voltage on the bus power source pin Vbus draws high it to noble potential, does not mark among the figure.Therefore, the logical bit on this moment bus power source pin Vbus is a logical zero, represents that then USB device 100 plays the part of USB peripherals, but is not powered i.e. start as yet.On the contrary,, represent that then USB device 100 plays the part of USB peripherals, and be powered, promptly start shooting if the logical bit on this moment bus power source pin Vbus is a logical one.
Moreover, when confirming that pin ID is logical zero, can learn that then USB device 100 is preset as the USB main control equipment, so 30 of judging units can be coupled to interface unit IFA 50 with the interface unit IF1 12 of usb host controller 10, so that carry out data transmission.Because the USB main control equipment is powered by power supply unit, usb host controller 10 does not need bus power source pin Vbus to judge whether power supply, so this moment, bus power source pin Vbus can be in order to be used as the indication pin of excess current.When this moment, bus power source pin Vbus was logical zero, represent that then the excess current incident takes place USB device 100.On the contrary, when being logical one, represent that then USB device 100 operates under the normal power supply pattern as if bus power source pin Vbus.
In addition, when multiplexer 40 receives enable signal SWE, stop to transmit the logical bit of affirmation pin ID to judging unit 30, and software certification signal SWID is sent to judging unit 30, cause the logical bit of judging unit 30 according to software certification signal SWID, judgement USB device 100 is played the part of USB main control equipment or USB peripherals.
Because judging unit of the present invention can learn that USB device 100 is played the part of USB main control equipment or USB peripherals, whether excess current takes place the USB main control equipment and USB peripherals is to be powered by four kinds of situations in the truth table, therefore USB device 100 of the present invention can functionally be played the part of USB main control equipment or USB peripherals, and does not need known realization main frame negotiation needed complicated order of agreement and state machine.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; any those skilled in the art; without departing from the spirit and scope of the present invention; when can doing a little change and retouching, so protection scope of the present invention is as the criterion when looking appended the claim scope person of defining.

Claims (8)

1. universal serial bus device is used for transmitting data having between the equipment of USB (universal serial bus), comprising:
Interface unit is in order to the transmission data;
Judging unit, be coupled to above-mentioned interface unit, in order to when the enable signal that receives is logical zero, determine that according to bus the logical bit of pin judges whether above-mentioned universal serial bus device is USB (universal serial bus) main control equipment or USB (universal serial bus) peripherals;
Device controller when being above-mentioned USB (universal serial bus) peripherals when above-mentioned universal serial bus device, according to the logical bit on the bus power source pin, judges whether above-mentioned USB (universal serial bus) peripherals is powered;
Console controller, when being above-mentioned USB (universal serial bus) main control equipment when above-mentioned universal serial bus device, according to the logical bit on the above-mentioned bus power source pin, judge whether above-mentioned USB (universal serial bus) main control equipment operates in the normal power supply pattern or the excess current incident takes place; And
Multiplexer, above-mentioned multiplexer is coupled to above-mentioned bus and determines pin and above-mentioned judging unit, in order to when the enable signal that receives is logical one, stop to transmit above-mentioned bus and determine that the logical bit of pin is to above-mentioned judging unit, and the software certification signal is sent to above-mentioned judging unit, cause the logical bit of above-mentioned judging unit, judge that above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment or above-mentioned USB (universal serial bus) peripherals according to above-mentioned software certification signal.
2. universal serial bus device according to claim 1, wherein when the logical bit of determining pin according to bus is judged, when bus determines that pin is first logical bit, above-mentioned judging unit determines that above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment, and above-mentioned console controller is coupled to above-mentioned interface unit; And
When above-mentioned bus determines that pin is second logical bit, when above-mentioned judging unit determines that above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) peripherals, the said equipment controller is coupled to above-mentioned interface unit.
3. universal serial bus device according to claim 2, wherein working as above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment, when above-mentioned bus power source pin was above-mentioned first logical bit, above-mentioned console controller determined that above-mentioned excess current incident takes place above-mentioned USB (universal serial bus) main control equipment; And
When above-mentioned bus power source pin was second logical bit, above-mentioned console controller determined that above-mentioned USB (universal serial bus) main control equipment operates in the above-mentioned normal power supply pattern.
4. universal serial bus device according to claim 2, wherein above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) peripherals, when above-mentioned bus power source pin was above-mentioned first logical bit, the said equipment controller was not judged to above-mentioned USB (universal serial bus) peripherals power supply; And
When above-mentioned bus power source pin was above-mentioned second logical bit, the said equipment controller was judged above-mentioned USB (universal serial bus) peripherals is powered.
5. the control method of a universal serial bus device comprises:
When the enable signal that receives is logical zero, determine the logical bit of pin according to bus, judge whether above-mentioned universal serial bus device is USB (universal serial bus) main control equipment or USB (universal serial bus) peripherals;
When being above-mentioned USB (universal serial bus) main control equipment at above-mentioned universal serial bus device,, judge that above-mentioned USB (universal serial bus) main control equipment operates in the normal power supply pattern or the excess current incident takes place according to the logical bit on the bus power source pin;
When above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) peripherals,, judge whether above-mentioned USB (universal serial bus) peripherals is powered according to the logical bit on the above-mentioned bus power source pin; And
When the enable signal that receives is logical one,, judge whether above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment or above-mentioned USB (universal serial bus) peripherals according to the logical bit of software certification signal.
6. control method according to claim 5, wherein when the logical bit of determining pin according to bus is judged, when above-mentioned bus determines that pin is first logical bit, universal serial bus device is above-mentioned USB (universal serial bus) main control equipment, and console controller is coupled to interface unit to connect above-mentioned USB (universal serial bus) main control equipment; And
When above-mentioned bus determines that pin is second logical bit, when above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) peripherals, device controller is coupled to above-mentioned interface unit to connect above-mentioned USB (universal serial bus) peripherals.
7. control method according to claim 6, wherein above-mentioned universal serial bus device is above-mentioned USB (universal serial bus) main control equipment, when above-mentioned bus power source pin is above-mentioned first logical bit, represent that then above-mentioned excess current incident takes place above-mentioned USB (universal serial bus) main control equipment; And
When above-mentioned bus power source pin is second logical bit, represent that then above-mentioned USB (universal serial bus) main control equipment operates in the above-mentioned normal power supply pattern.
8. control method according to claim 6, wherein above-mentioned universal serial bus device is played the part of above-mentioned USB (universal serial bus) peripherals, when above-mentioned bus power source pin was above-mentioned first logical bit, then expression was not powered to above-mentioned USB (universal serial bus) peripherals; And
When above-mentioned bus power source pin was above-mentioned second logical bit, then expression was to above-mentioned USB (universal serial bus) peripherals power supply.
CN2008101254692A 2008-06-13 2008-06-13 Double-mode general-purpose serial bus equipment and control method thereof Active CN101299208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101254692A CN101299208B (en) 2008-06-13 2008-06-13 Double-mode general-purpose serial bus equipment and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101254692A CN101299208B (en) 2008-06-13 2008-06-13 Double-mode general-purpose serial bus equipment and control method thereof

Publications (2)

Publication Number Publication Date
CN101299208A CN101299208A (en) 2008-11-05
CN101299208B true CN101299208B (en) 2011-04-13

Family

ID=40079039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101254692A Active CN101299208B (en) 2008-06-13 2008-06-13 Double-mode general-purpose serial bus equipment and control method thereof

Country Status (1)

Country Link
CN (1) CN101299208B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8145800B2 (en) * 2008-12-31 2012-03-27 Fresenius Medical Card Holdings, Inc. Identifying when a USB self-powered device is connected to a medical device by triggering an alert about a potential risk to patient
US8335875B1 (en) * 2011-06-24 2012-12-18 Intel Corporation System and method for performing isochronous data buffering
TWI497306B (en) * 2012-11-29 2015-08-21 Faraday Tech Corp Usb super speed hub and associated traffic managing method
US10216253B2 (en) 2013-03-28 2019-02-26 Via Technologies, Inc. Universal serial bus hub and control method thereof
TWI613546B (en) * 2013-03-28 2018-02-01 威盛電子股份有限公司 Universal serial bus hub and control method thereof

Also Published As

Publication number Publication date
CN101299208A (en) 2008-11-05

Similar Documents

Publication Publication Date Title
TW591509B (en) USB control circuit and operation method applied in computer-to-computer transmission
CN101299208B (en) Double-mode general-purpose serial bus equipment and control method thereof
US20090063717A1 (en) Rate Adaptation for Support of Full-Speed USB Transactions Over a High-Speed USB Interface
CN108351852A (en) Enhanced communications on universal serial bus (USB) TYPE-C cables
US8924598B1 (en) USB interface configurable for host or device mode
CN107357376A (en) A kind of hard disk backboard, making and its implementation
CN107688550A (en) Equipment connecting detection
CN106407145A (en) An interface access method and system and a memory card
CN102375918A (en) Interaction virtual role system between facilities
US8788734B2 (en) Methods and devices for universal serial bus port event extension
US8074232B2 (en) Method for improving the communication of the human interface device
EP2290554A1 (en) Management of a configuration of a USB device
CN1316388C (en) USB control circuit suitable to computer-to-computer transmission and its operation method
JP2003316732A (en) Data transfer control device, electronic equipment, and data transfer control method
TWI522808B (en) Expansion module and control method thereof
TWM577533U (en) Expandable electronic computing system
CN104484302A (en) System for realizing both-way communication and control between two hosts based on USB (Universal Serial Bus) interfaces
CN100403285C (en) Semicondustor storage device having host system operation function
CN109557846A (en) Detect identification circuit, its detection recognition method and electronic equipment
CN203825617U (en) USB (universal serial bus)-based high speed data transmission equipment
CN208225049U (en) A kind of computer data is to passing on-line unit
TWI648636B (en) Universal serial bus type c transmission line and transmission device
CN205750414U (en) A kind of high-sensitive USB interface and mainboard thereof
CN201168423Y (en) Hand-hold games machine with multiple master/slave Ethernet network interfaces
CN216956856U (en) Special mainboard for machine vision system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant