PC Peripherals for Technicians: SYM8008266

advertisement
PC Peripherals for
Technicians
Chapter 1.3 Interfaces: USB
(Universal Serial Bus)
Systems Manufacturing Training
and Employee Development
Copyright © 1998 Intel Corp.
1
USB Overview
OBJECTIVES: At the end of this section, the
student will be able to do the following:

List features & applications of the Universal Serial Bus

Explain the Topology of the USB

Describe USB Cables and Connections

Discuss USB Bus transactions
2
Why Universal Serial Bus?

Historically adding functionality to the PC has been
problematic for the user:
Limited
»
Serial; Parallel
Add-in
»

card configuration:
Dip switches; jumper cables; IRQ settings; DMA channels;
I/O addresses; software drivers.
PC
»
external standard ports:
User Experience:
Time consuming; high-risk; fear of system crashing
USB allows simpler addition of peripherals to PC's.
Projected
to replace many existing peripheral-to-host
protocols (e.g. RS-232), allowing many peripherals to
connect to PC through the same type of port.
3
Why Universal Serial Bus?
Initially, USB is an addition to existing interfaces.
BEFORE ....
Gradual Transition
USB
AFTER ...
USB
Keyboard
Serial
Port
Mouse
Sound
/Game
Parallel
Port
LAN
USB
USB
Modem
USB Connectors
SCSI
Port
Graphics
Port
Graphics
Port
4
LAN
Universal Serial Bus - Overview

USB is a bi-directional, dynamically attachable, hostdriven serial interface for adding peripheral devices on
a single bus.
USB
uses a single connector for keyboards, mice, serial
devices, digital audio, printers, etc.
The
USB provides a new serial protocol for sending data
between a PC and peripherals.
USB
enables low & medium speed I/O devices to be
connected without card insertions or reconfiguration.

USB was jointly developed by Compaq, Digital
Equipment, IBM, Intel, Microsoft, NEC, and Nortel.
The
USB specification is royalty-free and openly
available.
5
Universal Serial Bus - Features

USB Features Summary:
Plug
& play “outside the box”
»
Supports hot-plugging
»
Supports up to 127 devices
Single
connector across all devices
»
Up to 5 meters per cable segment
»
Built-in power distribution
12
»
Mb/s throughput--for highest performance
Low-speed option (1.5 Mb/s)--for lowest cost
2-wire
differential signaling
Asynchronous
and isochronous support
6
Universal Serial Bus - Features

Allows virtually unlimited expansion “outside the box.”
Can
»
connect up to 127 daisy-chained devices.
Breaks the traditional log jam associated with the limited
number of serial and parallel expansion connectors or PC
card slots available for port expansion.
Supports
»
hot-plugging:
Enables devices to be connected to the PC without card
insertions, reconfiguration or powering down the computer.
Dynamic
insertion-removal and autoconfiguration on
change.
»
If the devices and the OS support Plug and Play, the
appropriate device drivers can automatically load and
unload without user intervention.
7
Universal Serial Bus - Features

USB employs a “one-size-fits-all” industry-standard
connector and socket interface
Cables
have only 4 wires, allowing compact connectors.
USB
cable +5-volt power distribution eliminates the need
for AC power supply boxes for low/bus-powered devices.

Data transfer rate of 12Mbits/second supports a wide
variety of desktop peripherals:
Low-speed
1.5 Mbit/second option supports low-end,
low-speed devices such as key-boards and mice for
further cost reduction.

Isochronous transfers (such as audio), get top priority,
assuring that time-sensitive data streams are not
interrupted.
8
Universal Serial Bus - Applications

USB eliminates need for mouse port, keyboard port,
and eventually for serial and parallel ports
Keyboard,
Printers
Game
and scanners
peripherals (Joystick)
Modem
4x
mouse, trackball
or ISDN/PBX interface
& 6x CD ROM drives and floppy drives
Digital
audio interface - Eliminates need for an analog
audio connection for speakers and microphones.
»
Speakers and microphones could be built into monitor.
Monitor
»
- Control Only (Contrast, Brightness, Colors, etc.)
Video Signals are not managed (uses separate connection)
9
Universal Serial Bus - Applications
An incremental Connector for
new applications
1394.x Card
USB in 1997:
USB
1394.x Optional Add-in Card
Keyboard
Serial
Port
Mouse
Sound/Game
Ports
Parallel
Port
LAN
1394.x
Modem
Graphics
Port
USB Future:
The PC evolves into a
simpler, easier to use
appliance.
USB
1394.x
Graphics LAN
Telephony, Modem,
Kyb, Mouse, Joystick,
Still/ Motion Camera,
Digital Audio,
Backup Store,
Printer, Scanner,
Wireless Adapters
Digital
Video,
Consumer
Electronics,
Storage
10
Universal Serial Bus - Applications
1394 Domain
USB Domain
Video Conf
Camera
DSS
“NIC”
Phone
Joystick
Keyboard
DV Camcorder
Mouse
Audio
Personal Printers
Tape Backup
Floppy
Digital VCR
DVD-RAM
USB and IEEE1394 Are
Complementary Technologies
11
Universal Serial Bus - Applications

USB Focus on Low Cost, High Volume Applications
USB
is targeted at devices requiring relatively low
bandwidth (10Mb/s or less).
The
USB, tiered star approach is cheap for downstream
nodes, but requires a central host.

IEEE 1394 is more expensive and has a different
design focus.
IEEE
1394 (FireWire) has no central host, and therefore
requires a complete controller at each node.
IEEE
1394 is targeted at applications requiring 100Mb/s+
bandwidth which is not needed for most PC peripherals.
»
Digital VCRs and other consumer electronics require the
bandwidth provided by IEEE 1394.
12
Universal Serial Bus - Topology

The Universal Host Controller is integrated into the PIIX3
(and later) PCI-ISA Expansion Bridge chips.
CPU
Host
CPU Local Bus /PCI
Bridge
Memory Bus
Main
Memory
Graphic
Adapter
PCI Bus
SCSI
Host Bus
Adapter
S
C
S
I
LAN
Adapter
LAN
USB Host
Ctlr (e.g PIIX3)
(Root Hub)
Keyboard
(Hub)
Disk
Monitor
(Hub)
USB
Port
Tape
B
U
S
Mouse
CD
ROM
Speakers
13
Universal Serial Bus - Topology
Host:
Initiates all transactions under software control.
Hub:
Provides connecting ports and power.
Device:
A Peripheral that attaches to the USB.
Host
5m
5m
5m
5m
Hub
5m
Device
14
Universal Serial Bus - Topology
The USB physical interconnect is a tiered star topology.
 Each
segment is a point-to-point connection between the host
and a hub/device, or a hub connected to another hub or device.
A
hub is at the center of each star.
 Up
to 5 meters per segment
 Up
to 127 devices
 Up
to 6 tiers
Host (Root Tier)
Host
RootHub
Tier 1
Hub 1
USB has the concept of a HUB:
A device whose purpose is to
allow the connection of
Hub 3
additional devices.
Port
Tier 2
Hub 2
Port
Port
Tier 3
Hub 4
Port
Port
Tier 4
Port
Port
15
Universal Serial Bus - Topology

Each USB Hub converts a single attachment point into
multiple attachment points (ports).
A
USB Hub expands a single connection, or port (termed
the upstream port), to two or more downstream ports.
Peripherals
can act as Hub devices so only 1 peripheral
device must be plugged directly into the host PC.
»
A Hub may have integrated device(s)--the combination is
known as a compound device.
A
Hub provides attach/detach detection.
A
Hub also provides electrical safety services.
»
Automatically reports to the host every over-current event.
»
Shuts down the downstream power to all four ports when
total load exceeds 400mA.
16
Universal Serial Bus - Topology

USB supports 100mA and 500 mA current levels.
Max
current available is 500mA for bus powered devices.
Minimum

current available at a port is 100mA (1 load).
Hubs may be self-powered or bus-powered
Unpowered
devices (e.g. mice) can be attached to
powered hubs--power distributed over the USB cabling.
»
A bus-powered hub draws electrical current (500ma) directly
from its upstream connection to the USB.
>
»
It delivers 100ma to each of its 4 downstream connections,
using the remaining power for its own operation.
Note: The USB spec. does not permit the connection of an
additional bus-powered hub to one of the downstream ports
of a bus-powered hub; the downstream hub must be selfpowered (i.e., have its own power supply).
17
USB Cables and Connections

Physical Layer
4
pin connector, 4 wire cable
Supply
2-wire
CMOS

Power pair
Sourcing +5V
differential signaling
signal levels @ 3.3V
In most cases a USB cable should be
captive (molded in) to it's peripheral.
Differential Signal pair
The
series "A" connector is a plug for a
peripheral and a socket for a PC platform.
The
series "B" connector (detachable)
was created for applications where a
captive cable is prohibitive.
18
USB Cables and Connections

Connectors
4-Position
Positive
Blind

~ 8.65 mm
Retention
Mating Capabilities
Staggered
»
with shielded housing
~9.7 mm
+5
D- D+ Gnd
Plug
power/data pins in plug
Insures power will not flow through data lines
Cables have only four wires, allowing
compact connectors roughly as wide as
a staple.
Plug
Small
size is important for notebooks &
downsized desktop PCs.
19
USB Cables and Connections

Bi-directional, half-duplex link
The
Differential Receiver amplifies the difference between
the incoming data lines.
»
Communication toward the host PC is called upstream
»
Communication toward the devices is called downstream.
Differential
Driver
Differential
Driver
D+
D+
D+
USB Cable
Xmt Data
D-
D-
Xmt Data
D-
Differential
Receiver
Rcv Data
Differential
Receiver
+
+
-
-
Upstream Port (HUB)
e.g. PC
Rcv Data
Downstream Port
e.g. Digital Video Camera
20
USB Cables and Connections
5 meters max
+5V
D+
DGND
...
...
+5V
D+
DGND

Cables: 20-28 AWG for power; 28 AWG for signaling

Full-Speed--Twisted & Shielded cable
 USB

runs at 12 Mbit / sec Full Speed (F.S.) bit rate
Low-Speed Mode--Unshielded & Untwisted cable
 1.5
Mbit / sec Low Speed (L.S.) bit rate (1.5Mbps sub-channel)
 Saves
EMI suppression costs and allows very-low-cost devices to be
built without compromising data rate for faster devices.
 Mice,
keyboards, and most other user interface peripherals don’t
need fast data rate.
21
USB Cables and Connections
Device Connect Detection
Differential signal pair
F.S./L.S. USB
Transceiver
D+
(45W Outputs)
D-
Twisted Pair, Shielded
ZO = 90 W
5 Meters Max.
R1
F.S./L.S. USB
Transceiver
D+
(45W Outputs)
D-
Host or
Hub Port
D+
R1
Host or
Hub Port
R2
R1 = 15KW ±5%
R2 = 1.5KW ±5%
D-
Untwisted, Unshielded
3 Meters Max.
R1
R1 = 15KW ±5%
R2 = 1.5KW ±5%
(45W Outputs)
Hub Port 0
or
Full Speed Function
D+
R1
F.S. USB
Transceiver
R2
D-
F.S. USB
Transceiver
(45W Outputs)
Low Speed Function
22
USB Cables and Connections

Pull-down resistors on the D+ and D- lines ensure that both
data lines are near ground when no device is attached.

USB devices have a pull-up resistor on either D+ or D When
D+ (Full Speed) or D- (Low Speed) rise above 2VDC for
longer than 2.5 us, the HUB recognizes device attachment.

Host software periodically polls each HUB to check for
device attachment and detachment
D+
VOH (min)
VIH (max)
VIL (min)
VOL (max)
VSS
DDevice
Connected
 2.5 ms
Connect
Detected
Full Speed Device Connect Detection
23
USB Bus Transactions
USB uses 7 bits to address each device on the bus.
 The
USB Host Controller broadcasts tokens on the bus and a
device that detects a match on the address in the token
responds by either accepting data or sending data to the host.
Pen
HUB
HUB
Kbd
Monitor
Mouse
Speaker
HOST/HUB
PC
Mic
Phone
USB has automatic address selection, no terminators, and locations
on the bus are arbitrary.
24
USB Bus Transactions

USB transfers data at regular intervals called frames.
All

bus activity is controlled and directed by the host.
Four transfer types (Control, Interrupt, Bulk,
Isochronous) enable a variety of peripherals:
Control
»
(e.g.: Configuration, Messages)
Bi-directional; Used for bus management, configuration,
device control, & status information.
Interrupt
(e.g.: Keyboard, Mouse, Joystick)
»
Designed to support Human Input Devices (HID) such as
joysticks, mice, & keyboards.
»
Used to poll devices to see if they have data to transfer.
»
Asynchronous, non periodic, low bandwidth, response time
sensitive.
25
USB Bus Transactions
Bulk
(e.g.: Printer, Scanner, Still camera)
»
Enables devices like printers to communicate large amounts
of data as bus bandwidth becomes available.
»
Stream, NO guaranteed bandwidth.
»
Asynchronous, non periodic, high bandwidth utilization.
»
Used for data that may be bursty, less time-sensitive.
Isochronous
(e.g.: Audio, Telephony)
»
Isochronous transfers get top priority, assuring that timesensitive data streams are not interrupted.
»
Unidirectional, no handshake, no guaranteed delivery.
>
>
»
Based on time slices rather than handshaking.
No retry in the event of delivery failure or error.
Media access controlled by host.
26
REVIEW & SUMMARY

USB Features
Plug
»
& play “outside the box”
Up to127 devices; Hot-plugging; Autoconfig. on change
Single
»
Built-in power distribution; 2-wire differential signaling
12
»
connector across all devices
Mb/s throughput--for highest performance
Low-speed option (1.5 Mb/s)--for lowest cost
Asynchronous

and isochronous support
USB Applications
Telephony,
Modem, Kyb, Mouse, Joystick, Still/ Motion
Camera, Digital Audio, Printer, Scanner, 4x/6x CD ROM,
Floppy drives, & Monitor (control only).
27
REVIEW & SUMMARY

USB Topology
Tiered
127
Up

Star (Distributes Connectivity Points)
devices + host
to 6 tiers (up to 5 meters per segment)
USB Cables and Connections
2-wire
differential signaling
Power pair
Supply
4
Sourcing +5V
pin connector, 4 wire cable
Differential Signal pair
28
REVIEW & SUMMARY

USB Bus transactions
Media
access controlled by host
Speed:
Four
12Mbps full speed; 1.5Mbps sub-channel
transfer types enable a variety of peripherals:
»
Control (e.g.: Configuration, Messages)
»
Interrupt (e.g.: Keyboard, Mouse, Joystick)
»
Bulk (e.g.: Printer, Scanner, Still camera)
»
Isochronous (e.g.: Audio, Telephony)
BEFORE ....
AFTER ...
End of Chapter 1-3
29
Download