Questions tagged [usb]

USB is Universal Serial Bus. If your question relates to a specific chip, please mention it in your question.

The Universal Serial Bus (USB) is a 4-wire bus that supports communication between a host and one or more (up to 127) peripherals. The host controller allocates the USB bandwidth to attached devices through a token-based protocol. The bus supports hot-plugging and dynamic configuration of the devices. All transactions are initiated by the host controller. (source)

The standard specifies the connectors, cables, and protocols used on the bus.

USB has different speed classes: Low Speed (1.5 Mbps), Full Speed (12 Mbps), High Speed (480 Mbps), and Super Speed (up to 5 Gbps). Low speed and full speed have existed from the initial versions of the specification, while high speed was introduced with USB 2.0 and super speed was introduced with USB 3.0.

The specification has undergone several major revisions since its official release in 1995, the latest being USB 3.0.

Logically, USB implements a tree-structured master-slave bus. However, each physical connection is point-to-point between a host or upstream port and a device or downstream port.

Further reading:

3430 questions
223
votes
7 answers

Why was Mini USB deprecated in favor of Micro USB?

Mini USB connectors were standardized as part of USB 2.0 in 2000. In 2007, the USB Implemeters Forum standardized Micro USB connectors, deprecating Mini USB connectors four months later. Why? What are the advantages of Micro USB over Mini USB that…
Dan Fabulich
  • 2,131
  • 2
  • 13
  • 6
198
votes
8 answers

Why does USB have 4 lines instead of 3?

USB specifies 4 pins: 1. VBUS +5V 2. D- Data- 3. D+ Data+ 4. GND Ground Why is this not 3? Could the Data and Power not share a common ground? Am I correct in understanding that D- is the ground for D+?
Mark Harrison
  • 10,419
  • 27
  • 68
  • 95
126
votes
7 answers

What measures should I take to protect the USB ports of my PC during development of a USB device?

I'm going to start developing a USB 1.1 device using a PIC microcontroller. I'm going to keep one of the USB ports of my PC connected to a bread board during this process. I don't want to destroy my PC's USB port by a short circuit or connecting…
hkBattousai
  • 13,913
  • 31
  • 114
  • 190
123
votes
7 answers

Why does micro USB 2.0 have 5 pins, when the A-type only has 4?

What is the extra, 5th, pin on micro usb 2.0 adapters for? Here is an image with the different connectors. Most of them have 5 pins, but the A-type host only has four. (source: wikimedia.org)
Sponge Bob
  • 5,193
  • 16
  • 46
  • 64
94
votes
10 answers

How to get more than 100mA from a USB port

I heard that the current limit for a USB port is 100mA. However, I also heard that some devices can get up to 1.8A from a port. How do you get past the 100mA limit?
200ok404notfound
  • 1,594
  • 3
  • 15
  • 22
77
votes
13 answers

How to connect USB Connector shield?

How should I route USB Connector shield on PCB? Should it be connected to GND plane right where USB is placed, or should the shield be isolated from GND, or should it be connected to ground through ESD protection chip, high resistance resistor or…
Andrzej H
  • 975
  • 1
  • 8
  • 7
74
votes
3 answers

What is the ideal way to handle data pins D+ and D- on a USB power adapter to be compatible with fast charging on devices?

I have found that many USB wall chargers use a resistive voltage divider to set the D+ and D- pins to a specific voltage, usually between 2 and 3 volts. Other USB wall chargers short the D+ and D- pins together with no connection to anything else. …
59
votes
2 answers

In a USB cable, is it OK to swap the D+ and D- wires?

I heard that D+ and D- are differential signals, does it matter if I swap them when connecting a USB device to the computer?
Yan King Yin
  • 701
  • 1
  • 5
  • 6
58
votes
8 answers

Can an Android tablet serve as USB Host and be charged simultaneously through a single port?

A number of Android tablets are powered through the Micro B USB port but also provide USB Host support through the same port (e.g. Motorola Xoom 2, Acer A510/700). I need to be able to use USB Host support while charging, at the full power the…
John Beatty
  • 681
  • 1
  • 5
  • 3
53
votes
2 answers

Why are USB devices slower than 480 MBit/s

Motivation With a signaling rate of 480 MBit/s USB 2.0 devices should be able to transmit data with up to 60 MB/s. However today's devices seem to be limited to 30-42 MB/s while reading [Wiki:USB]. That is a 30 percent overhead. USB 2.0 has been a…
Chris
  • 671
  • 1
  • 6
  • 7
50
votes
8 answers

How can I tell charge-only USB cables from USB data cables?

Like most computer hobbyists and programmers, I've amassed boxes of USB cables to connect USB, Micro-USB, and Mini-USB to chargers, computers, and gadgets. These cables are a mix of phone charger cables, and cables that came with external hard…
Benzo
  • 603
  • 1
  • 5
  • 5
44
votes
8 answers

USB Shield. To ground or not to ground?

I have been given a device at work to do some testing on. Basically an IC is becoming obsolete so I need to test a replacement part. Upon redoing the ESD checks, the device failed. I checked the history of the device, and there were problems…
MCG
  • 11,809
  • 4
  • 34
  • 70
39
votes
6 answers

Switch between 5V power supplies?

I'm designing a board that can be powered either by USB or an ATX power supply. They can both be plugged in at the same time, independently. I'd like the ATX to provide 5V if its plugged in, but fall back to the USB if possible. The chips in the…
Zach Hoeken
39
votes
2 answers

How does a USB C port provide the power to charge laptops?

I've heard about laptops such as the new Chromebooks that are charged via a wall charger that connects to a USB-C port. I'm quite happy that this will supposedly standardize laptop chargers but I'm a little unclear about how this works. Existing…
ZeroKelvinKeyboard
  • 571
  • 2
  • 5
  • 5
38
votes
10 answers

What are some smallest, cheapest microcontrollers with USB built in?

The cheaper, smaller, and fewer external components needed the better. AVR would be preferred, but anything with free SDKs is good.
tlrobinson
  • 549
  • 1
  • 4
  • 5
1
2 3
99 100