18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 1 USB (Universal Serial Bus) Need for “Plug and Play” capability for PC peripherals outside of PC Supports hot plugging Inexpensive solution for low to medium speed applications (v. 2.0 480Mbps) Tiered star topology (hubs) –Expands to 127 peripherals Supports 2 kinds of transfer –Asynchronous (delay between packets) –Isochronous (planned delivery of data, e.g., multimedia applications)
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 2 USB Need for peripherals expansion outside of PC –Want to connect new device without opening the case –Do not want to use PC serial or parallel ports –Want to be able to “hot swap” devices without power off or rebooting –Want to be able to service low, medium (full), and high speed devices ( Mbps) –Want a lot of extension capability (127) –Want the device end interface simple and cheap –Want interface to supply some power
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 3 USB Packets Parts of packet –SYNC –PID (Packet Identifier) –EOP (End of Packet) Sync (Idle J) D+ D- KKKKKJJJ 8 Bits
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 4 USB Signaling Differential Encoding used –NRZ-I 0 Transition 1 No transition –Bit stuffing used 0 stuffed after 6 consecutive 1s Note the difference from HDLC
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 5 USB Features Serial Half duplex medium All control originates from PC (Access not distributed) Operating system must recognize new devices at any time Information sent in packets Information types –Control –Interrupt (polling) –Bulk (good delivery) –Isochronous (guaranteed rate)
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 6 USB Signaling Differential voltage signaling Bus states –D+ high, D- low J (Idle) –D+ low, D- high K Bus can float if neither end drives SE0 (single ended zero) –D+, D- low SE1 (single ended one) –D+, D- high
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 7 USB Mechanical Aspects Cable length limited to 5m Interface is serial, differential Host or hub supplies up to 500mA at 5V downstream –Cable has 4 wires VCC, GND, D+, D- V. 1.1: Cable must be shielded for 12Mbps V. 2.0: Max speed 480Mbps Automatic speed sensing
18 - Winter 2003 EE EE 766 Computer Interfacing and Protocols 8 USB Mechanical Aspects Cable ends distinctive –Flat vs. square Power pins longer so power is stable when data is connected Up to 5 levels of hub hierarchy –Speed degradation if all devices are active together