资源描述:
《当pc一接上电源时》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、UniversalSerialBusSystemArchitecture(1)overviewThebigpicture–overviewUSBBusTopologyUSBHostThereisonlyonehostinanyUSBsystem.TheUSBinterfacetothehostcomputersystemisreferredtoastheHostController.Aroothubisintegratedwithinthehostsystemtoprovideoneormoreattachmentpoints.USBDevicesUSBdevicesareon
2、eofthefollowing:Hubs,whichprovideadditionalattachmentpointstotheUSBFunctions,whichprovidecapabilitiestothesystem,suchasanISDNconnection,adigitaljoystick,orspeakers.USBelectricalUSBbusprotocolTheUSBisapolledbus.TheHostControllerinitiatesalldatatransfers.Allbustransactionsinvolvethetransmissio
3、nofuptothreepackets.TokenpacketEachtransactionbeginswhentheHostController,onascheduledbasis,sendsaUSBtokenpacketdescribingthetypeanddirectionoftransaction,theUSBdeviceaddress,andendpointnumber.DatapacketTheUSBdevicethatisaddressedselectsitselfbydecodingtheappropriateaddressfields.Inagiventra
4、nsaction,dataistransferredeitherfromthehosttoadeviceorfromadevicetothehost.Thedirectionofdatatransferisspecifiedinthetokenpacket.Thesourceofthetransactionthensendsadatapacketorindicatesithasnodatatotransfer.HandshakepacketThedestination,ingeneral,respondswithahandshakepacketindicatingwhether
5、thetransferwassuccessful.USBpipeTheUSBdatatransfermodelbetweenasourceordestinationonthehostandanendpointonadeviceisreferredtoasapipe.streampipeMessagepipePipeshaveassociationsofdatabandwidth,transferservicetype,andendpointcharacteristicslikedirectionalityandbuffersizes.Mostpipescomeintoexist
6、encewhenaUSBdeviceisconfigured.Onemessagepipe,theDefaultControlPipe,alwaysexistsonceadeviceispowered,inordertoprovideaccesstothedevice’sconfiguration,status,andcontrolinformation.Thetransactionscheduleallowsflowcontrolforsomestreampipes.Atthehardwarelevel,thispreventsbuffersfromunderrunorove
7、rrunsituationsbyusingaNAKhandshaketothrottlethedatarate.WhenNAKed,atransactionisretriedwhenbustimeisavailable.Plugandplay當pc一接上電源時,所有利用usb所連接的裝置與集線器都預設為位址0接著pc就向usb查詢,若發現第一個device其位址為0,則assign一個新位址給他,然後再向下尋找第二個位址為0的裝置或集線器最多可連接127個devices在配給新位址的同時,p