SlideShare a Scribd company logo
Agenda
 USB Specifications
 USB Basics
 Components
 Onion introduction
 Signaling
 Packets
 Transfers
 Requests
 Operating System Interface
 USB Resources
USB in 1996:
Initially introduced as an
additional connector for new
applications.
USB
PC Connectivity Vision
Universal Serial Bus
Keyboard
Mouse
Serial
Port
Parallel
Port
SCSI
Port
Sound/Game
Ports
Graphics
Port
LAN Modem
Graphics
Port
LAN
USB Future:
The PC evolves into a simpler,
easier to use appliance. USB USB USB
Telephony, Modem, Keyboard, Mouse,Game ports, Serial
ports Device,Digital Audio, Printer, Scanner
USB Specifications
USB 1.0 – The original spec, superseded quickly by
USB 1.1
USB 1.1 – Minor enhancements to the USB 1.0 spec,
supported Low and Full speed devices
USB 2.0 – The Current Standard, added “high
speed’ to USB 1.1
USB OTG – USB On-the-Go, a supplement to the
USB 2.0 spec that added a form of device to device
communications.
USB Founding Companies
USB 1.0 USB 2.0
Compaq Compaq
Intel Intel
Microsoft Microsoft
NEC NEC
IBM Lucent
DEC HP
Northern Telecom Philips
USB 2.0 in a Nutshell
 Runs 40X faster than USB 1.1
 Low speed: 1.5Mb/s
 Full speed: 12Mb/s
 High speed: 480Mb/s
 Fully supports existing USB devices
 Forward compatible—plug existing 1.1 devices into new 2.0
hosts
 Backward compatible—plug new 2.0 devices into existing 1.1
hosts
 Uses the same cables as USB 1.1
Hardware Overview...
 Topology
 Tiered Star (Distributes Connectivity Points)
 127 logical connections (upto 5 meters per segment)
 Upto 6 tiers
 ...
Universal Serial Bus
USB
Monitor
SpeakerPen Mouse
Kbd
Mic Phone
PC
HUBHUB
HOST/HUB
USB On-the-Go (USB OTG)
 Connect two ‘peripherals’ together
 PC is not required (but still supported)
 Allow peripherals to wake up hosts
 Allow two devices to exchange the host role
 New OTG devices can tap into the existing 900
million USB devices
USB OTG Example Applications
Source: Beeman: www.usbonthego.com
Exchange pictures
Upload pictures to web
Print pictures
Camera
Cell Phone
Printer
Camera
Exchange songsMP3 playerMP3 player
Exchange Contact info
Print call info
Upload pictures to web
Cell Phone
Printer
Camera
Cell
Phone
Synchronize phone list, meetings
Upload pictures
Download songs
Cell Phone
Camera
MP3 player
PC
ApplicationsPeripheralHost
USB OTG Details
 Defines a new connector and cable
 “Mini AB” receptacle
 Mini-A to Mini-B cable
 Cable establishes the default host
 A-Device is the default host
 Dual-role USB devices:
 Are sometimes a peripheral, sometimes a host
 Must use the new AB connector
 Provide limited host capability
 Targeted peripheral list
 Operate at full speed (high speed optional)
USB Basics
USB Basics USB is a Master/Slave Polled Bus (PC is the “Master”,
Devices are the “Slaves”)
 USB has a “tiered star” architecture that can USB can
support up to 127 devices
 7-bit address = 128 – root hub – reserved addr 0 for enumeration
 USB is “Hot Pluggable”
 USB connections can provide both data and power to the
devices
USB is not Simple
 Outside, it is simple
 The “rich user experience” requires some inner
complexity
 Even though it replaces serial and parallel ports, it’s
not a drop-in replacement
 It’s electrically simple, but a whole protocol layer is
added
USB Projects Can Require a
Significant Code Development
Effort
 Device side
 USB houskeeping firmware
 Application firmware
 Host side
 Driver (maybe)
 Application software
USB Components
Components of USB Systems
USB Host Controllers
USB Hubs
USB Cables
USB Peripheral Devices
USB Host Controllers
Reside in PC on motherboard or add-in card
Are the “master” device on the USB bus
Host Controller has integral “Root Hub”
Host Controller Interfaces:
 Universal Host Controller Interface (UHCI)
 Open Host Controller Interface (OHCI)
 Enhanced Host Controller Interface (EHCI)
USB Cables
 Transport both Data and Power
 Four wires: Vbus, GND, D+, D–
 Cables are 5 meters MAX
 Two connector types, “A” and “B”
 Prevents illegal topologies
 “A” connectors are the ones that goes to the PC or Hub,
“B” connectors goes to the device) (OTG adds Miny A
and Mini B connectors)
 Cables can be either “captive” (like mice) or
detachable
 Cables can be unshielded (Low speed devices)
or shielded (Full Speed and High Speed devices)
 USB extension cables are ILLEGAL
USB Hubs
 A hub provides additional connection points (ports)
for devices
Hubs can be:
 Self-Powered (<= 500ma to each device)
 Bus-Powered (<= 100mA to each device)
Hubs contain most of the “magic” and differences
between USB 1.1 and USB 2.0
USB Devices
Devices can be:
 Self-Powered
 External Power Source (i.e. wall wart)
 Batteries
 Bus-Powered
 Low Power Bus Powered (<= 100mA)
 High Power Bus Powered >100mA, <=500mA)
Devices are “self describing”
 Devices return data (USB descriptors) to host to indicate its
capabilities, configurations, and how the device is able to
communicate
Compound and Composite Devices
 Composite Device
 Multiple interfaces, independently controlled
 Each interface can have a different driver
 Compound Device
 Collection of separate functions, each with a
USB address, connected to an internal hub
 Example: Keyboard & Trackball in same
package
USB is a Polled BUS
 The Host (PC) initiates all transfers
 Devices respond to host requests
 Direction: OUT is host-to-device
 Direction: IN is device-to-host
 USB is NOT peer-to-peer (not even in USB OTG)
USB Topology
PC
USB USB
“Tiered Star”
Hub
USB USB USB USB
PC
USB USB
Device Device Device
Device Device
Host
Root Hub
Device
DeviceDevice
Device
HUB
Device
HUB
Hot Plug and Play feature
 Device attachment on Hub port
 Device is detected
 Downstream port is enabled
 Configuration of Device by Host
Device
USB Configuration Process
Enumeration
 Host Software is responsible for Device
configuration
Host
Root Hub
Device
DeviceDevice
Device Device
HUB
Device
HUB
Universal Serial Bus, details
Process of Configuration is
accomplished via Control Transfers
USB Transfer Speeds
 USB 1.1:
 Low speed is 1.5Mb/s
 Full speed is 12Mb/s
 USB 2.0
 Low speed is 1.5Mb/s
 Full speed is 12Mb/s
 High speed is 480 Mb/s
There is a VERY common misconception that say a device
is USB 2.0 compliant that it means that it is High Speed
device. It does NOT!
Device Abstractions...
- Device
 Common features and interactions of devices
 Typically controlled by system software
- Function
 Highest level I/F between device driver and function
- End Point
 Ultimate data source or sink at the device end
 Each endpoint is unidirectional and has a transfer
type associated with it‘s Peripheral
Endpoints
 USB Spec: “a source or sink of data”
 A Control Transfer Type endpoint is bi-directional
 Others are uni-directional
 Four address bits plus a direction bit selects
between up to 32 buffers (FIFOs)
 Different USB chips support
 Various numbers of endpoints
 Various buffer sizes
 Each device must have 1 Control Type Endpoint
(Commonly referred to as Endpoint 0 or the
Default Endpoint)
Pipes
 An abstraction used by the USB spec used to indicate
that 2 endpoints are joined (one in the PC Host and
the other in the device).
 CONTROL pipe is bi-directional
 Others are uni-directional
USB Descriptors
Device Descriptors
 Contains the VID/PID/DID/Serial Number
Configuration Descriptors
Interface Descriptors
Endpoint Descriptors
String Descriptors
Device Qualifier Descriptors (USB 2.0)
Other Speed Configuration Descriptors (USB 2.0)
USB “Classes” can add other class specific
Descriptors
OS Interface
Requests
Transfers
The USB Onion
Packets
Signaling
Signaling
USB Signaling
USB utilizes differential signaling on the D+ and
D- lines.
Data is encoded in “non-return to zero with bit
stuffing”
 Bit stuffing is used to ensure enough transitions for
the clock recovery circuitry.
Most designs use silicon that incorporates an
integral Serial Interface Engine (SIE) so you don’t
have to worry about the decoding yourself.
PCB layout of D= and D- requires care (especially
on High Speed devices).
The SIE
(Serial Interface Engine)
Serial
Interface
Engine
(SIE)
D+
Bytes
USB
Transceiver
D+
Packets
USB Packets
 USB data travels in packets
 Identified by “Packet ID” (PID)
 Token packet tells what’s coming
 Data packets deliver bytes
 Handshake packets report success or otherwise
Packet IDs (PIDS)
Token Packets
 IN, OUT, SOF, SETUP
Data Packets
 DATA0, DATA1 (USB LS/FS)
 DATA2, MDATA (USB HS)
Handshake Packets
 ACK, NAK, STALL (USB LS/FS)
 NYET (USB HS)
Handshaking Packets
 Used to ensure correct data delivery on Control, Bulk
and Interrupt Transfers
 ACK – Received with out Error
 NAK – Device Busy, has no data
 Stall – Unsupported Request, Request Failed
 No Response – Request not received or corrupt, will be
retried up to 3 times.
Packets: Identified by PIDS
D
A
T
A
0
D
A
T
A
1
I
N
O
U
T
A
C
K
N
A
K
S
O
F
S
E
T
U
P
S
T
A
L
L
P
R
E
Three Packet Types
O
U
T
A
D
D
R
E
N
D
P
C
R
C
5
Token Packet
H
D
A
T
A
0
Payload
Data
C
R
C
1
6
Data Packet
H
A
C
K
H/S Pkt
D

More Related Content

What's hot

Parts of a Computer: Cables
Parts of a Computer: CablesParts of a Computer: Cables
Parts of a Computer: Cables
Luz Divina Alguno
 
Basics of Connectors
Basics of ConnectorsBasics of Connectors
Basics of Connectors
Pantech ProLabs India Pvt Ltd
 
Identification of ports & cables adapter cards
Identification of ports & cables adapter cardsIdentification of ports & cables adapter cards
Identification of ports & cables adapter cardsprakasa mani
 
Pc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnlinePc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnline
Neil Farley
 
16 supporting io devices
16 supporting io devices16 supporting io devices
16 supporting io devices
hafizhanif86
 
USB presentation by Mishuk
USB presentation by MishukUSB presentation by Mishuk
USB presentation by Mishuk
mks mk
 
Muhammad Ahsan Rauf Presentation about USB
Muhammad Ahsan Rauf Presentation about USBMuhammad Ahsan Rauf Presentation about USB
Muhammad Ahsan Rauf Presentation about USB
Rider Ahsan
 
USB 3.0 -Infinite Possibilities
USB 3.0 -Infinite PossibilitiesUSB 3.0 -Infinite Possibilities
USB 3.0 -Infinite Possibilities
Rehan Guha
 
act_4@hfa
act_4@hfaact_4@hfa
act_4@hfa
guest0c7db41
 
A2 Video Streamer
A2 Video StreamerA2 Video Streamer
A2 Video Streamer
Andrew Roughan
 
ITFT_Peripheral devices
ITFT_Peripheral devices ITFT_Peripheral devices
ITFT_Peripheral devices
Swati Aggarwal
 
External Cards and Slots
External Cards and SlotsExternal Cards and Slots
External Cards and Slots
Arif Samoon
 
motherboard
motherboardmotherboard
motherboard
iyinyan
 
IT Book of Knowledge
IT Book of KnowledgeIT Book of Knowledge
IT Book of KnowledgePhil Primeau
 
Sound systems on linux
Sound systems on linuxSound systems on linux
Sound systems on linuxDeepak KARDA
 

What's hot (20)

Parts of a Computer: Cables
Parts of a Computer: CablesParts of a Computer: Cables
Parts of a Computer: Cables
 
Basics of Connectors
Basics of ConnectorsBasics of Connectors
Basics of Connectors
 
Identification of ports & cables adapter cards
Identification of ports & cables adapter cardsIdentification of ports & cables adapter cards
Identification of ports & cables adapter cards
 
Usb Overview
Usb OverviewUsb Overview
Usb Overview
 
Pc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnlinePc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnline
 
16 supporting io devices
16 supporting io devices16 supporting io devices
16 supporting io devices
 
USB presentation by Mishuk
USB presentation by MishukUSB presentation by Mishuk
USB presentation by Mishuk
 
Muhammad Ahsan Rauf Presentation about USB
Muhammad Ahsan Rauf Presentation about USBMuhammad Ahsan Rauf Presentation about USB
Muhammad Ahsan Rauf Presentation about USB
 
Spec00462
Spec00462Spec00462
Spec00462
 
USB 3.0 -Infinite Possibilities
USB 3.0 -Infinite PossibilitiesUSB 3.0 -Infinite Possibilities
USB 3.0 -Infinite Possibilities
 
act_4@hfa
act_4@hfaact_4@hfa
act_4@hfa
 
A2 Video Streamer
A2 Video StreamerA2 Video Streamer
A2 Video Streamer
 
EDP hardware
EDP hardwareEDP hardware
EDP hardware
 
ITFT_Peripheral devices
ITFT_Peripheral devices ITFT_Peripheral devices
ITFT_Peripheral devices
 
External Cards and Slots
External Cards and SlotsExternal Cards and Slots
External Cards and Slots
 
Usb
UsbUsb
Usb
 
motherboard
motherboardmotherboard
motherboard
 
IT Book of Knowledge
IT Book of KnowledgeIT Book of Knowledge
IT Book of Knowledge
 
Sound systems on linux
Sound systems on linuxSound systems on linux
Sound systems on linux
 
Usb 3.0
Usb 3.0Usb 3.0
Usb 3.0
 

Viewers also liked

Wireless electronic notice board using rf
Wireless electronic notice board using rfWireless electronic notice board using rf
Wireless electronic notice board using rf
Jagadeesh Yadav
 
Electrical engineering labs modernization
Electrical engineering labs modernizationElectrical engineering labs modernization
Electrical engineering labs modernization
Jabez Winston
 
15EE51 - Microcontrollers Laboratory
15EE51 - Microcontrollers Laboratory15EE51 - Microcontrollers Laboratory
15EE51 - Microcontrollers Laboratory
Jabez Winston
 
MPLABX with proteus
MPLABX with proteusMPLABX with proteus
MPLABX with proteus
Jabez Winston
 
Protection and Switchgear-EE2402 notes Unit-2
Protection and Switchgear-EE2402 notes Unit-2Protection and Switchgear-EE2402 notes Unit-2
Protection and Switchgear-EE2402 notes Unit-2
Jabez Winston
 
CAN in linux
CAN in linuxCAN in linux
CAN in linux
Jabez Winston
 
Fault avoidance and fault tolerance
Fault avoidance and fault toleranceFault avoidance and fault tolerance
Fault avoidance and fault tolerance
Jabez Winston
 
Local Interconnect Network
Local Interconnect NetworkLocal Interconnect Network
Local Interconnect Network
Jabez Winston
 
00 lab view arduino
00 lab view arduino00 lab view arduino
00 lab view arduino
Vaporla Ute
 
Labview applications in healthcare
Labview applications in healthcareLabview applications in healthcare
Labview applications in healthcare
Bharat Thakur
 
Intelligent Energy Systems
Intelligent Energy SystemsIntelligent Energy Systems
Intelligent Energy Systems
Thorsten MAYER
 
VLSI Design
VLSI DesignVLSI Design
VLSI Design
Jabez Winston
 
Arduino+lab view
Arduino+lab viewArduino+lab view
Arduino+lab view
francisco javier
 
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduino
Dr. Pranav Rathi
 
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
Varun Kambrath
 
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWSIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
Pooja Shukla
 
Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)
Manipal University Jaipur
 

Viewers also liked (18)

Wireless electronic notice board using rf
Wireless electronic notice board using rfWireless electronic notice board using rf
Wireless electronic notice board using rf
 
Electrical engineering labs modernization
Electrical engineering labs modernizationElectrical engineering labs modernization
Electrical engineering labs modernization
 
15EE51 - Microcontrollers Laboratory
15EE51 - Microcontrollers Laboratory15EE51 - Microcontrollers Laboratory
15EE51 - Microcontrollers Laboratory
 
MPLABX with proteus
MPLABX with proteusMPLABX with proteus
MPLABX with proteus
 
Protection and Switchgear-EE2402 notes Unit-2
Protection and Switchgear-EE2402 notes Unit-2Protection and Switchgear-EE2402 notes Unit-2
Protection and Switchgear-EE2402 notes Unit-2
 
CAN in linux
CAN in linuxCAN in linux
CAN in linux
 
Fault avoidance and fault tolerance
Fault avoidance and fault toleranceFault avoidance and fault tolerance
Fault avoidance and fault tolerance
 
Local Interconnect Network
Local Interconnect NetworkLocal Interconnect Network
Local Interconnect Network
 
00 lab view arduino
00 lab view arduino00 lab view arduino
00 lab view arduino
 
Labview applications in healthcare
Labview applications in healthcareLabview applications in healthcare
Labview applications in healthcare
 
Intelligent Energy Systems
Intelligent Energy SystemsIntelligent Energy Systems
Intelligent Energy Systems
 
VLSI Design
VLSI DesignVLSI Design
VLSI Design
 
Labview
Labview Labview
Labview
 
Arduino+lab view
Arduino+lab viewArduino+lab view
Arduino+lab view
 
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduino
 
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
 
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWSIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
 
Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)
 

Similar to Advance of usb

USB 2.0
USB 2.0USB 2.0
Choosing_(and_Implem..
Choosing_(and_Implem..Choosing_(and_Implem..
Choosing_(and_Implem..webhostingguy
 
Usb 72213 76207
Usb 72213 76207Usb 72213 76207
Usb 72213 76207
Muruly Krishan
 
Usb Pinout
Usb PinoutUsb Pinout
Usb Pinout
Sais Abdelkrim
 
Usb universal serial bus
Usb   universal serial busUsb   universal serial bus
Usb universal serial bus
Dr. Anita Bhandari
 
Wireless USB
Wireless USBWireless USB
Wireless USB
Nitin Sonawane
 
2 the visible pc
2 the visible pc2 the visible pc
2 the visible pc
hafizhanif86
 
Usb In-a-Nutshell
Usb In-a-NutshellUsb In-a-Nutshell
Usb In-a-Nutshell
Avalue Technology
 
usb protocol and its various application
usb protocol and its various applicationusb protocol and its various application
usb protocol and its various application
deosaugat144
 
HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0
pranay agrawal
 
Usb old
Usb oldUsb old
Usb old
surendartech
 
Usb
UsbUsb
USB Universal Serial Bus
USB Universal Serial BusUSB Universal Serial Bus
USB Universal Serial Bus
koushik960
 
Android usb audio
Android usb audioAndroid usb audio
Android usb audio
Ba Dan
 

Similar to Advance of usb (20)

USB 2.0
USB 2.0USB 2.0
USB 2.0
 
Usb 2
Usb 2Usb 2
Usb 2
 
USB 2.0
USB 2.0USB 2.0
USB 2.0
 
Choosing_(and_Implem..
Choosing_(and_Implem..Choosing_(and_Implem..
Choosing_(and_Implem..
 
Usb 72213 76207
Usb 72213 76207Usb 72213 76207
Usb 72213 76207
 
Usb Pinout
Usb PinoutUsb Pinout
Usb Pinout
 
Usb universal serial bus
Usb   universal serial busUsb   universal serial bus
Usb universal serial bus
 
USB 3.0
USB 3.0USB 3.0
USB 3.0
 
Wireless USB
Wireless USBWireless USB
Wireless USB
 
USB BASIC
USB BASICUSB BASIC
USB BASIC
 
Un se-bu
Un se-buUn se-bu
Un se-bu
 
2 the visible pc
2 the visible pc2 the visible pc
2 the visible pc
 
Usb In-a-Nutshell
Usb In-a-NutshellUsb In-a-Nutshell
Usb In-a-Nutshell
 
usb protocol and its various application
usb protocol and its various applicationusb protocol and its various application
usb protocol and its various application
 
About USB
About USBAbout USB
About USB
 
HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0
 
Usb old
Usb oldUsb old
Usb old
 
Usb
UsbUsb
Usb
 
USB Universal Serial Bus
USB Universal Serial BusUSB Universal Serial Bus
USB Universal Serial Bus
 
Android usb audio
Android usb audioAndroid usb audio
Android usb audio
 

More from PREMAL GAJJAR

Rs 232 interface
Rs 232 interfaceRs 232 interface
Rs 232 interface
PREMAL GAJJAR
 
Usb protocol
Usb protocol Usb protocol
Usb protocol
PREMAL GAJJAR
 
Storage interface sata_pata
Storage interface sata_pataStorage interface sata_pata
Storage interface sata_pata
PREMAL GAJJAR
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)
PREMAL GAJJAR
 
Hdmi
Hdmi Hdmi
Network switching
Network switchingNetwork switching
Network switching
PREMAL GAJJAR
 
Introduction types of medium data_com
Introduction types of medium data_comIntroduction types of medium data_com
Introduction types of medium data_com
PREMAL GAJJAR
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layer
PREMAL GAJJAR
 

More from PREMAL GAJJAR (8)

Rs 232 interface
Rs 232 interfaceRs 232 interface
Rs 232 interface
 
Usb protocol
Usb protocol Usb protocol
Usb protocol
 
Storage interface sata_pata
Storage interface sata_pataStorage interface sata_pata
Storage interface sata_pata
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)
 
Hdmi
Hdmi Hdmi
Hdmi
 
Network switching
Network switchingNetwork switching
Network switching
 
Introduction types of medium data_com
Introduction types of medium data_comIntroduction types of medium data_com
Introduction types of medium data_com
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layer
 

Recently uploaded

J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 

Recently uploaded (20)

J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 

Advance of usb

  • 1.
  • 2. Agenda  USB Specifications  USB Basics  Components  Onion introduction  Signaling  Packets  Transfers  Requests  Operating System Interface  USB Resources
  • 3. USB in 1996: Initially introduced as an additional connector for new applications. USB PC Connectivity Vision Universal Serial Bus Keyboard Mouse Serial Port Parallel Port SCSI Port Sound/Game Ports Graphics Port LAN Modem Graphics Port LAN USB Future: The PC evolves into a simpler, easier to use appliance. USB USB USB Telephony, Modem, Keyboard, Mouse,Game ports, Serial ports Device,Digital Audio, Printer, Scanner
  • 4. USB Specifications USB 1.0 – The original spec, superseded quickly by USB 1.1 USB 1.1 – Minor enhancements to the USB 1.0 spec, supported Low and Full speed devices USB 2.0 – The Current Standard, added “high speed’ to USB 1.1 USB OTG – USB On-the-Go, a supplement to the USB 2.0 spec that added a form of device to device communications.
  • 5. USB Founding Companies USB 1.0 USB 2.0 Compaq Compaq Intel Intel Microsoft Microsoft NEC NEC IBM Lucent DEC HP Northern Telecom Philips
  • 6. USB 2.0 in a Nutshell  Runs 40X faster than USB 1.1  Low speed: 1.5Mb/s  Full speed: 12Mb/s  High speed: 480Mb/s  Fully supports existing USB devices  Forward compatible—plug existing 1.1 devices into new 2.0 hosts  Backward compatible—plug new 2.0 devices into existing 1.1 hosts  Uses the same cables as USB 1.1
  • 7. Hardware Overview...  Topology  Tiered Star (Distributes Connectivity Points)  127 logical connections (upto 5 meters per segment)  Upto 6 tiers  ... Universal Serial Bus USB Monitor SpeakerPen Mouse Kbd Mic Phone PC HUBHUB HOST/HUB
  • 8. USB On-the-Go (USB OTG)  Connect two ‘peripherals’ together  PC is not required (but still supported)  Allow peripherals to wake up hosts  Allow two devices to exchange the host role  New OTG devices can tap into the existing 900 million USB devices
  • 9. USB OTG Example Applications Source: Beeman: www.usbonthego.com Exchange pictures Upload pictures to web Print pictures Camera Cell Phone Printer Camera Exchange songsMP3 playerMP3 player Exchange Contact info Print call info Upload pictures to web Cell Phone Printer Camera Cell Phone Synchronize phone list, meetings Upload pictures Download songs Cell Phone Camera MP3 player PC ApplicationsPeripheralHost
  • 10. USB OTG Details  Defines a new connector and cable  “Mini AB” receptacle  Mini-A to Mini-B cable  Cable establishes the default host  A-Device is the default host  Dual-role USB devices:  Are sometimes a peripheral, sometimes a host  Must use the new AB connector  Provide limited host capability  Targeted peripheral list  Operate at full speed (high speed optional)
  • 12. USB Basics USB is a Master/Slave Polled Bus (PC is the “Master”, Devices are the “Slaves”)  USB has a “tiered star” architecture that can USB can support up to 127 devices  7-bit address = 128 – root hub – reserved addr 0 for enumeration  USB is “Hot Pluggable”  USB connections can provide both data and power to the devices
  • 13. USB is not Simple  Outside, it is simple  The “rich user experience” requires some inner complexity  Even though it replaces serial and parallel ports, it’s not a drop-in replacement  It’s electrically simple, but a whole protocol layer is added
  • 14. USB Projects Can Require a Significant Code Development Effort  Device side  USB houskeeping firmware  Application firmware  Host side  Driver (maybe)  Application software
  • 16. Components of USB Systems USB Host Controllers USB Hubs USB Cables USB Peripheral Devices
  • 17. USB Host Controllers Reside in PC on motherboard or add-in card Are the “master” device on the USB bus Host Controller has integral “Root Hub” Host Controller Interfaces:  Universal Host Controller Interface (UHCI)  Open Host Controller Interface (OHCI)  Enhanced Host Controller Interface (EHCI)
  • 18. USB Cables  Transport both Data and Power  Four wires: Vbus, GND, D+, D–  Cables are 5 meters MAX  Two connector types, “A” and “B”  Prevents illegal topologies  “A” connectors are the ones that goes to the PC or Hub, “B” connectors goes to the device) (OTG adds Miny A and Mini B connectors)  Cables can be either “captive” (like mice) or detachable  Cables can be unshielded (Low speed devices) or shielded (Full Speed and High Speed devices)  USB extension cables are ILLEGAL
  • 19. USB Hubs  A hub provides additional connection points (ports) for devices Hubs can be:  Self-Powered (<= 500ma to each device)  Bus-Powered (<= 100mA to each device) Hubs contain most of the “magic” and differences between USB 1.1 and USB 2.0
  • 20. USB Devices Devices can be:  Self-Powered  External Power Source (i.e. wall wart)  Batteries  Bus-Powered  Low Power Bus Powered (<= 100mA)  High Power Bus Powered >100mA, <=500mA) Devices are “self describing”  Devices return data (USB descriptors) to host to indicate its capabilities, configurations, and how the device is able to communicate
  • 21. Compound and Composite Devices  Composite Device  Multiple interfaces, independently controlled  Each interface can have a different driver  Compound Device  Collection of separate functions, each with a USB address, connected to an internal hub  Example: Keyboard & Trackball in same package
  • 22. USB is a Polled BUS  The Host (PC) initiates all transfers  Devices respond to host requests  Direction: OUT is host-to-device  Direction: IN is device-to-host  USB is NOT peer-to-peer (not even in USB OTG)
  • 23. USB Topology PC USB USB “Tiered Star” Hub USB USB USB USB PC USB USB Device Device Device Device Device
  • 24. Host Root Hub Device DeviceDevice Device HUB Device HUB Hot Plug and Play feature  Device attachment on Hub port  Device is detected  Downstream port is enabled  Configuration of Device by Host Device USB Configuration Process Enumeration  Host Software is responsible for Device configuration Host Root Hub Device DeviceDevice Device Device HUB Device HUB Universal Serial Bus, details Process of Configuration is accomplished via Control Transfers
  • 25. USB Transfer Speeds  USB 1.1:  Low speed is 1.5Mb/s  Full speed is 12Mb/s  USB 2.0  Low speed is 1.5Mb/s  Full speed is 12Mb/s  High speed is 480 Mb/s There is a VERY common misconception that say a device is USB 2.0 compliant that it means that it is High Speed device. It does NOT!
  • 26. Device Abstractions... - Device  Common features and interactions of devices  Typically controlled by system software - Function  Highest level I/F between device driver and function - End Point  Ultimate data source or sink at the device end  Each endpoint is unidirectional and has a transfer type associated with it‘s Peripheral
  • 27. Endpoints  USB Spec: “a source or sink of data”  A Control Transfer Type endpoint is bi-directional  Others are uni-directional  Four address bits plus a direction bit selects between up to 32 buffers (FIFOs)  Different USB chips support  Various numbers of endpoints  Various buffer sizes  Each device must have 1 Control Type Endpoint (Commonly referred to as Endpoint 0 or the Default Endpoint)
  • 28. Pipes  An abstraction used by the USB spec used to indicate that 2 endpoints are joined (one in the PC Host and the other in the device).  CONTROL pipe is bi-directional  Others are uni-directional
  • 29. USB Descriptors Device Descriptors  Contains the VID/PID/DID/Serial Number Configuration Descriptors Interface Descriptors Endpoint Descriptors String Descriptors Device Qualifier Descriptors (USB 2.0) Other Speed Configuration Descriptors (USB 2.0) USB “Classes” can add other class specific Descriptors
  • 30. OS Interface Requests Transfers The USB Onion Packets Signaling
  • 32. USB Signaling USB utilizes differential signaling on the D+ and D- lines. Data is encoded in “non-return to zero with bit stuffing”  Bit stuffing is used to ensure enough transitions for the clock recovery circuitry. Most designs use silicon that incorporates an integral Serial Interface Engine (SIE) so you don’t have to worry about the decoding yourself. PCB layout of D= and D- requires care (especially on High Speed devices).
  • 33. The SIE (Serial Interface Engine) Serial Interface Engine (SIE) D+ Bytes USB Transceiver D+
  • 35. USB Packets  USB data travels in packets  Identified by “Packet ID” (PID)  Token packet tells what’s coming  Data packets deliver bytes  Handshake packets report success or otherwise
  • 36. Packet IDs (PIDS) Token Packets  IN, OUT, SOF, SETUP Data Packets  DATA0, DATA1 (USB LS/FS)  DATA2, MDATA (USB HS) Handshake Packets  ACK, NAK, STALL (USB LS/FS)  NYET (USB HS)
  • 37. Handshaking Packets  Used to ensure correct data delivery on Control, Bulk and Interrupt Transfers  ACK – Received with out Error  NAK – Device Busy, has no data  Stall – Unsupported Request, Request Failed  No Response – Request not received or corrupt, will be retried up to 3 times.
  • 38. Packets: Identified by PIDS D A T A 0 D A T A 1 I N O U T A C K N A K S O F S E T U P S T A L L P R E
  • 39. Three Packet Types O U T A D D R E N D P C R C 5 Token Packet H D A T A 0 Payload Data C R C 1 6 Data Packet H A C K H/S Pkt D