Welcome to my presentation
Presented by:
Mishuk
Dept. of
Electronics & Communication Engineering
Jatiya Kabi Kazi Nazrul Islam University
USB
Universal Serial Bus
Outlines:
• What is USB
• Need for USB
• Versions of USB
• Types of USB
• Architecture
• Data transmission &Transactions
• USB Descriptors
• Usages
Universal Serial Bus
• A representative peripheral interface
• Universal Serial Bus (USB) provides a serial bus standard
for connecting devices, usually to a computer, but it also is
in use on other devices such as set-top boxes, game
consoles and PDAs.
Why this interfaces is needed ?
• Easy to use, so there’s no need to fiddle with configuration and setup
details.
• Fast, so the interface doesn’t become a bottleneck of slow communications.
• Reliable, so that errors are rare, with automatic correction of errors that do
occur.
• Flexible, so many kinds of peripherals can use the interface.
• Inexpensive, so users (and the manufacturers who will build the interface
into their products) don’t balk at the price.
• Power-conserving, to save battery power on portable computers.
• Supported by the operating system, so developers don’t have to struggle
with writing low-level drivers for the peripherals that use the interface.
Versions of USB
USB 1.x
• Released in January 1996, USB 1.0 specified a data rate of 1.5 Mbit/s (Low Bandwidth or Low
Speed). It did not allow for extension cables or pass-through monitors, due to timing and
power limitations.
USB 2.0
• USB 2.0 was released in April 2000, adding a higher maximum signaling rate of 480 Mbit/s
(High Speed or High Bandwidth),.
USB 3.0
• The USB 3.0 specification was released on 12 November 2008.
• USB 3.0 defines a new SuperSpeed transfer mode, with associated new backwards-
compatible plugs, receptacles, and cables. SuperSpeed plugs and receptacles are identified
with a distinct logo and blue inserts in standard format receptacles.
USB 3.1
• USB 3.1, which was released on 31 July 2013. introduces a faster transfer rate
called SuperSpeed USB 10 Gbps
Types of USB
Several major types of physical layouts exist for USB ports:
• USB-A (Type A): USB A devices are nearly square in shape and are typically used for
wired mice and keyboards.
• USB-B (Type B): This rectangular connector approximately 1.4 cm (9/16 in) length by
0.65 cm (1/4 in) height is commonly found on routers, computers, printers and game
consoles. USB sticks normally feature USB-B connectors also.
• Micro USB: So-called Micro USB versions of both USB-A and USB-B also exist -
smaller versions than their base counterparts, popular on mobile devices.
• USB Type C: With dimensions of 0.84 cm by 0.26cm, this newer standard is designed
to replace both A and B with smaller ports to better support the thinner form factors of
mobile devices
Physical Interface
Architectural Overview
A USB system consists of a host and some number of devices all operating
together on the same time base and logical interconnect.
USB system can be described by three definitional areas:
• USB interconnect
• USB devices
• USB host
USB interconnect is the manner in which USB devices are connected to and
communicate with the host.
This includes the following:
•Topology
•Data Flow
Bus Hierarchy
Host Computer
CPU
Main
Memory
USB Host
Hub
USB Device
System Bus
Memory BusCPU Bus
USB External Bus and interfaceExternal Device
USB Internal Bus and interface
How the USB system is arranged
• The Universal Serial Bus is a network of attachments connected to the host
computer. These attachments come in two types known as Functions and
Hubs .Functions are the peripherals such as mice, printers, etc. Hubs
basically act like a double adapter does on a power-point, converting one
socket, called a port, into multiple ports. Hubs and functions are collectively
called devices.
Figure: Physical arrangement of usb are joined to hub
Figure: How USB system appears to functions
How data is sent across the USB
When the software requires data transfer to occur between itself and the USB, it sends a block of
data called an I/O Request Packet (IRP) to the appropriate pipe, and the software is later notified
when this request is completed successfully
As suggested by the name Universal Serial Bus, data transmission in the bus occurs in a serial
form. Bytes of data are broken up and sent along the bus one bit at a time, with the least significant
bit first as illustrated by figure. Here data 11010010 is sent.
Figure : Serial transmission of binary number 11010010.
The actual data is sent across the bus in packets. Each packet is a bundle of data along with
information concerning the source, destination and length of the data.
Functions,Enpoints,Pipes
• USB Functions
A function is a USB device that is able to transmit or receive data or control information over the bus. A
function is typically implemented as a separate peripheral device, with a cable that plugs into a port on a
hub. However, it is possible to implement multiple functions and an embedded hub with a single USB
cable.
• USB Endpoints
Endpoints can be described as sources or sinks of data. As the bus is host centric, endpoints occur at the
end of the communications channel at the USB function. Every USB device must provide at least one
control endpoint at address 0 called the default endpoint or Endpoint0.
In USB terminology, the direction of an endpoint ( and transfers to or from them) is based on the host.
Thus, IN always refers to transfers to the host from a device and OUT always refers to transfers from the
host to a device. USB devices can also support bi-directional transfers of control data.
• USB pipes
Data is transferred between a USB device and the USB host through an abstraction called a pipe. Pipes is
purely a software term. A pipe talks to an endpoint on a device, and that endpoint has an address. A pipe
is a logical connection between the host and endpoint(s).
Data Transactions
• A data transaction is simply a movement of
data between the host and a connected
device. The different types of possible
transactions depend upon what transfer type
the corresponding pipe is configured for.
• Data flows IN and OUT with respect to the
host
• “IN Transaction”
• “OUT Transaction”
• An endpoint is a buffer used to transmit or
receive data
• Each endpoint has a direction and an
address
• Up to 32 (16 pairs) endpoints can reside
within a device
INOUT
HOST
Different types of Data transactions
Interrupt Transaction
• These are used for small, infrequent
transfers which require priority over
other requests.
• Only way low speed devices can
transfer data
• Also used by the host to send data to
the device on a scheduled basis
• Maximum packet size: 1-64 bytes
Bulk Transaction
• Used for large amount
of data
• Only full and high-
speed devices
• Host controller ensures
that bulk transfer are
eventually completed
but it does not
guarantee bandwidth
• Fastest transfer type on
an otherwise idle bus
• Maximum packet size:
8,16,32,64,512 bytes
Different types of Data transactions
Isochronous Transaction
• Fixed number of bytes per frame. Bandwidth
is guaranteed
• No error correction – No ACK field
• Used for continuous communication of time-
relevant information (streaming data)
• Full and high-speed devices only
• Maximum Packet size: 1-1023 bytes
Control Transaction
• Enables the host to read information about the
device (enumeration)
• All devices must support Control Transfers at
Endpoint 0
• Control transfers require both an IN and OUT
Endpoint
• Talks to the device through Address 0 while
enumeration
• Maximum Packet Size: 8,16,32,64 bytes
USB Descriptors
• A USB device provides information about itself in data structures called USB descriptors .All USB
devices have a hierarchy of descriptors which describe to the host information such as what the
device is, who makes it, what version of USB it supports, how many ways it can be configured,
the number of endpoints and their types etc. The host obtains descriptors from an attached
device by sending various standard control requests to the default endpoint.
• The more common USB descriptors are:
 Device Descriptors
 Configuration Descriptors
 Interface Association Descriptors
 Endpoint Descriptors
 String Descriptors
USB Descriptors
• Device Descriptors
The device descriptor of a USB device represents the entire device. As a result a USB device can only
have one device descriptor. It specifies some basic, yet important information about the device such
as the supported USB version, maximum packet size, vendor and product IDs and the number of
possible configurations the device can have.
• Configuration Descriptors
The configuration descriptor specifies how the device is powered, what the maximum power
consumption is, the number of interfaces it has. Once all the configurations have been examined by
the host, the host will send a SetConfiguration command with a non zero value which matches the
bConfigurationValue of one of the configurations. This is used to select the desired configuration.
USB Descriptors
• Interface Association Descriptors
The interface association descriptor could be seen as a header or grouping of the endpoints into a
functional group performing a single feature of the device. USB interface association descriptor (IAD)
allows the device to group interfaces that belong to a function
• Endpoint Descriptors
Endpoint descriptors are used to describe endpoints other than endpoint zero. Endpoint zero is always
assumed to be a control endpoint and is configured before any descriptors are even requested. The host
will use the information returned from these descriptors to determine the bandwidth requirements of the
bus.
• String Descriptors
String descriptors provide human readable information and are optional. If they are not used, any string
index fields of descriptors must be set to zero indicating there is no string descriptor available. String
descriptors are referenced by their one-based index number. A string descriptor contains one or more
Unicode strings; each string is a translation of the others into another language.
Usages of USB
Human Interface Devices
• Keyboards, mice, joysticks, game controllers
Mass Storage Devices
• External hard drives, DVD/CD-RW, floppy,
• zip, Flash card readers, USB Flash drives
Digital Cameras, Portable Media Players
• Similar to mass storage, so speed is important
• Will also use high speed, bulk data transfers
Printers
• Also uses high-speed
• High-speed, isochronous transfers
Thanks Everybody For Your Patience

USB presentation by Mishuk

  • 1.
    Welcome to mypresentation
  • 2.
    Presented by: Mishuk Dept. of Electronics& Communication Engineering Jatiya Kabi Kazi Nazrul Islam University
  • 3.
    USB Universal Serial Bus Outlines: •What is USB • Need for USB • Versions of USB • Types of USB • Architecture • Data transmission &Transactions • USB Descriptors • Usages
  • 4.
    Universal Serial Bus •A representative peripheral interface • Universal Serial Bus (USB) provides a serial bus standard for connecting devices, usually to a computer, but it also is in use on other devices such as set-top boxes, game consoles and PDAs.
  • 5.
    Why this interfacesis needed ? • Easy to use, so there’s no need to fiddle with configuration and setup details. • Fast, so the interface doesn’t become a bottleneck of slow communications. • Reliable, so that errors are rare, with automatic correction of errors that do occur. • Flexible, so many kinds of peripherals can use the interface. • Inexpensive, so users (and the manufacturers who will build the interface into their products) don’t balk at the price. • Power-conserving, to save battery power on portable computers. • Supported by the operating system, so developers don’t have to struggle with writing low-level drivers for the peripherals that use the interface.
  • 6.
    Versions of USB USB1.x • Released in January 1996, USB 1.0 specified a data rate of 1.5 Mbit/s (Low Bandwidth or Low Speed). It did not allow for extension cables or pass-through monitors, due to timing and power limitations. USB 2.0 • USB 2.0 was released in April 2000, adding a higher maximum signaling rate of 480 Mbit/s (High Speed or High Bandwidth),. USB 3.0 • The USB 3.0 specification was released on 12 November 2008. • USB 3.0 defines a new SuperSpeed transfer mode, with associated new backwards- compatible plugs, receptacles, and cables. SuperSpeed plugs and receptacles are identified with a distinct logo and blue inserts in standard format receptacles. USB 3.1 • USB 3.1, which was released on 31 July 2013. introduces a faster transfer rate called SuperSpeed USB 10 Gbps
  • 7.
    Types of USB Severalmajor types of physical layouts exist for USB ports: • USB-A (Type A): USB A devices are nearly square in shape and are typically used for wired mice and keyboards. • USB-B (Type B): This rectangular connector approximately 1.4 cm (9/16 in) length by 0.65 cm (1/4 in) height is commonly found on routers, computers, printers and game consoles. USB sticks normally feature USB-B connectors also. • Micro USB: So-called Micro USB versions of both USB-A and USB-B also exist - smaller versions than their base counterparts, popular on mobile devices. • USB Type C: With dimensions of 0.84 cm by 0.26cm, this newer standard is designed to replace both A and B with smaller ports to better support the thinner form factors of mobile devices
  • 8.
  • 9.
    Architectural Overview A USBsystem consists of a host and some number of devices all operating together on the same time base and logical interconnect. USB system can be described by three definitional areas: • USB interconnect • USB devices • USB host USB interconnect is the manner in which USB devices are connected to and communicate with the host. This includes the following: •Topology •Data Flow
  • 10.
    Bus Hierarchy Host Computer CPU Main Memory USBHost Hub USB Device System Bus Memory BusCPU Bus USB External Bus and interfaceExternal Device USB Internal Bus and interface
  • 11.
    How the USBsystem is arranged • The Universal Serial Bus is a network of attachments connected to the host computer. These attachments come in two types known as Functions and Hubs .Functions are the peripherals such as mice, printers, etc. Hubs basically act like a double adapter does on a power-point, converting one socket, called a port, into multiple ports. Hubs and functions are collectively called devices. Figure: Physical arrangement of usb are joined to hub Figure: How USB system appears to functions
  • 12.
    How data issent across the USB When the software requires data transfer to occur between itself and the USB, it sends a block of data called an I/O Request Packet (IRP) to the appropriate pipe, and the software is later notified when this request is completed successfully As suggested by the name Universal Serial Bus, data transmission in the bus occurs in a serial form. Bytes of data are broken up and sent along the bus one bit at a time, with the least significant bit first as illustrated by figure. Here data 11010010 is sent. Figure : Serial transmission of binary number 11010010. The actual data is sent across the bus in packets. Each packet is a bundle of data along with information concerning the source, destination and length of the data.
  • 13.
    Functions,Enpoints,Pipes • USB Functions Afunction is a USB device that is able to transmit or receive data or control information over the bus. A function is typically implemented as a separate peripheral device, with a cable that plugs into a port on a hub. However, it is possible to implement multiple functions and an embedded hub with a single USB cable. • USB Endpoints Endpoints can be described as sources or sinks of data. As the bus is host centric, endpoints occur at the end of the communications channel at the USB function. Every USB device must provide at least one control endpoint at address 0 called the default endpoint or Endpoint0. In USB terminology, the direction of an endpoint ( and transfers to or from them) is based on the host. Thus, IN always refers to transfers to the host from a device and OUT always refers to transfers from the host to a device. USB devices can also support bi-directional transfers of control data. • USB pipes Data is transferred between a USB device and the USB host through an abstraction called a pipe. Pipes is purely a software term. A pipe talks to an endpoint on a device, and that endpoint has an address. A pipe is a logical connection between the host and endpoint(s).
  • 14.
    Data Transactions • Adata transaction is simply a movement of data between the host and a connected device. The different types of possible transactions depend upon what transfer type the corresponding pipe is configured for. • Data flows IN and OUT with respect to the host • “IN Transaction” • “OUT Transaction” • An endpoint is a buffer used to transmit or receive data • Each endpoint has a direction and an address • Up to 32 (16 pairs) endpoints can reside within a device INOUT HOST
  • 15.
    Different types ofData transactions Interrupt Transaction • These are used for small, infrequent transfers which require priority over other requests. • Only way low speed devices can transfer data • Also used by the host to send data to the device on a scheduled basis • Maximum packet size: 1-64 bytes Bulk Transaction • Used for large amount of data • Only full and high- speed devices • Host controller ensures that bulk transfer are eventually completed but it does not guarantee bandwidth • Fastest transfer type on an otherwise idle bus • Maximum packet size: 8,16,32,64,512 bytes
  • 16.
    Different types ofData transactions Isochronous Transaction • Fixed number of bytes per frame. Bandwidth is guaranteed • No error correction – No ACK field • Used for continuous communication of time- relevant information (streaming data) • Full and high-speed devices only • Maximum Packet size: 1-1023 bytes Control Transaction • Enables the host to read information about the device (enumeration) • All devices must support Control Transfers at Endpoint 0 • Control transfers require both an IN and OUT Endpoint • Talks to the device through Address 0 while enumeration • Maximum Packet Size: 8,16,32,64 bytes
  • 17.
    USB Descriptors • AUSB device provides information about itself in data structures called USB descriptors .All USB devices have a hierarchy of descriptors which describe to the host information such as what the device is, who makes it, what version of USB it supports, how many ways it can be configured, the number of endpoints and their types etc. The host obtains descriptors from an attached device by sending various standard control requests to the default endpoint. • The more common USB descriptors are:  Device Descriptors  Configuration Descriptors  Interface Association Descriptors  Endpoint Descriptors  String Descriptors
  • 18.
    USB Descriptors • DeviceDescriptors The device descriptor of a USB device represents the entire device. As a result a USB device can only have one device descriptor. It specifies some basic, yet important information about the device such as the supported USB version, maximum packet size, vendor and product IDs and the number of possible configurations the device can have. • Configuration Descriptors The configuration descriptor specifies how the device is powered, what the maximum power consumption is, the number of interfaces it has. Once all the configurations have been examined by the host, the host will send a SetConfiguration command with a non zero value which matches the bConfigurationValue of one of the configurations. This is used to select the desired configuration.
  • 19.
    USB Descriptors • InterfaceAssociation Descriptors The interface association descriptor could be seen as a header or grouping of the endpoints into a functional group performing a single feature of the device. USB interface association descriptor (IAD) allows the device to group interfaces that belong to a function • Endpoint Descriptors Endpoint descriptors are used to describe endpoints other than endpoint zero. Endpoint zero is always assumed to be a control endpoint and is configured before any descriptors are even requested. The host will use the information returned from these descriptors to determine the bandwidth requirements of the bus. • String Descriptors String descriptors provide human readable information and are optional. If they are not used, any string index fields of descriptors must be set to zero indicating there is no string descriptor available. String descriptors are referenced by their one-based index number. A string descriptor contains one or more Unicode strings; each string is a translation of the others into another language.
  • 20.
    Usages of USB HumanInterface Devices • Keyboards, mice, joysticks, game controllers Mass Storage Devices • External hard drives, DVD/CD-RW, floppy, • zip, Flash card readers, USB Flash drives Digital Cameras, Portable Media Players • Similar to mass storage, so speed is important • Will also use high speed, bulk data transfers Printers • Also uses high-speed • High-speed, isochronous transfers
  • 21.
    Thanks Everybody ForYour Patience