CN102023955A - Method for connecting USB controller and USB controller - Google Patents

Method for connecting USB controller and USB controller Download PDF

Info

Publication number
CN102023955A
CN102023955A CN2009101923427A CN200910192342A CN102023955A CN 102023955 A CN102023955 A CN 102023955A CN 2009101923427 A CN2009101923427 A CN 2009101923427A CN 200910192342 A CN200910192342 A CN 200910192342A CN 102023955 A CN102023955 A CN 102023955A
Authority
CN
China
Prior art keywords
pin
usb
vbus
state machine
message
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.)
Withdrawn
Application number
CN2009101923427A
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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co 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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN2009101923427A priority Critical patent/CN102023955A/en
Publication of CN102023955A publication Critical patent/CN102023955A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for connecting a universal serial bus (USB) controller and the USB controller. The USB controller is encapsulated with a D+ pin and a D- pin which are sequentially connected with a D+ pin and a D- pin positioned on a socket, and a first input/output interface and a second input/output interface of the USB controller are respectively connected with a video bus (VBUS) pin positioned on the socket; and in the method, roles are normally identified and the connection process is completed by sending a message indicating that the VBUS state is effective and a message indicating that a USB state machine enters a host mode or a slave mode to the USB state machine. The method can reduce the complexity of a hardware detection circuit. The pin special for the encapsulation of the USB controller can be the D+ or D- pin, also can be the D+, D- or VBUS pin, and also can be the D+, D- or identity (ID) pin, the pins needed by the method is less than the special pins needed to be encapsulated in the USB controller in the prior art, and the encapsulation area is correspondingly reduced, so that the encapsulation cost is saved.

Description

Method and a kind of USB controller that a kind of USB controller connects
Technical field
The present invention relates to the USB technical field, relate in particular to method and a kind of USB controller that a kind of USB controller connects.
Background technology
USB (Universal Serial BUS, USB (universal serial bus)) is the interfacing that is applied in computer realm, USB is an external bus standard, is used for being connected and communication of standard computing machine and USB device, plug and play and hot plug function that USB can support equipment.
At present, what be connected with the USB controller has 5 kinds of more common sockets, is respectively: standard A, standard B, Mini-A, Mini-B, Mini-AB, and Dui Ying plug has 4 kinds with it, be respectively: standard-A, standard-B, Mini-A, Mini-B, and the kind of USB connecting line just can reach 16 kinds.
In the prior art, what be connected with the USB controller generally all is standard-A socket, and this standard-A socket comprises VBUS pin (being power lead), D+ pin (data line), D-pin (data line), GND pin (ground wire).Typical USB device has keyboard, mouse, USB flash disk, card reader, portable hard drive etc., and these USB device all are to have standard-A plug.
The portable set that has has been realized the two role's (equipment of promptly can deciding of USB, also can make slave unit), USB controller in these portable sets need encapsulate out 5 dedicated pin, be respectively VBUS pin (being power lead), D+ pin (data line), D-pin (data line), ID pin (master slave mode line), GND pin (ground wire), these five dedicated pin are connected with USB device by socket.The hardware detecting circuit of USB controller inside detects the high-low level value of ID pin, and this high-low level value is outputed to the state machine of USB controller inside, and state machine can be operated in Host Status or slave status according to the high-low level value; Hardware detecting circuit judges by the high-low level that detects the VBUS pin whether the USB controller sets up good the connection with USB device simultaneously.
But the USB controller of this portable set need encapsulate 5 dedicated pin, and the dedicated pin number is many, and package area is bigger, and corresponding cost can be than higher.
Summary of the invention
The invention provides method and a kind of USB controller that a kind of USB controller connects, the dedicated pin of its encapsulation is fewer, and packaging cost is lower.
Technical scheme of the present invention is:
The method that a kind of USB controller connects, described USB controller is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, first IO interface of described USB controller and second IO interface are connected with VBUS pin on the described socket respectively;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, read the level signal of described VBUS pin by second IO interface, when judging that described level signal is high value, send the message that enters slave mode to the USB state machine; And the effective message of VBUS state sent to described USB state machine;
If do not change,, send the message that enters host mode to described USB state machine when receiving the instruction that enters Host Status; By described first IO interface is the power supply of described VBUS pin, and the voltage transitions of will described first IO interface exporting is to satisfy the voltage of USB standard, and the effective message of VBUS state is sent to described USB state machine.
The method that another USB controller of the present invention connects, described USB controller is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, sends the message that enters slave mode to the USB state machine; And the effective message of VBUS state sent to described USB state machine;
If do not change,, send the message that enters host mode to the USB state machine when receiving the instruction that enters Host Status; By described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard, and the effective message of VBUS state sends to described USB state machine.
The method that another USB controller of the present invention connects, described USB controller is packaged with D+ pin, D-pin and VBUS pin, be connected with D+ pin, D-pin and VBUS pin on the socket successively, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, and when the level signal of described VBUS pin is high value, sends the message that enters slave mode to the USB state machine;
If do not change,, send the message that enters host mode to described USB state machine when receiving the instruction that enters Host Status; By described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard.
The method that another USB controller of the present invention connects, described USB controller is packaged with D+ pin, D-pin and ID pin, be connected with D+ pin, D-pin and ID pin on the socket successively, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, and when the level signal of described ID pin is high value, the effective information of VBUS state is sent to the USB state machine;
If do not change, and when the level signal of described ID pin is low level value, by described IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described IO interface output, the effective information of VBUS state is sent to the USB state machine.
The present invention has also disclosed a kind of USB controller, it is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, first IO interface of described USB controller and second IO interface are connected with VBUS pin on the described socket respectively;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes, if change, reads the level signal of described VBUS pin by second IO interface;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status
Sending module, be connected with receiver module with described detection module, be used for when described detection module judges that the level signal of described VBUS pin is high value, send the message that enters slave mode, and the effective message of VBUS state is sent to described USB state machine to the USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described first IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described first IO interface output, the effective message of VBUS state is sent to described USB state machine.
The present invention has also disclosed another USB controller, and it is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for when the level of described D+ pin and D-pin changes, and sends the message that enters slave mode to the USB state machine, and the effective message of VBUS state is sent to described USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, with the voltage transitions of described IO interface output is to satisfy the voltage of USB standard, and the effective message of VBUS state sends to described USB state machine.
The present invention has also disclosed another USB controller, it is packaged with D+ pin, D-pin and VBUS pin, be connected with D+ pin, D-pin and VBUS pin on the socket successively, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, when the level that is used for described D+ pin and D-pin does not change, receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, be used for when the level of described D+ pin and D-pin changes, and the level signal of described VBUS pin sends the message that enters slave mode when being high value to the USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard.
The present invention has also disclosed another USB controller, and it is packaged with D+ pin, D-pin and ID pin, is connected with D+ pin, D-pin and ID pin on the socket successively, and the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for changing at the level of described D+ pin and D-pin, and when the level signal of described ID pin is high value, the effective information of VBUS state is sent to the USB state machine;
Receive the instruction that enters Host Status at described receiver module, and when the level signal of described ID pin is low level value, by described IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described IO interface output, the effective information of VBUS state is sent to the USB state machine.
Method and a kind of USB controller that USB controller of the present invention connects, can whether change by the level of described D+ pin of software detection and D-pin, send the message that enters slave mode or host mode to the USB state machine according to actual needs, perhaps the effective message of VBUS state is sent to described USB state machine; The USB state machine is according to the message that receives, normally discern the role and finish connection procedure, do not need hardware detecting circuit to send host mode, slave mode message or the effective message of VBUS state, can reduce the complexity of hardware detecting circuit to the USB state machine.And owing to do not need hardware detecting circuit to send host mode, slave mode message or the effective message of VBUS state to the USB state machine, the dedicated pin of then described USB controller encapsulation can be D+, D-pin, also can be D+, D-, VBUS pin, can also be D+, D-, ID pin, lack than the dedicated pin that USB controller of the prior art need encapsulate, package area is also smaller accordingly, has saved packaging cost.
Description of drawings
Fig. 1 is the method process flow diagram in one embodiment that USB controller of the present invention connects;
Fig. 2 is the method process flow diagram in another embodiment that USB controller of the present invention connects;
Fig. 3 is the method process flow diagram in another embodiment that USB controller of the present invention connects;
Fig. 4 is the method process flow diagram in another embodiment that USB controller of the present invention connects;
Fig. 5 is the encapsulation synoptic diagram of Fig. 1 USB controller;
Fig. 6 is the encapsulation synoptic diagram of Fig. 2 USB controller;
Fig. 7 is the encapsulation synoptic diagram of Fig. 3 USB controller;
Fig. 8 is the encapsulation synoptic diagram of Fig. 4 USB controller;
Fig. 9 is the structural representation of USB controller of the present invention.
Embodiment
Method and USB controller that USB controller of the present invention connects, can whether change by the level of described D+ pin of software detection and D-pin, send the message that enters slave mode or host mode to the USB state machine according to actual needs, perhaps the effective message of VBUS state is sent to described USB state machine; The USB state machine is according to the message that receives, normally discern the role and finish connection procedure, do not need hardware detecting circuit to send host mode, slave mode message or the effective message of VBUS state, can reduce the complexity of hardware detecting circuit to the USB state machine.And owing to do not need hardware detecting circuit to send host mode, slave mode message or the effective message of VBUS state to the USB state machine, the dedicated pin of then described USB controller encapsulation can be D+, D-pin, also can be D+, D-, VBUS pin, can also be D+, D-, ID pin, lack than the dedicated pin that USB controller of the prior art need encapsulate, package area is also smaller accordingly, has saved packaging cost.
Below in conjunction with accompanying drawing specific embodiments of the invention are done a detailed elaboration.
Embodiment one
Among this embodiment, described USB controller such as Fig. 5, the USB controller is provided with the first IO interface GPIO-1, the second IO interface GPIO-2, D+ pin, D-pin and GND pin, wherein be packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the first IO interface GPIO-1 of described USB controller and the second IO interface GPIO-2 are connected with VBUS pin on the described socket respectively; Outside socket can use following six kinds: standard-A, standard-B, Mini-A, Mini-B, Mini-AB, and any self-defining socket that comprises D+ pin, D-pin; This GPIO-1 can be a general programmable input/output port, perhaps I2C (Inter-Integrated-Circuit, twin wire serial) bus, and GPIO-2 can be a general programmable input/output port, perhaps I2C bus.
The method that this USB controller connects as Fig. 1, comprises step:
Insert described socket as the USB line, whether the level of S101, the described D+ pin of detection and D-pin changes; When the USB line on main frame inserts, because the D+ of host side, the pull down resistor that there is 15K in the D-pin, simultaneously owing to there be weak the driving on the D+ pin of USB controller of the present invention and the D-pin, so can be by detecting D+, level on the D-pin judges whether to be connected to main frame;
If change, prove that this USB controller is inserted into main frame, then S102, read the level signal of described VBUS pin by IO interface; S103, judge when described level signal is high value, send the message that enters slave mode to the USB state machine; And the effective message of VBUS state sent to described USB state machine;
If do not change, S105, receive the instruction that enters Host Status, S106, send the message that enters host mode to described USB state machine; S107, be the power supply of described VBUS pin, and the voltage transitions of will described first IO interface exporting is to satisfy the voltage of USB standard by described first IO interface; S108, the effective message of VBUS state is sent to described USB state machine.
This enters the instruction of Host Status, can be the user by touch, means inputs such as button, menu.
Send the message that enters slave mode to the USB state machine, be specifically as follows: first register to USB controller inside writes first predetermined value; Send the message that enters host mode to the USB state machine, be specifically as follows: first register to USB controller inside writes second predetermined value; The effective message of VBUS state is sent to described USB state machine, be specifically as follows: second register to described USB controller inside writes the 3rd predetermined value; Predetermined value can be pre-set, and in a preferred embodiment, first predetermined value can be a low level value, and second predetermined value can be a high value, and the 3rd predetermined value can be a high value.This first register and second register can be same register in actual applications.
USB controller among this embodiment as Fig. 9, comprising:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes, if change, reads the level signal of described VBUS pin by second IO interface;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module, be connected with receiver module with described detection module, be used for when described detection module judges that the level signal of described VBUS pin is high value, send the message that enters slave mode, and the effective message of VBUS state is sent to described USB state machine to the USB state machine;
And when described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described first IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described first IO interface output, the effective message of VBUS state is sent to described USB state machine.
Embodiment two
Among this embodiment, described USB controller such as Fig. 6, the USB controller is provided with IO interface GPIO, D+ pin, D-pin and GND pin, wherein be packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the IO interface GPIO of described USB controller is connected with VBUS pin on the described socket; Outside socket can use following six kinds: standard-A, standard-B, Mini-A, Mini-B, Mini-AB, and any self-defining socket that comprises D+ pin, D-pin; This GPIO can be the general programmable input/output port, perhaps the I2C bus.
The method that this USB controller connects as Fig. 2, comprises step:
Insert described socket as the USB line, whether the level of S201, the described D+ pin of detection and D-pin changes; When the USB line on main frame inserts, because the D+ of host side, the pull down resistor that there is 15K in the D-pin, simultaneously owing to there be weak the driving on the D+ pin of USB controller of the present invention and the D-pin, so can be by detecting D+, level on the D-pin judges whether to be connected to main frame;
If change, prove that this USB controller is inserted into main frame, then S202, send the message enter slave mode to the USB state machine; S203, the effective message of VBUS state is sent to described USB state machine;
If do not change, S204, receive the instruction that enters Host Status, S205, send the message that enters host mode to described USB state machine; S206, be the power supply of described VBUS pin, and be to satisfy the voltage of USB standard the voltage transitions of described IO interface output by described IO interface; S207, the effective message of VBUS state is sent to described USB state machine.
This enters the instruction of Host Status, can be the user by touch, means inputs such as button, menu, be provided with by software then that relevant register realizes.
Send the message that enters slave mode to the USB state machine, be specifically as follows: first register to USB controller inside writes first predetermined value; Send the message that enters host mode to the USB state machine, be specifically as follows: first register to USB controller inside writes second predetermined value; The effective message of VBUS state is sent to described USB state machine, be specifically as follows: second register to described USB controller inside writes the 3rd predetermined value; Predetermined value can be pre-set, and in a preferred embodiment, first predetermined value can be a low level value, and second predetermined value can be a high value, and the 3rd predetermined value can be a high value.This first register and second register can be same register in actual applications.
This USB controller as Fig. 9, comprising:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for when the level of described D+ pin and D-pin changes, and sends the message that enters slave mode to the USB state machine, and the effective message of VBUS state is sent to described USB state machine;
And when described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, with the voltage transitions of described IO interface output is to satisfy the voltage of USB standard, and the effective message of VBUS state sends to described USB state machine.
Embodiment three
Among this embodiment, described USB controller such as Fig. 7, the USB controller is provided with IO interface GPIO, D+ pin, D-pin and GND pin, wherein be packaged with VBUS pin, D+ pin and D-pin, be connected with VBUS pin, D+ pin and D-pin on the socket successively, the IO interface GPIO of described USB controller is connected with VBUS pin on the described socket; Outside socket can use following six kinds: standard-A, standard-B, Mini-A, Mini-B, Mini-AB, and any self-defining socket that comprises D+ pin, D-pin; This GPIO can be the general programmable input/output port, perhaps the I2C bus.
The method that this USB controller connects as Fig. 3, comprises step:
Insert described socket as the USB line, whether the level of S301, the described D+ pin of detection and D-pin changes; When the USB line on main frame inserts, because the D+ of host side, the pull down resistor that there is 15K in the D-pin, simultaneously owing to there be weak the driving on the D+ pin of USB controller of the present invention and the D-pin, so can be by detecting D+, level on the D-pin judges whether to be connected to main frame;
If change, prove that this USB controller is inserted into main frame, then S302, when the VBUS pin is high value, send the message enter slave mode to the USB state machine;
If do not change, S303, receive the instruction that enters Host Status, S304, send the message that enters host mode to described USB state machine; S305, be the power supply of described VBUS pin, and be to satisfy the voltage of USB standard the voltage transitions of described IO interface output by described IO interface;
This enters the instruction of Host Status, can be the user by touch, means inputs such as button, menu.
Send the message that enters slave mode to the USB state machine, be specifically as follows: first register to USB controller inside writes first predetermined value; Send the message that enters host mode to the USB state machine, be specifically as follows: first register to USB controller inside writes second predetermined value; Predetermined value can be pre-set, and in a preferred embodiment, first predetermined value can be a low level value, and second predetermined value can be a high value.This first register and second register can be same register in actual applications.
USB controller among this embodiment as Fig. 9, comprising:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, when the level that is used for described D+ pin and D-pin does not change, receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, be used for when the level of described D+ pin and D-pin changes, and the level signal of described VBUS pin sends the message that enters slave mode when being high value to the USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard;
Embodiment four
Among this embodiment, described USB controller such as Fig. 8, the USB controller is provided with IO interface GPIO, D+ pin, D-pin, ID pin and GND pin, wherein be packaged with ID pin, D+ pin and D-pin, be connected with ID pin, D+ pin and D-pin on the socket successively, the IO interface GPIO of described USB controller is connected with VBUS pin on the described socket; Outside socket can use following six kinds: Mini-A, Mini-B, Mini-AB, and any self-defining socket that comprises D+ pin, D-pin; This GPIO can be the general programmable input/output port, perhaps the I2C bus.
The method that this USB controller connects as Fig. 4, comprises step:
Insert described socket as the USB line, whether the level of S401, the described D+ pin of detection and D-pin changes; When the USB line on main frame inserts, because the D+ of host side, the pull down resistor that there is 15K in the D-pin, simultaneously owing to there be weak the driving on the D+ pin of USB controller of the present invention and the D-pin, so can be by detecting D+, level on the D-pin judges whether to be connected to main frame;
If change, prove that this USB controller is inserted into main frame, then S402, when the ID pin is high value, the effective message of VBUS state is sent to the USB state machine;
If do not change, S403, when the ID pin is low level value is described VBUS pin power supply by described IO interface, and is to satisfy the voltage of USB standard with the voltage transitions of described IO interface output;
S404, send the effective message of VBUS state to described USB state machine.
Send the effective message of VBUS state to described USB state machine, be specifically as follows: the register to USB controller inside writes predetermined value; This predetermined value can be pre-set, can be high value or low level value.
USB controller among this embodiment as Fig. 9, comprising:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for changing at the level of described D+ pin and D-pin, and when the level signal of described ID pin is high value, the effective information of VBUS state is sent to the USB state machine;
And receive the instruction that enters Host Status at described receiver module, and when the level signal of described ID pin is low level value, by described IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described IO interface output, the effective information of VBUS state is sent to the USB state machine.
In sum, the method that USB controller of the present invention connects, can whether change by the level of described D+ pin of software detection and D-pin, send the message that enters slave mode or host mode to the USB state machine according to actual needs, perhaps the effective message of VBUS state is sent to described USB state machine; The USB state machine is according to the message that receives, normally discern the role and finish connection procedure, do not need hardware detecting circuit to send host mode, slave mode message or the effective message of VBUS state, can reduce the complexity of hardware detecting circuit to the USB state machine.And the dedicated pin of described USB controller encapsulation can be D+, D-pin, also can be D+, D-, VBUS pin, can also be D+, D-, ID pin, lacks than the dedicated pin that USB controller of the prior art need encapsulate, package area is also smaller accordingly, has saved packaging cost.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (12)

1. the method that connects of a USB controller, described USB controller is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, first IO interface of described USB controller and second IO interface are connected with VBUS pin on the described socket respectively;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, read the level signal of described VBUS pin by second IO interface, when judging that described level signal is high value, send the message that enters slave mode to the USB state machine; And the effective message of VBUS state sent to described USB state machine;
If do not change,, send the message that enters host mode to described USB state machine when receiving the instruction that enters Host Status; By described first IO interface is the power supply of described VBUS pin, and the voltage transitions of will described first IO interface exporting is to satisfy the voltage of USB standard, and the effective message of VBUS state is sent to described USB state machine.
2. method according to claim 1. it is characterized in that: send the message that enters slave mode to the USB state machine, be specially: first register to USB controller inside writes first predetermined value;
Send the message that enters host mode to the USB state machine, be specially: first register to described USB controller inside writes second predetermined value;
The effective message of VBUS state is sent to described USB state machine, be specially: second register to USB controller inside writes the 3rd predetermined value.
3. the method that connects of a USB controller, described USB controller is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, sends the message that enters slave mode to the USB state machine; And the effective message of VBUS state sent to described USB state machine;
If do not change,, send the message that enters host mode to the USB state machine when receiving the instruction that enters Host Status; By described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard, and the effective message of VBUS state is sent to described USB state machine
4. method according to claim 3. it is characterized in that: send the message that enters slave mode to the USB state machine, be specially: first register to USB controller inside writes first predetermined value;
Send the message that enters host mode to the USB state machine, be specially: first register to described USB controller inside writes second predetermined value;
The effective message of VBUS state is sent to described USB state machine, be specially: second register to USB controller inside writes the 3rd predetermined value.
5. the method that connects of a USB controller, described USB controller is packaged with D+ pin, D-pin and VBUS pin, be connected with D+ pin, D-pin and VBUS pin on the socket successively, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, and when the level signal of described VBUS pin is high value, sends the message that enters slave mode to the USB state machine;
If do not change,, send the message that enters host mode to described USB state machine when receiving the instruction that enters Host Status; By described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard.
6. method according to claim 5. it is characterized in that: send the message that enters slave mode to the USB state machine, be specially: first register to USB controller inside writes first predetermined value;
Send the message that enters host mode to the USB state machine, be specially: first register to described USB controller inside writes second predetermined value.
7. the method that connects of a USB controller, described USB controller is packaged with D+ pin, D-pin and ID pin, be connected with D+ pin, D-pin and ID pin on the socket successively, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described method comprises:
Whether the level that detects described D+ pin and D-pin changes, if change, and when the level signal of described ID pin is high value, the effective information of VBUS state is sent to the USB state machine;
If do not change, and when the level signal of described ID pin is low level value, by described IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described IO interface output, the effective information of VBUS state is sent to the USB state machine.
8. method according to claim 7. it is characterized in that: the effective information of VBUS state is sent to the USB state machine, be specially: first register to USB controller inside writes first predetermined value.
9. USB controller, it is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, first IO interface of described USB controller and second IO interface are connected with VBUS pin on the described socket respectively;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes, if change, reads the level signal of described VBUS pin by second IO interface;
Receiver module is connected with described detection module, is used to receive the instruction that enters Host Status;
Sending module, be connected with receiver module with described detection module, be used for when described detection module judges that the level signal of described VBUS pin is high value, send the message that enters slave mode, and the effective message of VBUS state is sent to described USB state machine to the USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described first IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described first IO interface output, the effective message of VBUS state is sent to described USB state machine;
10. USB controller, it is packaged with D+ pin and D-pin, successively with socket on the D+ pin be connected with the D-pin, the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for when the level of described D+ pin and D-pin changes, and sends the message that enters slave mode to the USB state machine, and the effective message of VBUS state is sent to described USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, with the voltage transitions of described IO interface output is to satisfy the voltage of USB standard, and the effective message of VBUS state sends to described USB state machine.
11. a USB controller, it is packaged with D+ pin, D-pin and VBUS pin, is connected with D+ pin, D-pin and VBUS pin on the socket successively, and the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, when the level that is used for described D+ pin and D-pin does not change, receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, be used for when the level of described D+ pin and D-pin changes, and the level signal of described VBUS pin sends the message that enters slave mode when being high value to the USB state machine;
When described receiver module receives the instruction that enters Host Status, send the message that enters host mode to described USB state machine, by described IO interface is described VBUS pin power supply, and the voltage transitions that described IO interface is exported is to satisfy the voltage of USB standard.
12. a USB controller, it is packaged with D+ pin, D-pin and ID pin, is connected with D+ pin, D-pin and ID pin on the socket successively, and the IO interface of described USB controller is connected with VBUS pin on the described socket;
Described USB controller comprises:
Detection module, whether the level that is used to detect described D+ pin and D-pin changes;
Receiver module is connected with described detection module, is used for when the level of described D+ pin and D-pin does not change, and receives the instruction that enters Host Status;
Sending module is connected with receiver module with described detection module, is used for changing at the level of described D+ pin and D-pin, and when the level signal of described ID pin is high value, the effective information of VBUS state is sent to the USB state machine;
Receive the instruction that enters Host Status at described receiver module, and when the level signal of described ID pin is low level value, by described IO interface is described VBUS pin power supply, and be to satisfy the voltage of USB standard with the voltage transitions of described IO interface output, the effective information of VBUS state is sent to the USB state machine.
CN2009101923427A 2009-09-14 2009-09-14 Method for connecting USB controller and USB controller Withdrawn CN102023955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101923427A CN102023955A (en) 2009-09-14 2009-09-14 Method for connecting USB controller and USB controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101923427A CN102023955A (en) 2009-09-14 2009-09-14 Method for connecting USB controller and USB controller

Publications (1)

Publication Number Publication Date
CN102023955A true CN102023955A (en) 2011-04-20

Family

ID=43865267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101923427A Withdrawn CN102023955A (en) 2009-09-14 2009-09-14 Method for connecting USB controller and USB controller

Country Status (1)

Country Link
CN (1) CN102023955A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335311A (en) * 2014-07-04 2016-02-17 纬创资通股份有限公司 Portable electronic device and power management method
CN109522258A (en) * 2018-10-18 2019-03-26 芜湖智久机器人有限公司 USB interface, electronic equipment, USB interface-based programming system and its method
US10303633B2 (en) 2014-09-15 2019-05-28 Micro Motion, Inc. Method and apparatus to control a mode of a device
CN115237235A (en) * 2022-09-22 2022-10-25 珠海智融科技股份有限公司 USB equipment shift-out identification circuit and method and power supply system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335311A (en) * 2014-07-04 2016-02-17 纬创资通股份有限公司 Portable electronic device and power management method
US10303633B2 (en) 2014-09-15 2019-05-28 Micro Motion, Inc. Method and apparatus to control a mode of a device
CN109522258A (en) * 2018-10-18 2019-03-26 芜湖智久机器人有限公司 USB interface, electronic equipment, USB interface-based programming system and its method
CN115237235A (en) * 2022-09-22 2022-10-25 珠海智融科技股份有限公司 USB equipment shift-out identification circuit and method and power supply system

Similar Documents

Publication Publication Date Title
CN100495377C (en) Method for inspecting type of connected peripheral apparatus and terminal interface
KR101374638B1 (en) Mobile device auto detection apparatus and method
US8554977B2 (en) Integrated circuits for accessing USB device
CN103019991B (en) Interface system and changing method, USB key and UART terminal
KR20090004508A (en) Pci express interface apparatus
US20070180181A1 (en) USB interface provided with host/device function and its control method
CN102087624B (en) Circuit structure and method for realizing USB interface functional verification test on the basis of FPGA module
CN105335311A (en) Portable electronic device and power management method
CN105677420A (en) Method and device for interface pin configuration
CN104063348B (en) Realize the device and method of compatible USB communications and voice communication
CN103095855A (en) I2C communication interface unit
CN105183679A (en) Electronic device and information processing method
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN105868140A (en) A mobile apparatus
CN101339542B (en) Data transmission device, control circuit chip and operation mode control method
CN102023955A (en) Method for connecting USB controller and USB controller
WO2021227635A1 (en) Usb interface switching apparatus, usb interface switching method, and terminal device
CN212112455U (en) Type-c interface circuit, chip and electronic equipment
CN100447700C (en) Multi-function portable device for electronic processors
CN107153456A (en) OTG connections control method, OTG connection control devices and electronic equipment
CN111858422A (en) Integrated interface and electronic device with same
CN211180806U (en) Debugging serial port circuit based on HDMI interface, HDMI interface module and HDMI equipment
CN104123257A (en) Universal serial bus devices, communication method, and computer readable storage medium
CN103311766A (en) Mobile equipment switching device and working mode switching method thereof
CN112821156A (en) Electronic tags chip and TYPE-C data line

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C04 Withdrawal of patent application after publication (patent law 2001)
WW01 Invention patent application withdrawn after publication

Open date: 20110420