Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

USB: Advantages, Disadvantages and Architecture (Part 1/6)

By Arpit jain April 21, 2008

USB: Advantages, Disadvantages and Architecture (Part 1/6)

USB i.e. Universal Serial Bus is an interfacing standard through which two devices can communicate with each other. For example, devices like digital cameras, flash drives, mouse, tablets, etc communicate with computer via USB. It was first introduced in mid-1990s with the aim of simplifying the communication between devices. Various companies like Compaq, DEC, IBM, Intel, Microsoft, Nortel and NEC contributed to its development. However, presently it is developed by USB Implementers Forum.

The USB interfacing consists of two main devices host and peripheral. The most common example is Computer (Host) and Flash drive (Peripheral). The host manages the communication. Multiple numbers of peripherals can be connected through single host at the same time.

The initial version of USB was meant for slower devices. As the demand for high speed communication increased, new version were developed and released. USB currently supports 4 different modes in terms of speed :

MODE PERFORMANCE APPLICATION
Low speed 1.5Mbit/s Keyboard, Mouse, Game, Peripherals
Full Speed 12Mbit/s Scanner,Printer, Digital Audio
High speed 480Mbit/s Broadband, Mass Storage, imaging
Super Speed 5Gbit/s Real time streaming, Portable storage devices

Transfer speed comparison for different modes :

Data size Time Taken
  USB 1.0 USB 2.0 USB 3.0
Image/MP3(4MB) 5.3 sec 0.1 sec 0.01 sec
Flash drive (1 GB ) 22 Min 33 sec 3.3 sec
HD-Movies (16 GB ) 9.3 Hr 13.9 min 70 sec

Advantages of USB

• Ease of Use : USB was designed considering the easy interface for the users in the following ways – :

 Single Interface for multiple devices : The versatile nature of USB removes the complexity of different connector type and hardware requirements for each peripheral.

 Auto configuration : The windows automatically loads driver whenever a USB device is plugged in for first time. Once the driver is installed, the windows automatically configure the device whenever it is plugged in. 

 Easy to expand : Generally a normal PC contains 3-4 USB ports. In case if more ports are required, USB hubs can be used to add external ports.

 Compact Size : USB sockets are small in size as compared to RS232 or parallel ports. 

 No external power needed : The host supplies the power to the peripheral which is required for its working.

• Speed : USB provides various speed modes which makes it efficient and fast compared to RS232 and parallel ports. It offers speed ranges from 1.5Mbit/s to 5Gbit/s. With the introduction of USB3.1 in 2013, the speed has been increased to 10Gbit/s. It is also referred as Super Speed+

• Reliability : The USB protocol helps in detecting errors and notifying the transmitter to retransmit the data. The hardware, drivers and software also ensure an error free communication.

• Low cost : With its versatile nature and increasing demand, it has become very inexpensive to manufacture USB supported devices. The components, connector, and cable are easily available at low cost.

Besides so many advantages there are some limitations which make USB ineffective for some task.

Limitations 

• Speed : With introduction of USB3.0, it is possible to achieve 5Gbits/sec. But it is still lower than Gigabit Ethernet. The Fire Wire 800(IEEE-1394b) is also a competitor for USB.

• Peer to Peer Communication : As per the USB standard, the communication takes place between the host and peripheral. Two hosts cannot communicate directly to each other. Same is the case for peripheral. On the other hand, interfaces like Fire Wire supports peripheral to peripheral communication. For overcoming the limitation, the USB introduced the concept of OTG (On The Go). The OTG device normally functions as peripheral, but it can also function as host with some limited capability when required.

• Distance : According to USB standards, the connecting cable can be as long as 5 meters beyond which USB hubs can be used for expanding the connectivity.

• Broadcasting : Universal Serial Bus does not provide the broadcasting feature, only individual messages can be communicated between host and peripheral.

USB System Architecture

The USB is controlled by host; there can be multiple peripherals but only one host per bus. The host can be taken as master and peripheral as slaves, whereby the former is responsible for managing the connection, transactions, and scheduling bandwidth. The USB system uses tiered start topology. It consists of 7 bit addressing; this means it can support up to 127 devices at once.

The connection cable consists of 4 shielded wires out of which two are for power (+5V and Ground) and the remaining are twisted pair differential data signals which use NRZI (Non Return to Zero invert) scheme to transmit data. In order to synchronize the host and receiver clocks, Sync field is used.

Endpoints

In USB, the information flows between host and device. The endpoints are source or sink of information in a communication channel. These are blocks of memory in a controller chip containing buffers for transmission and reception.

Two endpoints can have same endpoint number but different directions. When the device is plugged in, only the default endpoint 0 is accessible. This endpoint receives control and status request from host during enumeration process. The other endpoints are declared as per requirement after configuration of the device.

Pipes

A pipe is a logical data connection between host controller’s software and device endpoint. The information is exchanged through this pipe. It is created during enumeration process. When the device is unplugged, unneeded pipes are removed.

There are two types of pipes

• Message pipes : These are bi-directional pipes which follow defined packet format. They are controlled by host and only support control transfer.

• Stream pipes : These are unidirectional pipes which don’t follow any specific data format. They can be controlled by host or device (peripheral) and support bulk, isochronous and interrupt types of transfer.

The Default Control pipe is a special type of message pipe which is bidirectional and supports control transfer type. It uses endpoint 0-IN and endpoint 0-OUT. This pipe can be accessed when device is plugged in.

Transfer Types

There are four types of transfer modes or types which can be for communication :

• Control Transfer: This transfer type is used to transfer the control information while identifying and configuring the device.

• Bulk Transfer: In this transfer type, large amount of data is moved and time is not a critical factor here. It can be used as fillers. 

• Interrupt Transfer: This type of transfer is for small data transmission with immediate attention.

• Isochronous Transfer: It is a transfer in which time is a critical factor. The transfer has to be completed in a given time.

Transaction

A single transaction contains transmission of up to three packets. These packets are :

• Token Packet: This packet is always sent by Host. 

• Data Packet: This packet can be send by Host or Device. 

• Handshake Packet: This packet provides success/failure information for the data packet received. If Host transmits the data packet, the device sends the handshake packet and vice versa.

Handshaking

Handshaking is mechanism to check the success/failure of a request or to check the delivery of a packet.  It is done to avoid loss of packets and to ensure successful transmission. Terms related to handshaking.

• ACK – acknowledgment for data receive (success)
• NAK – negative acknowledgment means no data
• STALL – request not supported or endpoint halted
• NYET – not yet. A case can be when device is busy and not ready for next data packet
• ERR – split transaction error
• No response

USB Device States

A USB device has several possible states described as follows – :

• Attached State : This state occurs when the device is attached to the Host.

• Powered State : After the device is attached, the Host provides power to the device if it does not have its own power supply. The device should not draw more than 100 mA in this state.

• Default State : This state occurs when the device is reset and has not been assigned unique address. In this state the device uses default control pipe for communication and default address 0.

• Addressed State : The USB device enters this state after it gets unique address which is used for future communications.

• Configured : When the Host obtains required information from the device, it loads the appropriate driver for the device. The host configures the device by selecting a configuration. The device is now ready to do the operations it was meant for.

• Suspended State : The USB device enters the suspended state when the bus remains idle for more than 3mS. In this state, the device must not draw more than 500uA of current.

Enumeration

Enumerating is making peripheral device recognizable at host end. For making enumeration successful some steps have to be followed.

• Writing firmware code for the controller chip: This firmware will be responsible for sending device description, decoding the packets and responding to the host. 

• A device driver needs to be installed on host: For windows an INF is needed which contains the information about the device. Sometimes USB device itself contains drivers for host.

After successful enumeration, the device will be known to the host and an application will be needed to make use of the USB communication. Application uses Operating System’s API (for e.g. Windows API). The application can transmit or receive data by using Buffers.

Device Class

Every USB device has a device class defining the functionality and purpose of that device. The host loads the suitable driver according to the device class. The most common device classes are :

• Human Interface Device (HID): This class is generally used by devices which use Interrupt Transfer for data communication. Examples are keyboard, mouse or joystick.

• Mass Storage: Devices which need to transfer large amount of data through Bulk Transfer implements this class. Examples are USB flash drive, memory card reader or external hard disk.

• Audio: This class is implemented by audio devices like microphone, speaker, external sound card etc. The device uses Isochronous Transfer for data communication.

• USB Hub: It is used by USB hubs to expand the number of ports.

• Image: Used by device like webcam or scanner.

• Printer: Used by Laser printer, inkjet printer or CNC machines.

• Wireless: Used by external adapter for wireless communication. Example – Bluetooth , 802.11

The next article covers the protocol of USB defining the various types of packet fields. Stay tuned for the upcoming details of USB in the series.

 


Filed Under: Articles

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Finding past posts on edaboard?
  • I think i have devised a new type of "super_transformer" for the Electricity grid?
  • Industrial Relay Board Design for Motorcycle Use
  • sequence detector FSM design
  • Need suggestions in task NI6363 retrigger (analog trigger)

RSS Electro-Tech-Online.com Discussions

  • Sump pit water alarm - Kicad 9
  • Pic18f25q10 osccon1 settings swordfish basic
  • Anyone jumped from Easyeda std to Easyeda pro?
  • turbo jet fan - feedback appreciated.
  • More fun with ws2812 this time XC8 and CLC

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe