M Tech credit seminar report, Electronic Systems group, EE Dept, IIT Bombay, submitted Nov 2002 UNIVERSAL SERIAL BUS

Similar documents
More on IO: The Universal Serial Bus (USB)

Microprocessors LCD Parallel Port USB Port

Course 10: Interfaces Agenda

USB: Features and Circuits Manoj Purohit ( ) Supervisor: Prof P.C.Pandey

Testing and Debugging

USB for Embedded Devices. Mohit Maheshwari Prashant Garg

Bus Example: Pentium II

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704

Universal Serial Bus - USB 2.0

STUDY, DESIGN AND SIMULATION OF FPGA BASED USB 2.0 DEVICE CONTROLLER

Design Of Linux USB Device Driver For LPC2148 Based Data Acquisition System Including GSM.

SERIAL BUS COMMUNICATION PROTOCOLS USB

Essential Components for Today s Industrial Connections

David Harrison, Design Engineer for Model Sounds Inc.

1. INTRODUCTION 2. OVERVIEW

Chapter 11: Input/Output Organisation. Lesson 17: Standard I/O buses USB (Universal Serial Bus) and IEEE1394 FireWire Buses

Module 6: INPUT - OUTPUT (I/O)

Universal Serial Bus Host Interface on an FPGA

Joseph D. Cornwall, CTS-D, CTS-I Technology Evangelist

Organisasi Sistem Komputer

An Introduction to Universal Serial Bus

Signals and Encoding

4 Multiplexer. Y Fig Keyboard Scan Matrix

COMP asynchronous buses April 5, 2016

Extending USB Connections. SMART Board 800 series interactive whiteboards and systems

AN INTRODUCTION TO USB EXTENDERS

Input/Output Organization. Outline

CHAPTER 2: SETUP...5 CHAPTER 1: GENERAL INFORMATION...3 USB HUB BACKGROUND...6 CASCADING LIMITATION...7 USB BACKGROUND...6 DESCRIPTION...

USB 3.0 A Cost Effective High Bandwidth Solution for FPGA Host Interface Introduction

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub.

Hubs: the Link between Devices and the Host

USB (Universal Serial Bus) Presentation to UCHUG - 2/06/08 G. Skalka

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

Darshan Institute of Engineering & Technology for Diploma Studies

Today s Schedule. USB 2.0 Overview. USB 2.0 Compliance Testing. Demo of the Agilent Solution Q&A

* USB Full-Speed Hub Controller

COMP 273 Winter asynchronous I/O April 5, 2012

Making USB Device Drivers Easier Using the HID Class

Connectivity. Module 2.2. Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved. Connectivity - 1

Computer Architecture

Module Introduction. Purpose This training module covers 68K/ColdFire Ethernet and USB

Module 5. Embedded Communications. Version 2 EE IIT, Kharagpur 1

Module 5. Input/Output Ports

Prepared by Agha Mohammad Haidari Network Manager ICT Directorate Ministry of Communication & IT

USB. The Universal Serial Bus. Most of the material is taken from Jan Axelsson: USB Complete, third edition Lakeview Research ISBN:

STANDARD I/O INTERFACES

ECE 471 Embedded Systems Lecture 30

Intel Thunderbolt. James Coddington Ed Mackowiak

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

Thunderbolt 3 to USB 3.1 Controller Adapter - 1x USB-C, 3x USB-A

Computer Architecture CS 355 Busses & I/O System

USB Compliance Checklist Hubs (Excluding Root Hubs) USB Device Product Information

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

Part 1 Using Serial EEPROMs

ECE 485/585 Microprocessor System Design

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals

1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7.

Chip Choices. Chip Choices

Introduction to USB/LPC23xx

Chapter Four. Making Connections. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

2. THE PCI EXPRESS BUS

Human Interface Devices: Using Control and Interrupt Transfers

Smart cards and smart objects communication protocols: Looking to the future. ABSTRACT KEYWORDS

Bluetooth was originally started as a project by the Ericsson Company.

Extending the Benefits of USB

Lesson 4: The Network Interface Card

INPUT/OUTPUT ORGANIZATION

Growing Together Globally Serial Communication Design In Embedded System

Q1. Describe C.P.U and its subunits with the help of diagram?

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

About the Presentations

PDF created with pdffactory Pro trial version How USB Ports Work by Marshall Brain. Introduction to How USB Ports Work

UFC3212V. Version 1.0

Introduction To Computer Hardware. Hafijur Rahman

USB INTERFACE AND DRIVER Mentor: Dr. Yann Hang Lee Team Members: Jubin Mehta, Koshik Samota (jmehta3,

Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses

or between microcontrollers)

Functional Verification of xhci (extensible host controller Interface) for USB 3.1 Using HDL

UNIVERSAL VERIFICATION METHODOLOGY BASED VERIFICATION ENVIRONMENT FOR PCIE DATA LINK LAYER

2. LAN Topologies Gilbert Ndjatou Page 1

Using the HID class eases the job of writing USB device drivers

8. I/O Buses and Interfaces

Controller IP for a Low Cost FPGA Based USB Device Core

By offering a range of USB port types, you can easily connect a variety of modern and legacy USB devices, both inside and outside your computer.

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Components of a personal computer

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

INPUT/OUTPUT ORGANIZATION

5-Port USB 3.1 (10Gbps) Combo Card - 1x USB-C, 2x USB-A + 2x IDC (5Gbps) - PCIe

Chapter 4 The Components of the System Unit

INPUT/OUTPUT ORGANIZATION

Discovering Computers 2012

ARM Cortex core microcontrollers

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

Different network topologies

Inside the Computer System

Introduction to Input and Output


Part 1 - Introduction to USB

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University

Transcription:

M Tech credit seminar report, Electronic Systems group, EE Dept, IIT Bombay, submitted Nov 2002 UNIVERSAL SERIAL BUS Bandaru Raja Sekhar (02307046) Supervisor: rof.c.andey Abstract Universal Serial Bus is an interface for communicating external peripherals with a C. In this report, various interfaces prevalent today and their comparisons with USB are brought out. Different types of USB controllers along with the chips available in market is discussed in detail. The USB hardware and software details along with USB products available in market are presented. The advantages both from the user and developer point of view are included. A brief discussion on different data transfers supported by USB and how the peripheral gets enumerated as soon as it is plugged into a port is also included. Introduction Universal Serial Bus (USB) is primarily a C bus, which is designed so that simple and efficient way of communication is possible with many types of peripherals, without the frustrations and limitations of existing interfaces. In other interfaces, each peripheral depending on its speed has its own type of interface. Another major disadvantage while connecting a new peripheral, an Extended Industry Standard Architecture (EISA) card is to be connected as limited eripheral Component Interconnect (CI) slots exist on a mother board. To overcome all these problems and ease in peripheral connectivity, an organization called Universal Serial Bus Implementers Forum [1] formed to do away with all the existing different varieties of interfaces and to come with an ideal interface which have the following features. Ease of use for C peripheral expansion Low cost solution that supports different transfer rates from few kb/s to hundreds of Mb/s Full support for real-time data for voice, audio and video lug and play etc. A number of interfaces is prevalent today. Each peripheral depending on its transfer data uses suitable interface. In the present convention, low speed and interrupt devices use serial interface while high speed devices use parallel interface. The popular interface and comparison with USB has shown in Table 1. An interface with the above specified ideas was developed and named as Universal Serial Bus. The copyright on USB1.1 specifications [1] is assigned jointly to four corporations, all popular in C hardware and software: COMAQ, INTEL, MICROSOFT and NEC. All have agreed to make the specifications available for use by anyone without charge. As it gained widespread acceptance in industry, other three joined namely HEWLETT ACKARD, LUCENT TECHNOLOGIES and HILIS and the latest version USB2.0 [1] copyright is jointly owned by them. USB supports a wide range of data rate transfers and thus various peripherals can use USB as an interface. Table 2 gives an overview. 1

Table 1: A comparison of popular interfaces [3]. Interface RS-232 RS-485 SI IEEE- 488(GIB) arallel printer port IEEE-1394a, IEEE-1394b USB Format Max no. of devices Cable length (in feet) Speed (in bits/s) Typical use Asynchronous serial 2 50-100 20k Modem, mouse Asynchronous 32 unit 4000 10M DAS, Control serial loads System Synchronous 8 10 2.1M Micro-controller serial communications arallel 15 60 8M Instrumentation arallel 2 (or 8 with daisy chain) 10-30 8M rinters, scanners Serial 64 15 400M, Video Asynchronous serial 127 16 (or 96 with 5 hubs) 3.2Gb/s 1.5M, 12M, 480M Mouse, printers, Video Table 2: USB application taxonomy erformance Applications Attributes Low speed Interactive devices 10-100kb/s Keyboard, mouse, stylus Lowest cost Ease of use Full speed hone, audio, compressed video 500kb/s-10Mb/s High speed Video, storage 25-480Mb/s Broadband, audio, microphone Video Storage Imaging Broadband Dynamic attach/detach Lower cost Ease of use Guaranteed B.W. Guaranteed latency Low cost Multiple eripherals Guaranteed B.W. Guaranteed latency Inside USB USB connects USB devices with host. USB physical interconnect is a tiered star topology and its architecture overview is shown in Fig.1. Due to timing constraints allowed for hub and cable propagation times, the maximum number of tiers allowed is seven including the root hub. A compound device occupies two tiers, and therefore cannot be enabled at tier level seven. 2

Tier1 Root hub Tier2 hub Tier3 hub Compound Device Tier4 hub Fig 1: Architecture Overview, -peripheral USB HOST USB DEVICE Fig 2: Host-Device view But a very simple connection between host and peripheral appears for a user as shown in Fig 2. But, on the backside a number of interactions take place between different layers namely functional layer, device layer and USB interface layer. Actual communication flow and logical flow has shown in Fig 3.But a host communicates with each logical device (L.D) as if each logical device is connected to root port as shown in Fig 4. Even though physical and logical topology of USB reflects shared nature of bus, client software (C.S) manipulating a USB function interface is presented with the view that it deals only with the interface of interest. The figures described so far shows USB is host centric that is intervention of host C is must. USB-IF released a new set of specifications (supplementary specifications) of USB 2.0. called On -The Go (OTG) which provides point to point connectivity on September 2001 and its revision on December 2001.These specifies USB controller to 3

Host Device Client Software Function Usb System Software USB Logical Device Host Controller USB Bus Interface Fig 3: USB Data flow model Data flow Logical flow play a dual role that is host for one device and peripheral for another one either one at a time or simultaneously. These controllers must support full speed transfer while high speed is optional. These controllers are useful in mobiles and embedded system Inside USB controller Controller chips vary in how much support they require for USB communications. Some controllers have a general purpose CU on chip which controls the chip s actions by executing instructions stored in the firmware of the chip. The CU may be microcontroller such as 8051 or it may be designed specifically for use in USB applications. Other controller chips interface to an external CU. These chips support a command set for USB related communications. Therefore these chips provide a way to add USB capabilities to any microcontroller. The chips use external data buses (either serial or parallel) to connect to the CU. The main elements of USB controller are: 1) rogram memory It is the code CU executes. The code configures the chip, access the USB port and also I/O pins. The memory may be ROM, RAM, EROM etc. In case of RAM, the program must be loaded on power-up. For example Cypress Semiconductor s EZ-USB use RAM for program storage which gets loaded from C on power-up or attachment to bus 4

2) Data memory Contents of data memory include data received from USB devices, data to be sent to USB devices, values to be used in calculations like error checking, or anything which needs the chip to keep track of. 3) Registers Status and control registers hold information about what end points are enabled, number of bytes received/transmitted, suspend status, error checking information. 4) Serial interface engine (SIE) The circuits which control the USB interface form the serial interface engine. Some chips support all of USB transfer types while others support only a few transfer types. 5) Buffers Transmit and receive buffers store USB data. Some chips use registers while others reserve a portion of data memory for the buffer. Various types of USB controllers available from different manufactures are given below 1) Chips dedicated for USB applications CY7C63xx (Cypress series) 2) Chips based on popular families- Intel 8x931 (8051 based), Intel 8x930 (80251 based), Cypress EZ-USB (8051 based) 3) Chips which interface to external CU- National Semiconductor USBN9602, NET2888, hilips D1USBD11/12 Advantages User advantages 1) Ease of use One interface versatile enough to be usable with many kinds of peripherals Automatic configuration as operating system detects and loads the appropriate driver USB peripherals don t need user settings such as port addresses and IRQ lines (A non USB peripheral requires dedicated port addresses and often an IRQ line) Easy to connect as simple USB cable connectors namely A connectors and B connectors doesn t allow user to plug wrong Hot pluggable as user can connect/disconnect a peripheral without damaging C or peripheral USB interface supplies power through one of its four pins to peripherals. So peripheral doesn t require a power supply of its own. A device which requiring less than 500mA can draw all its power from bus. 2) Speed A wide variety of speeds suitable for almost all peripherals. 3) Reliability The hardware specifications for USB drivers, receivers and cables eliminate most noise. USB protocol enables detecting of errors and notifies the sender so that it can retransmit. 4) Low cost Though USB is more complex, a device with USB interface is likely to cost less. Its cables and components are inexpensive. Low speed devices have less stringent hardware requirements that may further reduce the cost. 5) Low power consumption ower saving circuits and code automatically power down USB peripherals when there is no bus activity, yet keep them ready to respond when needed 5

L.D L.D HOST L.D L.D L.D Fig 4: Host view of communication ( L.D-logical device) Developer advantages The advantages of user make developer eager to develop USB peripherals as user buys them. In addition developer has the following : 1) Easy to develop USB s defined cable standards and automatic error checking mean developers don t have to worry about specifying cable characteristics or providing error checking in software. 2) Flexibility The flexibility built into USB protocol, the support in controller chips and the operating system, and the interface isn t controlled by single vendor. At a higher level, O.S. support may also mean the inclusion of software device drivers for some peripherals. 3).Minimal fees USB specifications and related documents are available free online. Anyone can develop USB software without paying licensing fees. Of course to sell a device with USB interface, developer must sign an Adopters Agreement [1] and pay a fee for vendor ID. Limitations 1) Lack of support for legacy hardware A peripheral with non USB interface support can be connected to USB port by using converters [2]. On the other hand, a peripheral with USB interface cannot be connected to older computers with no USB support. This can be possible only if host controller is plugged into CI slot and operating system which supports USB is installed, both of which are expensive. 2) Distance limits A cable segment can be as long as 5 m. It can be increased to 30 m by five hubs. Alternative solution is, USB interface on C is converted to RS-485 interface using converters [2] for long distance cabling. 6

Data transfer types The USB is designed to handle many types of peripherals with varying requirements for transfer rate, response time, and error correcting. USB supports four types of data transfer. A peripheral depending on its need can support any of the transfers. Every peripheral must also support Control Transfer along with its own data transfer support because enumeration of devices takes place through Control transfer type. Types of Data transfer:- 1) Control Transfer This type of data exchange is used only for enumeration and not for data transfer as it involves high protocol overhead. 10% of bandwidth is reserved for it. 2) Interrupt Transfer This type of transfer is used mainly for human interface devices (HID) like mouse, keyboard etc. Latency is guaranteed that is after an interrupt is given host controller accepts the request within the specified time. 3) Bulk transfer This type of transfer used where large amount of data transfer involves. This type of transfer is not used for time critical data. Guarantees data transfer. If busy is busy, it may take long time. If bus is idle, highest data transfer takes place. Suitable for printers, scanners etc. 4) Isochronous transfer This type of data transfer is used for time critical data. Except for isochronous, all other data transfers has error checking code and retransmission facility. So isochronous devices must withstand wrong data transfers. This type data transfer devices are always provided enough bandwidth if host controller accepts configuration during enumeration. If busy is too busy, it ignores the device. USB host controller executes data transfers in frames. A frame is 1 ms for low/full speed devices and 125 s for high speed devices. Each transfer is given a part of frame. Each transfer consists of one or more transactions. As all transfers share one data path, each transaction must include the address of the transaction s source or destination. A typical frame starts with start of frame (SOF), then few transfers depending on data packets width and ends with end of frame (EOF). acket ID (ID) contains source/destination addresses, endpoint numbers and direction of data flow. A typical transfer is shown in Fig 5. Enumeration Enumeration is the initial exchange of information between host and device until the device driver starts communicating with the device. Steps in enumeration 1) User plugs a device into a USB port. The port may be root hub at the host or on a hub. 2) The hub detects the device by monitoring the voltage on the signal lines of port. When a device plugs, the device pull-up brings that line high. It informs the host through interrupt pipe. 3) Host learns of new device and sends Get_ort_Status to find out more and Host-Controller sends Set_ort_Feature request to reset the port. 4) Hub establishes signal path between the device and the bus in the default state over the default pipe [3] at endpoint zero. 5) The hub detects the device speed by examining voltages on two signal lines and informs host. The host sends Get_descriptor request to learn maximum packet size of default pipe to device address zero [3], endpoint zero 7

6) Host reads first eight bytes of descriptor and host controller assigns a unique address by sending a Set_address request. The device reads request, stores the new address and now in address state. 7) The host learns about device abilities like the number of configurations the device supports and other basic information by sending Get_descriptor. 8) The host assigns and loads a device driver after it receives descriptors and finding the best match in device drivers. 9) The host device driver selects a configuration by sending a Set_configuration request. The device reads the request and sets its configuration to match and now device in configured state and device interface is enabled. USB products [5] 1) Hubs These are used to expand the peripherals connected. Hubs can be connected either to root hub or to another hub. The hub can provide either four or more ports depending on the manufacturer. Model UH-91247 adds four more ports and its specifications are 4 downstream ports, USB type A receptacles 1 upstream port, type B receptacle 5 power/status indicator LEDs bus powered from USB host controller, or external power supply 6 ft USB cable included TRANSFER TRANSFER TRANSFER TRANSACTION TRANSACTION TRANSACTION TOKEN ACK DATA ACK HANDSHAK. ID ADDI.INFO CRC FIELD Fig 5 A typical transfer in a frame: CRC-cyclic redundancy check, ID-packet ID, ADDI.INFO-additional information; HANDSHAK-handshake packet 8

2) Converters These are used to convert older interfaces into USB interfaces so that the peripheral can communicate with a USB port on a computer. A few models are shown USTOL4 optically isolated USB to RS-422/485..$139.95 USTL4 non-isolated USB to RS-422/485 $119.95 USO9ML2 optically isolated USB to RS-232.$139.95 3) Cables These form the physical link between the host and the peripheral. USB supports a distance of 5m. If the cable characteristics does not meet strict specifications of USB errors occur during transmission. So host controller need to retransmit the data which is waste of time. Active cables solve this problem by buffering signals going in and out and thereby reducing errors. USBAEC16 USB active extender cable...$24.95 (active cable) USBAMBM-2M 2 meter type A male to type B male.$8.95 (passive cable) USBAMBM-5M 5 meter type A male to type B male.$9.95 (passive cable) Conclusion resently, all the new C s are coming with two USB ports. We can expand the number of peripherals by using hubs available in market [2].We can upgrade older C s by connecting Host-Controller in the expansion slot of motherboard provided operating system in C has support for USB. Windows98 and its successors and many operating systems support it. In future, C s will come with an embedded hub with varying number of ports with a minimum of four. As far as cost is concerned, it increases only slightly. IEEE 1394 parallel interface also known as peer-to-peer model is USB competitor. It has the capability of peripheral to peripheral communication. A single peripheral data can be directed to multiple receivers. IEEE 1394b has a speed of 3.2 Gbps almost six times of USB2.0.It has its use in very high bandwidth applications like video conferences. Its electronic circuitry is very complex and hence very expensive. Both the interfaces are likely to exist in tomorrow s C s as USB is ideal for low/full speed and few high speed devices while IEEE1394 for large number of high speed devices. References 1. http://www.usb.org, site sponsored by USB Implementers Forum, Inc, creators of USB technology, accessed on March 7,2002 2. http://www.quatech.com/comm_main.htm#usb, accessed on Oct 1, 2002 3. Axelson, J., USB Complete, enram International ublishing (India), Mumbai 1999, vol. 1,ch.1, pp. 4, ch. 5 pp. 88, ch. 7 pp. 122-126. 4. http:/www.bb-elec.com/products.asp?dept-id=145, accessed on Oct 20, 2002. 9