Вы находитесь на странице: 1из 25

Understanding USB Concepts

Universal Serial Bus


Step by Step Tutorial

IMBUENT TECHNOLOGIES PVT. LTD.


Ludhiana, Punjab,India
Universal Serial Bus : Introduction
 The Universal Serial Bus (USB) is one of the most common
interfaces used in electronic consumer products today, including
PCs, cameras, GPS devices, MP3 players, modems, printers,
and scanners, to name a few.
 The USB was originally developed by
• Compaq,
• Microsoft,
• Intel,
• and NEC,
• and later by Hewlett-Packard, Lucent, and Philips as well.

These companies eventually formed the nonprofit corporation USB


Implementers Forum Inc. to organize the development and publication
of USB specifications.

2
Cont’d:
The USB is four-wire serial cable of up to three or even five meters in
length.

The USB is a high-speed serial interface that can also provide power to
devices connected to it. A USB bus supports up to 127 devices.

A device can be plugged into a hub which is plugged into another hub, and
so on. The maximum number of tiers permitted is six.

For longer-distance bus communications, other methods such as use of


Ethernet are recommended.

3
Who Developed USB?
Universal Serial Bus (USB) is a specification[1] to establish communication between
devices and a host controller (usually a personal computer), developed and invented
by Ajay Bhatt while working for Intel.

4
USB Device
1) USB as Host
Like .. USB based Audio, Video Player

1) USB as Device
Like.. USB Based Pen Drive, Mouse

1) USB as OTG (On- to – Go)


Latest One. Same device will acts Host and Device using Same
Bus(Signals) Like.. Nokia N8 Mobile.

USB On-The-Go, often abbreviated USB OTG, is part of a supplement[1] to the USB 2.0 specification originally agreed upon
in late 2001 and later revised.[2] The specification allows for devices that generally fulfill the role of being a slave USB device
(which might be, e. g. digital audio player or mobile phone) to a USB host (usually a desktop or notebook computer) to
become the host themselves when paired with another USB device. The latest version of the supplement also defines
behavior for an Embedded Host which has targeted capabilities and the same USB Standard-A port used by PCs.

Source:
http://en.wikipedia.org/wiki/USB_On-The-Go

5
1.USB Fundamentals:
Bus Specifications:

Low speed —1.5Mb/sec


Full speed —12Mb/sec
High speed — 480Mb/sec (Version USB 2.0)
Super Speed — 5.0 Gbit/sec (Latest Version USB 3.0)

Wireless USB - 53 - 480 Mbit/s (in 3-10 meter)

The maximum power available to an external device is limited to about


100mA at 5.0V

6
Advertisement:

EMBEDDED TRAINING IN LUDHIANA


PUNJAB, INDIA

8051/ PIC / ARM / EMBEDDED LINUX

www.imbuent.com

7
2. USB Connector (s):
 USB device comes with their own USB cable, which may have
two type of connectors
• A Type Connector
• B Type Connector

 A Type Connector
• This connector goes to computer A type Connector
• This is upstream connector

 B Type Connector
• This connector goes to device side
• This is downstream connector

B type Connector

8
2. Mini USB Connector (s): Cont’d

Source:
http://en.wikipedia.org/wiki/Universal_Serial_Bus#Physical_appearance

9
3. USB Pin Assignment:
USB is a four-wire interface implemented using a four-core shielded cable. Two
types of connectors are specified and used.

10
4. USB Signals
 USB signals are bi-phase, and signals are sent from the host
computer using the NRZI (non-return to zero inverted) data
encoding technique

11
5. USB Speed Specifications

USB has four Signals i.e. Vbus, D+ , D- ,GND

For Full Speed Bus:


If D- must be having pulled up resistance with +5V.
For Low Speed Bus:
If D+ must be having pulled up resistance with +5V.

When no device is plugged in, the host will see both data lines as low. Connecting a device to the
bus will pull either the D+ or the D- line to logic high, and the host will know that a device is
plugged into the bus

12
6. USB Transaction:
Data is transmitted on a USB bus in packets. A packet starts with a sync pattern to allow
the receiver clock to synchronize with the data. The data bytes of the packet follow,
ending with an end of packet signal.

There are four packet formats, based on which PID is at the start of the packet:
1. Token packets,
2. Data packets,
3. Handshake packets
4. Special packets

13
7. USB Transfer:
•Bulk transfer:

•Interrupt transfers:

•Isochronous transfers:

•Control transfer:

14
8.Enumeration:
When a device is plugged into a USB bus, it becomes known to the host
through a process called enumeration (Means Part of Host i.e. Host)

15
9. Descriptor:

All USB devices have a hierarchy of descriptors that describe various features of
the device: the manufacturer ID, the version of the device, the version of USB it
supports, what the device is, its power requirements, the number and type of
endpoints, and so forth.

The most common USB descriptors are:


• Device descriptors
• Configuration descriptors
• Interface descriptors
• HID descriptors
• Endpoint descriptors

16
Some common USB terms are:
HID : Human Interface Device

PID : Product ID

VID : Vendor ID
Endpoint: An endpoint is either a source or a sink of data. A single
USB device can have a number of endpoints, the limit being
sixteen IN and sixteen OUT endpoints.
Transaction: A transaction is a transfer of data on the bus.
Pipe: A pipe is a logical data connection between the host and an
endpoint.

Note: Vendor IDs are unique throughout the world and are issued by the USB implementers
. Please Log on to www.usb.org
Where to Get VID?? : http://www.usb.org/developers/vendor/

17
Examples: USB Device Class (HID)

18
Advertisement:

EMBEDDED TRAINING IN LUDHIANA


PUNJAB, INDIA

8051/ PIC / ARM / EMBEDDED LINUX

www.imbuent.com

19
Embedded USB: USB in MCUs
Microchip PIC18F4550 Host/Device

PIC24FJ256GB110 Host/Device

NxP LPC2148 Host/Device

TI LM3S9B90 Host/Device/USB On-to-Go

NxP LPC1768 Host/Device/USB On-to-Go

Microchip PIC32MX440F512H Host/Device/USB On-to-Go

20
Why USB??

1) USB Devices are plug and play.


2) Speed:USB is much faster than Traditional Communication Techniques like Serial,
Parallel

3) Implementation: Only Four Wires needs for USB.


4) Self Power and Low Cost
5) Size: Varity of Connectors available for USB interface.

6) Adaptation: USB interface is adapted by No. of Devices for different manufactures in All
Most all domain like Consumer, Industrial,Domestic applications for facilitate the user in
terms Of accessibility of use as well as upgradation of system.

21
How to Check USB Detail ?

22
USB Viewer:

http://www.ftdichip.com/Support/Utilities.htm
23
Example : Kingston USB Pen Drive

24
Thanks

http:// www.embeddedcraft.org
embeddedcraft@googlegroup.com
query@embeddedcraft.com

Вам также может понравиться