0% found this document useful (0 votes)
67 views34 pages

Universal Serial Bus (US B) : EE 446 Embedded Architecture

The document discusses the Universal Serial Bus (USB) interface standard. USB allows for connection of devices to computers and other devices. It supports various transfer types and speeds up to 480Mbps for USB 2.0 and 5Gbps for USB 3.0. USB has benefits like ease of use, plug-and-play capability, and power delivery directly from the bus.

Uploaded by

Ronabol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views34 pages

Universal Serial Bus (US B) : EE 446 Embedded Architecture

The document discusses the Universal Serial Bus (USB) interface standard. USB allows for connection of devices to computers and other devices. It supports various transfer types and speeds up to 480Mbps for USB 2.0 and 5Gbps for USB 3.0. USB has benefits like ease of use, plug-and-play capability, and power delivery directly from the bus.

Uploaded by

Ronabol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Universal Serial Bus (US

B)
EE 446 Embedded Architecture

Universal Serial Bus


A representative peripheral interface
Universal Serial Bus (USB) provides a serial bus standard for conne

cting devices, usually to a computer, but it also is in use on other


devices such as set-top boxes, game consoles and PDAs. (wikipedi
a.org)

What USB Can Do


USB is a likely solution any time you want to use a computer to communi

cate with devices outside the computer.

The interface is suitable for one-of-kind and small-scale designs as well as

mass-produced, standard peripheral types.

Device, male connector


Computer, female connector
Hub

Comparison
Interface

Format

Number of
Devices
(maximum)

Length
(maximum,
feet)

Speed
(maximum,
bits/sec.)

Typical Use

USB

asynchronous
serial

127

16 (or up to
96 ft. with 5
hubs)

1.5M, 12M,
480M

Mouse,
keyboard, disk
drive, modem,
audio

RS-232
(EIA/TIA-232)

asynchronous
serial

50-100

20k (115k
with some
hardware)

Modem, mouse,
instrumentation

Parallel
Printer
Port

parallel

2 (8 with
daisy-chain
support)

1030

8M

Printers,
scanners, disk
drives

IEEE-1394
(FireWire)

serial

64

15

400M
(increasing
to
3.2G with
IEEE-1394b

Video, mass
storage

7 Level

Benefits for Users


Ease of Use

Ease of use was a major design goal for USB, and the result is an interface thats a pleasure to
use for many reasons:

One interface for many devices.

USB is versatile enough to be usable with many kinds of peripherals. Instead of having a diffe
rent connector type and supporting hardware for each peripheral, one interface serves many.

Automatic configuration.

When a user connects a USB peripheral to a computer, its OS automatically detects the perip
heral and loads the appropriate software driver.

Hot pluggable

We can connect and disconnect a peripheral whenever you want, whether or not the system
and peripheral are powered, without damaging the PC or peripheral. The operating system d
etects when a device is attached and readies it for use.

No power supply required (sometimes).

A peripheral that requires up to 500 milliamperes can draw all of its power from the bus inste
ad of having its own supply..

USB
USB

1.0 specification introduced in 1994


USB 2.0 specification finalized in 2001
Became popular due to cost/benefit advantage
Eg.

Three

IEEE 1394 high bandwidth, high cost

generations of USB

USB

1.0
USB 2.0
USB 3.0 and WUSB

USB 2.0
A big step in USBs evolution was version 2.0

support for much faster transfers.


a 40-times increase was found to be feasible, for a bus speed of 480

Megabits per second.

How to use it
USB 2.0 is backwards compatible with USB 1.1.
Version 2.0 peripherals can use the same connectors and cables as 1.x

peripherals.
To use the new, higher speed, peripherals must connect to 2.0-compli
ant hosts and hubs. 2.0 hosts and hubs can also communicate with 1.
x peripherals.
A 2.0-compliant hub with a slower peripheral attached will translate a
s needed between the peripherals speed and high speed.
This increases the hubs complexity but makes good use of the bus ti
me without requiring different hubs for different speeds.

USB 3.0 Overview

Also referred to as SuperSpeed USB


Speeds 10x faster than 2.0 (5 Gbps in controlled test environment)
Transfer of 25 GB file in approx 70 seconds (see chart)
Extensible Designed to scale > 25Gbps
Optimized power efficiency
No device polling (asynchronous notifications)
Lower active and idle power requirements
Backward compatible with USB 2.0

USB 2.0 device will work with USB 3.0 host


USB 3.0 device will work with USB 2.0 host

USB 3.0
"SuperSpeed" bus provides a fourth transfer mode

at 5.0 Gbit/s
Communication is full-duplex during SuperSpeed;
(in the modes supported previously, by 1.x and 2.
0, communication is half-duplex, with direction co
ntrolled by the host.)

USB versus IEEE-1394


IEEE-1394 is best suited for video and other links where speed is essential or a

host PC isnt available.


USB is best suited for typical peripherals such as keyboards, printers, scanners,

and disk drives as well as low- to moderate-speed, cost-sensitive applications.


For many devices, either interface would work.
With USB, a single host controls communications with many peripherals.
IEEE-1394 uses a peer-to-peer model, where peripherals can communicate wi

th each other directly.


A single communication can also be directed to multiple receivers.
IEEE-1394s 400 Megabits per second is more than 30 times faster than USB

1.xs 12 Megabits per second.


As USB is getting faster with version 2.0, IEEE-1394 is getting faster with the

proposed IEEE-1394.b.

Physical Appearances

Type A connectors on host devices that supply power


Type B connectors on target devices that receive power.

Communication Flow

The Physical Layer

Signaling On The Bus


The USB cable is 4 wire cable
Signal on the bus is done by signaling over two wi

res ( D+ and D_ )
Data encoding and decoding is done using NRZI (
Non Return to Zero Inverted )
a 0 bit is transmitted by toggling the data lines
a 1 bit is transmitted by leaving the data lines as-is.

SIE
SIE Serial Interface Engine

It is part of both the hosts and the devices physic


al layer
=>Serialization and De-serialization
=>Encoding and Decoding
=>Generate(for out) and Verify(for in) CRC
=>Detect PID

HC
HC Host Controller

=>It is an additional hardware to ensure that every


thing which is transmitted on the bus is correct
=>It serves both the USB and the host and has the
same functionality in every USB system

The Protocol Engine La


yer

Responsible for the translating the data between t

he application layer and the USB transactions prot


ocol .
Two Roles
=>USB System Software (in the USB host)
=>USB Logical Device (in the USB device)

The USB System SW


Compose of The Host Controller Driver and The U

SB Driver
Responsible for
=>Bandwidth allocation
=>bus power management
Two of above are in order to enable devices to acc
ess the bus

The USB Logical Device


Compose of a collection of independent endpoint

s
Each endpoint has an unique Endpoint Number a
nd is unidirectional(except endpoint zero and has t
wo type--In/Out)
Default pipe is associated with endpoint zero

The Application Layer

Host end Client Software

= >Manages the appropriate interface by


transferring data from its buffers to the
endpoint with the appropriate interface
Device end Function
= >Composed of interfaces and controls the
functionality of the device

Pipes
The logic communication between the client

software on the host and the function on the


device is done through pipes
It is a association between a specific
endpoint on the device and the appropriate
software in the host

Pipes (continued)
An endpoint is the source or destination of the

data that transmitted on the USB cable


An endpoint of a pipe is addressable with a tu
ple (device_address, endpoint_number)
Two direction
=>OUT
data flows from the host to the device
=>IN
data flows from the device to the host

USB Packet
Types

Four Types of Data Transfers (Pipes)


Message Pipe
Control transfers Control transfers are bidirectional transfers used by the USB system software
mainly to query, configure, and issue certain generic commands to USB devices. Control transf
ers typically take place between the host computer and the USB device's endpoint 0, but your
control transfers might use other endpoints.
Stream Pipe
Interrupt transfers are used when a peripheral wants to be polled by the host periodically to
see if it has data to send to the host. Keyboards, mice, and joysticks are examples of devices t
hat typically use interrupt transfers.
Bulk transfers are used to move data between the host system and the peripheral when data i

ntegrity is more critical than data latency, and they also include error checking and retries if er
rors are detected. Printers, scanners, and storage devices are examples of devices that depend
primarily on bulk transfers.
Isochronous transfers are used for moving real-time data. In these transfers, the streaming o

f the data is more critical than the accuracy of the data. There is no error-checking or retries as
sociated with isochronous transfers. Web-cams, speakers and microphones are examples of d
evices that utilize isochronous transfers.

USB On-The-Go (OTG)


Released in December 2006.
USB On-The-Go makes it possible for two USB dev

ices to communicate with each other without requ


iring a separate USB host.
In practice, one of the USB devices acts as a host
(device roles change) for the other device.
For example:
A usb flash drive (peripheral) served by a printer (ho

st);
A keyboard (peripheral) connected to a mobile phon
e (host)

USB OTG supported by Micro-AB


An OTG product must have a single Micro-AB rece

ptacle and no other USB receptacles.


When attached to a PC, (host)
an OTG device requires a cable which has a US
B Standard-A plug on one end
and a Micro-B plug on the other end. (Peripher
al)

In order to attach a peripheral to an OTG device (n

ow it serves as a host)
the peripheral either needs to have a cable ending in

a Micro-A plug which is inserted into the OTG devic


e's Micro-AB (same physical appearance as Micro-A
receptacle) with receptacle
or the OTG device itself needs an adapter cable whic
h has a Micro-A plug on one end and a Standard-A r
eceptacle on the other. The adapter cable enables a
ny standard USB peripheral to be attached to an OT
G device. (see below)

In order to attach two OTG devices together requi

res either a cable with a Micro-B plug at one end a


nd a Micro-A plug at the other or can be achieved
using a combination of the PC cable and adapter c
able.

USB 3.0 Bus Architecture

Operates concurrently with USB 2.0


(Dual bus architecture)

Mechanically and electrically


backward/forward compatible
Devices configured at fastest signaling
rate
Hubs contain additional ports
Speed and power efficiency
Non polling reduces power
consumption
Additional data lines included to
increase speed
Efficiency of bandwidth
simultaneous communication between
host and device

Dedicated in and out lines allow


communication between host and
device

You might also like