Editing
USB
(section)
From Deskthority Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Topology== Each USB bus is controlled by its host. Unlike e.g. PS/2 where a device sends bytes whenever it has input, a USB device talks only when asked by the host: this is often referred to as "polling". When a device is connected, the device responds with its requirements: its power requirements, what kinds of interface it has, and what speeds those want to run on. The host then decides how to configure the device β or to ''not'' configure it. ===Power management=== A device has to request for the amount of power to use when it has been configured. The limit is 500 mA.<ref group="footnote">"Default power" of 500 mA is for USB 2.0 devices. USB 3.0 devices and later could draw up to 900 mA but HID devices that declare themselves as being more than USB 2.0 are very rare. A power source could provide more power, but more than default is not guaranteed, even over USB Type C.</ref> An unconfigured device is not allowed to draw more than 100 mA. A host could also put a USB bus into "suspend" mode, at which time all devices on the bus (configured or not) are required to go into suspend mode themselves. A suspended device is not allowed to draw more than 2.5 mA. Many devices break these rules however, especially firmware for DIY keyboards. For instance PJRC's USB code for AVR [[Keyboard controller|microcontrollers]] ([[Teensy]] 2.0) did not originally support suspend mode, and many keyboards with [[backlighting]] and/or [[underglow]] are lit before they have been configured. ===Hubs=== USB does not have daisy-chaining (like [[ADB]]) but allows tree-shaped networks with a "hub" in each node. When a device has one or more external ports, either the device itself and its ports are all under the hub or the port is a ''pass-through'' through the device cable to a separate plug on the host side.<ref group="footnote">Some keyboards carry passthrough not only for a second USB bus but also for analogue headphone and microphone jacks.</ref> A hub can be powered or not powered. On a non-powered hub over USB 2.0 devices must share 500 mA power from the host between them (and the hub itself). This can cause problems with some [[backlit keyboard]]s that request all the power. ===Logical interfaces=== USB allows a peripheral device to expose multiple logical ''interfaces'', to perform multiple roles. For instance, a peripheral could be both a keyboard and a mouse, or a keyboard and a storage device, each on a separate logic interface.<ref group="footnote">One device known to actually be both a keyboard and a storage device is the [[Kinesis Advantage 2]], where the storage device is used for changing the keyboard's firmware and settings</ref>
Summary:
Please note that all contributions to Deskthority Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
Edit source
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Deskthority forum
Support Deskthority
Search
Main categories
Guides
Keyboards
Keyboard switches
Keycaps
Keyboard modding
Pointing devices
Brands & companies
Group buys
Other topics
Wiki info & links
Recent changes
Random page
All pages
Deskthority wiki help
MediaWiki help
Tools
What links here
Related changes
Special pages
Page information