SlideShare ist ein Scribd-Unternehmen logo
1 von 57
USB 2.0
   INTRODUCTION
NTUT CSIE
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
Key Word
Down : From host to device
Up : From device to host
Example
Down stream : data flow from host to
device
Up stream : data flow from device to
host
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
History
USB—Universal Serial Bus
Invented and standardized by a group
of computer and peripherals
manufactures in 1995
Compete with IEEE1394
Evolution
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
Characteristic (1)
 Connection of the PC to the
 telephone :
  =>In order to transmit data
 Ease-of-use :
  =>Support plug and play
 Port expansion :
  =>Up to 127 devices
  =>Can add lots of device to a XX
Characteristic (2)
The logical topology of the USB is a star
structure
It is similar to computer network
The USB uses a polling protocol
Up to 7 level
USB Can Do
Combines low speed and high speed
bus activity , USB enables shared
access for both speed
Automatic configuring of devices and a
serial bus which is simplified and easy
to plug into
Attach / detach easily without restarting
system
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
USB System Member (1)
Host : only one
=>The smartest element in the USB system
=>Responsible to the complexity of the
  protocol to make devices design simple
  and low cost
=>Control the media access ( no one can
  access the bus unless it get an approval
   required from the host )
USB System Member (2)
Hub : one or more
=>Like the hubs used for computer
network
=>Enables many devices to connect to
   a single USB port
USB System Member (3)
Device : one or more
=>Everything in the USB system , which is
  not a host , is a device ( include hubs)
=>A device may provides one or more USB
  functions
=>Has an unique address at the end of the
  enumeration process
Typical Application
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
Communication Flow
Pipes (1)
The logic communication between the client
software on the host and the function on the
device is done through pipes
It is a association between a specific
endpoint on the device and the appropriate
software in the host
Pipes (2)
An endpoint is the source or destination of
the data that transmitted on the USB cable
Two direction
=>OUT :
   data flows from the host to the device
=>IN :
   data flows from the device to the host
The Physical Layer
Signaling On The Bus
The USB cable is 4 wire cable
Signal on the bus is done by signaling
over tow wires ( D+ and D_ )
=>1 : D_ low , D+ high
=>0 : D_ high , D+ low
Data encoding and decoding is done
using NRZI ( Non Return to Zero
Inverted )
SIE
SIE : Serial Interface Engine
It is part of both the host’s and the
device’s physical layer
=>Serialization and Deserialization
=>Encoding and Decoding
=>Generate(for out) and Verify(for in)
CRC
=>Detect PID
HC
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
ever USB system
The Protocol Engine
Layer
This Layer Handles
Responsible for the translating the data
between the application layer and the
USB transactions protocol .
Two Role
=>USB System Software (in the USB
host)
=>USB Logical Device (in the USB
device)
The USB System SW
Compose of The Host Controller Driver
and The USB Driver
Responsible for
=>Bandwidth allocation
=>bus power management
Two of above are in order to enable
devices to access the bus
The USB Logical Device
Compose of a collection of independent
endpoints
Each endpoint has an unique Endpoint
Number and is unidirectional(except
endpoint zero and has two type--In/Out)
Default pipe is associated with endpoint
zero
The Application Layer
Host end : Client Software
= >Manages the appropriate interface by
   transferring data from its buffers to the
   endpoint with the appropriate interface
Device end : Function
= >Composed of interfaces and controls the
   functionality of the device
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
Transaction
USB transactions are done through
packets include three phases
=>Token phase : host initiates token
   indicating the future transfer type
=>Data phase : actual data transmitted
=>Handshake phase : indicate the
success or failure of the transaction
Transfer Types (1)
Control Transfer
=>Used to configure a device (enumeration)
=>Compose of three phases (setup,data,status)
Isochronous Transfer
=>Used for multimedia devices
=>It is guarantee the required bandwidth
=>No handshake phase
Transfer Types (2)
Bulk Transfer
=>Used for large burst data
=>Guarantee of delivery , no guarantee of
    bandwidth or minimum latency
Interrupt Transfer
=>If there is a pending interrupt , the function
    will send details to host after host poll it
Packet (1)
PID : Packet Identifier Field



Address Field



=>So , there are up to 127 devices in USB
Packet (2)
Token Packet




=>ADDR & ENDP define an unique endpoint
Packet (3)
Data Packet
Packet (4)
Handshake Packet




=>Such as ACK 、 NAK 、 STALL…
etc.
Outline
History and Evolution
Why We Need USB ?
Architectural Overview
USB communication flow
Protocol Layer
Conclusion
Conclusion
USB is powerful and easy to use
The complex host make the device
easy to design
The   End


        Thanks
7 Level
Hub (1)
Detecting an attachment and detachment
of devices
Handling the power management for device
that are bus-powered
Responsibility for bus error detection and
recovery
Manage both full and low speed devices
Hub (2)
Device Category (1)
By speed
=>High-speed : work in 480 MB/S
=>Full-speed : work in 12 MB/S
=>Low-speed : work in 1.5 MB/S
By power supply
=>Self powered
=>bus powered
Device Category (2)
By number of functions
=>Compound device
=>Composite device
Device Category (3)
Device Category (4)
PIPE
Cable
NRZI (1)
Want to transmit :
=>1 : without changing the level of the
      level of the signaling
=>0 : flip the value of the differential pair
example :
NRZI (2)
Problem :
When we send “1” stream , the transmission
line will stay static ( no change period )
Solution :
“Bit stuffing” , performed before the NRZI
example :
data : 010111111101
send : 0101111110101
HC Handles
Frame Generation :
=>Partition time units (each one is 1msec as
   a frame)
Data Processing :
=>Handles the request for data to / from the
   host
Error Handling :
Such as Timeout 、 CRC error 、 Unexpected
data payload
Remote wakeup
HCD && USBD
UCD :
=>An interface to the host controller
USBD :
=>Handle IRPS(I/O Request Packets) from
  client software
=>Handle enumeration process , so it owns
  default pipe (initial pipe)
Tree Phase
Control Transfer
Isochronous Transfer
Bulk Transfer
Interrupt Transfer

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

USB 2.0
USB 2.0USB 2.0
USB 2.0
 
What is Bootloader???
What is Bootloader???What is Bootloader???
What is Bootloader???
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 
PCI express
PCI expressPCI express
PCI express
 
Wireless LANs
Wireless LANsWireless LANs
Wireless LANs
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSING
 
OSI Model - Open Systems Interconnection
OSI Model - Open Systems InterconnectionOSI Model - Open Systems Interconnection
OSI Model - Open Systems Interconnection
 
Universal serial bus(usb)
Universal serial bus(usb)Universal serial bus(usb)
Universal serial bus(usb)
 
Control unit
Control  unitControl  unit
Control unit
 
RS 232
RS 232RS 232
RS 232
 
Usb
UsbUsb
Usb
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Usb Overview
Usb OverviewUsb Overview
Usb Overview
 
Structure of switches
Structure of switchesStructure of switches
Structure of switches
 
Processor types
Processor typesProcessor types
Processor types
 
Von Neumann Architecture
Von Neumann Architecture   Von Neumann Architecture
Von Neumann Architecture
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
USB 3.0 -Infinite Possibilities
USB 3.0 -Infinite PossibilitiesUSB 3.0 -Infinite Possibilities
USB 3.0 -Infinite Possibilities
 

Ähnlich wie Usb

wireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptxwireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptxTanmayaKar4
 
TCP vs UDP in OSI model Computer Network
TCP vs UDP in OSI model  Computer NetworkTCP vs UDP in OSI model  Computer Network
TCP vs UDP in OSI model Computer NetworkSwarajSonavane
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA Aiman Hud
 
Networking Fundamentals
Networking Fundamentals Networking Fundamentals
Networking Fundamentals Vikas Gupta
 
Chapter05 -- networking hardware
Chapter05  -- networking hardwareChapter05  -- networking hardware
Chapter05 -- networking hardwareRaja Waseem Akhtar
 
Class_notes_InternetTechnology
Class_notes_InternetTechnologyClass_notes_InternetTechnology
Class_notes_InternetTechnologyGulrez Khan
 
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March 2020
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March  2020Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March  2020
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March 2020PriyankaBhattacharya28
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )Tarun Khaneja
 
layering.pdf
layering.pdflayering.pdf
layering.pdfBoostHub
 
USB TO USB Data Transfer without PC
USB TO USB Data Transfer without PCUSB TO USB Data Transfer without PC
USB TO USB Data Transfer without PCIJERD Editor
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) pptDulith Kasun
 
USB presentation by Mishuk
USB presentation by MishukUSB presentation by Mishuk
USB presentation by Mishukmks mk
 

Ähnlich wie Usb (20)

USB 2.0
USB 2.0USB 2.0
USB 2.0
 
wireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptxwireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptx
 
Advance of usb
Advance of usb Advance of usb
Advance of usb
 
TCP vs UDP in OSI model Computer Network
TCP vs UDP in OSI model  Computer NetworkTCP vs UDP in OSI model  Computer Network
TCP vs UDP in OSI model Computer Network
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Usb old
Usb oldUsb old
Usb old
 
Cp33551556
Cp33551556Cp33551556
Cp33551556
 
Cp33551556
Cp33551556Cp33551556
Cp33551556
 
Usb 72213 76207
Usb 72213 76207Usb 72213 76207
Usb 72213 76207
 
Networking Fundamentals
Networking Fundamentals Networking Fundamentals
Networking Fundamentals
 
Chapter05 -- networking hardware
Chapter05  -- networking hardwareChapter05  -- networking hardware
Chapter05 -- networking hardware
 
Ch 2 network
Ch 2 networkCh 2 network
Ch 2 network
 
Uart
UartUart
Uart
 
Class_notes_InternetTechnology
Class_notes_InternetTechnologyClass_notes_InternetTechnology
Class_notes_InternetTechnology
 
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March 2020
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March  2020Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March  2020
Concept of OSI Model_KSMS_BCA_4th_6th_Sem_Priyanka Bhattacharya_20th March 2020
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )
 
layering.pdf
layering.pdflayering.pdf
layering.pdf
 
USB TO USB Data Transfer without PC
USB TO USB Data Transfer without PCUSB TO USB Data Transfer without PC
USB TO USB Data Transfer without PC
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
USB presentation by Mishuk
USB presentation by MishukUSB presentation by Mishuk
USB presentation by Mishuk
 

Kürzlich hochgeladen

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Kürzlich hochgeladen (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Usb

  • 1. USB 2.0 INTRODUCTION NTUT CSIE
  • 2. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 3. Key Word Down : From host to device Up : From device to host Example Down stream : data flow from host to device Up stream : data flow from device to host
  • 4. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 5. History USB—Universal Serial Bus Invented and standardized by a group of computer and peripherals manufactures in 1995 Compete with IEEE1394
  • 7. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 8. Characteristic (1) Connection of the PC to the telephone : =>In order to transmit data Ease-of-use :   =>Support plug and play Port expansion : =>Up to 127 devices   =>Can add lots of device to a XX
  • 9. Characteristic (2) The logical topology of the USB is a star structure It is similar to computer network The USB uses a polling protocol Up to 7 level
  • 10. USB Can Do Combines low speed and high speed bus activity , USB enables shared access for both speed Automatic configuring of devices and a serial bus which is simplified and easy to plug into Attach / detach easily without restarting system
  • 11. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 12. USB System Member (1) Host : only one =>The smartest element in the USB system =>Responsible to the complexity of the protocol to make devices design simple and low cost =>Control the media access ( no one can access the bus unless it get an approval required from the host )
  • 13. USB System Member (2) Hub : one or more =>Like the hubs used for computer network =>Enables many devices to connect to a single USB port
  • 14. USB System Member (3) Device : one or more =>Everything in the USB system , which is not a host , is a device ( include hubs) =>A device may provides one or more USB functions =>Has an unique address at the end of the enumeration process
  • 16. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 18. Pipes (1) The logic communication between the client software on the host and the function on the device is done through pipes It is a association between a specific endpoint on the device and the appropriate software in the host
  • 19. Pipes (2) An endpoint is the source or destination of the data that transmitted on the USB cable Two direction =>OUT : data flows from the host to the device =>IN : data flows from the device to the host
  • 21. Signaling On The Bus The USB cable is 4 wire cable Signal on the bus is done by signaling over tow wires ( D+ and D_ ) =>1 : D_ low , D+ high =>0 : D_ high , D+ low Data encoding and decoding is done using NRZI ( Non Return to Zero Inverted )
  • 22. SIE SIE : Serial Interface Engine It is part of both the host’s and the device’s physical layer =>Serialization and Deserialization =>Encoding and Decoding =>Generate(for out) and Verify(for in) CRC =>Detect PID
  • 23. HC 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 ever USB system
  • 25. This Layer Handles Responsible for the translating the data between the application layer and the USB transactions protocol . Two Role =>USB System Software (in the USB host) =>USB Logical Device (in the USB device)
  • 26. The USB System SW Compose of The Host Controller Driver and The USB Driver Responsible for =>Bandwidth allocation =>bus power management Two of above are in order to enable devices to access the bus
  • 27. The USB Logical Device Compose of a collection of independent endpoints Each endpoint has an unique Endpoint Number and is unidirectional(except endpoint zero and has two type--In/Out) Default pipe is associated with endpoint zero
  • 28. The Application Layer Host end : Client Software = >Manages the appropriate interface by transferring data from its buffers to the endpoint with the appropriate interface Device end : Function = >Composed of interfaces and controls the functionality of the device
  • 29. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 30. Transaction USB transactions are done through packets include three phases =>Token phase : host initiates token indicating the future transfer type =>Data phase : actual data transmitted =>Handshake phase : indicate the success or failure of the transaction
  • 31. Transfer Types (1) Control Transfer =>Used to configure a device (enumeration) =>Compose of three phases (setup,data,status) Isochronous Transfer =>Used for multimedia devices =>It is guarantee the required bandwidth =>No handshake phase
  • 32. Transfer Types (2) Bulk Transfer =>Used for large burst data =>Guarantee of delivery , no guarantee of bandwidth or minimum latency Interrupt Transfer =>If there is a pending interrupt , the function will send details to host after host poll it
  • 33. Packet (1) PID : Packet Identifier Field Address Field =>So , there are up to 127 devices in USB
  • 34. Packet (2) Token Packet =>ADDR & ENDP define an unique endpoint
  • 36. Packet (4) Handshake Packet =>Such as ACK 、 NAK 、 STALL… etc.
  • 37. Outline History and Evolution Why We Need USB ? Architectural Overview USB communication flow Protocol Layer Conclusion
  • 38. Conclusion USB is powerful and easy to use The complex host make the device easy to design
  • 39. The End Thanks
  • 41. Hub (1) Detecting an attachment and detachment of devices Handling the power management for device that are bus-powered Responsibility for bus error detection and recovery Manage both full and low speed devices
  • 43. Device Category (1) By speed =>High-speed : work in 480 MB/S =>Full-speed : work in 12 MB/S =>Low-speed : work in 1.5 MB/S By power supply =>Self powered =>bus powered
  • 44. Device Category (2) By number of functions =>Compound device =>Composite device
  • 47. PIPE
  • 48. Cable
  • 49. NRZI (1) Want to transmit : =>1 : without changing the level of the level of the signaling =>0 : flip the value of the differential pair example :
  • 50. NRZI (2) Problem : When we send “1” stream , the transmission line will stay static ( no change period ) Solution : “Bit stuffing” , performed before the NRZI example : data : 010111111101 send : 0101111110101
  • 51. HC Handles Frame Generation : =>Partition time units (each one is 1msec as a frame) Data Processing : =>Handles the request for data to / from the host Error Handling : Such as Timeout 、 CRC error 、 Unexpected data payload Remote wakeup
  • 52. HCD && USBD UCD : =>An interface to the host controller USBD : =>Handle IRPS(I/O Request Packets) from client software =>Handle enumeration process , so it owns default pipe (initial pipe)