Tải bản đầy đủ - 0 (trang)
Chapter 15. I/O Interfaces from Serial and Parallel to IEEE 1394 and USB

Chapter 15. I/O Interfaces from Serial and Parallel to IEEE 1394 and USB

Tải bản đầy đủ - 0trang

IntroductiontoInput/OutputPorts

Thischaptercoverstheprimaryperipheralinput/outputports

onamodernPCsystem.Thisincludesadiscussionofboththe

so-called"legacy"serialandparallelportsthathavebeen

standardonPCssincethebeginning,aswellasadiscussionof

themorecurrentUniversalSerialBus(USB),whichisreplacing

bothserialandparallelports,andIEEE1394(i.LINKor

FireWire)interfaces.(IEEEstandsfortheInstituteofElectrical

andElectronicEngineers.)AlthoughSCSIandIDEarealsoI/O

interfaces,theyaremainlyusedasinternalinterfaces.IDEis

coveredinChapter7,"TheATA/IDEInterface,"eventhough

desktopPCstodayrarelyimplementSCSI.Ifyouwanttolearn

moreaboutthisarchitecture,pleaserefertomynewbook,

UpgradingandRepairingSevers.

Currently,thetwomostpopularhigh-speedserial-bus

architecturefamiliesfordesktopandportablePCsareUniversal

SerialBus(USB)andIEEE1394,whichisalsocalledi.LINKor

FireWire.Eachinterfacetypeisavailableintwoversions:USB

1.1andUSB2.0;IEEE1394aandIEEE1394b(alsocalled

FireWire800).TheUSBandIEEE1394portfamiliesarehighspeedcommunicationsportsthatfaroutstripthecapabilitiesof

olderstandardserialandparallelports.Theycanalsobeused

asanalternativetoSCSIforhigh-speedexternalperipheral

connections.Inadditiontoperformance,thesenewerports

offerI/Odeviceconsolidation,whichmeansthatalltypesof

externalperipheralscanconnecttotheseports.



WhySerial?

Asmentionedintheprevioussection,thetechnologybehind

bothUSBandIEEE1394isserialinnature.Thecurrenttrendin

high-performanceperipheralbusdesignistouseaserial



architecture,inwhich1bitatatimeissentdownawire.

Becauseparallelarchitecture(usedbySCSI,ATA,andLPT

ports)uses8,16,ormorewirestosendbitssimultaneously,

theparallelbusisactuallymuchfasteratthesameclockspeed.

However,increasingtheclockspeedofaserialconnectionis

mucheasierthanincreasingthatofaparallelconnection.

Parallelconnectionsingeneralsufferfromseveralproblems,the

biggestbeingsignalskewandjitter.Skewandjitterarethe

reasonshigh-speedparallelbusessuchasSCSI(small

computersystemsinterface)arelimitedtoshortdistancesof3

metersorless.Theproblemisthat,althoughthe8or16bitsof

dataarefiredfromthetransmitteratthesametime,bythe

timetheyreachthereceiver,propagationdelayshaveconspired

toallowsomebitstoarrivebeforetheothers.Thelongerthe

cable,thelongerthetimebetweenthearrivalofthefirstand

lastbitsattheotherend!Thissignalskew,asitiscalled,

preventsyoufromrunningahigh-speedtransferrateora

longercableorboth.Jitteristhetendencyforthesignalto

reachitstargetvoltageandfloataboveandbelowforashort

periodoftime.

Withaserialbus,thedataissent1bitatatime.Becausethere

isnoworryaboutwheneachbitwillarrive,theclockingrate

canbeincreaseddramatically.Forexample,thetoptransfer

ratepossiblewithEPP/ECPparallelportsis2.77MBps,whereas

IEEE1394aports(whichusehigh-speedserialtechnology)

supporttransferratesashighas400Mbps(about50MBps)25

timesfasterthanparallelports.USB2.0supportstransferrates

of480Mbps(about60MBps),whichisabout30timesfaster

thanparallelports,andthenewIEEE1394b(FireWire800)

portsreachtransferratesashighas800Mbps(orabout

100MBps),whichisabout50timesfasterthanparallelports!

Athighclockrates,parallelsignalstendtointerferewitheach

other.Serialagainhasanadvantagebecause,withonlyoneor

twosignalwires,crosstalkandinterferencebetweenthewires

inthecablearenegligible.



Ingeneral,parallelcablingismoreexpensivethanserial

cabling.Besidesthemanyadditionalwiresneededtocarrythe

multiplebitsinparallel,thecablealsomustbespecially

constructedtopreventcrosstalkandinterferencebetween

adjacentdatalines.ThisisonereasonexternalSCSIcablesare

soexpensive.Serialcabling,bycomparison,isvery

inexpensive.Foronething,ithassignificantlyfewerwires.

Furthermore,theshieldingrequirementsarefarsimpler,even

atveryhighspeeds.Becauseofthis,transmittingserialdata

reliablyoverlongerdistancesisalsoeasier,whichiswhy

parallelinterfaceshaveshorterrecommendedcablelengths

thandoserialinterfaces.

ForthesereasonsinadditiontotheneedforPlugandPlay

externalperipheralinterfacesandtheeliminationofthephysical

portcrowdingonportablecomputersthesehigh-performance

serialbusesweredeveloped.USBisastandardfeatureon

virtuallyallPCstoday;isusedformostgeneral-purpose,highspeedexternalinterfacing;andisthemostcompatible,widely

available,andfastestgeneral-purposeexternalinterface.In

addition,IEEE1394(morecommonlyknownasFireWire),

althoughmainlyusedincertainnichemarketssuchas

connectingDV(digitalvideo)camcordersisalsospreadinginto

otherhigh-bandwidthuses,suchashigh-resolutionscanners,

externalharddrives,andnetworking.



ComparingIEEE1394andUSB

AlthoughbothUSBandIEEE1394arediscussedindetailinthe

followingsections,it'shelpfultofirstcomparethem.Becauseof

thesimilarityinboththeformandfunctionofUSBand1394

ports,therehasbeensomeconfusionaboutthedifferences

betweenthem.Table15.1summarizesthedifferencesbetween

thesetechnologies.

Table15.1.IEEE1394andUSBComparison



IEEE1394a

(alsocalled

IEEE1394b

I.LINKor

(alsocalled

FireWire

FireWire800)

400)







USB1.1



USB2.0



PC-hostrequired No



No



Yes



Yes/No[1]



Maximum

numberof

devices



63



63



127



127



Hot-swappable



Yes



Yes



Yes



Yes



Maximumcable

lengthbetween

devices



4.5meters



4.5meters(95meters

pincopper);100

meters(glass

opticalfiber)[2]



5meters



Transferrate



400Mbps

(50MBps)



800Mbps

(100MBps)



12Mbps

(1.5MBps)



480Mbps

(60MBps)



1,600Mbps

(400MBps);

3,200Mbps

(800MBps)



None



None



Keyboards;

mice;

joysticks;

low-res

digital

cameras;

low-speed

drives;

modems;

printers;lowresscanners



AllUSB1.1

devices;DV

camcorders;

high-res

digital

cameras;

HDTV;settopboxes;

high-speed

drives;highresscanners



Proposedfuture None

transferrates



Typicaldevices



DV

All1394a

camcorders; devices

highres

digital

cameras;

HDTV;settopboxes;

high-speed

drives;highresscanners;

electronic

musical

instruments



[1]NowithUSBOn-The-Go.



[2]CAT-5UTPsupportedfor100Mbpsspeeds(100metersmax.);step-indexplasticopticalfibersupportedfor

100Mbpsand200Mbpsspeeds(50metersmax.).



Becausetheoverallperformanceandphysicalspecificationsare

similar,themaindifferencebetweenUSBand1394is

popularity.ThebottomlineisthatUSBisbyfarthemost

popularexternalinterfaceforPCs,eclipsingallothersby

comparison.ThisisprimarilybecauseInteldevelopedmostof

USBandhasplacedbuilt-inUSBsupportinallitsmotherboard

chipsetsandmotherboardssince1996.Fewmotherboard

chipsetsintegrate1394aor1394b;inmostcases,ithastobe

addedasanextra-costchiptothemotherboard.Thecostofthe

additional1394circuitry(anda$0.25royaltypaidtoApple

Computerpersystem)andthefactthatallmotherboards

alreadyhaveUSB,havelimitedthepopularityof1394

(FireWire)inthePCmarketplace.

EvenwiththeoverwhelmingpopularityofUSB,amarketfor

1394stillexists.Perhapsthemainreason1394willsurvivein

conjunctionwiththeUSB2.0interfaceisthatUSBbeganasa

PC-centrictechnology,whereas1394isnot.Inotherwords,

USBandHi-SpeedUSBinitiallyrequiredaPCasthehost,

whereas1394canconnecttwodevicesdirectlywithoutaPC

betweenthem.Assuch,1394couldbeusedtodirectlyconnect

aDVcamcordertoaDV-VCRfordubbingtapesorediting.

Eventhishaschanged,however,withtheintroductionofa

supplementtotheUSB2.0specificationcalledUSBOn-The-Go.

USBOn-The-Go,introducedinDecember2001,enablesthe

samedevice-to-deviceconnectionsaswascapablein1394

(FireWire)andessentiallynullifiestheprimaryadvantage1394

hadoverUSB.Becauseofthepopularityandcapabilitiesof

USB,IrecommendseekingoutonlyUSBperipheralsovertheir

1394(FireWire)counterpartswherepossible.

BecausebothUSB2.0and1394a(FireWire)offerrelatively

closetothesameoverallcapabilitiesandperformance,you

shouldmakeyourchoicebasedonwhichdevicesyouintendto



connect.Ifthedigitalvideocamerayouwanttoconnecthas

onlya1394(FireWire/i.LINK)connection,youwillneedtoadda

1394FireWirecardtoyoursystem,ifsuchaconnectionisn't

alreadypresentonyourmotherboard.Mostgeneral-purposePC

storage,I/Operipherals,andotherdevicesareUSB,whereas

onlyvideoandsomestoragedevicesusuallyhave1394

connections.However,manydevicesnowofferbothUSB2.0

and1394interfacestoenableusewiththewidestrangeof

computers.







UniversalSerialBus

UniversalSerialBus(USB)isanexternalperipheralbus

standarddesignedtobringPlugandPlaycapabilityfor

attachingperipheralsexternallytothePC.USBeliminatesthe

needforspecial-purposeports,reducestheneedtousespecialpurposeI/Ocards(thusreducingtheneedtoreconfigurethe

systemwitheachnewdeviceadded),andsavesimportant

systemresourcessuchasinterrupts(IRQs);regardlessofthe

numberofdevicesattachedtoasystem'sUSBports,onlyone

IRQisrequired.PCsequippedwithUSBenableperipheralsto

beautomaticallyrecognizedandconfiguredassoonastheyare

physicallyattached,withouttheneedtorebootorrunsetup.

USBallowsupto127devicestorunsimultaneouslyonasingle

bus,withperipheralssuchasmonitorsandkeyboardsactingas

additionalplug-insites,orhubs.USBcables,connectors,hubs,

andperipheralscanbeidentifiedbyicons,asshowninFigure

15.1.Notethe"plus"symboladdedtotheuppericon,which

indicatesthatportsupportsUSB2.0(Hi-SpeedUSB)inaddition

tothestandard1.xsupport.



Figure15.1.TheseiconsidentifyUSBcables,

connectors,hubs,andperipherals.



IntelhasbeentheprimaryproponentofUSB,andallitsPC

chipsetsstartingwiththePIIX3SouthBridgechipset

component(introducedinFebruary1996)haveincludedUSB



supportasstandard.Otherchipsetvendorshavefollowedsuit,

makingUSBasstandardafeatureoftoday'sdesktopand

notebookPCsastheserialandparallelportsoncewere.

SixothercompaniesinitiallyworkedwithIntelincodeveloping

theUSB,includingCompaq,Digital,IBM,Microsoft,NEC,and

NorthernTelecom.Together,thesecompanieshaveestablished

theUSBImplementersForum(USB-IF)todevelop,support,and

promoteUSBarchitecture.

See"Chipsets,"p.253.



TheUSB-IFformallyreleasedUSB1.0inJanuary1996,USB1.1

inSeptember1998,andUSB2.0inApril2000.The1.1revision

wasmostlyaclarificationofsomeissuesrelatedtohubsand

otherareasofthespecification.Mostdevicesandhubsshould

be1.1compliant,eveniftheyweremanufacturedbeforethe

releaseofthe1.1specification.ThebiggestchangewasUSB

2.0,whichis40timesfasterthantheoriginalUSBandyetfully

backwardcompatible.USBportscanberetrofittedtoolder

computersthatlackbuilt-inUSBconnectorsthroughtheuseof

eitheranadd-onPCIcard(fordesktopcomputers)oraPCCard

onCardbus-compatiblenotebookcomputers.Youcanalsouse

USBadd-oncardstoupdateanoldersystemthathasonlyUSB

1.1onthemotherboard.Asofmid-2002,virtuallyall

motherboardsincludefourormoreUSB2.0portsasstandard.

Notebookcomputerswereslowertocatchonitwasn'tuntilearly

2003thatmostnotebookorlaptopcomputersincludedUSB2.0

portsasstandard.



USBTechnicalDetails



USB1.1runsat12Mbps(1.5MBps)overasimplefour-wire

connection.Thebussupportsupto127devicesconnectedtoa

singleroothubandusesatiered-startopology,builton

expansionhubsthatcanresideinthePC,anyUSBperipheral,

orevenstandalonehubboxes.

Notethatalthoughthestandardallowsupto127devicestobe

attached,theyallmustsharethe1.5MBpsbandwidth,meaning

thatforeveryactivedeviceyouadd,thebuswillslowdown

some.Inpracticalreality,fewpeoplewillhavemorethan8

devicesattachedatanyonetime.

Forlow-speedperipherals,suchaspointingdevicesand

keyboards,theUSBalsohasaslower1.5Mbpssubchannel.The

subchannelconnectionisusedforslowerinterfacedevices,such

askeyboardsandmice.

USBemployswhatiscalledNonReturntoZeroInvert(NRZI)

dataencoding.NRZIisamethodofencodingserialdatain

which1sand0sarerepresentedbyoppositeandalternating

highandlowvoltageswherethereisnoreturntoazero(or

reference)voltagebetweentheencodedbits.InNRZIencoding,

a1isrepresentedbynochangeinsignallevel,anda0is

representedbyachangeinlevel.Astringof0scausestheNRZI

datatotoggleeachbittime;astringof1scauseslongperiods

withnotransitionsinthedata.Thisisanefficienttransfer

encodingschemebecauseiteliminatestheneedforadditional

clockpulsesthatwouldotherwisewastetimeandbandwidth.

USBdevicesareconsideredeitherhubsorfunctions,orboth.

FunctionsaretheindividualdevicesthatattachtotheUSB,

suchasakeyboard,mouse,camera,printer,telephone,andso

on.HubsprovideadditionalattachmentpointstotheUSB,

enablingtheattachmentofmorehubsorfunctions.Theinitial

portsinthePCsystemunitarecalledtheroothub,andthey

arethestartingpointfortheUSB.Mostmotherboardshave

two,three,orfourUSBports,anyofwhichcanbeconnectedto

functionsoradditionalhubs.Somesystemsplaceoneortwoof



theUSBportsinthefrontofthecomputer,whichisvery

convenientfordevicesyouuseonlyoccasionally,suchasdigital

camerasorflashmemorycardreaders.Externalhubs(also

calledgenerichubs)areessentiallywiringconcentrators,and

throughastar-typetopologytheyallowtheattachmentof

multipledevices.Eachattachmentpointisreferredtoasaport.

Mosthubshaveeitherfouroreightports,butmoreare

possible.Formoreexpandability,youcanconnectadditional

hubstotheportsonanexistinghub.Thehubcontrolsboththe

connectionanddistributionofpowertoeachoftheconnected

functions.AtypicalhubisshowninFigure15.2.



Figure15.2.AtypicalUSBhubwithfourports.



BesidesprovidingadditionalsocketsforconnectingUSB

peripherals,ahubprovidespowertoanyattachedperipherals.

Ahubrecognizesthedynamicattachmentofaperipheraland

providesatleast0.5Wofpowerperperipheralduring

initialization.UndercontrolofthehostPCdriversoftware,the

hubcanprovidemoredevicepower,uptoamaximumof2.5W,

forperipheraloperation.



Tip

Forthemostreliableoperation,Irecommendthat

youuseself-poweredhubs,whichplugintoanAC

adapter.Bus-poweredhubspullpowerfromthePC's

USBroothubconnectorandaren'talwayscapableof

providingadequatepowerforhigh-power



requirementdevices,suchasopticalmice.



Anewlyattachedhubisassignedauniqueaddress,andhubs

canbecascadeduptofivelevelsdeep(seeFigure15.3).Ahub

operatesasabidirectionalrepeaterandrepeatsUSBsignalsas

requiredbothupstream(towardthePC)anddownstream

(towardthedevice).Ahubalsomonitorsthesesignalsand

handlestransactionsaddressedtoitself.Allothertransactions

arerepeatedtoattacheddevices.AUSB1.1hubsupportsboth

12Mbps(full-speed)and1.5Mbps(low-speed)peripherals.



Figure15.3.AtypicalPCwithUSBdevicescan

usemultipleUSBhubstosupportavarietyof

peripherals,connectedtowhicheverhubismost

convenient.



[Viewfullsizeimage]



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 15. I/O Interfaces from Serial and Parallel to IEEE 1394 and USB

Tải bản đầy đủ ngay(0 tr)

×