Logo USB

The Universal Serial Bus (USB) bus

#Universal #Serial #Bus #USB #bus

  • Introducing the USB channel

  • What are the USB standards

  • What are the types of connectors

  • How the USB bus works

Introducing the USB channel

The channel USB (Universal Serial Bus) is based, as its name implies, on a serial type architecture. However, it is a much faster input / output interface than standard serial ports. The serial architecture was used for this type for two main reasons: it offers the user a much higher speed than the parallel interface, since it does not support very high frequencies (in high-speed architecture, the bits that circulate through each wire arrive late , causing errors), and serial cables are much cheaper than parallel cables.

What are USB standards

As of 1995, the USB standard was developed to connect a wide variety of devices. The standard USB 1.0 proposes two modes of communication: 12 Mb / s in high speed mode and 1.5 Mb / s in low speed.

The standard USB 1.1 offers some clarification to the manufacturers of USB devices but does not change the speed. USB 1.1 certified devices have the following logo:

USB logo

The USB 2.0 standard allows speeds of up to 480 Mbit / s to be achieved. Devices certified to the USB 2.0 standard bear this logo:

USB 2.0 logo

In the absence of a logo, the best way to determine if they are high-speed or low-speed USB peripherals is to consult the product documentation when the connectors are the same.

Compatibility between USB 1.0, 1.1 and 2.0 devices is guaranteed. However, using a USB 2.0 device on a low speed USB port (ie 1.0 or 1.1) will limit the speed to a maximum of 12 Mbit / s. Sometimes, the operating system displays a message that explains that the speed will be restricted.

What are the types of connectors

There are three types of USB connectors: the connectors type A, which are rectangular in shape and serve for devices that do not require broadband (keyboard, mouse, webcam) and connectors type B, whose shape is square and are used mainly for high-speed devices (external hard drives, for example) and type C that don’t have a right side to be inserted. They are reversible and smaller compared to type A and B (8.4 mm x 2.6 mm) and it is precisely for this reason that they have been establishing themselves as the standard for mobile devices, due to the compatibility with micro-USB ports. 2.0, present in most smartphones, for example:

USB type A and B connectors

Representation of the USB type C connector:

How the USB bus works

A feature of the USB architecture is to provide the power supply to the devices it connects to, with a maximum limit of 15 W per device. In order to do this, he uses a cable with four wires (GND ground, VBUS power and two data wires called D- and D +):

the USB cable

The USB standard allows devices to be connected using a bus or star topology. The devices can then be connected in a chain or branched fashion.

Branching is done with the help of boxes called hubs, comprising a single entry and several exits. Some are active (that is, they provide electricity) and others are passive (energy is provided by the computer):

bus topology of USB ports

Star USB port topology

The communication between the computer (host) and the devices is done according to a protocol based on the principle of token ring. This means that broadband is temporarily shared between all connected devices. The host emits a signal to start the sequence for each millisecond, a time interval in which it will offer each device the opportunity to ‘speak’.

When the host wants to communicate with a device, it transmits a network (data packet containing the device address encoded in 7 bits) that designates a device in such a way that it is the host that decides to ‘talk’ to the devices.

If the device recognizes its address on the network, it will send a data packet (between 8 and 255 bytes) in response. On the other hand, it forwards the packet to the other connected devices. The data exchanged in this way will be encoded according to NRZI encoding.

As the address was encoded in 7 bits, 128 devices (2 ^ 7) can be connected simultaneously to a port of this type. In fact, it is recommended to reduce this amount to 127 because address 0 is a reserved address (see below).

With a maximum cable length of five meters between two devices and the maximum number of five hubs, it is possible to create a chain of up to 25 meters.

USB ports support devices Hot Plug and Play. Thus, the devices can be connected without turning off the computer. When a device is connected to the host, the latter detects the addition of the new element by changing the voltage between the D + and D- wires.

At this point, the computer sends a startup signal to the device for 10 milliseconds and then supplies power through the GND and VBUS wires (up to 100 mA). The device is then powered by electric current and temporarily retrieves the default address (address 0).

The next step is to provide the final address (enumeration procedure). For this, the computer interrogates the devices already connected to know their addresses and assigns a new one, which in turn, identifies it. When the host has all the necessary requirements, it can load the appropriate driver.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *