Menu
Is free
check in
the main  /  Navigators / Universal USB sequential bus. Consecutive USB Bus Serial Bus Tires

Universal USB sequential bus. Consecutive USB Bus Serial Bus Tires

Explanatory dictionary on computing systems determines the concept of the interface (Interface) as the border of the section of two systems, devices or programs; Connection elements and auxiliary control circuits used to connect devices. We will talk about interfaces that allow you to connect a variety of peripheral devices and their controllers to personal (and not only) computers. By the method of transmitting information, the interfaces are divided into parallel and consistent. In the parallel interface, all bits of the transmitted word (usually byte) are set and transmitted according to the corresponding parallel going wires simultaneously. The PC traditionally uses the CENTRONICS parallel interface implemented by LPT ports. In the sequential interface, the bits are transmitted by each other, usually one line. COM ports PC provide a serial interface in accordance with the RS-232C standard. When considering interfaces an important parameter is bandwidth.

In the architecture of modern computers, external tires that serve to connect various devices are becoming increasingly important. Today it can be, for example, external hard Disks, CD-, DVD devices, scanners, printers, digital cameras, etc.

A widely used serial interface of synchronous and asynchronous data transmission.

2. Shine USB. Single characteristic.

USB (Universal Serial Bus - Universal Serial Tire) is an industrial standard for expanding the PC architecture oriented with telephony and devices household electronics. Version 1.0 was published in January 1996. The USB architecture is determined by the following criteria:

    Easily implemented expansion of PC peripherals.

    A cheap solution that supports the transfer rate to 12 Mbps.

    Full support in real-time audio and (compressed) video data.

    Flexibility of the mixed transmission protocol of isochronous data and asynchronous messages.

    Integration with manufactured devices.

    Availability in PC of all configurations and sizes.

    Security standard interfacecapable of quickly conquer the market.

    Creating new classes of devices expanding PC.

    From the point of view of the end user, the following USB features are attractive:

    Easy cable system and connections.

    Hiding the details of the electrical connection from the end user.

    Self-identifying PU, automatic communication of devices with drivers and configuration.

    The ability to dynamically connect and configure PU.

Since mid-1996, PC is available with a built-in USB controller implemented by the chipset. Modems, keyboards, scanners, speakers, and other I / O devices with USB support are already appeared, as well as monitors with USB adapters - they play the role of hubs to connect other devices.

USB structure

USB provides simultaneous data exchange between the host computer and multiple peripheral devices (PU). The distribution of the bandwidth of the tire between the PU is planned by the host and is implemented by it by sending markers. The bus allows you to connect, configure, use and disconnect the devices while the host works and the devices themselves.

The following is a copyright transfer of terms from the "Universal Serial Bus Specification" specification, published by COMPAQ, DEC, IBM, Intel, Microsoft, NEC and Northern Telecom. More detailed and prompt information can be found at:

USB devices (Device) may be hubs, features or combination thereof. Hub (HUB) provides additional connectivity points to the bus. USB function (Function) provide system additional features, such as connection to ISDN, digital joystick, acoustic speakers with digital interface etc. USB device Must have a USB interface that provides full support for the USB protocol, performing standard operations (configuration and reset) and providing information describing the device. Many devices connected to USB have in their composition and hub, and functions. The operation of the entire USB system controls the host controller (Host Controller), which is a software and hardware host computer.

The physical connection of devices is carried out on the topology of a multi-tiered star. The center of each star is a hub, each cable segment connects two points - a hub with another hub or with a function. The system has one (and only one) host controller, located in the top of the pyramid of devices and hubs. The host controller is integrated with the root hub (root hub), providing one or more connection points - ports. The USB controller, which is part of the chipsets, usually has a built-in double-port hub. Logically, a device connected to any USB hub and configured (see below) may be considered as directly connected to the host controller.

Functions are devices that can transmit or receive data or control information on the bus. Typically features are separate PU with cable connected to the port of the hub. Physically, one case may have several functions with a built-in hub, providing them to connect to one port. These combined host devices are hubs with constantly connected function devices.

Each function provides configuration information that describes the possibilities of PU and resource requirements. Before use, the function must be configured by the host - it must be highlighted in the channel and the configuration options are selected.

Examples of functions are:

    Pointers - Mouse, Tablet, Light Feather.

    Input devices - keyboard or scanner.

    Output device - printer, audio columns (digital).

    ISDN telephone adapter.

Hub is a key element of the RPR system in the USB architecture. Hub is a cable hub. Connection points are called the hub ports. Each hub converts one point of connection in their set. Architecture allows a connection of several hubs.

Each hub has one upstream port, designed to connect to a host or high-level hub. The remaining ports are descending (downstream ports) designed to connect functions or lower level hubs. Hub can recognize the connection of devices to ports or shutdown from them and control the power supply to their segments. Each ports can be allowed or prohibited and configured to complete or limited metabolism. The hub provides isolation of low speed segments from high-speed.

Hubs can control the supply of downstream ports; It is envisaged to install a current limitation consumed by each port.

The USB system is divided into three levels with certain interaction rules. The USB device contains an interface part, part of the device and the functional part. The host is also divided into three parts - interface, systemic and devices. Each part meets only for a certain range of tasks, logical and real interaction between them illustrates Fig. 7.1.

The structure under consideration includes the following elements:

    The USB physical device is a device on the bus that performs the functions of interest to the end user.

    Client SW - software corresponding to a specific device executed on the host computer. May be part of OS or special product.

    USB SYSTEM SW - USB system support, independent of specific devices and client software.

    USB HOST CONTROLLER - hardware and software To connect USB devices to the host computer.

Lecture 11. Universal USB serial bus.

Explanatory dictionary on computing systems determines the concept of the interface (Interface) as the border of the section of two systems, devices or programs; Connection elements and auxiliary control circuits used to connect devices. We will talk about interfaces that allow you to connect a variety of peripheral devices and their controllers to personal (and not only) computers. By the method of transmitting information, the interfaces are divided into parallel and consistent. In the parallel interface, all bits of the transmitted word (usually byte) are set and transmitted according to the corresponding parallel going wires simultaneously. The PC traditionally uses the CENTRONICS parallel interface implemented by LPT ports. In the sequential interface, the bits are transmitted by each other, usually one line. COM ports PC provide a serial interface in accordance with the RS-232C standard. When considering interfaces, an important parameter is bandwidth.

In the architecture of modern computers, external tires that serve to connect are increasingly acquired. various devices. Today it can be, for example, external hard drives, CD-, DVD devices, scanners, printers, digital cameras etc.

A widely used serial interface of synchronous and asynchronous data transmission.

2. Shine USB. Single characteristic.

USB Universal Serial Bus - a universal sequential tire) is an industrial standard for expanding the PC architecture, integrating with telephony and appliances of consumer electronics. Version 1.0 was published in January 1996. The USB architecture is determined by the following criteria:

    Easily implemented expansion of PC peripherals.

    A cheap solution that supports the transfer rate to 12 Mbps.

    Full support in real-time audio and (compressed) video data.

    Flexibility of the mixed transmission protocol of isochronous data and asynchronous messages.

    Integration with manufactured devices.

    Availability in PC of all configurations and sizes.

    Providing a standard interface capable of quickly conquer the market.

    Creating new classes of devices expanding PC.

    From the point of view of the end user, the following USB features are attractive:

    Easy cable system and connections.

    Hiding the details of the electrical connection from the end user.

    Self-identifying PU, automatic communication of devices with drivers and configuration.

    The ability to dynamically connect and configure PU.

Since mid-1996, PC is available with a built-in USB controller implemented by the chipset. Modems, keyboards, scanners, speakers, and other I / O devices with USB support are already appeared, as well as monitors with USB adapters - they play the role of hubs to connect other devices.

USB structure

USB provides simultaneous data exchange between the host computer and multiple peripheral devices (PU). The distribution of the bandwidth of the tire between the PU is planned by the host and is implemented by it by sending markers. The bus allows you to connect, configure, use and disconnect the devices while the host works and the devices themselves.

The following is a copyright transfer of terms from the "Universal Serial Bus Specification" specification, published by COMPAQ, DEC, IBM, Intel, Microsoft, NEC and Northern Telecom. More detailed and prompt information can be found at:

USB devices (Device) may be hubs, features or combination thereof. Hub (HUB) provides additional connectivity points to the bus. USB Functions (Function) provide system additional features, such as connecting to ISDN, digital joystick, acoustic speakers With a digital interface, etc. The USB device must have a USB interface that provides full support for the USB protocol, performing standard operations (configuration and reset) and providing information describing the device. Many devices connected to USB have in their composition and hub, and functions. The operation of the entire USB system controls the host controller (Host Controller), which is a software and hardware host computer.

The physical connection of devices is carried out on the topology of a multi-tiered star. The center of each star is a hub, each cable segment connects two points - a hub with another hub or with a function. The system has one (and only one) host controller, located in the top of the pyramid of devices and hubs. The host controller is integrated with the root hub (root hub), providing one or more connection points - ports. The USB controller, which is part of the chipsets, usually has a built-in double-port hub. Logically, a device connected to any USB hub and configured (see below) may be considered as directly connected to the host controller.

Functions are devices that can transmit or receive data or control information on the bus. Typically features are separate PU with cable connected to the port of the hub. Physically, one case may have several functions with a built-in hub, providing them to connect to one port. These combined host devices are hubs with constantly connected function devices.

Each function provides configuration information that describes the possibilities of PU and resource requirements. Before use, the function must be configured by the host - it must be highlighted in the channel and the configuration options are selected.

Examples of functions are:

    Pointers - Mouse, Tablet, Light Feather.

    Input devices - keyboard or scanner.

    Output device - printer, audio columns (digital).

    ISDN telephone adapter.

Hub is a key element of the RPR system in the USB architecture. Hub is a cable hub. Connection points are called the hub ports. Each hub converts one point of connection in their set. Architecture allows a connection of several hubs.

Each hub has one upstream port, designed to connect to a host or high-level hub. The remaining ports are descending (downstream ports) designed to connect functions or lower level hubs. Hub can recognize the connection of devices to ports or shutdown from them and control the power supply to their segments. Each ports can be allowed or prohibited and configured to complete or limited metabolism. The hub provides isolation of low speed segments from high-speed.

Hubs can control the supply of downstream ports; It is envisaged to install a current limitation consumed by each port.

The USB system is divided into three levels with certain interaction rules. The USB device contains an interface part, part of the device and the functional part. The host is also divided into three parts - interface, systemic and devices. Each part meets only for a certain range of tasks, logical and real interaction between them illustrates Fig. 7.1.

The structure under consideration includes the following elements:

    The USB physical device is a device on the bus that performs the functions of interest to the end user.

    Client SW - software corresponding to a specific device executed on the host computer. It may be an integral part of the OS or a special product.

    USB SYSTEM SW - USB system support independent specific devices and client software.

    USB Host Controller - hardware and software to connect USB devices to a host computer.

3.physical interface

USB standard defines electrical and mechanical tire specifications. Information signals and supply voltage 5 V are transmitted over a four-wire cable. A differential method for transmitting signals D + and D-for two wires is used. Transmitter signal levels in static mode should be below 0.3 V (low) or above 2.8 V (high level). Receivers are withstanding the input voltage within - 0.5 ... + 3.8 V. Transmitters should be able to switch to high-impedance state for bidirectional half-duplex transmission over one pair of wires.

Transmission over two wires in USB is not limited to differential signals. In addition to the differential receiver, each device has linear receivers of D + signals and D-, and the transmitters of these lines are managed individually. This allows you to distinguish more than two status of the line used to organize a hardware interface. The states diff0 and diff1 are determined by the difference in potentials on the D + lines and D - more than 200 mV, provided that on one of them the potential above the VSE trigger threshold. A condition in which on both inputs D + and D- is a low level, called linear zero (SEO - Single-Ended Zero). The interface determines the following states:

    Data J State and Data to STATE - the status of the transmitted bit (or simply j and k) are determined through the status of Diff0 and Diff1.

    Idle State - Pause on the bus.

    Resume State is the "Awakening" signal to output the device from the "sleep" mode.

    Start of Packet (SOP) is the beginning of the package (transition from IDle State in K).

    End of Packet (EOP) is the end of the package.

    DISCONNECT - the device is disabled from the port.

    Connect - The device is connected to the port.

    Reset - Reset device.

States are determined by combinations of differential and linear signals; For complete and low speeds of the Diffo and Diff1 states have the opposite assignment.
In decoding the states of Disconnect, Connect and Reset, the time of finding lines (more than 2.5 ms) in certain states is taken into account.

The tire has two transmission modes. The total transmission rate of USB signals is 12 Mbps, low - 1.5 Mbps. For full speed, a shielded twisted pair with an impedance of 90 Ohm and the length of the segment is up to 5 m is used, for a low-unite unshielding cable up to 3 m. Low-speed cables and devices are cheaper than high-speed. The same system can simultaneously use both modes; Switching for devices is transparent.

Low speed is designed to work with a small number of PU, which do not require high speed. The speed used by the device connected to a specific port is determined by the hub on signal levels.

on the D + and D- lines displaced with loading resistors R2 transceivers (see Fig. 7.2 and 7.3)

FROM
ignala Synchronization are encoded along with the NRZI data (non return to zero Invert), its operation illustrates Fig. 7.4. Each package is preceded by a Sync sync field that allows the receiver to tune in to the frequency of the transmitter. The cable also has a VBUS and GND lines for transmitting the supply voltage 5 to devices.

The conductor cross section is selected in accordance with the length of the segment to provide a guaranteed signal level and supply voltage. The standard defines two types of connectors (see Table 7.1 and Fig. 7.5).

R assocks like "A" are used to connect to the hubs (Upstream Connector). The plugs are installed on cables that are not disconnected from devices (for example, keyboard, mouse, etc.). Nests are installed on downward ports (Downstream port) hubs. The "B" connectors (DownStream Connector) are installed on devices from which the connecting cable can be disconnected (printers and scanners). The response (fork) is installed on the connecting cable, the opposite end of which has a plug of type "A".

Type connectors "A" and "B" differ mechanically (Fig. 7.5), which eliminates unacceptable loop connections of the ports of hubs. Four-contact connectors have keys that exclude incorrect connection. Connector design provides a later connection and early disconnection of signaling circuits compared to the supply. To recognize the USB connector on the device case, the standard symbolic designation is set.

R
iP. 7.5. USB sockets: a - type "a", b - type "in", in - symbolic designation

USB devices are possible from the cable (Bus-Powered Devices) or from its own power supply unit (Self-Powered Devices). The host provides power to the PU directly connected to it. Each hub, in turn, provides power to devices connected to its downward ports. With some restrictions of topology, the use of hubs feeding from the tire is allowed. In fig. 7.6 An example is a USB device connection scheme.

Here Keyboard, Pen and Mouse can eat from the tire.

USB supports both unidirectional and bidirectional communication modes. Data transfer is made between the host and the end point of the device. The device may have several endpoints, communication with each of them (channel) is set independently.

USB architecture admits four basic data types:

    Control Transfers used to configure while connecting and during operation to manage devices. The protocol provides guaranteed data delivery. The data field of the control parcel does not exceed 64 bytes at full speed and 8 bytes on low.

    Complete transmissions (Bulk Data Transfers) relatively large packages without harsh requirements for delivery time. Translations occupy the entire loose bus bandwidth. Packages have a data field in size 8, 16, 32 or 64 bytes. The priority of these gears is the lowest, they can be suspended with a large bus loading. Allowed only at full transmission rate.

    Interrupt (Interrupt) is short (up to 64 bytes at full speed, up to 8 bytes on low) transmission type of entered characters or coordinates. Interrupts have a spontaneous character and must be serviced not slower than the device requires. The service time limit is set in the range of 1-255 ms for full speed and 10-255 ms - for low.

    ISOCHRONOUS TRANSFERS (ISOCHRONOUS TRANSFERS) - continuous transmissions in real time, which occupy a previously agreed part of the tire bandwidth and having a specified delivery delay. In case of error detection, isochronous data is transmitted without repeat - invalid packages are ignored. Example - digital voice transmission. The throughput is determined by the requirements for the quality of the transmission, and the delivery delay can be critical, for example, when implementing teleconferencing.

The bus bandwidth is divided between all installed channels. The selected bar is fixed by the channel, and if the setting of a new channel requires such a band that does not fit into the already existing distribution, the channel for selecting the channel is rejected.

The architecture of the USE provides for the internal buffering of all devices, and the larger bandwidth requires a device, the more its buffer should be. USB should provide an exchange at such a speed so that the data delay in the device caused by buffering has not exceeded several milliseconds.

Isochronous transmissions are classified according to the method of synchronizing endpoints - sources or data recipients - with the system: distinguish asynchronous, synchronous and adaptive device classes, each of which corresponds to its USB channel type.

Protocol

All exchanges (transactions) via USB consist of three packages. Each transaction is planned and starts at the initiative of the controller, which sends the Arker Package (Token Packet). It describes the type and direction of transmission, the USB UP address and the end point number. In each transaction, it is possible to exchange only between the addressable device (its end point) and the host. The device addressed to the marker recognizes its address and is preparing for exchange. The data source (defined by the marker) transmits a data packet (or notification of the absence of data intended for transmission). After successfully receiving the package, the data receiver sends a confirmation package (Handshake Packet).

Transaction Planning provides streaming channels. At the hardware level, using a transactional failure (NACK) with an invalid transmission intensity prevents buffers from overflow from above and below. Rejected transaction markers are re-transmitted to the time free for the tire. Flow management allows you to flexibly planning the maintenance of simultaneous heterogeneous data streams.

Error resistance ensure the following USB properties:

    High quality signals achieved due to differential receivers / transmitters and shielded cables.

    Protection of control fields and data CRC codes.

    Detection of connecting and disable devices and configuring resources at the system level.

    Self-set protocol with a timeout when losing packages.

    Flow control to ensure isochronism and control hardware buffers.

    Independence of functions from unsuccessful exchanges with other functions.

To detect transmission errors, each package has CRC codes control fields that allow you to detect all single and double bit errors. Hardware detect transmission errors, and the controller automatically produces a three-time transmission attempt. If the repetitions are unsuccessful, the error message is transmitted to the client software.

USB devices - functions and hubs

USB bus capabilities allow you to use it to connect a variety of devices. Not touching the "useful" properties of the PU, we will focus on their interface part associated with the USB bus. All devices must support the set of common operations listed below. Dynamic connection and shutdown. These events are tracked by a hub that reports a host controller about them and reset the connected device. The device after a reset signal should respond to a zero address, while it is not configured and not suspended. After assigning the address for which the host controller is responsible, the device must only respond to its unique address.

Configuring devices performed by the host is necessary for their use. For configuration, information read from the device itself is usually used. The device may have many interfaces, each of which corresponds to its own endpoint representing the host function of the device. The interface in the configuration may have alternative characteristics sets; Set of sets is supported by the protocol. To support adaptive drivers, device descriptors and interfaces have class fields, subclass and protocol.

Data transmission is possible by one of the four types of gear (see above). For endpoints allowing different types of transmissions, only one of them is available after configuration.

Energy management is a highly developed USB function. For devices that feed on the tire, power is limited. Any device when connected should not consume a current from a bus exceeding 100 mA. The operating current (no more than 500 mA) is declared in the configuration, and if the hub can not provide the device the claimed current, it is not configured and, therefore, cannot be used.

The USB device must support the suspension (Suspended Mode), in which its current consumed does not exceed 500 μA. The device must automatically be suspended when the bus activity is terminated.

Remote Wakeup allows a suspended device to submit a signal to a hostcomputener, which can also be in a suspended state. The possibility of remote awakening is described in the device configuration. When configuring, this feature may be prohibited.

The hub in the USB switches the signals and the issuance of the power supply voltage, and also monitors the state of the devices connected to it, notify the host about the changes. The hub consists of two parts of the controller (Hub Controller) and the Repeater (Hub Repeater). Repeater repeater is a managed key connecting the output port with the input. It has reset support and suspension signaling. The controller contains registers to interact with the host. Access to registers is carried out on specific teams of hub. Commands allow you to configure the hub, control downward ports and observe their condition.

Downstream (DownStream) ports of hubs can be in the following states:

    Powered (power is disabled) - no power is supplied to the port (possibly only for hubs, switting nutrition). Output buffers are translated into high-impedance status, the input signals are ignored.

    Disconnected (disconnected) - the port does not transmit signals in any direction, but it is able to detect the connection of the device (according to the absence of the SEO state for 2.5 μs). Then the port goes to the Disabled state, and input signals (Diffo or Diff1 in the IDLE state), it determines the speed of the connected device.

    Disabled (forbidden) - the port transmits only the reset signal (by command from the controller), the signals from the port (except for disconnection) are not perceived. By disconnection (2.5 μS SEO state), the port goes to the Disconnect state, and if the shutdown is detected by the "sleep" hub, the controller will be sent a RESUME signal.

    Enabled - the port transmits signals in both directions. According to the controller command or the frame error detection, the port goes to the Disabled state, and the disconnection is detected - to the DISCONNECT state.

  • Suspended (suspended) - the port transmits a translation signal to the stop state ("sleep" mode). If the hub is in an active condition, the signals through the port are not missing in any direction. However, the "sleeping" hub perceives the signals for changing the status of unmatched ports, feeding the "awakening" signals from the activated device even through the chain of "sleeping" hubs. The state of each port is identified by a hub controller using separate registers. There is a general register whose bits reflect the fact of changes in the state of each port (fixed during EOF). This allows the host controller to quickly find out the hub condition, and in case of detection of changes to special transactions to clarify the state.

    cars - Processor, even to the detriment of the efficiency of work using its specialists. Fig. 1.2. Centralized system ...

Universal sequential tire

  • MINI-B Connector ECN: Notification issued in October 2000.
  • Errata since December 2000: Notification issued in December 2000.
  • Pull-Up / Pull-Down Resistors ECN
  • Errata since May 2002: Notification issued in May 2002.
  • Interface Associations ECN.: Notification issued in May 2003.
    • New standards have been added to associate multiple interfaces with one device function.
  • Rounded Chamfer Ecn.: Notification issued in October 2003.
  • Unicode ECN.: Notification issued in February 2005.
    • This ECN specifies that strings are encoded using UTF-16LE.
  • Inter-Chip USB Supplement: Notification issued in March 2006.
  • ON-THE-GO Supplement 1.3: Notification issued in December 2006.
    • The USB on-the-GO makes it possible to connect two USB devices with each other without a separate USB host. In practice, one of the devices plays the role of the host for another.

USB OTG.

USB 3.0.

USB 3.0 is at the final stages of development. Creation of USB 3.0 companies are engaged in companies: Microsoft, Texas Instruments, NXP Semiconductors. In USB 3.0 Specifications, the connections and cables of the updated standard will be physically and functionally compatible with USB 2.0. USB 2.0 cable contains four lines - a pair for receiving / data transfer, one - for power and one more - for grounding. In addition to them, USB 3.0 adds five new lines (as a result of which the cable has become much thicker), but new contacts are located in parallel with respect to the old on another contact row. Now you can easily determine the cable belonging to a particular version of the standard, just looking at its connector. The USB 3.0 specification increases the maximum information transfer rate to 4.8 Gbps - which is an order of magnitude more than 480 Mbps, which can provide USB 2.0. USB 3.0 boasts not only a higher rate of information transmission, but also increased current power from 500 mA to 900 mA. From now on, the user will be able not only to feed from one hub much larger number of devices, but also hardwarepreviously supplied with separate power supplies get rid of them.


Here GND is the "case" chain for powering peripheral devices, VBus - +5 V, as well as for power circuit. The data is transmitted by wire D + and D-differential (states 0 and 1 (in the terminology of official documentation Diff0 and Diff1, respectively) are determined by the potential difference between the lines of more than 0.2 V and under the condition that on one of the lines (D- in the case of Diff0 and D + with Diff1) the potential relative to the GND above 2.8 V. The differential transmission method is the main, but not the only one (for example, when initialized, the device reports the host on the mode supported by the device (FULL-SPEED or LOW-SPEED), pulling up one of the lines Data to V_BUS via a 1.5 com resistor (D- for Low-Speed \u200b\u200bmode and D + for Full-Speed \u200b\u200bmode, devices operating in Hi-Speed \u200b\u200bmode, behave at this stage as a device in Full-Speed \u200b\u200bmode). Sometimes around Wires there is a fibrous winding to protect against physical damage..

USB 3.0 Connector Type B

USB 3.0 Connector Type A

Cables and USB 3.0 connectors

USB disadvantages

Although the PIC bandwidth of USB 2.0 is 480 Mbps (60 MB / s), in practice, provide bandwidth close to peak, cannot be available. This is explained by fairly large USB bus delays between the data transfer request and the actual transmission itself. For example, the FireWire tire although it has a smaller peak bandwidth of 400 Mbps, which is 80 Mbps less than that of USB 2.0, in reality allows you to provide greater bandwidth for exchanging data with hard disks and other information storage devices.

USB and FireWire / 1394

USB Storage Protocol, which is a command transfer method

In addition, USB Storage was not supported in the old OS (initial Windows 98), and required the installation of the driver. SBP-2 was supported in them. Also in the old OS (Windows 2000), the USB Storage protocol was implemented in a trimmed form that does not allow using the CD / DVD disk burning function on a USB drive connected, SBP-2 has never had such restrictions.

USB bus is strictly oriented, because the connection of 2 computers or 2 peripheral devices requires additional equipment. Some manufacturers support the connection of the printer and the scanner, or the camera and the printer, but these implementations are strongly tied to a particular manufacturer and are not standardized. The 1394 / FireWire bus is not subject to this lack (you can connect 2 camcorders).

However, due to the licensing policy, Apple, as well as a much higher complexity of the equipment, 1394 is less common, motherboards Old computers have no 1394 controller. As for the periphery, the support of 1394 is usually not found anything except video cameras and enclosures for external hard disks and CD / DVD drives.

see also

  • Firewire.
  • Transferjet.

Sources

Links

  • USB NEWS (it.)
  • List of USB ID's (VENDORS, DEVICES AND INTERFACES) (eng.)

· Lecture 14. Universal USB sequential bus.

Explanatory dictionary on computing systems determines the concept of the interface (Interface) as the border of the section of two systems, devices or programs; Connection elements and auxiliary control circuits used to connect devices. We will talk about interfaces that allow you to connect a variety of peripheral devices and their controllers to personal (and not only) computers. By the method of transmitting information, the interfaces are divided into parallel and consistent. In the parallel interface, all bits of the transmitted word (usually byte) are set and transmitted according to the corresponding parallel going wires simultaneously. The PC traditionally uses the CENTRONICS parallel interface implemented by LPT ports. In the sequential interface, the bits are transmitted by each other, usually one line. COM ports PC provide a serial interface in accordance with the RS-232C standard. When considering interfaces, an important parameter is throughput.

In the architecture of modern computers, external tires that serve to connect various devices are becoming increasingly important. Today it can be, for example, external hard drives, CD-, DVD devices, scanners, printers, digital cameras, etc.

A widely used serial interface of synchronous and asynchronous data transmission.

2. Shine USB. Single characteristic.

USB Universal Serial Bus - a universal sequential tire) is an industrial standard for expanding the PC architecture, integrating with telephony and appliances of consumer electronics. Version 1.0 was published in January 1996. The USB architecture is determined by the following criteria:

Ø Easily implemented expansion of PC peripherals.

Ø Cheap solution supporting transmission speed up to 12M bit / s.

Ø Full support in real-time audio and (compressed) video data.

Ø Flexibility of the mixed transmission protocol of isochronous data and asynchronous messages.

Ø Integration with manufactured devices.

Ø Availability in PC of all configurations and sizes.

Ø Providing a standard interface capable of quickly conquer the market.

Ø Creating new classes of devices expanding PC.

Ø From the point of view of the end user, the following USB features are attractive:

Ø Easy cable system and connections.

Ø Hiding the details of the electrical connection from the end user.

Ø Self-identifying PU, automatic communication of devices with drivers and configuration.

Ø The ability to dynamically connect and configure PU.

Since mid-1996, PC is available with a built-in USB controller implemented by the chipset. Modems, keyboards, scanners, speakers, and other I / O devices with USB support are already appeared, as well as monitors with USB adapters - they play the role of hubs to connect other devices.

USB structure

USB provides simultaneous data exchange between the host computer and multiple peripheral devices (PU). The distribution of the bandwidth of the tire between the PU is planned by the host and is implemented by it by sending markers. The bus allows you to connect, configure, use and disconnect the devices while the host works and the devices themselves.

Below is a copyright of the translation of terms from the "Universal Serial Bus Specification" specification, publishedCOMPAQ, DEC, IBM, Intel, Microsoft, NEC and Northern Telecom . More detailed and prompt information can be found at:

USB devices (Device) may be hubs, features or combination thereof. Hub (HUB) provides additional connectivity points to the bus. Functions of the USB provide the system additional features, such as connecting to ISDN, digital joystick, acoustic speakers with a digital interface, etc. USB must have a USB interface that provides full support for USB protocol, performing standard operations (configuration and reset) and Providing information describing the device. Many devices connected to USB have in their composition and hub, and functions. The operation of the entire USB system controls the host controller (Host Controller), which is a software and hardware host computer.

The physical connection of devices is carried out on the topology of a multi-tiered star. The center of each star is a hub, each cable segment connects two points - a hub with another hub or with a function. The system has one (and only one) host controller, located in the top of the pyramid of devices and hubs. The host controller is integrated with the root hub (root hub), providing one or more connection points - ports. ControllerU. SB, which is part of chipsets, usually has a built-in two-port hub. Logically, a device connected to any USB hub and configured (see below) may be considered as directly connected to the host controller.

Functions are devices that can transmit or receive data or control information on the bus. Typically features are separate PU with cable connected to the port of the hub. Physically, one case may have several functions with a built-in hub, providing them to connect to one port. These combined host devices are hubs with constantly connected function devices.

Each function provides configuration information that describes the possibilities of PU and resource requirements. Before use, the function must be configured by the host - it must be highlighted in the channel and the configuration options are selected.

Examples of functions are:

Ø Pointers - Mouse, Tablet, Light Feather.

Ø Input devices - keyboard or scanner.

Ø Output device - printer, audio columns (digital).

Ø ISDN telephone adapter.

Hub is a key element of the RPR system in the USB architecture. Hub is a cable hub. Connection points are called the hub ports. Each hub converts one point of connection in their set. Architecture allows a connection of several hubs.

Each hub has one upstream port, designed to connect to a host or high-level hub. The remaining ports are descending (downstream ports) designed to connect functions or lower level hubs. Hub can recognize the connection of devices to ports or shutdown from them and control the power supply to their segments. Each ports can be allowed or prohibited and configured to complete or limited metabolism. The hub provides isolation of low speed segments from high-speed.

Hubs can control the supply of downstream ports; It is envisaged to install a current limitation consumed by each port.

The USB system is divided into three levels with certain interaction rules. The USB device contains an interface part, part of the device and the functional part. The host is also divided into three parts - interface, systemic and devices. Each part meets only for a certain range of tasks, logical and real interaction between them illustrates Fig. 7.1.

The structure under consideration includes the following elements:

Ø The USB physical device is a device on the bus that performs the functions of interest to the end user.

Ø Client SW - software corresponding to a specific device executed on the host computer. It may be an integral part of the OS or a special product.

Ø USB SYSTEM SW - USB system support, independent of specific devices and client software.

Ø USB Host Controller - hardware and software to connect USB devices to a host computer.

3.physical interface

USB standard defines electrical and mechanical tire specifications. Information signals and supply voltage 5 V are transmitted over a four-wire cable. A differential method for transmitting signals D + and D-for two wires is used. Transmitter signal levels in static mode should be below 0.3 V (low) or above 2.8 V (high level). Receivers are withstanding the input voltage within - 0.5 ... + 3.8 V. Transmitters should be able to switch to high-impedance state for bidirectional half-duplex transmission over one pair of wires.

Transmission over two wires in USB is not limited to differential signals. In addition to the differential receiver, each device has linear receivers of D + signals and D-, and the transmitters of these lines are managed individually. This allows you to distinguish more than two status of the line used to organize a hardware interface. The states diff0 and diff1 are determined by the difference in potentials on the D + lines and D - more than 200 mV, provided that on one of them the potential above the VSE trigger threshold. A condition in which on both inputs D + and D- is a low level, called linear zero (SEO - Single-Ended Zero). The interface determines the following states:

Ø Data J State and Data to STATE - the status of the transmitted bit (or simply j and k) are determined through the status of Diff0 and Diff1.

Ø Idle State - Pause on the bus.

Ø Resume State is the "Awakening" signal to output the device from the "sleep" mode.

Ø Start of Packet (SOP) is the beginning of the package (transition from IDle State in K).

Ø End of Packet (EOP) is the end of the package.

Ø DISCONNECT - the device is disabled from the port.

Ø Connect - The device is connected to the port.

Ø Reset - Reset device.

States are determined by combinations of differential and linear signals; For complete and low speeds of the Diffo and Diff1 states have the opposite assignment.
In decoding the states of Disconnect, Connect and Reset, the time of finding lines (more than 2.5 ms) in certain states is taken into account.

The tire has two transmission modes. The total transmission rate of USB signals is 12 Mbps, low - 1.5 Mbps. For full speed, a shielded twisted pair with an impedance of 90 Ohm and the length of the segment is up to 5 m is used, for a low-unite unshielding cable up to 3 m. Low-speed cables and devices are cheaper than high-speed. The same system can simultaneously use both modes; Switching for devices is transparent.

Low speed is designed to work with a small number of PU, which do not require high speed. The speed used by the device connected to a specific port is determined by the hub on signal levels.

on the D + and D- lines displaced with loading resistors R2 transceivers (see Fig. 7.2 and 7.3)

Synchronization signals are encoded along with the NRZI method (non return to Zero Invert), its operation illustrates Fig. 7.4. Each package is preceded by a Sync sync field that allows the receiver to tune in to the frequency of the transmitter. The cable also has a VBUS and GND lines for transmitting the supply voltage 5 to devices.

The conductor cross section is selected in accordance with the length of the segment to provide a guaranteed signal level and supply voltage. The standard defines two types of connectors (see Table 7.1 and Fig. 7.5).

"A" connectors are used to connect to the hubs (Upstream Connector). The plugs are installed on cables that are not disconnected from devices (for example, keyboard, mouse, etc.). Nests are installed on downward ports (Downstream port) hubs. The "B" connectors (DownStream Connector) are installed on devices from which the connecting cable can be disconnected (printers and scanners). The response (fork) is installed on the connecting cable, the opposite end of which has a plug of type "A".

Type connectors "A" and "B" differ mechanically (Fig. 7.5), which eliminates unacceptable loop connections of the ports of hubs. Four-contact connectors have keys that exclude incorrect connection. Connector design provides a later connection and early disconnection of signaling circuits compared to the supply. To recognize the USB connector on the device case, the standard symbolic designation is set.

Fig. 7.5. USB sockets: a - type "a", b - type "in", in - symbolic designation

USB devices are possible from the cable (Bus-Powered Devices) or from its own power supply unit (Self-Powered Devices). The host provides power to the PU directly connected to it. Each hub, in turn, provides power to devices connected to its downward ports. With some restrictions of topology, the use of hubs feeding from the tire is allowed. In fig. 7.6 An example is a USB device connection scheme.

Here Keyboard, Pen and Mouse can eat from the tire.

USB supports both unidirectional and bidirectional communication modes. Data transfer is made between the host and the end point of the device. The device may have several endpoints, communication with each of them (channel) is set independently.

USB architecture admits four basic data types:

Ø Control Transfers used to configure while connecting and during operation to manage devices. The protocol provides guaranteed data delivery. The data field of the control parcel does not exceed 64 bytes at full speed and 8 bytes on low.

Ø Complete transmissions (Bulk Data Transfers) relatively large packages without harsh requirements for delivery time. Translations occupy the entire loose bus bandwidth. Packages have a data field in size 8, 16, 32 or 64 bytes. The priority of these gears is the lowest, they can be suspended with a large bus loading. Allowed only at full transmission rate.

Ø Interrupt (Interrupt) is short (up to 64 bytes at full speed, up to 8 bytes on low) transmission type of entered characters or coordinates. Interrupts have a spontaneous character and must be serviced not slower than the device requires. The service time limit is set in the range of 1-255 ms for full speed and 10-255 ms - for low.

Ø ISOCHRONOUS TRANSFERS (ISOCHRONOUS TRANSFERS) - continuous transmissions in real time, which occupy a previously agreed part of the tire bandwidth and having a specified delivery delay. In case of error detection, isochronous data is transmitted without repeat - invalid packages are ignored. Example - digital voice transmission. The throughput is determined by the requirements for the quality of the transmission, and the delivery delay can be critical, for example, when implementing teleconferencing.

The bus bandwidth is divided between all installed channels. The selected bar is fixed by the channel, and if the setting of a new channel requires such a band that does not fit into the already existing distribution, the channel for selecting the channel is rejected.

The architecture of the USE provides for the internal buffering of all devices, and the larger bandwidth requires a device, the more its buffer should be. USB should provide an exchange at such a speed so that the data delay in the device caused by buffering has not exceeded several milliseconds.

Isochronous transmissions are classified according to the method of synchronizing endpoints - sources or data recipients - with the system: distinguish asynchronous, synchronous and adaptive device classes, each of which corresponds to its USB channel type.

Protocol

All exchanges (transactions) via USB consist of three packages. Each transaction is planned and starts at the initiative of the controller, which sends the Arker Package (Token Packet). It describes the type and direction of transmission, the USB UP address and the end point number. In each transaction, it is possible to exchange only between the addressable device (its end point) and the host. The device addressed to the marker recognizes its address and is preparing for exchange. The data source (defined by the marker) transmits a data packet (or notification of the absence of data intended for transmission). After successfully receiving the package, the data receiver sends a confirmation package (Handshake Packet).

Transaction Planning provides streaming channels. At the hardware level, using a transactional failure (NACK) with an invalid transmission intensity prevents buffers from overflow from above and below. Rejected transaction markers are re-transmitted to the time free for the tire. Flow management allows you to flexibly planning the maintenance of simultaneous heterogeneous data streams.

Error resistance ensure the following USB properties:

Ø High quality signals achieved due to differential receivers / transmitters and shielded cables.

Ø Protection of control fields and data CRC codes.

Ø Detection of connecting and disable devices and configuring resources at the system level.

Ø Self-set protocol with a timeout when losing packages.

Ø Flow control to ensure isochronism and control hardware buffers.

Ø Independence of functions from unsuccessful exchanges with other functions.

To detect transmission errors, each package has CRC codes control fields that allow you to detect all single and double bit errors. Hardware detect transmission errors, and the controller automatically produces a three-time transmission attempt. If the repetitions are unsuccessful, the error message is transmitted to the client software.

USB devices - functions and hubs

USB bus capabilities allow you to use it to connect a variety of devices. Not touching the "useful" properties of the PU, we will focus on their interface part associated with the USB bus. All devices must support the set of common operations listed below. Dynamic connection and shutdown. These events are tracked by a hub that reports a host controller about them and reset the connected device. The device after a reset signal should respond to a zero address, while it is not configured and not suspended. After assigning the address for which the host controller is responsible, the device must only respond to its unique address.

Configuring devices performed by the host is necessary for their use. For configuration, information read from the device itself is usually used. The device may have many interfaces, each of which corresponds to its own endpoint representing the host function of the device. The interface in the configuration may have alternative characteristics sets; Set of sets is supported by the protocol. To support adaptive drivers, device descriptors and interfaces have class fields, subclass and protocol.

Data transmission is possible by one of the four types of gear (see above). For endpoints allowing different types of transmissions, only one of them is available after configuration.

Energy management is a highly developed USB function. For devices that feed on the tire, power is limited. Any device when connected should not consume a current from a bus exceeding 100 mA. The operating current (no more than 500 mA) is declared in the configuration, and if the hub can not provide the device the claimed current, it is not configured and, therefore, cannot be used.

The USB device must support the suspension (Suspended Mode), in which its current consumed does not exceed 500 μA. The device must automatically be suspended when the bus activity is terminated.

Remote Wakeup allows a suspended device to submit a signal to a hostcomputener, which can also be in a suspended state. The possibility of remote awakening is described in the device configuration. When configuring, this feature may be prohibited.

The hub in the USB switches the signals and the issuance of the power supply voltage, and also monitors the state of the devices connected to it, notify the host about the changes. The hub consists of two parts of the controller (Hub Controller) and the Repeater (Hub Repeater). Repeater repeater is a managed key connecting the output port with the input. It has reset support and suspension signaling. The controller contains registers to interact with the host. Access to registers is carried out on specific teams of hub. Commands allow you to configure the hub, control downward ports and observe their condition.

Downstream (DownStream) ports of hubs can be in the following states:

Ø Powered (power is disabled) - no power is supplied to the port (possibly only for hubs, switting nutrition). Output buffers are translated into high-impedance status, the input signals are ignored.

Ø Disconnected (disconnected) - the port does not transmit signals in any direction, but it is able to detect the connection of the device (according to the absence of the SEO state for 2.5 μs). Then the port goes to the Disabled state, and input signals (Diffo or Diff1 in the IDLE state), it determines the speed of the connected device.

Ø Disabled (forbidden) - the port transmits only the reset signal (by command from the controller), the signals from the port (except for disconnection) are not perceived. By disconnection (2.5 μS SEO state), the port goes to the Disconnect state, and if the shutdown is detected by the "sleep" hub, the controller will be sent a RESUME signal.

Ø Enabled - the port transmits signals in both directions. According to the controller command or the frame error detection, the port goes to the Disabled state, and the disconnection is detected - to the DISCONNECT state.

Ø Suspended (suspended) - the port transmits a translation signal to the stop state ("sleep" mode). If the hub is in an active condition, the signals through the port are not missing in any direction. However, the "sleeping" hub perceives the signals for changing the status of unmatched ports, feeding the "awakening" signals from the activated device even through the chain of "sleeping" hubs. The state of each port is identified by a hub controller using separate registers. There is a general register whose bits reflect the fact of changes in the state of each port (fixed during EOF). This allows the host controller to quickly find out the hub condition, and in case of detection of changes to special transactions to clarify the state.

Host controller

The host computer communicates with devices through the controller. Host has the following duties:

Ø detection of connecting and disconnecting USB devices;

Ø manipulation flow control between devices and host;

Ø data flow management;

Ø collection of statistics;

Ø ensuring energy saving connected PU.

Ø The system controller controls the interaction between devices and their software operating on the host computer, for coordination:

Ø numbering and configuration of devices;

Ø isochronous data transmission;

Ø asynchronous data transmission;

Ø energy management;

Ø information management information and bus information.

USB provides data exchange between host computer and multiple peripheral devices (PU). According to the USB specification, devices, devices may be hubs, functions or combination thereof. The Hub device (HUB) only provides additional connectivity points to the bus. USB device (FUNCTION) provides an additional system functionality, for example, connecting to ISDN, digital joystick, acoustic speakers with a digital interface, etc. The combined device (Compound Device) containing several functions is represented as a hub with multiple devices connected to it. The USB device must have a USB interface that provides full USB support, executing standard operations (configuration and reset) and providing information describing the device. The operation of the entire USB system controls the host controller (Host Controller), which is a software and hardware host computer. The bus allows you to connect, configure, use and disconnect the devices while the host works and the devices themselves. USB bus is a hostsentrical: the only leading device that controls the exchange is a host computer, and all peripheral devices attached to it are exceptionally driven. The physical topology of the USB bus is a multi-tier star. Its vertex is a host controller, combined with a root hub (root hub), as a rule, double-port. The hub is a splitter device, it may be a power source for devices connected to it. Each port of the hub may directly connect the peripheral device or intermediate hub; The tire admits up to 5 levels of cascading hubs (not counting root). Since the combined devices inside themselves contain a hub, their connections to the hub of the 6th tier are already unacceptable. Each intermediate hub has several downstream ports for connecting peripheral devices (or underlying hubs) and one upstream (UPStream) port for connecting to root hub or downward port to a higher hub. The logical topology of the USB is an arbitrariness of the star: For the hub hosts, create an illusion of the direct connection of each device. Unlike extension tires (ISA, PCI, PC Card), where the program interacts with devices by calls to physical memory cells, I / O ports, interrupts and DMA channels, the interaction of applications with USB devices is performed only through the software interface. This interface that ensures the independence of access to devices is provided by system uSB controller.

Unlike cumbersome expensive loops of parallel tires AT A and especially SCSI tires with its diversity of connectors and the complexity of connecting rules, cable farming USB simple and elegant. USB cable contains one shielded vitua couple With an impedance of 90 ohms for signaling circuits and one unshielded for power supply (+5 V), the permissible length of the segment - up to 5 m. For low speed, an unknown unshielded cable can be used to 3 m (it is cheaper). The USB cable and connector system does not make it possible to be mistaken when the devices are connected (Fig. 13.1, a and b). To recognize the USB connector on the device case, a standard symbolic designation is placed (Fig. 13.1, B). Jacks of type "A" are installed only on the downstream ports of hubs, the plugs of the type "A" - on the cords of the peripheral devices or the rising ports of the hubs. The sockets and plugs of the "B" type are used only for cords disconnected from peripheral devices and upstream ports of hubs (from "small" devices - mice, keyboards, etc. Cables, as a rule, are not disconnected). In addition to the standard connectors shown in Figure 19, miniature options are also used (Fig. 20, B, G, D). Habs and devices provide the ability to "hot" connection and shutdown. For this, the connectors provide an earlier connection and later disconnecting the supply circuits relative to the signal, in addition, the connection and disable device alarm protocol is provided. The assignment of the conclusions of the USB connectors is given in Table. 9, the numbering of contacts is shown in Fig. 20. All USB cables "straight" - the connectors chains are connected in them.


Fig. 19. USB Connectors: A - type "A" type, b - type "B" type, in - symbolic designation

Fig. 20. USB sockets: a - type "a", b - type "B" standard, in, g, d - miniature type "B"

Table 9. Assigning USB Connector Connector

The tire uses a differential method for transmitting D + signals and D- to two wires. The speed of the device connected to a specific port is determined by a hub along the signal levels on the lines D + and D- displaced by load resistors of transceivers: low-speed devices "tighten" to a high level of D- line, with full - D +. Connecting the HS device is determined at the configuration information exchange stage - physically at the first time the HS must be connected as FS. Transmission over two wires in USB is not limited to differential signals. In addition to the differential receiver, each device has linear receivers of D + signals and D-, and these lines transmitters are managed individually. This allows you to distinguish more than two status of the line used to organize a hardware interface.

The introduction of high speed (480 Mbps - just 2 times slower than Gigabit Ethernet) requires careful coordination of transceiver and communication lines. At this speed, only a cable with shielded twisted pair for signal lines can work. For high speed, the USB hardware must have additional special transceivers. Unlike potential generators for FS and LS modes, HS transmitters are current sources focused on the presence of terminator resistors on both signal lines.

Data transfer rate (LS, FS or HS) is selected by the peripheral developer in accordance with the needs of this device. The implementation of low speeds for the device is somewhat cheaper (transceivers are easier, and the LS cable can be both an unshielded invasive pair). If in the "old" USB device, without thinking, connect to any free port of any hub, then in USB 2.0 in the presence of devices and hubs different versions The possibilities of choosing between optimal, non-optimal and non-working configurations appeared.

USB 1.1 hubs are required to maintain FS and LS speeds, the speed of the device connected to the hub is determined automatically by the difference in the potentials of signal lines. USB Habs 1.1 When transmitting packets are simply repeaters providing a transparent coupling of the peripheral device with the controller. Low speed transmissions are quite wastefully consumed by the potential bus bandwidth: during the time that they occupy a tire, a high-speed device can transmit data 8 times more. But for the sake of simplifying and cheating the entire system, these sacrifices went, and for the distribution of the strip between different devices Watch the host controller transaction scheduler.

In Specification 2.0, the speed of 480 Mbit / s should be taken from the same, but with this ratio of rates, exchanges for FS and LS will "eat" a possible bandwidth of the tire without any "pleasure" (for the user). That this does not happen, USB 2.0 hubs acquire the features of packet switches. If a high-speed device (or similar hub) is connected to the port of such a hub, the hub works in the repeater mode, and the transaction with the device on HS takes the entire channel to the host controller at all time. If a device or hub 1.1 is connected to the USB 2.0 hub port, then by part of the channel to the controller, the packet passes at the HS speed, is remembered in the hub buffer, and the old device or huba is already on its "native" speed FS or Ls. In this case, the functions of the controller and a hub 2.0 (including and root) are complicated, since transactions on FS and LS are split and split between their parts. high Speed \u200b\u200bShows. From old (1.1) devices and hubs all these subtleties are hidden, which provides backward compatibility. It is quite clear that the USB 2.0 device will be able to implement high speed, only if on the path from it to the host controller (also 2.0) only hubs 2.0 will be found. If this rule is broken between it and the 2.0 controller will be an old hub, then the connection can be installed only in FS mode. If such a speed device and client software satisfies (for example, for the printer and scanner, it will be outlined only at longer user waiting time), the connected device will work, but a message about the non-optimal configuration of the connections will appear. If possible, it (configuration) should be corrected, the benefit of switching USB cables can be performed on the go. Devices and software, critical to the bus bandwidth, in incorrect configuration Work will refuse and categorically require switching. If the host controller is old, then all the advantages of USB 2.0 will be inaccessible to the user. In this case, you will have to change the host controller (change the motherboard or acquire a PCI card controller). USB 2.0 controller and hubs allow you to improve the total bandwidth of the tire and for old devices. If FS devices connect to various USB 2.0 hub ports (including root), then for them, the total bandwidth of the USB bus will increase compared to 12 Mbps at as many times as high-speed hub ports are used.

Hub is a key element of the PNP system in the USB architecture. Hub performs many functions:

  • provides physical connection of devices,

forming and perceived

  • signals in accordance with the tire specification on

each of his ports;

  • controls the supply voltage on

downstream ports, and the installation of a current limitation consumed by each port;

  • tracks the state of the devices connected to it,

notifying the host about the changes;

  • detects bugs on the bus, performs procedures

restoration and isolates faulty tire segments;

  • provides the connection of tire segments operating on

different speeds.

The hub monitors the signals generated by devices. A faulty device may not "silence" (losing activity) or, on the contrary, something "bubble" (babble). These situations monitors the nearest Hab to the device and will provide ascending transfers from such a device no later than along the border (micro) frame. Thanks to the vigilance of hubs, these situations will not allow a faulty device to block the entire bus.

Each of the downstream ports can be allowed or prohibited, and is also configured to high, complete or limited metabolism. Hubs may have light indicators of downstream ports, controlled automatically (hub logic) or software (host controller). The indicator can be a pair of LEDs - green and yellow (amber) or one LED with a variable color. The state of the port is as follows:

  • does not shine - the port is not used;
  • green - normal operation;
  • yellow - Error;
  • green blinking - the program requires attention

user (Software Attention);

  • yellow flashing - instrument requires attention

user (Hardware Attention).

Ascending (Upstream) The hub port is configured and externally appeared as a full-speed or high-speed (for USB 2.0 only). When connecting the USB 2.0 hub port provides termination according to the FS scheme, it is translated into the HS mode only by the controller command.

In fig. 13.3 A variant of connecting devices and hubs is given, where the high-speed USB 2.0 device is only a telecaler transmitting video stream without compression. Connecting a printer and a USB 1.1 scanner to separate Haba ports 2.0, and even the interchange of them with audio devices, allows them to use a 12 Mbps tire strip / each. Thus, from the total strip of 480 Mbps to the "old" devices (USB 1.0), 3x12 \u003d 36 Mbps is released. Actually, it is possible to talk about 48 Mbit / s band, since the keyboard and mouse are connected to a separate port of the USB 2.0 host controller, but these devices are "toasting" only a small product from the 12 Mbps highlighted. Of course, you can connect the keyboard and the mouse to the port of the external hub, but in terms of improving reliability system devices Input is better to connect the shortest (by the number of cables, connectors and intermediate devices) by the method. The unsuccessful configuration would be to connect the printer (scanner) to the USB 1.1 hub - while working with audio devices (if they are high quality) print speed (scan) will fall. An inoperable configuration would be connecting the camera to the port of the hub USB 1.1.

When planning connections, it is necessary to take into account the method of nutrition of devices: devices eating from the tire, as a rule, are connected to the hubs feeding from the network. Only low-power devices are connected to the hubs that are fed from the tire - so, to the USB keyboard containing a hub inside of itself, the USB mouse and other indicators (trackball, tablet) are connected.

Energy management is a highly developed USB function. For devices that feed on the tire, power is limited. Any device when connected should not consume a current from a bus exceeding 100 mA. Working current (no more than 500 mA) is declared in the configuration. If a hub cannot provide the device a claimed current, it is not configured and, therefore, cannot be used.

The USB must maintain the suspension mode (Suspended Mode), in which its current consumed does not exceed 500 μA. The device must automatically be suspended when the bus activity is terminated.

Fig. 21. Connection configuration example

Remote Wakeup allows the suspended device to file a host computer that can also be in suspended state. The possibility of remote awakening is described in the device configuration. When configuring, this feature may be prohibited.