资源描述:
《usb协议的分析AnalysisofUSBprotocol.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、usb协议的分析(AnalysisofUSBprotocol)NowverypopularUSBequipment,allthetimearoundus,suchastheuseofUdisk,usingMP3,usingmobilephones,needtocommunicatewithUSBPC.ThroughtheUSBinterface,theuseofourlifeisveryconvenient,whenyouwanttolistentosongs,youcaninsertMP3toPCthere,andthendownloadMP3fromPC.Thisprocessis
2、verysimpleintheuser'sview,noneedtoinstallthedriver,donotneedtobreakthePCpowersupply.Trulyembodytheideaof〃scieneeandtechnologyasthepeople"・UsingsuchaconvenientUdiskorMP3,thenweneedtoaskwhy,whyisitsoconvenient?Oftenbehindtheconvenience,itmeansthattheneedforengineerstodoalotofwork,sothatyoucanuseUS
3、Bsoconvenient・HereisadetailedanalysisoftheUSBprotoco1.USBcommunicationisverycomplex,justathickdefinitionoftheagreement,tocompletelyread,andunderstandit,isaverytime-consumingthing・Ihopethisarticlecanprovideyouwithaverygoodguide,letyouin-depthunderstandingoftheUSBagreement・TheprotocolofUSBismaster
4、slaveprotoco1.Inallcommunication,thereisonlyonemastercontroller,andtheothersareslavedevices・Themaximumnumberof127devicescanberemovedbecausetheprotocolonlyretains7bitasthedeviceaddress・AllUSBdataexchangesareinitiatedbythemastercontroller,andotherresponsesfromthedevice・NowtoWINDOWScommunicationont
5、heUSBtolearnUSBcommunicationprotocol,allthedatameritionedlater,istheUSBdriverontheWINDOWSsentdata・Inordertodisplayallthecommunicationdata,IfoundaUSBARMdevelopmentboard,throughthisdevelopmentboard,youcanprintallthedataofthemastercontroller,andmakethecorrespondinganalysis・Atthesametime,usingthisde
6、velopmentboardcanalsobeusedtodebugGodsonmastercontrollerdriverdebugging.WhentheUSBdevelopmentboardpower,itwillinitializetheUSBconnection,butthereisnoinsertionofPCconnectionline,thenthedevelopmentboardwilloutputthefollowingcharactersfromtheserialport:USBSuspendUSBResumeAsyoucanseefromabove,theUSB
7、ofthedevicehasbeenhangingupandawakeninguntiltheinsertionofthePCconnection.WhentheconnectionlineisinsertedintoPC,themessagesentbythemastercontrollerisreceived・ThedatabelowisthedataexchangedbetweenthedevelopmentboardandtheUSBm