USB BASIC

16
UNIVERSAL SERIAL BUS (USB )

Transcript of USB BASIC

Page 1: USB BASIC

UNIVERSAL SERIAL BUS (USB)

Page 2: USB BASIC

SALIENT FEATURES

• Asynchronous serial communication.• Attachment is detected and device is

configured automatically.• Single standard connector.• 127 devices can be connected via hubs.• Three device speeds• Error detection/recovery is automatic.

Page 3: USB BASIC

SALIENT FEATURES• USB networks use a tiered-star topology• use a "speak-when-spoken-to" protocol;

peripherals cannot communicate with the host unless the host specifically requests communication.

• USB 3.0 is planned to allow for device-initiated communications towards the host

• A USB network relies on a single host at the top of the tree to control the network

Page 4: USB BASIC

SALIENT FEATURES• USB runs with a 5v power line• USB can connect peripherals such as mice, keybds,

digi cams, printers, personal media players, flash drives, and ext HDDs.

• USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time without reboot.

• Most emerging and widely used bus technology.

Page 5: USB BASIC

PC Host Software(USB Communication Flow)

Page 6: USB BASIC

USB DEVICE COMN

Page 7: USB BASIC

USB DEVICE COMN

• COMN BASED ON PIPES• PIPES ARE THE CONNECTION BETWEEN HOST

AND AN ENDPOINT• USB DEVICE CAN HAVE UP TO 32 ACTIVE PIPES:

16 INTO AND 16 OUT OF THE HOST CONTROLLER

• TWO TYPES OF PIPES: STREAM AND MESSAGE PIPES DEPENDING ON THE TYPE OF DATA TRANSFER.

Page 8: USB BASIC

TYPE OF DATA TRANSFER• Isochronous transfers: at some guaranteed data

rate but with possible data loss (e.g. realtime audio or video).

• Interrupt transfers: devices that need guaranteed quick responses (e.g. pointing devices and keyboards).

• Bulk transfers: large sporadic transfers using all available bandwidth(e.g. file transfers).

• Control transfers: typically used for short, simple commands to the device.

Page 9: USB BASIC

SIGNALLING TECHNOLOGY

• Signals are transmitted on a twisted pair data cable

• Use half-duplex differential signalling to reduce the effects of electromagnetic noise on longer lines

• USB 3.0 introduces two additional pairs of shielded twisted wire ,which permit higher data rate, and full duplex operation.

Page 10: USB BASIC

SIGNALLING TECHNOLOGY• A low-speed rate of 1.5 Mbps is defined by

USB 1.0. It is intended primarily to save cost.• The full-speed rate of 12 Mbps is the basic

USB data rate defined by USB 1.1. All USB hubs support full-bandwidth.

• A high-speed (USB 2.0) rate of 480 Mbps .All hi-speed devices support this bandwidth.

• A SuperSpeed (USB 3.0) rate of 4800 Mbps includes new wiring and full duplex operation.

Page 11: USB BASIC

I/O Device

Page 12: USB BASIC

DEVICE CONNECTIVITY

• USB DEFINES CLASS CODES USED TO IDENTIFY A DEVICE’S FUNCTIONALITY AND TO LOAD A DEVICE DRIVER BASED ON THAT FUNCTIONALITY

• THIS ENABLES EVERY DEVICE DRIVER WRITER TO SUPPORT DEVICES FROM DIFFERENT MANUFACTURERS THAT COMPLY WITH A GIVEN CLASS CODE.

Page 13: USB BASIC

SOME DEVICE CLASSESClass Usage Description Examples

01h Interface Audio Speaker, microphone, sound card

03h Interface Human Interface Device (HID)

Keyboard, mouse, joystick

07h Interface PrinterLaser printer, inkjet printer, CNC machine

08h Interface Mass storage

USB flash drive, memory card reader, digital audio player, digital camera, external

09h Device USB hub Full bandwidth hub

0Bh Interface Smart Card USB smart card reader

0Dh Interface Content Security Finger Print Reader

0Eh Interface Video Webcam

Page 14: USB BASIC

DATA TRANSFER• USB COMN TAKES THE FORM OF PACKETS• ALL PACKETS ARE SENT FROM THE HOST, VIA THE

ROOT HUB TO THE DEVICES• ALL PACKETS ARE MADE OF 8-BIT BYTES,

TRANSMITTED LSB FIRST• THE FIRST BYTE IS A PACKET IDENTIFIER (PID)

BYTE.• PACKETS COME IN THREE BASIC TYPES, EACH

WITH A DIFFERENT FORMAT-HANDSHAKE,TOKEN AND DATA PACKETS

Page 15: USB BASIC

USB PID BYTESType PID value

(msb-first)

Transmitted byte(lsb-first)

Name Description

Reserved 0000 0000 1111

Token

1000 0001 1110 SPLITHigh-bandwidth (USB 2.0) split transaction

0100 0010 1101 PINGCheck if endpoint can accept data (USB 2.0)

Data

0011 1100 0011 DATA0 Even-numbered data packet

1011 1101 0010 DATA1 Odd-numbered data packet

Handshake0010 0100 1011 ACK Data packet

accepted

1010 0101 1010 NAKData packet not accepted; please retransmit

Page 16: USB BASIC

FUTURE TRENDS- USB 3.0• 12 GB/SEC DATA SPEED • CACHE-ACCELERATION OF OLD USB DEVICES • FULLY PLUG AND PLAY WITHIN 500 MILLISEC • REALLY POSSIBLE TO INSTALL 128 DEVICES • 2048X1536X32BITS 75FRAMES/SEC WEBCAM • NINTENDO2USB3 AND PLAYSTATION3USB3

DEVICE LINK CABLES • FULLY COMPATIBLE WITH IEEE 1394 (SERIAL

BUS INTERFACE STD)