More on IO: The Universal Serial Bus (USB)

Similar documents
Microprocessors LCD Parallel Port USB Port

or between microcontrollers)

Raspberry Pi - I/O Interfaces

COMP asynchronous buses April 5, 2016

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

David Harrison, Design Engineer for Model Sounds Inc.

COMP 273 Winter asynchronous I/O April 5, 2012

Computer Architecture CS 355 Busses & I/O System

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.

Growing Together Globally Serial Communication Design In Embedded System

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Universal Serial Bus Host Interface on an FPGA

Interfacing Techniques in Embedded Systems

Course 10: Interfaces Agenda

ECE 471 Embedded Systems Lecture 30

Interrupt transfers & USB 2.0 & USB 3.0. Group Members Mehwish Awan Mehwish Kiran

Input-Output Organization

Universal Serial Bus - USB 2.0

Serial Communications

Data Communications & Computer Networks. Digital Data Communications Techniques

2 Network Basics. types of communication service. how communication services are implemented. network performance measures. switching.

Serial Communications

Sender Receiver Sender

Basics of UART Communication

Universität Dortmund. IO and Peripheral Interfaces

ECE251: Thursday November 8

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

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

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

Input/Output Organization. Outline

SERIAL BUS COMMUNICATION PROTOCOLS USB

Serial Communications

Serial Communication. Simplex Half-Duplex Duplex

Unit 19 - Serial Communications 19.1

Lecture 25 March 23, 2012 Introduction to Serial Communications

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

Lecture 25: Busses. A Typical Computer Organization

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Module 6: INPUT - OUTPUT (I/O)

lecture 22 Input / Output (I/O) 4

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

Concepts of Serial Communication

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

USB-COMi-TB USB to Industrial Single RS-422 / 485 Adapter Manual. Specifications and Features

Computer Communication Networks

Introduction to I2C & SPI. Chapter 22

MIKROPROCESORY PRO VÝKONOVÉ SYSTÉMY. Serial Data Transmission (Stručný přehled) České vysoké učení technické Fakulta elektrotechnická

Interconnection Structures. Patrick Happ Raul Queiroz Feitosa

Dariusz Makowski Department of Microelectronics and Computer Science tel

19.1. Unit 19. Serial Communications

Serial Communications

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

INTERCONNECTION NETWORKS LECTURE 4

Introduction to Embedded System I/O Architectures

Communication. Chirag Sangani

PCI Express 4-Port Industrial Serial I/O Cards

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

Amarjeet Singh. January 30, 2012

Serial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Digital Design Laboratory Lecture 6 I/O

Transporting audio-video data

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


Intel Thunderbolt. James Coddington Ed Mackowiak

Microcontroller basics

The D igital Digital Logic Level Chapter 3 1

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices

Module Introduction. PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor.

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4

Computer Science 146. Computer Architecture

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

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

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

Different network topologies

This 4-port RS-422/485 Adapter is provided with an external switching power adapter in the package.

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Informatics for industrial applications

SP5301. Universal Serial Bus Transceiver

UNIT IV SERIAL COMMUNICATIONS

18-349: Introduction to Embedded Real-Time Systems

EEM336 Microprocessors I. I/O Interface

ELE492 Embedded System Design

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

Digital Logic Level. Buses PCI (..continued) PTE MIK MIT

Introduction to Input and Output

Communication interfaces

PRODUCT PREVIEW TNETV1050 IP PHONE PROCESSOR. description

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

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

Learn how to communicate

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Signals and Encoding

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

Lecture-65 SERIAL DATA COMMMUNICATION The data bus of a microcomputer system is designed to transfer data to and from I/O device in parallel - all

Reading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems

Data Communication. Chapter # 1: Introduction. By: William Stalling

Transcription:

ecture 37 Computer Science 61C Spring 2017 April 21st, 2017 More on IO: The Universal Serial Bus (USB) 1

Administrivia Project 5 is: USB Programming (read from a mouse) Optional (helps you to catch up on points) Slide credit: Omid Fatemi, NUI Galway 2

Today s Lecture Generic Interfaces beyond GPIO USB concepts 3

Data Communication Channels Simplex Simplex channel is always one way. Simplex channels are not often used because it is not possible to send back error or control signals to the transmit end. Example: Keyboard, individual GPIO pins. Half Duplex Half duplex channel is two way, but not at the same time. Example: Old sounds cards, old serial busses. Full Duplex Data can travel in both directions simultaneously. Example: USB 4

Parallel and Serial Data Parallel transmission (e.g. 8 bits) Each bit uses a separate wire To transfer data on a parallel link, a separate line is used as a clock signal. This serves to inform the receiver when data is available. In addition, another line may be used by the receiver to inform the sender that the data has been used, and its ready for the next data. 5

Parallel and Serial Data Serial (e.g. 8 bits) Each bit is sent over a single wire, one after the other Usually no signal lines are used to convey clock (timing information) There are two types of serial transmission, essentially having to do with how the clock is embedded into the serial data Asynchronous serial transmission Synchronous serial transmission Parallel transmission is obviously faster, in that all bits are sent at the same time, whereas serial transmission is slower, because only one bit can be sent at a time. Parallel transmission is very costly for anything except short links. 6

Asynchronous Serial Transmission: RS232 Most widely used standard for decades! Software-configurable: UART (Universal asynchronous receiver/transmitter) Groups data together into a sequence of bits (five to eight), then prefixes them with a start bit and a stop bit. Electrical interface is held at high between the 8-bit characters. The start of transmission of a character is signaled by a drop in signal level to low. The receiver starts its clock. After one bit time (the start bit) come 8 bits of true data followed by one or more stop bits at 1 level. Transmitter and receiver only have to have approximately the same clock rate (5% difference OK!). High high overhead, in that each byte carries at least two extra bits: a 20% loss of line bandwidth. 7

Synchronous Serial Transmission: PS/2 The PS/2 mouse and keyboard implement a bidirectional synchronous serial protocol. The bus is "idle" when both lines are high. This is the only state where the keyboard/mouse is allowed begin transmitting data. The host has ultimate control over the bus and may inhibit communication at any time by pulling the Clock line low. The device (slave) always generates the clock signal. If the host wants to send data, it must first inhibit communication from the device by pulling Clock low. The host then pulls Data low and releases Clock. This is the "Request-to-Send" state and signals the device to start generating clock pulses. Summary: Bus States Data = high, Clock = high: Idle state. Data = high, Clock = low: Communication Inhibited. Data = low, Clock = high: Host Request-to-Send Data is transmited 1 byte at a time: 1 start bit. This is always 0. 8 data bits, least significant bit first. 1 parity bit (odd parity - The number of 1's in the data bits plus the parity bit always add up to an odd number. This is used for error detection.). 1 stop bit. This is always 1. 1 acknowledge bit (host-to-device communication only) 8

Serial Communication: Some Examples Name Sync Type Duplex Max Max Max Pin /Async devices speed (Kbps) distance (feet) count (not including ground) RS-232 async peer full 2 115.2 30 2 (or 4 with HW handshake) RS-422 async multi-drop half 10 10000 4,000 1 (unidirectional only, additional pins for each bidirectional comm.) RS-485 async multi-point half 32 10000 4,000 2 I 2 C sync multimaster half Limitation based on bus capacitance and bit rate 3400 <10 2 SPI sync multimaster full Limitation based on bus capacitance and bit rate >1000 <10 3+1(Additional pins needed for every slave if slave count is more than one) Microwire sync master/slave full Limitation based on bus capacitance and bit rate >625 <10 3+1(Additional pins needed for every slave if slave count is more than one) 1-Wire async master/slave half Limitation based on bus capacitance and bit rate 16 1,000 1 9

Side note: Data Multiplexing A multiplexer is a device which shares a communication link between a number of devices (users). Rather than provide a separate circuit for each device, the multiplexer combines each low speed circuit onto a single high speed link. The cost of the single high speed link is less than the required number of low speed links. It does this by time or frequency division. 10

Getting rid of the chaos: Universal Serial Bus Ease-of-use for PC peripheral expansion Low-cost solution that supports transfer rates up to 12Mb/s Full support for real-time data for voice, audio, and compressed video Protocol flexibility for mixed-mode isochronous data transfers and asynchronous messaging Integration in commodity device technology Comprehension of various PC configurations and form factors 11

Taxonomy of USB Application Space 12

USB s Feature list Easy to use for end user Single model for cabling and connectors Electrical details isolated from end user (e.g., bus terminations) Self-identifying peripherals, automatic mapping of function to driver, and configuration Dynamically attachable and re-configurable peripherals Wide range of workloads and applications Suitable for device bandwidths ranging from a few kb/s to several Mb/s Supports isochronous as well as asynchronous transfer types over the same set of wires Supports concurrent operation of many devices (multiple connections) Supports up to 127 physical devices Supports transfer of multiple data and message streams between the host and devices Allows compound devices (i.e., peripherals composed of many functions) Lower protocol overhead, resulting in high bus utilization 13

USB Feature list (cont d) Isochronous bandwidth Guaranteed bandwidth and low latencies appropriate for telephony, audio, etc. Isochronous workload may use entire bus bandwidth Flexibility Supports a wide range of packet sizes, which allows a range of device buffering options Allows a wide range of device data rates by accommodating packet buffer size and latencies Flow control for buffer handling is built into the protocol Robustness Error handling/fault recovery mechanism is built into the protocol Dynamic insertion and removal of devices is identified in user-perceived real-time Supports identification of faulty devices 14

USB Feature list (cont d II) Relation with PC industry Protocol is simple to implement and integrate Consistent with the PC plug-and-play architecture Leverages existing operating system interfaces Low-cost implementation Low-cost sub-channel at 1.5Mb/s Optimized for integration in peripheral and host hardware Suitable for development of low-cost peripherals Low-cost cables and connectors Uses commodity technologies Upgrade path Architecture upgradeable to support multiple USB Host Controllers in a system 15

Universal Serial Bus System Components Interconnect Devices Host 16

USB Interconnect: Bus Topology Bus Topology: Connection model between USB devices and the host. Inter-layer Relationships: The USB tasks that are performed at each layer in the system. Data Flow Models: The manner in which data moves in the system over the USB between producers and consumers. USB Schedule: The USB provides a shared interconnect. Access to the interconnect is scheduled in order to support isochronous data transfers and to eliminate arbitration overhead. 17

Physical Interface pin Name Descryption 1 Vcc +5 Vdc 2 D- Data- 3 D+ Data+ 4 GND Ground 18

Throughput Low speed 1.5 Mbit/s Full speed 12 Mbit/s High Speed 480 Mbit/s (USB 2.0) SuperSpeed 5 Gbit/s (USB 3.0) USB 3.1 Type C Connector (Aug 2014) SuperSpeed+ 10 Gbit/s (USB 3.1 Gen 2) Dynamic mode switching 19

Power Distribution Devices: Bus-powered devices Self-powered devices Power management Host based Power events:» Suspend» Resume 20

USB Protocol Polled bus Data transfers initiated only by host controller Three packets: Token packet» Type» Direction» Address» End point number Data packet Handshake packet More on this in Project 5!» ACK» NAK 21

Transfer Model Pipe Stream pipes» No USB standard format Message pipes» USB format Request Data Status End point zero Default control pipe Always exists 22

Data Flow Types Control Transfers: Used to configure a device at attach time and can be used for other device-specific purposes, including control of other pipes on the device. Bulk Data Transfers: Generated or consumed in relatively large and bursty quantities. Interrupt Data Transfers: Used for characters or coordinates with human-perceptible echo or feedback response characteristics. Isochronous Data Transfers: Occupy a pre-negotiated amount of USB bandwidth with a pre-negotiated delivery latency. 23

USB Devices All have endpoint zero Hub Function Compound 24

Typical Configuration 25

USB Host Responsibility Detecting the attachment and removal of USB devices Managing control flow between the host and USB devices Managing data flow between the host and USB devices Collecting status and activity statistics Providing power to attached USB devices. 26

Physical / Logical Bus Topology 27

Summary I/O Communication Parameters: Speed Length of cable Complexity of implementation USB Complex network for smart devices 28