usb?ò?é??
????·???
??USB????????????·?????,????????????·???:????(Control)????(isochronous)????(interrupt)?ó??(bulk)???????????????????????è????????????,?????????·??????????·???,??×÷?????????????ò???é????,?????è???????????????????????¤×÷·???????????
?¨???ù????????·????????÷???¨????PC±?,??????host±???
????(Control)·??????????????????????ò?????????????¨????????USB?????í???????÷???????é????????????USB?è±?·????¨?????ü????????????·???????°ü?¨8??16??32??64×????????????????????è±????????????????????????????????÷?????ú??USB???è??????????(Endpoint)0???????????????????¨???????????????????????????ü????????
????(isochronous)·??????????????????á?????·?¨?????í???????±???¨latency)???ü±??????±???????????????????í?????÷???????????ò?????????ó???¨?????????????????±???????????????????±?¨?°?????????°?????±???????????????????????????????????????????ó?·?¨?????í?????·?¨??×??ó???????????????????????????????±??????????±??ê?????????????????ê?????ü??????????
????(interrupt)·?????????????·????????÷???????¨?±?é???è±???·????????????????????è±????????????÷???á?????¨???ü???é??????????1??255ms??????????????·?????????????????????·????????????¤???????????????ü??????×??????ó±ê???????????à????????·????????????ò??????????host??????????????·?????
?ó??(bulk)???????÷?????????????ó???????????????????????????±?????????í???????±?????ó???é?????????ó±??¤???????ò???ú???¨?è???????????à?????????à?????è±???????????·????????ó??±??????????????????????ù?????ü?à???????????????ê?????ó??????????????????
USB???????§?????í·????÷????????è?(frame),??è??¨????1ms?±???¤???????è±???è???????????????????????°ü?????ê???????????????????????????ó,USB??host???á????????????????????·???×?????????°???,??????????????USB?????í???¨???é????,????·?????????·??????????á???????????í??90%,????????°?????????·?????????????
USB???????á??
USB?è±?
USB???è±?????????PC??????????USB??????????????HUB?????????????ü?à??USB?è±?????????????,USB??HUB????????????????(??host),???à????????????(???????ü???è±?),??????????????????????????????????127?????è,????HUB???á???è??????USB????????,USB??host??????PC±?,?ù??????????????host???????è±?,???è±????è±?????????·¨?????±???¨????,?????¨??host?????í???÷?????????????????????à????.????????,?¨???á???????ùHUB,????HUB??°???????????????????
????PC?????????????ò?à????USB host?????÷????°????????à?????????÷:UHCI(USB host?????÷????),OHCI(??·???host?????÷????)??Windows??USB?à???????ò?????????????????÷?à??????????miniclass???????ò???§????
USB?????í????
USB???????????ù??,???ù????????5V??????,???????±????????HUB?à?????è±??????±???????ü?????????í???????ù????????,???????????¤??,?????????????????????????????????¨??,??????????,??????????,????????????????±??????è±??????????????÷??±???.??????????,USB??1394???÷??????±???
USB??×??????????????????±?ò±?????,???ù????????????????????
???????±?ò??×??????????????ú(stall),±??????ó???????????±?ò????±??ò?????????±?ò?¨??host??????????????????×??????????¤×÷??
???????é
USB?????í???é???¨???ó?à??????×??????????????????¨????????????????è?????×??à????1500bytes,????????????è?×??à??187bytes??
è??¨????????·??????í????????????????·????????±????è??á????????????è?????????????????????×?????????????????
????×?????USB???????é??×?°ü(packet)??°ü°ü?¨??????????°ü±ê???¨packet ID)??CRC??????????????Packet ID??????????????
token: OUT IN SOF SETUP
data: DATA0 DATA1
handshake: ACK NAK STALL
special: PRE
Transactions?¨??????????
????transaction????host???è±??¨device)?????????????à?????????????¨????host????????????????????????Token??°ü??????????????????·??ò????????°ü????????°ü?????ê???ó?????á???è±??¨device??·????????????¨handshake)°ü??USB?????¨??IN,OUT,??SETUP??°ü?????¨USB???·??endpoint?¨×??à??128????0?¨??±???????×??±????????????????????,????????±????¨???è±?±????¨????????????°ü???????????????????¨??????SETUP??°ü°ü??8??byte???????????????????????????????à????????DATA????°ü???????è???????à????????°ü???????????????????????±?ò×????ü???????·??ACK handshake??°ü?????????????????????·??????STALL handshake?ò±í??????°ü????????????????????????????????host????·??????ò????????????????PRE??????°ü?÷??????????????USB???????????????????????????è±????±?ò??????????×??????????è±??????á????????PRE??°ü?????á???????è±???
?÷???????à????°ü???ó????????????DATA??????°ü×??ó??1023bytes.
Start of Frame(SOF)
SOF??host????????frame?????·????SOF??°ü°ü?¨11??bit??è??ò??????0??0X7FF(i.e. USBD_ISO_START_FRAME_RANGE-1)??SOF?????ù?????????è±??????????§????
Power
?????è±???????×?????????100mA?????÷?????????????ò?????ê????×??à????????500mA?????÷???????ú??×??????????÷????500uA
??????×????ò???????????ú??×????????????? ???·??
www.CETINet.com