Upload
ayanna-gibbs
View
35
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Interconnection Protocols. Berk ÜSTÜNDAĞ Istanbul Technical University Computer Engineering Department [email protected] http://berk.tc. Contents (Part 3/7). 1.Introduction 1.1 Goals of the lecture 1.2 OSI Reference Model 2. Wired communication techniques - PowerPoint PPT Presentation
Citation preview
Interconnection Protocols
Berk ÜSTÜNDAĞIstanbul Technical UniversityComputer Engineering [email protected] http://berk.tc
Contents (Part 3/7)1.Introduction
1.1 Goals of the lecture
1.2 OSI Reference Model
2. Wired communication techniques
2.1 Asynchronous Serial Communication
2.1.1 Unbalanced wired communication RS232
2.1.2 Balanced wired communication RS485 / RS422
2.2 Synchronous Serial Communication
2.2.1 I2C
2.2.2 Microwire
2.2.3 SPI
2.2.4 CAN BUS
2.2.5 USB
2.2.6 IEEE1394 (Firewire)
3. NonWired communication techniques
3.1 Optical Communication
3.1.2 IRDA
3.1.2 Optical Fibers
3.1.3 Laser
3.2 Radio Frequency Communication
3.2.1 Frequency allocation (ETSI)
3.2.2 Radiomodems
3.2.3 Bluetooth
3.2.4 IEEE802.11
3.2.5 GPRS, 3G, UMTS
4. Mobile Data Transfer
4.1 Smart Cards
4.2 Contactless Smart Cards
4.3 Touch Memory
4.4 Magnetic Strips (Cards)
4.5 PCMCIA cards
5. Application Examples
5.1 GPS (NMEA protocol), vehicle tracking
5.2 Can Bus – automative applications
5.3 Virtual Money
5.4 Mobile officers, PDA
5.5 PC AT keyboard interface
5.6 Pay TV
5.7 Energy meter (PLC-Power line data collection)
Microwire & SPI Interfaces
The serial peripheral interface (SPI) is a general purpose synchronous serial interface originally found on cerrtain Motorola microcontrollers.
Parallel Printer Port – SPI EEPROM connection
2.2.5 USB
What is the Universal Serial Bus?
The USB is a relatively recent way to connect instruments and devices to the PC. Most new computers have one or two USB ports, in addition to the familiar RS232 (COM) and parallel ports. You can use the USB ports to connect peripherals like digital cameras, printers and data acquisition and control units.
The USB is extremely convenient for data acquisition for several reasons. •The equipment can obtain power from the USB; it doesn't need to be battery powered or plugged into the wall. This makes USB ideal for portable data acquisition with a laptop. •Using a USB hub you can connect many devices to one USB port - letting you easily expand your system should requirements grow. •USB ports are provided on most new PCs - no need to open the computer and install adaptor cards.• You can plug in and unplug your equipment without switching off your computer or even restarting Windows.• The USB cable can be up to 5 m long. However, using USB hubs between cables you can reach 30m. • Faster speeds than those allowed by RS232 connections are achievable • You can use USB devices alongside existing data acquisition equipment (such as cards that you've installed in your PC or instruments that plug directly into the RS232 port).
Transferring data at 480 Mbps, USB 2.0's claim to fame is that it's 40 times faster than USB 1.1 — and a touch faster than FireWire's 400 Mbps. In addition, the new standard is backward-compatible with USB 1.1, so users can continue to use USB 1.1 peripherals (but won't receive the speed benefits of 2.0). According to Venture Development Corp. (VDC), a Natick, Mass.-based analyst firm, this bodes well for USB. The firm's recent study of cable shipments ("The U.S. Aftermarket for Computer Accessories, 4th Edition") shows USB cables made up 30 percent of total U.S. aftermarket cable shipments in 2001. VDC predicts USB will overtake other cable types this year in shipments, contributing to a predicted annual growth rate of more than 42 percent through 2006.
Another boost for USB 2.0 is Microsoft's decision to offer USB 2.0 drivers for Windows XP. However, the Redmond, Wash.-based firm does so cautiously, noting there have been some issues with the drivers. Apple Computer still remains on the fence regarding USB 2.0, stating that it's evaluating the upgrade and weighing it against the upcoming change to the FireWire standard.
...the interfacing solution...the interfacing solution
AgendaUSB basics Why USB Bus structure Enumeration, speed Layer model Physical interface Transfer, transaction, packet
USB - ISDN Terminal Adapter (TA) Standard TA (PC ISDN card) - USB TA Endpoints usage, ISDN data format Hardware implementation, Buffering B-channel performance Layer model USB TA PC ISDN card D-channel signalization through USB D-channel performance Hardware platform, tools SAB-C541U
USBthe interfacing solution
Universal Serial Bus Universal Serial Bus
Why USB ?
Universal Serial Bus Universal Serial Bus
Ease of Use Plug and Play capabilities for “Outside the Box” peripherals
Youwanna more?!
USBUSBUSBUSB
Universal Serial Bus Universal Serial Bus
USB Target ApplicationsPERFORMANCE PERFORMANCE PERFORMANCE PERFORMANCE APPLICATIONSAPPLICATIONSAPPLICATIONSAPPLICATIONS ATTRIBUTESATTRIBUTESATTRIBUTESATTRIBUTES
HIGH SPEEDHIGH SPEED50 - 1000 Mb/s50 - 1000 Mb/sHIGH SPEEDHIGH SPEED50 - 1000 Mb/s50 - 1000 Mb/s
VideoVideoDiskDiskLANLAN
VideoVideoDiskDiskLANLAN
High BandwidthHigh BandwidthVery Low LatencyVery Low LatencyEase of UseEase of Use
High BandwidthHigh BandwidthVery Low LatencyVery Low LatencyEase of UseEase of Use
Very Low costVery Low costEase of UseEase of UseDynamic Attach-DetachDynamic Attach-DetachMultiple Peripherals Multiple Peripherals
Very Low costVery Low costEase of UseEase of UseDynamic Attach-DetachDynamic Attach-DetachMultiple Peripherals Multiple Peripherals
Low costLow costGuaranteed Latency Guaranteed Latency Higher BandwidthHigher BandwidthEase of UseEase of Use
Low costLow costGuaranteed Latency Guaranteed Latency Higher BandwidthHigher BandwidthEase of UseEase of Use
LOW SPEEDLOW SPEED10 - 100 Kb/s10 - 100 Kb/s
LOW SPEEDLOW SPEED10 - 100 Kb/s10 - 100 Kb/s
Interactive DevicesInteractive Devices(Game, VR)(Game, VR)
Interactive DevicesInteractive Devices(Game, VR)(Game, VR)
MEDIUM SPEEDMEDIUM SPEED500Kb/s - 10Mb/s500Kb/s - 10Mb/s
MEDIUM SPEEDMEDIUM SPEED500Kb/s - 10Mb/s500Kb/s - 10Mb/s
ISDN, POTS, PBX, ISDN, POTS, PBX, Audio, Imaging,Audio, Imaging,Bulk DevicesBulk Devices
ISDN, POTS, PBX, ISDN, POTS, PBX, Audio, Imaging,Audio, Imaging,Bulk DevicesBulk Devices
1394+1394+""firewire"firewire"1394+1394+
""firewire"firewire"
USB focus on
USB focus on LOW C
OST
LOW COST, , H
IGH VOLUME
HIGH VOLUME applic
ations!
applicatio
ns!
USB focus on
USB focus on LOW C
OST
LOW COST, , H
IGH VOLUME
HIGH VOLUME applic
ations!
applicatio
ns!
USB in 1996:USB in 1996:Initially introduced as an Initially introduced as an additional connector for new additional connector for new applications.applications.
USBUSB
PC Connectivity Vision
Universal Serial Bus Universal Serial Bus
KeyboardKeyboard
MouseMouse
SerialSerialPortPort
ParallelParallelPortPort
SCSISCSIPortPort
Sound/GameSound/GamePortsPorts
GraphicsGraphicsPortPort
LANLAN ModemModem
GraphicsGraphicsPortPort
LANLAN
USB Future:USB Future:The PC evolves into a simpler, The PC evolves into a simpler, easier to use appliance.easier to use appliance. USBUSB USBUSB USBUSB
Telephony, Modem, Keyboard, Mouse,Game ports, Serial Telephony, Modem, Keyboard, Mouse,Game ports, Serial ports Device,Digital Audio, Printer, Scannerports Device,Digital Audio, Printer, Scanner
Hardware Overview...
Universal Serial Bus Universal Serial Bus
USB
Topology Tiered Star (Distributes Connectivity Points) 127 logical connections (upto 5 meters per segment) Upto 6 tiers ...
Monitor
SpeakerPen Mouse
Kbd
Mic Phone
PC
HUBHUB
HOST/HUB
...Topology...
Universal Serial Bus Universal Serial Bus
Host One PC host per system
Hub Provides connecting ports, power, terminations Self-Powered or Bus Powered
Device, Function and End-points Device is a collection of function(s) Function is a collection of end-points Upto 127 functions and 16 end-points per function
Host
Root Hub
Device
DeviceDevice
Device
HUB
Device
HUB
Hot Plug and Play feature
Device attachment on Hub port
Device is detected
Downstream port is enabled
Configuration of Device by Host
Device
USB Configuration ProcessEnumeration
Host Software is responsible for Device configuration
Host
Root Hub
Device
DeviceDevice
Device Device
HUB
Device
HUB
Universal Serial Bus, details Universal Serial Bus, details
Process of Configuration is accomplished via Control Transfers
Universal Serial Bus Universal Serial Bus
Hardware Overview
- Bus transactions Speed: 12Mbps full-speed
1.5Mbps low-speed Isochronous and Asynchronous Media access controlled by host
- Bus transactions Speed: 12Mbps full-speed
1.5Mbps low-speed Isochronous and Asynchronous Media access controlled by host
- Configuration, Hot Plug-And-Play Dynamic insertion-removal Autoconfiguration on change
- Configuration, Hot Plug-And-Play Dynamic insertion-removal Autoconfiguration on change
- Physical Layer 2-wire differential signaling, NRZI coded with bit stuffing Supply Sourcing +5V Signaling at CMOS 3.3V 4 pin connector, 4 wire cable
- Physical Layer 2-wire differential signaling, NRZI coded with bit stuffing Supply Sourcing +5V Signaling at CMOS 3.3V 4 pin connector, 4 wire cable
Device Abstractions...
- Device Common features and interactions of devices Typically controlled by system software
Universal Serial Bus Universal Serial Bus
- Function Highest level I/F between device driver and function
- End Point Ultimate data source or sink at the device end Each endpoint is unidirectional and has a
transfer type associated with it‘s Peripheral
...Device Abstractions
DeviceDeviceDriverDriver FunctionFunction
USBUSBSoftwareSoftware
USB DeviceUSB DeviceI/FI/F
HostHostControllerController
USBUSBHardwareHardware
Function AbstractionFunction Abstraction
Device AbstractionDevice Abstraction
Physical ConnectPhysical Connect
Universal Serial Bus Universal Serial Bus
PCPCDevice, like modem, Device, like modem, keyboard mouse, etckeyboard mouse, etc
Endpoint
Endpoint
Endpoint
USBTransfer types
...basics...basics
Control (e.g.: configuration, messages) bursty, host initiated (bus management, configuration) guaranteed bandwith of max. 10% error-free data delivery guaranteed
Interrupt (e.g.: mouse, joystick....) small bursty, low bandwidth required error-free data delivery guaranteed polling is used (by host) to check for "interrupt events” polling intervall programmable. From 1ms to 255ms (FS)
10ms to 255ms (LS)Isochronous (e.g.: audio, telephony.....)
for data which need to be periodically sent predictable latency on data delivery. no error check, error-free data delivery is not guaranteed
Bulk (e.g.: printer, scanner, still camera.....) non periodic, bursty, ideal for large amounts of data error-free data delivery guaranteed
Frame = 1ms
printerprinter
ControControllControControll
USB Frame Modelexample
Stereo Audio
Telephony
SO
FS
OF
low-speed
IsochronouIsochronoussIsochronouIsochronouss
BulkBulkBulkBulk
InterruptInterruptInterruptInterrupt
...basics...basics
printerprinter
any LS device like keyboard, mouse,
etc.
any LS device like keyboard, mouse,
etc.
BulkBulkBulkBulk
max. 5mmax. 5m
CABLE connectorCABLE connector'upstream''upstream'
Connectors and CablesConnectors
4-Position with shielded housing Positive Retention Blind Mating Capabilities
Universal Serial Bus Universal Serial Bus
Power pairPower pair
HOST PC / HUBHOST PC / HUB
CABLE connectorCABLE connector 'downstream''downstream'
HUB / DEVICEHUB / DEVICE
Differential Signal pairDifferential Signal pair
USB Hub FunctionPort Control
Connection detect
Port Enable/ Disable
Reset/ Resume Signaling
Data Switch Signal Regeneration
Robustness/ Recovery
Power Distribution
UpstreamConnectivity
HubHubRepeaterRepeater
DownstreamConnectivity
HubHubRepeaterRepeater
DisabledPort
EnabledPorts
Universal Serial Bus Universal Serial Bus
Power Distribution
Significant capability of USB Eliminate wall adaptors
Hubs may be self-powered or bus-powered
Two current levels: 100 & 500 mA Overcurrent protection for safety Wire gauge options: 20-28 AWG
Suspend All devices support suspend Enter suspend state after seeing
idle bus for 3 ms Suspend current 500 A from bus
Resume USB devices can cause “remote wake-up”
e.g. Modem wakes up the system
Universal Serial Bus Universal Serial Bus
Voltage Drop
Voltage drop per wire/connector: 0.125 VBudget for power switch: 0.100 V
Bus-PoweredBus-PoweredFunctionFunction
Bus-PoweredBus-PoweredHubHub
Host orHost or
Powered HubPowered Hub
4.65V (min) 4.40V (min)
Universal Serial Bus Universal Serial Bus
4.0V (as a resulting low value)
Data Signaling
Bi-directional, half-duplex link
Embedded clock and data
Differential signal pair
12 Mbit / sec Full Speed (FS) bit rate
1.5 Mbit / sec Low Speed (LS) bit rateUniversal Serial Bus Universal Serial Bus
Low Speed
1.5 Mb/s Unshielded, untwisted cable Saves EMI suppression costs 1.5% Frequency tolerance
Driver characteristics Rise/ Fall time: Min 75ns, Max 300ns Required on low speed functions and
on the downstream ports of Hubs
Allows very-low-cost devices to be built without compromising data rate for faster devices
Mice, keyboards, most user interface peripherals don’t need fast data rate
Eliminates need for shielded twisted pair cable (3 meters)Allows use of less-expensive IC process technology
Universal Serial Bus Universal Serial Bus
USB Connections and Terminations
D-
D+
R1
RR11 = 15K = 15K±5%±5%
RR22 = 1.5K = 1.5K±5%±5%
F.S./L.S. USBF.S./L.S. USBTransceiverTransceiver
F.S./L.S. USBF.S./L.S. USBTransceiverTransceiver
(45Outputs)
Host or Hub Port
ZZOO = 90 = 90±15%±15%
5 Meters Max. 5 Meters Max.
F.S. USBF.S. USBTransceiverTransceiverF.S. USBF.S. USB
TransceiverTransceiver
(45Outputs)
Hub Port 0or
Full Speed Function
R1
R2
D-
D+
R1
RR11 = 15K = 15K±5%±5%
RR22 = 1.5K = 1.5K±5%±5%
F.S./L.S. USBF.S./L.S. USBTransceiverTransceiver
F.S./L.S. USBF.S./L.S. USBTransceiverTransceiver
(45Outputs)
Host or Hub Port
3 Meters Max. 3 Meters Max.
L.S. USBL.S. USBTransceiverTransceiverL.S. USBL.S. USB
TransceiverTransceiver
(45Outputs)
Low Speed FunctionR1
R2
D+
D-
D+
D-
TwistedTwisted Pair Shielded Pair Shielded
Universal Serial Bus Universal Serial Bus
VCC
VCC
GND
GND
GND
GND
UnUntwisted, twisted, UnUnshieldedshielded
Transfer - Transaction - Packet (1)
Host Software initiates Transfer from or to a target USB Device
Host software splits up one Transfer into one or more Transactions
Transactions are set up based on the Device's characteristics (Packet Size, Transfer Type)
Transaction n-1 Transaction n-2 Transaction n-3
Transfer n
Transaction n-1
Universal Serial Bus, details Universal Serial Bus, details
Transfer - Transaction - Packet (2)
Host Software schedules and executes Transactions during 1ms Frames
Each Frame consists of several Transactions from different Transfers
Transaction n-1 Transaction n-2 Transaction n-3
Transfer n
Transaction n-1
1 ms Frame
Transaction n-1
Universal Serial Bus, details Universal Serial Bus, details
Transfer - Transaction - Packet (3)
Each Transaction consists of a series of packets
Token Packet defines the Type of Transaction
Data Packet carries the payload to or from a Device
Handshake Packet provides feedback about correct data transfer to sender
Transaction n-1 Transaction n-2 Transaction n-3
Transfer n
Transaction n-1
Token Packet Data PacketHandshake
Packet
1ms Frame
Transaction n-1
Universal Serial Bus, details Universal Serial Bus, details
Packet FormatsSync. Packet ID
DeviceAddress
ENDPNr
CRC EOP
8 bits 8 bits 7 bits 4 bits 5 bits 2 bits
Sync. Packet ID Data Field CRCCRC EOP
8 bits 8 bits 16 bits16 bits 2 bits0-1023 bytes
Sync. Packet ID EOP
8 bits 8 bits 2 bits
Token PacketToken Packet
Data PacketData Packet
Handshake/Low Speed Preamble
Sync. Packet ID Frame Number CRC EOP
8 bits 8 bits 11 bits 5 bits 2 bits
SOF Token PacketSOF Token Packet
Universal Serial Bus, details Universal Serial Bus, details
IN Transaction without errors
Token Packet defines the direction of the succeding Data Packet (here: IN = Data Packet from Device to Host)
Data Packet carries the payload
Handshake Packet reports error free reception of Data Packet
IN Packet from HostData Packet from
USB Device to HostACK Packet from Host
ONE TRANSACTION
Universal Serial Bus, details Universal Serial Bus, details
Sync EOP SyncPID
DataEOP Sync
PID
ACKEOP
PID
IN TokenData Packet (Payload)
Low Speed - Full Speed Transaction
Protocol overhead for FS and LS Transfers is 13 bytes
Payload for FS and LS is 8 bytesFS Transfer : 13 + 8 = 21 full speed bytes times
LS Transfer : 13 * 8 + 8 * 8 = 168 full speed byte times (excluding Preamble)~9,5% of bandwidth wasted
Token Data Packet (8 bytes)Hand-
shake
one full speed transaction
Preamble
full
speed
low
speed
low speed
Token
full
speed
low
speed
Preamble Data Packet (8 bytes)Hand-
shake
Universal Serial Bus, details Universal Serial Bus, details
USB 2.0 Technical Overview
Brad HoslerUSB Engineering ManagerIntel Corporation
Conference Goal
Provide you with the information youneed to build USB 2.0 products USB 2.0 technical details USB 2.0 Infrastructure Building USB 2.0 devices USB 2.0 Building Blocks
USB 2.0: Conference Agenda
Architecture OverviewPeripheral Development EnablingUSB 2.0 Compliance and Logo ProgramUSB 2.0 Compliance Testing
Single Track:Topics for Everyone
Single Track:Topics for Everyone
Split Track: Focused TopicsSplit Track: Focused TopicsUSB 2.0: Technical Agenda
USB2 Specifications Electricals Protocol Hubs
Power ManagementHost Controller SpecCable TestingUSB “On the Go”
USB2 Software MS Roadmap Driver Testing HS Isoch Interface
Building USB2 Devices Design Options Transceiver Macrocell Firmware and Testing Analyzers
Platform Design BIOS
ArchitectureOverview
USB 2.0: What Changed??
Low level electricals for High Speed (HS) signaling Much higher bit rate (480Mb/s) requires new
transmitter/receiver
Hub changes for backward compatibility Features limit bandwidth impact of Full
Speed (FS)and Low Speed (LS) devices on HS devices
FS/LS devices consume a bit-rate equivalentof HS bandwidth
USB 2.0: What Didn’t Change?
Same host/device model Host is in charge Devices are inexpensive
Same basic protocol Token, data, handshake
Same device framework Descriptors
Same software interfaces USBDI
USB 2.0: What Didn’t Change?
Same power distribution and consumption 500ua suspend, 100ma unconfigured,
500ma configured
Same power management features Suspend/resume model unchanged
Same topology management Hub features to handle connect, disconnect,
enable, disable, …
Same cables and connectors
ContinuedContinued
System SWSystem SW
Client DriverClient Driver Client DriverClient Driver
USB 1.1 HubUSB 1.1 Hub
USB 1.1 USB 1.1 DeviceDevice
USB 1.1 USB 1.1 DeviceDevice
HS HubHS HubHS HubHS Hub
USB 1.1 HubUSB 1.1 Hub
USB 1.1 USB 1.1 DeviceDevice
USB 1.1 USB 1.1 DeviceDevice
HS DeviceHS DeviceHS DeviceHS Device
USB 2.0 HostUSB 2.0 HostControllerController
USB 2.0 HostUSB 2.0 HostControllerController
Full/Low SpeedFull/Low Speed
High Speed OnlyHigh Speed Only
(2 x 12Mb/s(2 x 12Mb/sCapacity)Capacity)
Sample USB 2.0 Topology
Hub provides high-speed expansion (ala USB 1.1 hub)Hub provides additional Full/Low speed bus(es)
USB 2.0 Host Controller
Allows port functionality regardless of OS version USB 1.1 OS will ‘just work’ as USB 1.1 ports
USB 1.1 HCs can go away over time Replaced with integrated USB 2.0 Hub
USB 2.0 Host Controller (HC)
Port 1
USB 1.1 USB 1.1 HCsHCsHigh-Speed ModeHigh-Speed Mode
(Enhanced Interface) USB HC(Enhanced Interface) USB HC
Port 1 Port 2
Port OwnerPort OwnerControl(s)Control(s)
Port 1 Port 2
Port Routing Logic
Port N
HC Control Logic/Data Buffering Enhanced HC Control LogicEnhanced Data Buffering
Port 2 Port N
Port N
USB 2.0 Hub
Hub controller same as USB1.1Routing logic connects device to appropriate path
High Speed onlyHigh Speed only
Full/LowFull/LowSpeedSpeed
Routing LogicRouting LogicRouting LogicRouting LogicPortPort PortPort
PortPort PortPort
TransactionTransactionTranslatorTranslator
TransactionTransactionTranslatorTranslator HS SignalHS Signal
RepeaterRepeaterHS SignalHS SignalRepeaterRepeater
HubHubControllerController
HubHubControllerController
Transaction Translator (TT)
TT handles low/full speed transactions Driven with split transactions
Start-Split Host tells Hub to initiate full/low speed
transaction
Complete-Split Host asks Hub for results of previous full/low
speed transaction
Bandwidth Usage
Low/full speed devices use bit-rate equivalent of USB2.0 bandwidth
6Mbps classic camera (50% of classic) uses less than 2% of USB2.0 bandwidth (6Mbps/480Mbps)
ISOCH IN Through a TT
HS BusHS Bus
Full Speed BusFull Speed Bus
uSOFuSOF
1ms1ms
uSOFuSOF uSOFuSOF uSOFuSOF uSOFuSOF uSOFuSOF uSOFuSOF uSOFuSOF uSOFuSOF
SOFSOF SOFSOF
SSSS
SS = Start SplitSS = Start Split
CSCS CSCS CSCS CSCS
125us125us
CS = Complete SplitCS = Complete Split
Demo: Full Speed Device
Show the split transactions
Show better performance behind USB 2.0hub than behind USB 1.1 HC
Summary
Two major changes for USB 2.0 Higher speed electricals Transaction translator in USB2.0 hub
Backward compatibility Has little impact on HS bandwidth May even improve FS performance