KEMBAR78
USB PPT | PDF | Usb | Computer Engineering
0% found this document useful (0 votes)
42 views20 pages

USB PPT

Uploaded by

Kajal Singh
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)
42 views20 pages

USB PPT

Uploaded by

Kajal Singh
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/ 20

Universal Serial Bus (USB)

• 12Mbps for full speed operation and


1.5 Mbps for slow speed operation
• Cable lengths : 3 ~ 5 m (max)
• Can power I/O devices (100mA max.)
from 5.0V and ground lines Pin # Signal Color
• Upto 127 devices can be connected 1 5.0V Red
simultaneously 2 +Data Green
3 -Data White
4 Ground Black
USB Benefits
• Ease of Use
Most convenient and easy-to-use interface, widely accepted in the market

• One interface for many devices.


USB is usable with many kinds of peripherals. Same connector type for each peripheral and no supporting hardware is
not required.

• Automatic configuration.
PC OS automatically detects the peripheral and loads the appropriate software driver.

• Hot pluggable
Connect/ disconnect a peripheral whenever you want, without damaging the PC or peripheral. The operating system
detects when a device is attached and readies it for use.

• No power supply required (sometimes).


A peripheral that requires up to 100 mA can draw all of its power from the bus instead of having its own supply. OR,
allows I/O devices to have their own power supply

• Noise Suppression
Suppresses PC switching power supply generated noise for USB devices with own power supply. Ideal for devices such as
USB sound cards, etc.

• Multiple Devices
Multiplexes among multiple devices with a 7-bit address allowing upto 127 devices connected to the bus simultaneously

• Robustness
Built-in error handling and correction mechanism into the USB protocol

• Isochronous Bandwidth
Supports isochronous data transfer with guaranteed bandwidth and low latencies suitable for telephony, audio etc.
USB data
• Data over USB is transmitted LSB first.

• Data signals are biphase signals. When +data is at 5.0V, -data is at


0V, and vice versa. Benefit is improved immunity to noise, since,
noise may not affect both lines simultaneously

• USB uses NRZI


(non return to zero, inverted)
encoding scheme.
1 : no change
0 : inverted

• Bit stuffing: Inserts an extra redundant 0, if six consecutive 1s are


transmitted. To prevent loss of synchronization.
USB signals and states
• Suspend: A connected device not in use can be
powered down by suspending the device. Nothing
sent for at least 3 ms will suspend the device.
A suspended device draws no more than 0.5mA from
Vcc.
A suspended device must be able to recognize the
resume and reset signal
The suspend feature in USB optimizes power
consumption.
• Resume: wakes up a suspended device
• Keep Alive Signal: An SOP (at full speed) or an EOP (at
low speed) sent every 1 ms prevents the device from
getting suspended and is known as keep alive signal
Speed Indication
• Pull-up resistors are used to indicate the presence of a connected device, else the
USB host/hub detects nothing.
• Pulling up the D+ line to 3.3V
will indicate full speed operation

• Pulling up the D- line to 3.3V


will indicate low speed operation
USB Protocol
• USB is a host-centric protocol, i.e, all transactions are initiated by the host.
• Every USB transaction consists of a Token packet, (Data packet) and Status packet.
• Every packet starts with a sync byte (80H).
• PIDs (packet Identification byte) are indicators of the packet type that follows. PID is 4 bits in size, but the bits
are complemented and appended at LSB making 8 bits in total.
• Packet formats PID Name Type Description
E1H OUT Token Host function transaction
D2H ACK Handshake Packet receive success
C3H Data0 Data Data packet PID even
A5H SOF Token Start of frame
69H IN Token Function Host transaction
5AH NAK Handshake Packet failure
4BH Data1 Data Data packet PID odd
3CH PRE Special Host preamble
2DH Setup Token Setup
1EH Stall Token Stalled

• ADDR contains the 7-bit address of connected device.


• Stop and wait flow control: waits for ACK/NAK after every packet.
• Retransmission upon packet failure.
Nodes, Hubs, Host & Endpoints
• Nodes or USB devices plug in to USB ports which are actual hardware interconnect
points.
• A hub provisions a number of USB ports which can be expanded by plugging in another
hub into a USB port in a tiered topology. The number of tiers permitted is six.
• Hubs can be a powered hub or an unpowered hub. Usually devices that draw power
from the USB are connected to powered hubs, while devices with their own power
supply can be connected to unpowered hubs.
• A single USB host controller controls upto 127 slave devices.
• At the software level, a USB device may have several
functions that sink or source data, from the real
world. Endpoints are logical gateways to the USB
function hardware and occur at the end of the
communications channel. Abstracting the USB
function hardware, Endpoints can be
considered to be the source/ sink of data
and can be classified as IN endpoint and
OUT endpoint.
• Endpoint 0 must be supported by all
devices as it receives all control
/ status requests.
Pipes
• Pipes are logical connection between the two ends of a communication channel:
the host (PC) and endpoints.
• Pipes can have a set of associated attributes such as bandwidth, data transfer
type, direction, maximum packet/buffer size, etc.
• Two types of pipes: (i) Stream pipes without any defined USB format or data type,
controlled by either host/device and in either IN/ OUT direction (ii) Message
pipes with a defined USB format, controlled and initiated by host
• Data Transfer Types:
– Control Transfers (message pipes)
for short simple commands and status responses
– Bulk Data Transfers (stream pipes)
for large sporadic data transfer using all remaining bandwidth (no guarantee on
bandwidth and latency)
– Interrupt Data Transfers
for guaranteed quick responses (guaranteed bounded latency)
– Isochronous Data transfers
for streaming data with guaranteed bandwidth but with no error correction
Cyclic redundancy check (CRC)
• For error detection and correction
• Two types of CRC in USB
• 5-bit CRC
generator polynomial: X5+X2+1
• 16-bit CRC (for data packets)
generator polynomial: X16+ X15+X2+1
• CRC decreases overall data rate by adding
redundant CRC bits.
CRC example
• 3-bit CRC
• Generator polynomial: X3+X+1

• Transmitted sequence: 11010011101100 100


• The same process at receiver will yield all zeroes, for no errors
USB versions
 USB 1.0 released in 15th January, 1996
 Full speed rate 12Mbps
 Low speed rate of 1.5Mbps
 Not much popular
 USB 1.1 released in 23rd September, 1998
 First USB standard to gain popularity
 USB 2.0 released on April 27, 2000
 USB 3.0 released on 12 November, 2008
 Wireless USB (wUSB) released on 12th May, 2005
 Used Ultra Wide Band (UWB) as the radio technology
 480Mbps upto 3m/ 110Mbps upto 10m distance
USB 2.0
• A big step in USB’s 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-compliant 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 as needed
between the peripheral’s speed and high speed.
– This increases the hub’s complexity but makes good use of the bus time
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)
 "SuperSpeed" bus provides a fourth transfer mode at 5.0 Gbit/s

 Extensible – Designed to scale > 25Gbps


 Optimized power efficiency
 No device polling (asynchronous notifications)
 Lower active and idle power requirements

 Communication is full-duplex during SuperSpeed; (in the modes supported


previously, by 1.x and 2.0, communication is half-duplex, with direction
controlled by the host.)
 Backward / Forward 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
Speed Check
USB Connector Types

• Type A connectors on host devices that supply power


• Type B connectors on target devices that receive power.
USB Interface hardware
• SIE : Serial Interface Engine
It is part of both the host’s and the device’s physical layer that
performs
=>Serialization and De-serialization
=>Encoding and Decoding
=>Generate CRC (out) and Verify CRC (in)
=>Detect PID
• HC : Host Controller
=>It is an additional hardware to ensure that everything 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
USB On-The-Go (OTG)
• Released in December 2006.
• USB On-The-Go makes it possible for two USB
devices to communicate with each other without
requiring 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 (host);
– A keyboard (peripheral) connected to a mobile phone
(host)
USB OTG supported by Micro-AB
• An OTG product must have a single Micro-AB receptacle and
no other USB receptacles.
• To attach to a PC (host),an OTG device (peripheral) requires an
adapter cable which has a USB Standard-A plug on one end
and a Micro-B plug on the other end.
• In order to attach a peripheral to an OTG device (host)
– the peripheral either needs to have a cable ending in a
Micro-A plug
– OR, an adapter cable which has a Micro-A plug on one end
and a Standard-A receptacle on the other. The adapter
cable enables any standard USB peripheral to be attached
to an OTG device.
• In order to attach two OTG devices together, requires either a
cable with a Micro-A plug at one end and micro B plug at
other end or can be achieved using a combination of the PC
cable and adapter cable.

You might also like