0% found this document useful (0 votes)
23 views29 pages

PSPHET406: VHDL & Communication Interface: UNIT-3: Understanding USB and USB Protocols

Uploaded by

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

PSPHET406: VHDL & Communication Interface: UNIT-3: Understanding USB and USB Protocols

Uploaded by

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

PSPHET406:

VHDL & Communication


Interface
UNIT-3: Understanding USB and USB
Protocols

Reference Book: USB Complete: The Developers


Guide by Jan Axelson
- Ninisha Patil
Syllabus
• USB Basics:
Uses and limits, Evolution of an interface, Bus components, Division of
Labor, Developing a Device.

• Inside USB Transfers:


Transfer Basics, Elements of a Transfer, USB 2.0 Transactions,
Ensuring Successful Transfers, SuperSpeed Transactions.

• A Transfer Type for Every Purpose:


Control transfers, Bulk Transfers, Interrupt Transfers,
Isochronous Transfers, More about time‐critical transfers.
Syllabus
• Enumeration:
How the Host learns about devices: The Process, Descriptors.

• Control Transfers:
Structured Requests for Critical Data: Elements of a Control Transfer,
Standard Requests, Other Requests.

• Chip Choices:
Components of USB device.

• How the Host Communicates:


Device Drivers, Inside the Layers, Writing Drivers, Using GUIDs.
Benefits to the User
One interface for many devices. USB is versatile enough for just
about any standard PC peripheral function. Instead of having a different
connector and cable type for each peripheral function, one interface
serves many.

Automatic configuration. When a user connects a USB device to a


PC, the operating system detects the device and loads the appropriate
software driver. The first time the device connects, the operating system
may prompt the user to insert a disc with driver software, but other than
that, installation is automatic. Users don’t need to reboot before using
the device.
Benefits to the User

Easy to connect. A typical PC has multiple USB ports, and hubs make
it easy to add ports without opening up the PC.

No user settings. USB devices don’t have user-selectable settings such


as port addresses and interrupt-request (IRQ) lines, so users have no
jumpers to set or configuration utilities to run.

Wireless options. USB originated as a wired interface, but


technologies are now available for wireless communications with USB
devices.
Benefits to the User
Convenient cables. USB connectors are small and compact compared
to con- nectors used by other interfaces such as RS-232. To ensure
reliable operation, the USB specification defines electrical requirements
for cables. A cable seg- ment can be as long as 5 m depending on bus
speed. With hubs, again depend- ing on bus speed, a device can be as
far as 30 m from its host PC.

Hot pluggable. Users can connect and disconnect a USB device


whenever they want, whether or not the system and device are
powered, without damaging the PC or device. The operating system
detects when a device is attached and read- ies it for use.
Benefits to the User
• No power supply required (sometimes). The USB interface
includes power-supply and ground lines that provide a nominal +5V
from the PC or a hub. A device that requires up to 500 mA (USB
2.0) or 900 mA (USB 3.0) can draw all of its power from the bus
instead of using a dedicated power supply. In contrast, devices that
use other interfaces may have to provide a power supply inside the
device or an external supply.

• InexpensiveBecause the host computer provides most of the


intelligence to control the interface, components for USB devices
are inexpensive. A device with a USB interface is likely to cost the
same or less than an equivalent device with a different interface.
Benefits to the User
• Multiple speeds USB supports four bus speeds: SuperSpeed at 5
Gbps, high speed at 480 Mbps, full speed at 12 Mbps, and low
speed at 1.5 Mbps. SuperSpeed requires a USB 3.0 host controller
in the host PC. USB 2.0 host controllers support low, full, and high
speeds. The USB protocols support data transfers at around 400
MB/s for SuperSpeed, 53 MB/s for high speed, 1.2 MB/s for full
speed, and 800 B/s for low speed. Hardware and soft- ware
limitations can result in lower real-world rates, however.
Benefits to the User
• Reliable USB’s reliability is due to both the hardware and the
protocols. The hardware specifications for USB drivers, receivers, and
cables ensure an electrically quiet interface that eliminates most noise
that could cause data errors. The USB pro- tocols enable detecting
errors in received data and notifying the sender so it can retransmit.
Hardware performs the detecting, notifying, and retransmitting
without software or user support.
Benefits to the User
• Power Saving
Power-saving circuits and protocols reduce a device’s power
consumption while keeping the device ready to communicate when
needed. Reducing power consumption saves money, helps the
environment, and for battery-powered devices, allows a longer time
between recharges.
Benefits for the Developer
Versatile
• USB’s four transfer types and four speeds make the interface feasible
for many types of peripherals.
• USB has transfer types suited for exchanging large and small blocks
of data, with and without time constraints. For data that can’t tolerate
delays, USB can guarantee bandwidth.
• These abilities are especially welcome under Windows where
accessing peripherals in real time is often a challenge. Although the
operating system, device drivers, and application soft- ware can
introduce unavoidable delays, USB makes it as easy as possible to
achieve transfers that are close to real time even on desktop systems.
Benefits for the Developer
Operating System Support
• Windows have USB support,
but other OS including Linux and Apple Computer’s Macintosh. Some
real-time kernels also support USB.
• A basic level , an operating system that supports USB must do three
things:
1. Detect when devices are attached to and removed from the system.
2. Communicate with newly attached devices to find out how to
exchange data with them.
3. Provide a mechanism that enables software drivers to pass
communications between the USB hardware and applications that
want to access USB peripherals.
Benefits for the Developer
• At a higher level, operating-system support may also mean the
inclusion of class drivers that enable applications to access specific
types of devices. If the operating system doesn’t include a driver
appropriate for a specific device, the device vendor must provide the
driver.
Benefits for the Developer
Device Support
On the device side, the hardware must include a controller chip that manages USB
communications. The device is responsible for responding to requests that identify
and configure the device and for reading and writing other data on the bus. Some
controllers perform some functions entirely in hardware.
Many USB controllers are based on popular microcontroller architectures such as
Intel Corporation’s 8051 or Microchip Technology’s PIC with added hard- ware
support for USB communications. Other controllers don’t contain a CPU but
instead provide a serial or parallel interface to an external microcontroller. If
you’re already familiar with a chip architecture that has a USB-capable variant,
you don’t need to learn a new architecture. Most chip companies provide exam-
ple code to help you get started.
Limitations
• Interface Limits
Limits of USB include distance constraints, no support for peer-to-peer
com- munications or broadcasting, and lack of support in older hardware
and operating systems.

1. Distance. USB was designed as a desktop-expansion bus where


devices are rela- tively close at hand. Other interfaces, including RS-
232, RS-485, IEEE-1394b, and Ethernet, allow much longer cables.
To extend the distance between a device and its host computer, an
option is to use USB to connect to a nearby device that functions as a
bridge to a long-distance interface to the end circuits.
Limitations
• Peer-to-Peer Communications.
Every USB communication is between a host computer and a device (except for
one option introduced with USB 3.0). The host is a PC or other computer with
host-controller hardware. The device con- tains device-controller hardware. Hosts
can’t talk to each other directly, and devices can’t talk to each other directly. Other
interfaces, such as IEEE-1394, allow direct device-to-device communication.
USB provides a partial solution with the USB On-The-Go option. An On-The-Go
device can function as both a device and a limited-capability host that
communicates with other devices.
Two USB hosts can communicate with each other via a bridge cable that con- tains
two USB devices with a shared buffer. USB 3.0 defines a new host-to-host cable
for SuperSpeed. With driver support, this cable can support host-to-host
communications.
USB versus Ethernet
For some devices, the choice is between USB and Ethernet. Ethernet’s
advantages include the ability to use very long cables, support for
broadcasting, and familiar Internet protocols. Ethernet hardware is more
complex and expensive than typical USB device hardware, however.
USB is also more versatile, with four transfer types and defined classes
for different device functions.
Evolution of Interface
1. USB 1.0:-
• Released in Jan 1996.
• USB compatibility in PC first became available with release with
Window 95’s Service Release-2.

• USB support in these versions was buggy and limited, due to


limited no. of USB peripherals.

• Situation improved with Window 98’s release in June 1998.

• Windows 98 Second Edition fixed bugs and further enhanced USB


support. 21
Evolution of Interface
2. USB 1.1:-

• Released in Sept 1998.


• Added one new transfer type (Interrupt OUT).

22
Evolution of Interface
3. USB 2.0:-
• By the time USB 2.0 developed, USB gained popularity and
become household for data transfer.

• USB 2.0 was released in April 2000.

• A high speed transfer of 480 Mbps was made available.

• It has bus speed 40 times faster than USB 1.1 and it remains
backward compatible with low and full speed interfaces. i.e. USB
1.1 port can accommodate USB 2.0 without losing 2.0’s speed.
23
Evolution of Interface
3. USB 2.0:-
• Due to backward compatibility, USB 2.0 supports low speed, full
speed, and high-speed (40 times full speed of USB 1.1) data
transfer.

• The ability to communicated at any speed increases complexity of


hubs but conserves the bus bandwidth and eliminates a need to used
different hubs for different speeds.

24
Evolution of Interface
3. USB 2.0:-
• Further to avoid confusion in customers about whether all USB 2.0
devices supports high speed, USB-IF was developed and under it:

• If device supports high speed: it was labelled as high speed with


messege on packaging ‘Fully compatible with Original USB and
Compatible with the USB 2.0 Specification’.

• If the device supports only low or full speed: it comes with messege
‘Compatible with the USB 2.0 Specification
• and Works with USB and Hi-Speed USB systems, peripherals and
cables.’ 25
Evolution of Interface
4. USB 3.0:-
• Released in Nov 2008.

• USB 3.0 compatible hardware was expected to be developed from


2009.

• Windows 7 and further version supports USB 3.0 devices.

• UDB 3.0 has a pairof wires for USB 2.0 traffic & additional wires
to support the new superspeed bus at 5 Gbps.

• Superspeed offers 10 times speed than USB 2.0’s high speed. 26


Evolution of Interface
4. USB 3.0:-
• Another important advantage USB 3.0 has over 2.0 is that the pair
of wires for each difference can transfer data in both directions at
same time.

• USB 3.0 also increases the amount of bus current device can draw
and defines protocols for more aggressive power saving and more
efficient data transfers.

• USB 3.0 is backwards compatible with USB 2.0 as well.


27
Evolution of Interface
5. USB On-The-Go (OTG):-
• USB interface has became interface-of-choice for all kinds of
peripherals.

• Developers now started to demand for a USB peripheral to access


other USB devices.

• E.g. One might want to attach a printer to a camera.

• The USB OTG defines a limited-capability host function that device


can implement to enable communication with USB peripherals.
28
Evolution of Interface
6. Wireless USB:-
• Particularly developed for wireless interfaces.

• Supports upto 480 Mbps speed.

• Cypress Semiconductor’s wireless USB enables implementing


wireless devices that functions as low-speed USB devices.

• Another option is to use an adapter that converts between USB and


a wireless interface like Bluetooth or WiFi.
29

You might also like