Page 1

àÃÕ¹ÃٌáÅл¯ÔºÑµÔ¡ÒÃàª×èÍÁµ‹Í ¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹

¾Íϵ USB ¢Ñé¹¾×é¹°Ò¹

Simple PC-USB port Interface Experiment text-lab manual â´Â ÅÀ¹ ÊØÀÒ¾ ÍÃö¾Å ºØ­ÂÐâÀ¤Ò Çþ¨¹ ¡ÃᡌÇÇѲ¹¡ØÅ ªÑÂÇѲ¹ ÅÔÁé ¾Ã¨ÔµÃÇÔäÅ

(C) Innovative Experiment Co.,Ltd. àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 1


Simple PC-USB port Interface Experiment text-lab manual

àÃÕ¹ÃٌáÅл¯ÔºÑµÔ¡ÒÃàª×èÍÁµ‹Í¤ÍÁ¾ÔÇàµÍϡѺÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñé¹¾×é¹°Ò¹ ISBN

974-90349-0-2

â´Â ÅÀ¹ ÊØÀÒ¾ ÍÃö¾Å ºØ­ÂÐâÀ¤Ò Çþ¨¹ ¡ÃᡌÇÇѲ¹¡ØÅ ªÑÂÇѲ¹ ÅÔÁé ¾Ã¨ÔµÃÇÔäÅ ã¤Ã¤ÇÃ㪌˹ѧÊ×ÍàŋÁ¹Õé 1. ¹Ñ¡àÃÕ¹ ¹ÔÊµÔ ¹Ñ¡ÈÖ¡ÉÒ áÅкؤ¤Å·ÑÇè ä»·ÕÁè ¤Õ ÇÒÁʹã¨ã¹¡ÒÃàÃÕ¹ÃÙ¡Œ ÒùíÒ¤ÍÁ¾ÔÇàµÍÏÊNj ¹ºØ¤¤Åàª×Íè Á µ‹Í¡ÑºÍØ»¡Ã³ÀÒ¹͡à¾×Íè ·íÒ¡ÒÃáÅ¡à»ÅÕÂè ¹¢ŒÍÁÙÅËÃ×ͤǺ¤ØÁ¡Ò÷íÒ§Ò¹ 2. ʶҺѹ¡ÒÃÈÖ¡ÉÒ âçàÃÕ¹ ÇÔ·ÂÒÅÑ ÁËÒÇÔ·ÂÒÅÑ ·ÕÁè ¡Õ ÒÃແ´¡ÒÃàÃÕ¹¡ÒÃÊ͹ÇÔªÒÍÔàÅç¡·Ã͹ԡʏËÃ×Í ÀÒ¤ÇÔªÒÇÔÈÇ¡ÃÃÁÍÔàÅç¡·Ã͹ԡʏáÅФÍÁ¾ÔÇàµÍÏ 3. ¤³Ò¨ÒÏ·ÁÕè ¤Õ ÇÒÁµŒÍ§¡ÒÃÈÖ¡ÉÒ áÅÐàµÃÕÂÁ¡ÒÃàÃÕ¹¡ÒÃÊ͹ÇÔªÒ¡ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ ¹Í¡ (Computer Interfacing) 4. ˹‹Ç§ҹàÍ¡ª¹·ÕÁè ¡Õ ÒþѲ¹Ò¼ÅÔµÀѳ±´ÒŒ ¹ÍÔàÅç¡·Ã͹ԡʏáÅФÍÁ¾ÔÇàµÍÏ

´íÒà¹Ô¹¡ÒèѴ¾ÔÁ¾áÅШíÒ˹‹ÒÂâ´Â ºÃÔÉ·Ñ ÍÔ¹â¹àǵտ àÍç¡à¾ÍÃÔàÁ¹µ ¨íÒ¡Ñ´ 3133/53 «.ÊØ¢ÁØ ÇÔ· 101/2 ¶.ÊØ¢ÁØ ÇÔ· á¢Ç§ºÒ§¹Ò ࢵºÒ§¹Ò ¡ÃØ§à·¾Ï 10260 â·ÃÈѾ· 0-2747-7001-4 â·ÃÊÒà 0-2747-7005

ÃÒÂÅÐàÍÕ´·Õ»è ÃÒ¡¯ã¹Ë¹Ñ§Ê×ÍàÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñé¹¾×é¹°Ò¹ 䴌¼‹Ò¹¡ÒõÃǨ·Ò¹Í‹ҧÅÐàÍÕ´áÅжŒÇ¹¶Õè à¾×èÍãˌÁÕ¤ÇÒÁÊÁºÙóáÅж١µŒÍ§ÁÒ¡·ÕèÊØ´ÀÒÂ㵌 à§×Íè ¹ä¢áÅÐàÇÅÒ·Õ¾è §Ö Áա͋ ¹¡ÒèѴ¾ÔÁ¾à¼Âá¾Ã‹ ¤ÇÒÁàÊÕÂËÒÂÍѹÍÒ¨à¡Ô´¨Ò¡¡ÒùíÒ¢ŒÍÁÙÅã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õäé »ãªŒ ºÃÔÉ·Ñ ÍÔ¹â¹àǵտ àÍç¡à¾ÍÃÔàÁ¹µ ¨íÒ¡Ñ´ ÁÔ䴌ÁÀÕ ÒÃÐ㹡ÒÃÃѺ¼Ô´ªÍºáµ‹»ÃСÒÃã´ ¤ÇÒÁ¼Ô´¾ÅÒ´¤ÅÒ´à¤Å×Íè ¹ ·ÕÍè Ò¨ÁÕáÅÐä´ŒÃºÑ ¡ÒèѴ¾ÔÁ¾à¼Âá¾Ã‹ÍÍ¡ä»¹Ñ¹é ·Ò§ºÃÔÉ·Ñ Ï ¨Ð¾ÂÒÂÒÁªÕáé ¨§áÅÐᡌä¢ã¹¡ÒèѴ¾ÔÁ¾¤ÃÑ§é µ‹Íä» àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 2


¤íÒ¹íÒ

“Êдǡ㪌 §‹Ò·ÕÊè ´Ø äÁ‹Â§Ø‹ ÂÒ¡” ·Ñ§é ËÁ´¹Õ¤é Í× ËÑÇ㨢ͧ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡³¼Ò‹ ¹¾Íϵ USB ¢Í§à¤Ã×Íè § ¤ÍÁ¾ÔÇàµÍÏ ÍØ»¡Ã³·àÕè ª×Íè Áµ‹Í¼‹Ò¹¾ÍϵÍѨ©ÃÔÂеÑǹÕÁé ¡Ñ ¨ÐÁÕ¡ÒÃ㪌§Ò¹·Õäè Á‹Â§Ø‹ ÂÒ¡ à¾Õ§àÊÕºÊÒ Ãкº»¯ÔºµÑ Ô ¡ÒÃÇÔ¹â´Çʏ¨Ð¶ÒÁËÒ«Í¿µáÇÏ «Ö§è ÁÕ¢¹Ñé µÍ¹¡ÒõԴµÑ§é à¾Õ§àÅ硹ŒÍ ¡çÊÒÁÒö㪌§Ò¹ä´ŒáÅŒÇ ¤ÇÒÁÊдǡʺÒ ·Õäè ´ŒÃºÑ ¢Í§¼Ù㌠ªŒ§Ò¹»ÅÒ·ҧ¹Ñ¹é ᷌·¨Õè ÃÔ§áŌÇÁÕàº×Íé §ËÅѧ¡Ò÷íÒ§Ò¹·ÕÂè §Ø‹ ÂÒ¡ ÁÕà·¤â¹âÅÂÕὧÍÂÙ͋ ‹ҧÁÒ¡ÁÒ ÃÇÁ¶Ö§¢Ñ¹é µÍ¹ã¹¡ÒþѲ¹Ò«Í¿µáÇÏ·«Õè ºÑ «ŒÍ¹ÁÒ¡¾ÍÊÁ¤Çà «Ö§è àÃ×Íè §àËŋҹռé ãٌ ªŒ§Ò¹»ÅÒ·ҧÁÑ¡äÁ‹·ÃÒº ·Ñ§é ·ÕÁè ¡Õ ÒÃà¼Âá¾Ã‹¢ÍŒ ÁÙŢͧ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³¼Ò‹ ¹¾Íϵ USB ÍÍ¡ÁÒÁÒ¡¾Í¤Çà ¶ŒÒà·ÕºáŌÇÁÕÁÒ¡¡Ç‹ÒÊÁÑ ·Õàè ÃÔÁè µŒ¹ãªŒ¾Íϵ͹ءÃÁáÅоÍϵ¢¹Ò¹ã¹¡ÒÃàª×Íè Áµ‹Íà¾×Íè ¤Çº¤ØÁËÃ×ÍÃѺÊÑ­­Ò³¨Ò¡ÍØ»¡Ã³ÀÒ¹͡àÊÕÂÍÕ¡ ᵋà¹×Íè §¨Ò¡ USB (Universal Serial Bus) ໚¹ÃкººÑÊ͹ءÃÁÍ๡»ÃÐʧ¤·ÁÕè ÊÕ ÒÂÊÑ­­Ò³à¾Õ§ 2 àʌ¹ ᵋÊÒÁÒöÃͧÃѺÍØ»¡Ã³·àÕè ¢ŒÒÁÒàª×Íè Áµ‹Í䴌ÁÒ¡¶Ö§ 128 ÍØ»¡Ã³ ´Ñ§¹Ñ¹é ¡ÒèѴ¡ÒÃÊÑ­­Ò³ ¡ÒúÃÔËÒà ·ÃѾÂҡ÷Ñé§ã¹´ŒÒ¹¤ÇÒÁµŒÒ¹·Ò¹ä¿¿‡Ò ÃдѺáç´Ñ¹ ¡ÒÃ㪌¡ÃÐáÊä¿¿‡Ò¨Ö§à»š¹àÃ×èͧ·ÕèÁÕ¤ÇÒÁÊíҤѭÍ‹ҧÂÔè§ ¾ÃŒÍÁ¡Ñ¹¹Ñ¹é ´ŒÒ¹«Í¿µáÇϵ͌ §ÊÒÁÒöÃͧÃѺ¡Ò÷íÒ§Ò¹ã¹ÅѡɳР“àÊÕºáŌÇàŋ¹ (plug and play)” ¡ÑºÃкº »¯ÔºµÑ ¡Ô ÒÃàªÔ§¡ÃÒ¿¡Í‹ҧÇÔ¹â´Çʏ䴌´ÇŒ  ·íÒãˌà§×Íè ¹ä¢ã¹¡ÒÃàÃÕ¹ÃÙÁŒ ¤Õ ÇÒÁ«Ñº«ŒÍ¹à¾ÔÁè ¢Ö¹é Í‹ҧäáçµÒÁ ¡ÒÃàÃÕ¹ÃÙŒ §Ñ ¤§à»š¹ÊÔ§è ·ÕÊè Òí ¤Ñ­·ÕÊè ´Ø áÁŒÍÒ¨Âҡ仺ŒÒ§ ᵋ¶ÒŒ ËÒ¡ÁÕ¡ÒèѴ¡ÒÃàÃÕ¹ÃÙ·Œ àÕè »š¹ Ãкº à¼Âá¾Ã‹¢ÍŒ ÁÙÅ·Õªè ´Ñ à¨¹ ÁÕµÇÑ Í‹ҧ·Ñ§é ·Ò§ÎÒÏ´áÇÏáÅЫͿµáÇÏ·ÊÕè ÒÁÒö㪌໚¹á¹Ç·Ò§ã¹¡ÒÃÈÖ¡ÉÒ Â‹ÍÁ µŒÍ§ª‹ÇÂãˌ¡ÒÃàÃÕ¹ÃÙʌ ÒÁÒöàÃÔÁè µŒ¹ä»ä´ŒÍ‹ҧ§‹Ò¢ֹé ã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õ¤é Í× Ë¹Ö§è 㹤ÇÒÁ¾ÂÒÂÒÁʋ§àÊÃÔÁáÅÐÊÌҧ¤ÇÒÁÃٌ ¤ÇÒÁࢌÒã¨ã¹¡ÒÃ㪌§Ò¹¾Íϵ USB ¢Í§¤ÍÁ¾ÔÇàµÍÏ㹡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³ÀÒ¹͡ ·Ñ§é à¾×Íè ÃѺËÃ×Íʋ§¢ŒÍÁÙŠ㹤ÃÖ§è áá¨Ð໚¹·ÄÉ®Õ ËÅÑ¡¡Ò÷íÒ§Ò¹ àº×Íé §µŒ¹¢Í§ USB á¹Ð¹íÒÃÕ¨ÊÔ àµÍÏáÅÐʋǹ»ÃСͺ ÅíҴѺ¢Ñ¹é µÍ¹ã¹¡ÒþѲ¹Ò «Ö§è µŒÍ§ÂÍÁÃÑºÇ‹Ò ¤‹Í¹¢ŒÒ§«Ñº «ŒÍ¹ ´Ñ§¹Ñ¹é ¼Ù͌ ҋ ¹¨Ö§µŒÍ§ÈÖ¡ÉÒÍ‹ҧ¤‹ÍÂ໚¹¤‹ÍÂä» ÊíÒËÃѺã¹Ê‹Ç¹ËÅѧ¨Ð໚¹¡Ò÷´Åͧ·ÕÊè ÒÁÒö·íҧҹ䴌¨ÃÔ§ â´Â㪌 U-Board ἧǧ¨Ãàª×Íè Áµ‹Í¾Íϵ USB ໚¹ÍØ»¡Ã³ËÅÑ¡ áŌÇàª×Íè Áµ‹Í¡Ñºá¼§Ç§¨Ã LED à¾×Íè áÊ´§¼Å, µ‹Í¡Ñºá¼§Ç§¨ÃÊÇÔµªà¾×Íè ÃѺÊÑ­­Ò³´Ô¨µÔ ÍŠ໚¹µŒ¹ ã¹·Ø¡¡Ò÷´Åͧ¨ÐºÃèآ¹Ñé µÍ¹¡Ò÷´Åͧ ǧ¨Ã ÃÒÂÅÐ àÍÕ´¢Í§«ÍÏÊâ»Ãá¡ÃÁ µÑÇÍ‹ҧ¼Å¡ÒÃÃѹâ»Ãá¡ÃÁ áÅÐà¾×Íè ãˌà¡Ô´»ÃÐ⪹Ê§Ù Êش㹡ÒÃàÃÕ¹ÃÙጠÅоѲ¹Òἧ ǧ¨Ãàª×Íè Áµ‹Í¾Íϵ USB ÊíÒËÃѺ¼Ù͌ ҋ ¹·ÕÁè ¤Õ ÇÒÁʹã¨ã¹¡ÒþѲ¹Ò੾ÒдŒÒ¹ ã¹ÀÒ¤¼¹Ç¡¢Í§Ë¹Ñ§Ê×ÍàŋÁ¹Õ¨é §Ö 䴌ºÃèثÍÏÊâ»Ãá¡ÃÁ¢Í§äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ·àÕè »š¹ÍØ»¡Ã³ËÅÑ¡·Õãè ªŒ§Ò¹º¹ U-Board à¾×Íè ໚¹á¹Ç·Ò§ÊíÒËÃѺ ¼Ù·Œ ÊÕè ¹ã¨¾Ñ²¹Òâ»Ãá¡ÃÁ´ŒÇµ¹àͧ ËÇѧ໚¹Í‹ҧÂÔè§Ç‹Ò à¹×éÍËÒã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õ餧ÁÕʋǹ·íÒãˌ¤ÇÒÁʹã¨ã¹¡ÒÃàª×èÍÁµ‹Í¤ÍÁ¾ÔÇàµÍϡѺ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ä´ŒÃºÑ ¡ÒâÂÒÂǧ¡ÇŒÒ§¢ÇÒ§à¾ÔÁè ¢Ö¹é áÅйѺ¨Ò¡¹Õ¾é Íϵ USB ¨Ñ¡ÁÔ㪋¤¹á»Å¡ ˹ŒÒ¢Í§¹Ñ¡·´ÅͧÍÕ¡µ‹Íä» ÅÀ¹ ÊØÀÒ¾ ÍÃö¾Å ºØ­ÂÐâÀ¤Ò Çþ¨¹ ¡ÃᡌÇÇѲ¹¡ØÅ ªÑÂÇѲ¹ ÅÔÁé ¾Ã¨ÔµÃÇÔäÅ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 3


ÊÒúѭ µ¡Å§¡Ñ¹¡‹Í¹ ......................................................................................................................7 º··Õè 1 ÃÙ¨Œ ¡Ñ ¡Ñº¾Íϵ USB ...............................................................................................9 º··Õè 2 ÀÒ¾ÃÇÁ¡Ò÷íÒ§Ò¹¢Í§¾Íϵ USB ....................................................................11 ¡ÒÃʋ§¢ŒÍÁÙÅÀÒÂ㹺ÑÊ USB 1.0/1.1 ...............................................................11 ʋǹ»ÃСͺ·Ò§«Í¿µáÇÏ .............................................................................12 ʋǹ»ÃСͺ·Ò§ÎÒÏ´áÇÏ ..............................................................................13 â¤Ã§ÊÌҧ¡ÒÃàª×Íè Áµ‹Í ....................................................................................15 ¡ÒõԴµ‹ÍÃÐËNjҧÍØ»¡Ã³¡ºÑ âÎʵ...................................................................16 ´ÔʤÃÔ»àµÍÏ : ¤ÇÒÁËÁÒÂ, ª¹Ô´ áÅÐÃٻẺ¡Ò÷íÒ§Ò¹ ..................................16 ¡ÒèѴ¡ÒáѺÍØ»¡Ã³º¹ºÑÊ USB ·ÕÁè ¤Õ ÇÒÁàÃçǵ‹Ò§¡Ñ¹......................................18 ¡ÒÃʋ§ÊÑ­­Ò³ã¹ºÑÊ USB ............................................................................19 ¡Ãкǹ¡ÒáíÒ˹´¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ ......................................................19

º··Õè 3 ÊÒÂàª×Íè Áµ‹ÍáÅФ͹à¹ç¡àµÍϢͧ¾Íϵ USB ................................................ 21 ¤Í¹à¹ç¡àµÍÏ USB .........................................................................................21 àÃ×Íè §äÁ‹ÅºÑ ¢Í§Ë¹ŒÒÊÑÁ¼Ñʤ͹à¹ç¡àµÍÏ USB ....................................................22 ÊÒ¹íÒÊÑ­­Ò³¢Í§¾Íϵ USB .....................................................................22

º··Õè 4 ÊÑ­­Ò³µ‹Ò§æ ã¹Ãкº¢Í§¾Íϵ USB ............................................................. 25 ¡ÒõÃǨÊͺ¡ÒÃàª×Íè Áµ‹ÍáÅФÇÒÁàÃçǢͧÍØ»¡Ã³..........................................25 à·¤¹Ô¤¡ÒÃࢌÒÃËÑÊÊÑ­­Ò³ ...........................................................................26 ¡ÒÃʋ§¢ŒÍÁÙÅã¹ÊÒÂÊÑ­­Ò³ ..........................................................................27

º··Õè 5 ¡ÒèѴ¡ÒôŒÒ¹¾Åѧ§Ò¹¢Í§ USB ..................................................................... 33 ¡ÒÃÃÒ§ҹÍѵÃÒ¡ÒÃ㪌¾Åѧ§Ò¹ ....................................................................33 ¡ÒèíÒ¡Ñ´¡ÃÐáÊä¿¿‡Ò ....................................................................................34 ¡ÒÃແ´»´ÊÇÔµª¢Í§ÎѺ...................................................................................35 ¡ÒÃ㪌¾Åѧ§Ò¹ã¹ª‹Ç§µÑ§é ¤‹ÒàÃÔÁè µŒ¹·íÒ§Ò¹ .........................................................35 ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§ÍØ»¡Ã³ USB .....................................................................35 ¡ÒûÃÐËÂÑ´¾Åѧ§Ò¹¢Í§¾Íϵ USB ...............................................................36

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 4


ÊÒúѭ º··Õè 6 â¤Ã§ÊÌҧ¾×¹é °Ò¹¢Í§¡ÒÃʋ§¢ŒÍÁÙŢͧ¾Íϵ USB .......................................... 39 ÀÒ¾ÃÇÁ¢Í§¡ÒÃʋ§ÊÑ­­Ò³............................................................................39 ª¹Ô´¢Í§¡Òö‹Ò·ʹÊÑ­­Ò³ .......................................................................39 â¤Ã§ÊÌҧÃдѺŋҧ¢Í§¡ÒÃÃѺʋ§¢ŒÍÁÙÅ ...........................................................44

º··Õè 7 ¤ÇÒÁ¼Ô´¾ÅÒ´áÅСÒÃᡌä¢ã¹¡ÒÃÊ×Íè ÊÒâŒÍÁÙż‹Ò¹¾Íϵ USB ....................49 ¤ÇÒÁ¼Ô´¾ÅÒ´ª¹Ô´µ‹Ò§æ ................................................................................49 ¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒÂã¹á¾ç¡à¡çµ ........................................................................49 ʶҹРEOP ¼Ô´¾ÅÒ´ ...................................................................................50 ºÑÊä·ÁàÍÒµ ..................................................................................................50 ʋ§¢ŒÍÁÙÅ«éÒí à¹×Íè §¨Ò¡¤ÇÒÁ¼Ô´¾ÅÒ´ã¹á¾ç¡à¡çµáι´àªç¡ ..................................50 ʶҹкÑʤŒÒ§áÅСÒÃÊÙ­àÊÕÂÃٻẺ¡ÒÃʋ§¢ŒÍÁÙÅ ..........................................52

º··Õè 8 ´ÔʤÃÔ»àµÍÏáÅСÃкǹ¡ÒÃµÑ§é ¤‹Ò ..................................................................... 53 ¢ŒÍÁÙÅÀÒÂã¹´ÔʤÃÔ»àµÍÏ ...............................................................................53 ¢Ñ¹é µÍ¹¡ÒÃµÑ§é ¤‹ÒÍØ»¡Ã³ ................................................................................54 ¡ÒÃÌͧ¢Í¢ŒÍÁÙÅ ............................................................................................59

º··Õè 9 ÃÙ¨Œ ¡Ñ ¡Ñº HID Áҵðҹ¢Í§ÍØ»¡Ã³ USB ã¹ÃдѺàª×Íè Áµ‹Í¡Ñº¼Ù㌠ªŒ§Ò¹............... 69 ÃдѺ¢Í§ÍØ»¡Ã³ USB ...................................................................................69 ÊÔ§è ·Õ¤è ÇÃÃÙàŒ º×Íé §µŒ¹à¡ÕÂè ǡѺ HID ¤ÅÒÊ...............................................................69 ËÅÑ¡¡ÒáíÒ˹´ãËŒÍ»Ø ¡Ã³ USB 㹤ÅÒÊ HID................................................70 â¤Ã§ÊÌҧ´ÔʤÃÔ»àµÍÏ.....................................................................................71 HID ´ÔʤÃÔ»àµÍÏ............................................................................................72 ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ.........................................................................................72 ¤Ø³ÅѡɳÐ㹡Ò÷íÒ§Ò¹¢Í§ HID...................................................................74

º··Õè 10 á¹Ç·Ò§àº×Íé §µŒ¹ã¹¡ÒþѲ¹ÒÍØ»¡Ã³ÊÒí ËÃѺàª×Íè Áµ‹Í¡Ñº¾Íϵ USB............... 77 á¹Ç·Ò§ã¹¡ÒþѲ¹ÒÎÒÏ´áÇϢͧÍØ»¡Ã³ USB.............................................77 ÊÔ§è ·Õµè ͌ §´íÒà¹Ô¹¡ÒÃ㹡ÒþѲ¹ÒÍØ»¡Ã³ USB................................................ 79 µÑÇÍ‹ҧá¹Ç·Ò§ã¹¡ÒþѲ¹ÒÍØ»¡Ã³ USB....................................................81

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 5


ÊÒúѭ º··Õè 11 á¹Ð¹íÒà¤Ã×Íè §Á×ÍÊíÒËÃѺ¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ ¡ÑºÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ................................................................................85 U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB ................................................................86 EX-01 : ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ ...........................................................88 EX-03 : ºÍÏ´ÊÇÔµªÍ¹Ô ¾Øµ 16 ª‹Í§ ................................................................88 EX-05 : ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ ...............................................................90 EX-06 : ºÍÏ´¢ÑºÃÕàŏ 7 ª‹Í§ .........................................................................90 EX-09 : ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ Ẻ«Ô§â¤Ã¹ÑÊ .............................................90

¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¡ÒÃàµÃÕÂÁ¡ÒÃàº×Íé §µŒ¹ÊíÒËÃѺ¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ ¡ÑºÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ................................................................................95 ¡Ò÷´Åͧ·Õè 1

àª×Íè Áµ‹Í U-Board ¡Ñº¾Íϵ USB ´ŒÇ HIDComm..............................99

¡Ò÷´Åͧ·Õè 2

ʋ§ÊÑ­­Ò³ÍÍ¡¨Ò¡¾Íϵ USB ¼‹Ò¹·Ò§ PORTOUT ¢Í§ U-Board........................................................103

¡Ò÷´Åͧ·Õè 3

ÃѺÊÑ­­Ò³à¢ŒÒÊÙ¾ ‹ Íϵ USB ¼‹Ò¹·Ò§ PORTIN ¢Í§ U-Board ...........................................................105

¡Ò÷´Åͧ·Õè 4

ÃѺÊÑ­­Ò³à¢ŒÒÊÙ¾ ‹ Íϵ USB ¼‹Ò¹·Ò§ PORTIN ¢Í§ U-Board â´Â㪌 ReportID 0 .............................107

¡Ò÷´Åͧ·Õè 5

¢ÑºÊàµç»à»ÍÏÁÍàµÍϼҋ ¹¾Íϵ USB ..............................................109

¡Ò÷´Åͧ·Õè 6

¢ÑºÃÕàŏ¼Ò‹ ¹¾Íϵ USB ......................................................................113

¡Ò÷´Åͧ·Õè 7

͋ҹÊÑ­­Ò³ÍйÒÅÍ¡¼‹Ò¹¾Íϵ USB ...........................................115

¡Ò÷´Åͧ·Õè 8

¢ÂÒ¾ÍϵàÍÒµ¾µØ Ẻ«Ô§â¤Ã¹ÑÊ ÊíÒËÃѺ¡ÒäǺ¤ØÁãˌᡋ¾Íϵ USB ..................................................117

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 6


µ¡Å§¡Ñ¹¡‹Í¹ à¹×Íè §¨Ò¡¾Íϵ USB ÁÕÃÒÂÅÐàÍÕ´·Ñ§é ã¹´ŒÒ¹â¤Ã§ÊÌҧ·Ò§ÎÒÏ´áÇÏáÅЫͿµáÇϤ͋ ¹¢ŒÒ§ ÁÒ¡ ·Ñ§é Âѧ«Ñº«ŒÍ¹ ÃÇÁ¶Ö§ÁÕÈ¾Ñ ·à·¤¹Ô¤à©¾ÒзҧÍ‹ҧÁÒ¡ÁÒ ´Ñ§¹Ñ¹é 㹡ÒùíÒàʹͧ͢˹ѧÊ×Í àŋÁ¹Õ¨é §Ö ¨íÒ໚¹Í‹ҧÂÔ§è ·Õ¨è еŒÍ§·íÒ¤ÇÒÁࢌÒ㨡Ѻ¼Ù͌ ҋ ¹ ´Ñ§µ‹Í仹Õé 1. ã¹àÃ×Íè §¢Í§ÈѾ·à·¤¹Ô¤ ¼ÙàŒ ¢Õ¹䴌¾ÂÒÂÒÁËÒ¤íÒÈѾ··´á·¹·ÕÊè ÒÁÒöÊÌҧ¤ÇÒÁà¢ŒÒ ã¨ä´Œ ᵋ¶ÒŒ Ëҡ໚¹¤íÒÈѾ·à©¾Òзըè Òí ໚¹µŒÍ§ãªŒ¡Ò÷ѺÈѾ· ¼ÙàŒ ¢Õ¹䴌à·Õºà¤Õ§´ŒÇ¡ÒÃà¢Õ¹໚¹ ÀÒÉÒä·Â â´Â㪌¡ÒÃ͋ҹÍÍ¡àÊÕ§µÒÁ¾¨¹Ò¹Ø¡ÃÁ໚¹ËÅÑ¡ áÅоÂÒÂÒÁËÅÕ¡àÅÕÂè §¡Ò÷ѺÈѾ·´ÇŒ  ¡ÒÃà¢Õ¹ÀÒÉÒÍѧ¡ÄÉŧ仵çæ ànj¹áµ‹ã¹Ê‹Ç¹·Õàè »š¹â»Ãá¡ÃÁ·Õ¨è еŒÍ§à¢Õ¹´ŒÇÂÀÒÉÒÍѧ¡ÄÉ 2. Áҵðҹ¢Í§¾Íϵ USB 㪌Áҵðҹã¹Ãع‹ 1.0 ໚¹ËÅÑ¡ 3. ¢Íºà¢µã¹¡ÒùíÒàʹͨÐàÃÔÁè ¨Ò¡¡ÒÃãˌ¤ÇÒÁÃÙ¾ Œ ¹×é °Ò¹¢Í§¾Íϵ USB ¹ÔÂÒÁáÅÐ ¤ÇÒÁËÁÒ¢ͧÈѾ··Ò§à·¤¹Ô¤·Õàè ¡ÕÂè Ç¢ŒÍ§ ¡Ãкǹ¡Ò÷íÒ§Ò¹¾×¹é °Ò¹ ¡Ãкǹ¡ÒþѲ¹Ò ÍØ»¡Ã³·ãÕè ªŒ§Ò¹¡Ñº¾Íϵ USB â´Â¨Ð㪌ºÍÏ´ËÃ×Íἧǧ¨Ã·Õ¼è ÅÔµ¢Ö¹é ੾ÒÐã¹»ÃÐà·Èä·Â ໚¹µÑÇ͌ҧÍÔ§ ¡ÒÃ㪌§Ò¹ä´ÃàÇÍϾ¹×é °Ò¹·ÕÁè ÍÕ ÂÙ·‹ ÇÑè ä» â´Â¨ÐäÁ‹à¹Œ¹¡ÒþѲ¹Òä´ÃàÇÍϴnj  µÑÇàͧ à¹×Íè §¨Ò¡ÁÕ¤ÇÒÁ«Ñº«ŒÍ¹ÁÒ¡ áÅШеŒÍ§à¡ÕÂè Ç¢ŒÍ§¡ÑºÅ§·ÐàºÕ¹à¾×Íè ·´Êͺãˌ䴌µÃ§µÒÁ Áҵðҹ·ÕÍè §¤¡Ã USB ÃÐËNjҧ»ÃÐà·È¡íÒ˹´ 4. ¡ÒÃà¢Õ¹â»Ãá¡ÃÁà¾×Íè àª×Íè Áµ‹Í¡ÑºÍØ»¡Ã³ÀÒ¹͡¡Ñº¾Íϵ USB ¹Ñ¹é ¨Ð์¹Ë¹Ñ¡ ä»·Õ¡è ÒÃàÃÕ¡㪌ä´ÃàÇÍϾ¹×é °Ò¹¼¹Ç¡¡Ñºâ»Ãá¡ÃÁÊÑ§è §Ò¹·Õàè ¢Õ¹¢Ö¹é àͧ´ŒÇ Visual BASIC ໚¹ËÅÑ¡ 5. «ÍÏÊâ»Ãá¡ÃÁ·ÕÍè ÂÙ㋠¹Ë¹Ñ§Ê×ÍàŋÁ¹Õ·é §Ñé ËÁ´¨ÐÊÒÁÒö㪌§Ò¹ä´Œ¡ºÑ ºÍÏ´ËÃ×Íἧ ǧ¨Ã·Õèá¹Ð¹íÒänj෋ҹÑé¹ à¹×èͧ¨Ò¡ÍØ»¡Ã³ USB ᵋÅеÑǨÐÁÕ¡ÒáíÒ˹´ÃËÑÊ»ÃШíÒµÑÇänjáÅŒÇ áµ‹ÊÒÁÒö¹íÒºÍÏ´ËÃ×Íἧǧ¨Ã·Õáè ¹Ð¹íҹѹé ä»ãªŒ¡ºÑ ¤ÍÁ¾ÔÇàµÍÏà¤Ã×Íè §ã´¡ç䴌·ÁÕè ¾Õ Íϵ USB 6. ÃÒÂÅÐàÍÕ´·Ñ駷ҧ·ÄÉ®ÕáÅл¯ÔºÑµÔ໚¹à¾Õ§¡ÒÃá¹Ð¹íÒáÅСÒ÷´Åͧàº×éͧ µŒÍ¹·Õäè Á‹«ºÑ «ŒÍ¹ ÊÒÁÒö㪌໚¹á¹Ç·Ò§ã¹¡ÒþѲ¹Òµ‹Íä»ä´Œã¹ÃдѺ˹֧è ෋ҹѹé ËÒ¡µŒÍ§¡Òà ¹íÒä»ãªŒ¾² Ñ ¹Ò໚¹¼ÅÔµÀѳ± ¨ÐµŒÍ§ËÒ¢ŒÍÁÙÅà¾ÔÁè àµÔÁÍÕ¡ â´Â੾ÒÐÍ‹ҧÂÔ§è ã¹àÃ×Íè §¢Í§Áҵðҹ áÅСÒÃŧ·ÐàºÕ¹ÃËÑÊ»ÃШíÒµÑÇ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 7


àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 8


º··Õè 1 ÃÙ¨Œ ¡Ñ ¡Ñº¾Íϵ USB ¹Ñº¨Ò¡Çѹáá·ÕèÁÕ¡ÒäԴ¤Œ¹à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÏ¢Öé¹ÁÒ¨¹¶Ö§·Ø¡Çѹ¹Õé¡ç໚¹àÇÅÒ¹Ò¹ËÅÒ·ÈÇÃÃÉáÅŒÇ ¨Ò¡¨Ø´àÃÔÁè µŒ¹¢Í§à¤Ã×Íè §¨Ñ¡Ã¢¹Ò´ãË­‹¤ºÑ ˌͧ¶Ù¡¾Ñ²¹Òµ‹Íà¹×Íè §ÁÒàÃ×Íè Âæ ¨¹ã¹·Ø¡Çѹ¹ÕÁé ¢Õ ¹Ò´àÅç¡à·‹Ò¡ÑºË¹Ö§è ½†ÒÁ×Í á¹‹¹Í¹Ç‹ÒÃÐÂÐàÇÅÒ¡ÒþѲ¹Ò·ÕÂè ÒǹҹºÇ¡¡Ñº¤ÇÒÁ¡ŒÒÇ˹ŒÒÍ‹ҧÃÇ´àÃçǢͧ෤â¹âÅÂÕÂ͋ Á¨Ð¾Ñ²¹Ò ʋǹ»ÃСͺ·Ñ§é ËÁ´ä»¾ÃŒÍÁæ ¡Ñ¹ áÅÐàÁ×Íè ¤ÍÁ¾ÔÇàµÍÏ·Òí §Ò¹ä´ŒàÃçÇ¢Ö¹é 㪌§Ò¹ä´ŒÊдǡ¢Ö¹é ªÕÇµÔ ¢Í§Á¹Øɏ ¡ç¨Ðà¡ÕèÂǾѹ¡ÑºÁѹÁÒ¡¢Öé¹àÃ×èÍÂæ ·íÒãˌà¡Ô´ÍØ»¡Ã³µ‹Ò§æ ÁÒ¡ÁÒ·Õè¶Ù¡¤Ô´¤Œ¹¢Öé¹ÁÒà¾×èͨзíҧҹËÇÁ¡Ñº ¤ÍÁ¾ÔÇàµÍÏâ´ÂÍÒÈѤÇÒÁÊÒÁÒö㹡ÒûÃÐÁÇżŷÕèÃÇ´àÃçǢͧÁѹ àÁ×Íè ÁÕÍ»Ø ¡Ã³·µÕè ͌ §¹íÒÁÒàª×Íè Áµ‹Í¡Ñº¤ÍÁ¾ÔÇàµÍÏ ¡çµÍŒ §ËÒª‹Í§·Ò§ÊíÒËÃѺʋ§áÅÐÃѺ¢ŒÍÁÙŨҡµÑÇà¤Ã×Íè § ª‹Í§·Ò§¡ÒÃʋ§ËÃ×ÍÃѺ¢ŒÍÁÙŵ‹Ò§æ ¨Ò¡à¤Ã×Íè §¤ÍÁ¾ÔÇàµÍ϶¡Ù µÑ§é ª×Íè Ç‹Ò ¾Íϵ (port) â´Â¾ÍϵᵋÅЪ¹Ô´¡ç¨Ð ¶Ù¡Í͡ẺÁÒà¾×Íè ãˌÊÒÁÒöÃѺʋ§¢ŒÍÁÙÅ੾ÒÐ䴌Í‹ҧàËÁÒÐÊÁ äÁ‹Çҋ ¨Ð໚¹ ¾Íϵ͹ءÃÁ (serial port) «Ö§è ãªŒÃºÑ Ê‹§¢ŒÍÁÙŤÇÒÁàÃçǵèÒí Ẻ͹ءÃÁã¹ÃÐÂзҧ·Õäè ¡Å ÁÑ¡¹íÒÁÒ㪌¡ºÑ àÁÒʏËÃ×ÍâÁà´çÁ ¾Íϵ¢¹Ò¹ (parallel port) 㪌ÃѺʋ§¢ŒÍÁÙŤÇÒÁàÃçǻҹ¡ÅҧẺ¢¹Ò¹ä´Œã¹ÃÐÂзÕèäÁ‹ä¡ÅÁÒ¡¹Ñ¡ ¶Ù¡¹íÒÁÒ㪌¡Ñºà¤Ã×èͧ¾ÔÁ¾áÅÐ Ê᡹à¹ÍÏ ໚¹µŒ¹ ¹Í¡¨Ò¡¹Ñ¹é ÂѧÁÕ¾Íϵ੾ÒоÔàÈÉ ÍÒ·Ô ¾ÍϵÃѺʋ§¢ŒÍÁÙż‹Ò¹áʧÍÔ¹¿ÃÒàôËÃ×Í·Õàè ÃÕÂ¡Ç‹Ò IrDA áÅоÍϵ USB Íѹ໚¹¾ÍϵÃѺʋ§¢ŒÍÁÙÅ͹ءÃÁẺÍ๡»ÃÐʧ¤·äÕè ´ŒÃºÑ ¤ÇÒÁ¹ÔÂÁÍ‹ҧÁҡ㹡Òà ¾Ñ²¹ÒÍØ»¡Ã³àª×Íè Áµ‹Í¡Ñº¤ÍÁ¾ÔÇàµÍ϶´Ñ ¨Ò¡¡ÒÃ㪌¾Íϵ͹ءÃÁáÅТ¹Ò¹ «Ö§è ¨Ð䴌·Òí ¤ÇÒÁÃÙ¨Œ ¡Ñ áÅз´Åͧ à¢Õ¹â»Ãá¡ÃÁà¾×è͵Դµ‹Í¡ÑºÍØ»¡Ã³ÀÒ¹͡µ‹Íä»

¨Ø´¡íÒà¹Ô´¢Í§ USB ¾ÍϵᵋÅЪ¹Ô´¢Í§¤ÍÁ¾ÔÇàµÍÃä´ŒÃºÑ ¡ÒÃÍ͡ẺÁÒà¾×Íè §Ò¹à©¾ÒÐ ·íÒãËŒÍ»Ø ¡Ã³áµ‹ÅеÑǵŒÍ§àÅ×Í¡ 㪌¾Íϵµ‹Ò§æ ª¹Ô´¡Ñ¹ä» ʋ§¼Åãˌ¡ÒùíÒÍØ»¡Ã³µ‹Ò§æ ÁÒàª×èÍÁµ‹Í¡Ñºà¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÏ໚¹àÃ×èͧ·Õ赌ͧãˌ ¤ÇÒÁʹ㨠à¹×Íè §¨Ò¡ÍØ»¡Ã³áµ‹ÅЪ¹Ô´¡ç¨ÐÁդ͹à¹ç¡àµÍÏ·ãÕè ªŒàª×Íè Áµ‹Íᵡµ‹Ò§¡Ñ¹ä»µÒÁª¹Ô´¢Í§¾Íϵ ઋ¹ ¾Íϵ͹ءÃÁ·Õãè ªŒµÍ‹ ¤Õº ÍÏ´áÅÐàÁÒʏ (·Ñ§é Ẻ PS/2 áÅоÍϵ͹ءÃÁÁҵðҹ) ¾Íϵ¢¹Ò¹ÊíÒËÃѺµ‹Í à¤Ã×Íè §¾ÔÁ¾ ¾Íϵàª×Íè Áµ‹Í¢Í§¨ÍÀÒ¾ ÏÅÏ ·íÒãˌ¼ãٌ ªŒ·äÕè Á‹Á¤Õ ÇÒÁÃÙ㌠¹¡ÒõԴµÑ§é ËÃ×Í·Õàè ÃÕ¡¡Ñ¹Ç‹Ò àÍç¹´ÂÊÙ à«ÍÏ (end user) ¾º¡Ñº¤ÇÒÁÂÒ¡ÅíҺҡ㹡ÒÃàÃÕ¹ÃÙàŒ Ã×Íè §ÃÒÇàËŋҹÕé ¹Í¡¨Ò¡¹Ñ¹é ¡ÒõԴµÑ§é ÍØ»¡Ã³µÒ‹ §æ à¾ÔÁè ࢌÒä»ã¹à¤Ã×Íè §¤ÍÁ¾ÔÇàµÍϨÐà¡Ô´»˜­ËÒ¡ÒÃዧ¡Ñ¹ãªŒÊ­ Ñ ­Ò³ IRQ (Interrupt Request) «Ö§è ໚¹µÑǨíÒ¡Ñ´¨íҹǹÍØ»¡Ã³·¨Õè ÐÁÒµ‹Í ·íÒãˌà¡Ô´á¹Ç¤ÇÒÁ¤Ô´·Õ¨è СíÒ˹´Áҵðҹ à¾×èÍÊÌҧ໚¹¾Íϵ·Õè·íÒãˌ¡ÒÃàª×èÍÁµ‹Í·Ñé§ËÁ´ÍÂًã¹ÃٻẺà´ÕÂǡѹ §‹Òµ‹Í¡ÒÃ㪌§Ò¹¢Í§¼ÙŒãªŒ·ÑèÇæ ä» áÅÐ äÁ‹Á¢Õ ͌ ¨íҡѴ㹡ÒÃ㪌 IRQ ¤íҵͺ¢Í§á¹Ç¤Ô´¹Õ¤é Í× ¾Íϵ USB ¹Ñ¹è àͧ USB ‹ÍÁÒ¨Ò¡ Universal Serial Bus ¶ŒÒá»ÅẺµÃ§µÑÇ¡ç¨Ð䴌¤ÇÒÁËÁÒÂÇ‹Ò ºÑÊ͹ءÃÁÍ๡»ÃÐʧ¤ ¤Ø³ÊÁºÑµµÔ ҋ §æ ·Õ·è Òí ãˌÊÒÁÒö¡íÒ˹´ª×Íè ¹Õãé ˌ¡ºÑ ¾Íϵª¹Ô´¹Õäé ´ŒÁ´Õ §Ñ ¹Õé àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ '


¨ÍÁ͹ÔàµÍÏ/ÎѺ

¤Õº ÍÏ´

¤ÍÁ¾ÔÇàµÍÏ

àÁÒʏ

¾ÃÔ¹·àµÍÏ/ÎѺ

USB 넼

Ê᡹à¹ÍÏ ä´Ã¿Š«´Õ ÃÕ ÍÁ PDA

â·ÃÈѾ·´¨Ô µÔ ÍÅ

âÁà´çÁ

ÃÙ»·Õè 1-1 ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³µÒ‹ §æ ´ŒÇ USB 㪌¤Í¹à¹ç¡àµÍÏà¾Õ§ª¹Ô´à´ÕÂÇ «Ö§è ÁÕ 2 ÃٻẺÊíÒËÃѺàª×Íè Áµ‹ÍÍØ»¡Ã³·¡Ø æ ª¹Ô´à¢ŒÒ¡Ñº¤ÍÁ¾ÔÇàµÍÏ l ÊÒÁÒöàª×Í è Áµ‹ÍÍØ»¡Ã³ËÅÒÂæ ª¹Ô´ÃÇÁࢌÒÊÙ¤‹ ͹à¹ç¡àµÍϵÇÑ à´ÕÂÇ ÊÙ§ÊØ´ 127 µÑÇ l äÁ‹à¡Ô´¡ÒâѴጧ¡Ñ¹¢Í§¡ÒÃࢌÒ㪌·ÃѾÂҡâͧÃкº (IRQ) l µÃǨÊͺ¡ÒÃàª×èÍÁµ‹ÍáÅеÑ駤‹Ò¡Ò÷íÒ§Ò¹µ‹Ò§æ Íѵâ¹ÁÑµÔ ÃÐËNjҧ·Õèà¤Ã×èͧ¡íÒÅѧ·íÒ§Ò¹ÍÂً (hot attachment) l ¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙŨТֹ é ÍÂÙ¡‹ ºÑ Áҵðҹ ÍѹÁÕÃÒÂÅÐàÍÕ´´Ñ§¹Õé Áҵðҹ USB 1.0/1.1 ÁÕ굄 ÃÒ㹡Òö‹Ò·ʹ¢ŒÍÁÙŤÇÒÁàÃçǵèÒí (low speed) ෋ҡѺ 1.5 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ (Mbit/sec) áÅФÇÒÁàÃçÇàµçÁ·Õè (full speed) ෋ҡѺ 12 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ (Mbit/sec) Áҵðҹ USB 2.0 ¨ÐÁÕ굄 ÃÒàÃçÇ㹡Òö‹Ò·ʹà¾ÔÁè ¢Ö¹é ÍÕ¡ 1 ÃдѺ¤×Í ¤ÇÒÁàÃçÇÊÙ§ (high speed) «Ö§è ÁÕ¤ÇÒÁàÃçÇÊÙ§¶Ö§ 480 àÁкԵµ‹ÍÇÔ¹Ò·Õ l ·Õ¢ è Ò¾Íϵ USB ÁÕáç´Ñ¹ä¿µÃ§ +5V ¨‹ÒÂÍÍ¡ÁÒ´ŒÇ ·íÒãËŒÍ»Ø ¡Ã³µÍ‹ ¾‹Ç§·Õãè ªŒ¾Åѧ§Ò¹äÁ‹ÁÒ¡¹Ñ¡ ÊÒÁÒö㪌áç´Ñ¹¨Ò¡¾Íϵ USB ¹Õàé »š¹ä¿àÅÕÂé §à¾×Íè ·íҧҹ䴌 â´ÂäÁ‹µÍŒ §ÍÒÈÑÂáËŋ§¨‹ÒÂ俨ҡÀÒ¹͡à¾ÔÁè àµÔÁ Áҵðҹµ‹Ò§æ ¢Í§¾Íϵ USB ¶Ù¡¡íÒ˹´¢Ö¹é ໚¹àÇÍϪ¹Ñ ¤Ø³ÊÁºÑµ·Ô ¡Õè ŋÒÇÁÒ¢ŒÒ§µŒ¹áÅзըè йíÒàÊ¹Í ã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õàé »š¹ Áҵðҹ USB àÇÍϪ¹Ñ 1.0/1.1 ᵋ¶§Ö Çѹ¹Õäé ´ŒÁ¡Õ ÒÃÍÍ¡ÁҵðҹàÇÍϪ¹Ñ ãËÁ‹¤Í× àÇÍϪ¹Ñ 2.0 «Ö§è à¾ÔÁè ¤Ø³ÊÁºÑµµÔ ҋ §æ ࢌÒä»ÍÕ¡ÁÒ¡ÁÒ ÍÒ·Ô ¤ÇÒÁàÃçÇ㹡ÒÃʋ§¢ŒÍÁÙÅ·Õàè ¾Í‹ÁÊÙ§¢Ö¹é ¶Ö§ 480 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ ËÃ×Í 60 àÁ¡Ð亵µÍ‹ ÇÔ¹Ò·Õ (MB/sec) Í‹ҧäáçµÒÁ ã¹Ë¹Ñ§Ê×ÍàŋÁ¹ÕÍé Ҍ §ÍÔ§¡ÑºÁҵðҹ USB1.0/1.1 ໚¹ËÅÑ¡ l

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 


º··Õè 2

ÀÒ¾ÃÇÁ¡Ò÷íÒ§Ò¹¢Í§¾Íϵ USB 㹺·¹Õáé Ê´§ãˌàËç¹ÀÒ¾ÃÇÁ·Ñ§é ËÁ´¢Í§ USB à¾×Íè ¨Ð䴌àË繤ÇÒÁÊÑÁ¾Ñ¹¸ÃÐËNjҧÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅРʋǹ·Õ¨è СŋÒǶ֧㹺·¶Ñ´æ ä» à¾×Íè »‡Í§¡Ñ¹¤ÇÒÁÊѺʹ㹡Ò÷íÒ¤ÇÒÁࢌÒã¨ã¹áµ‹ÅÐʋǹ»ÃСͺ¢Í§ÃкººÑÊ USB

2.1 ¡ÒÃʋ§¢ŒÍÁÙÅÀÒÂ㹺ÑÊ USB 1.0/1.1 USB ໚¹¡ÒÃʋ§¢ŒÍÁÙÅ·ÕÁè ÃÕ »Ù Ẻ¡ÒÃàª×Íè Áµ‹Íã¹ÃкººÑʤ×Í ÍØ»¡Ã³·¡Ø æ µÑǨеŒÍ§Ê‹§ÊÑ­­Ò³ÃÇÁ ¡Ñ¹ä»ã¹ÊÒÂʋ§ÊÑ­­Ò³à¾Õ§¤Ù‹à´ÕÂÇ ´Ñ§¹Ñé¹ÍØ»¡Ã³·Ø¡æ µÑÇ·Õèàª×èÍÁµ‹Í¡ÑººÑʨеŒÍ§Ê‹§¢ŒÍÁÙÅàÃÕ§ÅíҴѺ¡Ñ¹ä» à¾×Íè äÁ‹ãˌà¡Ô´¡Ò깡ѹ¢Í§¢ŒÍÁÙÅ áÅÐà¹×Íè §¨Ò¡ USB ໚¹ÃкººÑÊ·Õãè ªŒÊÒÂʋ§ÊÑ­­Ò³à¾Õ§¤Ùà‹ ´ÕÂÇ (2 àʌ¹) ·íÒãˌ㹪‹Ç§àÇÅÒ˹֧è æ ¨ÐÁբ͌ ÁÙÅÇÔ§è ä»ä´Œà¾Õ§·ÔÈ·Ò§à´ÕÂÇ෋ҹѹé äÁ‹ÊÒÁÒöà¡Ô´¡ÒÃÃѺáÅÐʋ§¢ŒÍÁÙÅä»ã¹àÇÅÒ à´ÕÂǡѹ䴌ËÃ×Í·Õàè ÃÕ¡¡Ñ¹Ç‹Ò ¡ÒÃʋ§¢ŒÍÁÙÅẺÎÒŏ¿´Ùà¾Åç¡« (half duplex) ¨Ñ§ËÇСÒÃÃѺʋ§¢ŒÍÁÙŢͧÃкººÑÊ USB ·Ñ§é ËÁ´¨Ð¶Ù¡¤Çº¤ØÁ¨Ò¡âÎʵ (host) «Ö§è ¡ç¤Í× ¤ÍÁ¾ÔÇàµÍÏ·Õè ໚¹¨Ø´ÃÇÁ¢Í§ÍØ»¡Ã³·¡Ø µÑÇ·Õàè ª×Íè Áµ‹ÍÍÂÙ¹‹ ¹Ñè àͧ ´Ñ§¹Ñ¹é ¨Ö§äÁ‹ÊÒÁÒöàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ 2 à¤Ã×Íè §ãËŒÃºÑ ËÃ×Íʋ§ ¢ŒÍÁÙŶ֧¡Ñ¹ä´Œâ´ÂµÃ§ à¾ÃÒжŒÒ¤ÍÁ¾ÔÇàµÍÏ·§Ñé Êͧà¤Ã×Íè §·íÒ˹ŒÒ·Õàè »š¹âÎʵ·§Ñé ¤Ù¨‹ Ðà¡Ô´¡Ò깡ѹ¢Í§¢ŒÍÁÙÅÀÒ 㹺ÑÊ à¹×Íè §¨Ò¡áµ‹ÅÐà¤Ã×Íè §¡ç¨Ð¾ÂÒÂÒÁ¡íÒ˹´¨Ñ§ËÇÐ㹡ÒÃÃѺʋ§¢Í§µÑÇàͧ¢Ö¹é ÁÒ ´Ñ§¹Ñ¹é ¨Ðàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ 2 à¤Ã×Íè §à¢ŒÒ´ŒÇ¡ѹ¼‹Ò¹ USB ¨ÐµŒÍ§ÁÕÍ»Ø ¡Ã³·àÕè »š¹µÑÇ¡ÅÒ§à¾×Íè «Ô§â¤Ã乫µÇÑ àͧࢌҡѺâÎʵ·§Ñé Êͧãˌ䴌 ¡ÒÃÃѺʋ§¢ŒÍÁÙŨж١¡íÒ˹´à»š¹à¿ÃÁ â´Â·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ (ms) ¨Ðà¡Ô´¡ÒÃÃѺʋ§¢ŒÍÁÙÅ¢Ö¹é 1 à¿ÃÁ ã¹áµ‹ÅÐà¿ÃÁ¨Ðẋ§Â‹ÍÂÍ͡໚¹á¾ç¡à¡çµ (packet) àÃÔÁè µŒ¹¡Ò÷íÒ§Ò¹¢Í§áµ‹ÅÐà¿ÃÁâ´ÂâÎʵ¨Ðʋ§ÊÑ­­Ò³àÃÔÁè µŒ¹à¿ÃÁËÃ×Í SOF (Start Of Frame) ÍÍ¡ä»à¾×Íè ãËŒÍ»Ø ¡Ã³·¡Ø µÑÇÃÙ¨Œ §Ñ ËÇСÒÃàÃÔÁè à¿ÃÁ ËÅѧ¨Ò¡¹Ñ¹é âÎʵ¡¨ç ÐàÃÔÁè ʋ§ËÃ×ÍÃѺ¢ŒÍÁÙŵ‹Ò§æ µÒÁ·Õäè ´Œ¨´Ñ ÅíҴѺ¤ÇÒÁÊíҤѭänj ÍØ»¡Ã³µÒ‹ §æ ·ÕÍè ÂÙÀ‹ ÒÂ㹺ÑʨеŒÍ§·íÒ§Ò¹µÒÁ¨Ñ§ËÇзÕâè Îʵ ¡íÒ˹´äÇŒà·‹Ò¹Ñ¹é ¡ÒÃʋ§¢ŒÍÁÙÅ¡ÅѺä»ÂѧâÎʵ¨ÐÊÒÁÒö·íÒ䴌¡µç ͋ àÁ×Íè ä´ŒÃºÑ ¡ÒöÒÁËÃ×ÍÌͧ¢Í¨Ò¡âÎʵ ᵋà¹×Íè §¨Ò¡áµ‹ÅÐà¿ÃÁ¢ŒÍÁÙŨеŒÍ§ÃѺʋ§àÊÃç¨ÀÒÂã¹ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ ¹Ñ¹è ËÁÒ¤ÇÒÁNjҢŒÍÁÙŢͧÍØ»¡Ã³ ·Ø¡æ µÑÇ·Õàè ª×Íè Áµ‹Í¡ÑººÑʨеŒÍ§¶Ù¡¡íÒ˹´¢¹Ò´äÁ‹ãˌãË­‹à¡Ô¹¡Ç‹Ò·Õ¨è ÐÊÒÁÒöÃѺʋ§ä´ŒÀÒÂã¹ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ áÅÐ àÅ硾ͷըè зíÒãËŒÍ»Ø ¡Ã³·¡Ø æ µÑÇÊÒÁÒö㪌§Ò¹ºÑÊ仾ÌÍÁæ ¡Ñ¹ä´Œ ´Ñ§¹Ñ¹é ã¹ÃкººÑÊ USB ¨Ö§¨íÒ໚¹µŒÍ§ ÍÒÈÑ«ͿµáÇÏ·àÕè ¢ŒÒÁҨѴ¡ÒÃã¹´ŒÒ¹¹Õé áÅÐÂѧµŒÍ§ÍÒÈÑÂÎÒÏ´áÇÏ·¨Õè ФÍ¡ÃШÒ¡ÒÃʋ§áÅÐÃǺÃÇÁ¡ÒÃÃѺ ¢ŒÍÁÙŨҡÍØ»¡Ã³·¡Ø æ µÑÇã¹Ãкº «Ö§è «Í¿µáÇÏáÅÐÎÒÏ´áÇÏ·¨Õè Òí ໚¹ÊíÒËÃѺÃкº USB ÁÕ´§Ñ ¹Õé SOF

ʋ§àÊÕ§ ÃѺàÊÕ§ ʋ§¢ŒÍÁÙÅ ÃѺ¢ŒÍÁÙÅ ä»Âѧ ¨Ò¡ ä»Âѧ ¨Ò¡ â·ÃÈѾ· â·ÃÈѾ· âÁà´çÁ âÁà´çÁ

ʋ§àÊÕ§à¾Å§ä»ÅíÒ⾧

ÃѺ¢ŒÍÁÙÅ ÃѺ¢ŒÍÁÙÅ ¨Ò¡ ¨Ò¡ àÁÒʏ ¤ÕºÍÏ´

ʋ§¢ŒÍÁÙÅä»à¤Ã×èͧ¾ÔÁ¾

1 ÁÔÅÅÔÇÔ¹Ò·Õ (1 ms)

ÃÙ»·Õè 2-1 ¡ÒèѴÅíҴѺ¡ÒÃÃѺʋ§¢ŒÍÁÙŢͧÍØ»¡Ã³áµ‹ÅеÑÇ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 

ÃѺ¢ŒÍÁÙŨҡ Ê᡹à¹ÍÏ


ʋǹ«Í¿µáÇÏ l ä´ÃàÇÍÏͻ Ø ¡Ã³ USB (USB device drivers) l ä´ÃàÇÍÏ USB (USB driver) l ä´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏ (USB host controller driver) ʋǹÎÒÏ´áÇÏ l USB âÎʵ¤Í¹â·ÃÅàÅÍÏ (USB host controller) / ÃÙµÎѺ (root hub) l USB ÎѺ (USB hub) l ÍØ»¡Ã³ USB (USB device)

2.2 ʋǹ»ÃСͺ·Ò§«Í¿µáÇÏ 2.2.1 ä´ÃàÇÍÃÍ»Ø ¡Ã³ USB ä´ÃàÇÍÃÍ»Ø ¡Ã³ USB ¤×Íâ»Ãá¡ÃÁà¡çº¢ŒÍÁÙÅ·Õ¨è Òí ໚¹ã¹¡ÒõԴµ‹Íä»ÂѧÍØ»¡Ã³áµ‹ÅеÑÇ àÁ×Íè â»Ãá¡ÃÁ ã´ÁÕ¤ÇÒÁµŒÍ§¡ÒèеԴµ‹Í¡ÑºÍØ»¡Ã³µÒ‹ §æ ¨ÐµŒÍ§á¨Œ§¤ÇÒÁµŒÍ§¡Òùѹé æ ÁÒÂѧä´ÃàÇÍÃÍ»Ø ¡Ã³ USB à¹×Íè §¨Ò¡ µÑÇä´ÃàÇÍϹ¨Õé ÐÃÙnj ҋ ¶ŒÒµŒÍ§¡ÒõԴµ‹Í¡ÑºÍØ»¡Ã³¨ÐµŒÍ§µÔ´µ‹Í¼‹Ò¹àÍç¹´¾Íµ (Endpoint) ä˹ ´ŒÇÂÃٻẺ㴠(¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ USB ¨ÐµÔ´µ‹ÍÊÑ§è §Ò¹¼‹Ò¹àÍç¹´¾Íµ¢Í§µÑÇÍØ»¡Ã³ «Ö§è ÍØ»¡Ã³µÒ‹ §æ ¨ÐÁÕª¹Ô´áÅШíҹǹ àÍç¹´¾Íµ·µÕè ҋ §¡Ñ¹ ÃÒÂÅÐàÍÕ´¨Ð¡Å‹ÒǶ֧㹺·µ‹Íæ ä») ´Ñ§¹Ñ¹é ÍØ»¡Ã³áµ‹ÅеÑÇ¡ç¨ÐÁÕä´ÃàÇÍÃÍ»Ø ¡Ã³ USB ੾ÒеÑÇ «Ö§è àÁ×Íè ¶Ö§¤ÃÒǵŒÍ§¹íÒÍØ»¡Ã³¹¹Ñé ÁÒµ‹Í㪌§Ò¹¡Ñº¤ÍÁ¾ÔÇàµÍϨÃÔ§æ ¡ç¨ÐµŒÍ§¹íÒä´ÃàÇÍϵÇÑ à´ÕÂǡѹÁÒµÔ´ µÑ§é à¾ÔÁè ࢌҡѺÃкº»¯ÔºµÑ ¡Ô ÒÃ㹤ÍÁ¾ÔÇàµÍÏà¾×Íè ãˌÃкºÃÙ¨Œ ¡Ñ áÅеԴµ‹Í㪌§Ò¹ÍØ»¡Ã³·µÕè ´Ô µÑ§é ࢌÒÁÒãËÁ‹¹äÕé ´Œ ઋ¹ ¶ŒÒµŒÍ§¡ÒõԴµ‹Íà¾×Íè ÃѺ¢ŒÍÁÙŨҡ¤Õº ÍÏ´ µÑÇä´ÃàÇÍÃÍ»Ø ¡Ã³ USB ¨ÐÃÙnj ҋ µŒÍ§ÃѺʋ§¢ŒÍÁÙÅ´ŒÇÂÍѵÃÒàÃçǵèÒí (slow speed) â´Â㪌û٠Ẻ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺÍÔ¹àµÍÃÃ»Ñ µ (interrupt transfer type) ¼‹Ò¹àÍç¹´¾ÍµµÇÑ Ë¹Ö§è ¢Í§ ¤Õº ÍÏ´ áÅеÃǨÊͺ¢ŒÍÁÙÅ¡Òá´à»š¹ª‹Ç§ÃÐÂÐˋҧ¤‹Ò˹֧è (ÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅÐʋǹ¨Ð¡Å‹ÒǶ֧ã¹Ê‹Ç¹ËÅѧ) ᵋ㹺ҧÍØ»¡Ã³·àÕè »š¹ÍØ»¡Ã³¾¹×é °Ò¹¢Í§¤ÍÁ¾ÔÇàµÍÏ ઋ¹ àÁÒʏáÅФÕº ÍÏ´ ¨ÐÁÕ¡ÒúÃèØä´ÃàÇÍÏ ¢Í§ÍØ»¡Ã³àËŋҹÕäé njÀÒÂã¹äºÍÍʢͧà¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏàÃÕºÌÍÂáÅŒÇ ¨Ö§äÁ‹µÍŒ §µÔ´µÑ§é ä´ÃàÇÍÏà¾ÔÁè àµÔÁÊíÒËÃѺ ÍØ»¡Ã³àËŋҹÕé à¾Õ§ᵋࢌÒä»à»´¡Ò÷íÒ§Ò¹ äºÍÍÊ¡ç¨Ð·íÒãˌà¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏèٌ ¡Ñ ÍØ»¡Ã³àËŋҹÕàé ͧ

2.2.2 ä´ÃàÇÍÏ USB ¡Ò÷íÒ§Ò¹¢Í§ USB ¹Ñ¹é ໚¹¡Òõ‹ÍËÇÁ¡Ñ¹¢Í§ÍØ»¡Ã³ËÅÒÂæ ª¹Ô´º¹ÊÒÂÊÑ­­Ò³à¾Õ§¤Ùà‹ ´ÕÂÇ ´Ñ§¹Ñ¹é ¡ÒÃʋ§¢ŒÍÁÙŢͧÍØ»¡Ã³áµ‹ÅЪ¹Ô´¨ÐµŒÍ§ÁÕ¡ÒÃẋ§ÊÃû˜¹Ê‹Ç¹¡Ñ¹ä»Í‹ҧ¾ÍàËÁÒÐ¾Í´Õ à¾×Íè ãËŒÍ»Ø ¡Ã³·¡Ø µÑÇ ÊÒÁÒö·íÒ§Ò¹ä»ä´Œ¾ÃŒÍÁæ ¡Ñ¹ áÅÐṋ¹Í¹Ç‹ÒµŒÍ§ÁÕ«Í¿µáÇÏ·àÕè ¢ŒÒÁÒ·íÒ˹ŒÒ·Õ¹è Õé «Ö§è ¡ç¤Í× ä´ÃàÇÍÏ USB ¹Ñ¹è àͧ ä´ÃàÇÍÃÍ»Ø ¡Ã³ USB ¢Í§ÍØ»¡Ã³áµ‹ÅеÑǨÐʋ§¡ÒÃÌͧÃÍà¾×Íè ¡ÒõԴµ‹Í (request) ŧÁÒÂѧä´ÃàÇÍÏ USB áÅÐàÁ×Íè ä´ÃàÇÍÏ USB ÃѺ·ÃÒº¤ÇÒÁµŒÍ§¡ÒáÒõԴµ‹Í¢Í§ÍØ»¡Ã³¤Ãº·Ø¡æ µÑÇ·Õàè ª×Íè Áµ‹ÍÍÂÙ¡‹ ºÑ ºÑÊáÅŒÇ ¡ç¨Ð¾Ô¨ÒóÒÇ‹Ò ã¹Ãͺ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ˹֧è æ ¹Ñ¹é ÍØ»¡Ã³áµ‹ÅеÑÇÊÒÁÒöÃѺʋ§¢ŒÍÁÙÅ䴌Áҡ෋Òã´ ËÒ¡»ÃÔÁÒ³ ¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃÃѺʋ§ÁÕ¢¹Ò´ÁÒ¡¡ç¨ÐµÑ´áº‹§Í͡໚¹Ê‹Ç¹æ áŌÇà¡çºänjà¾×Íè ÃÍʋ§ã¹Ãͺ¶Ñ´ä» â´Â»ÃÔÁÒ³¢ŒÍÁÙÅ ·ÕÊè §‹ 䴌¢Í§ÍØ»¡Ã³áµ‹ÅеÑǨж١¾Ô¨ÒóҨҡª¹Ô´¢Í§¡Òö‹Ò·ʹ¢ŒÍÁÙÅ (transfer type) Ç‹Ò ÍØ»¡Ã³ã´ãªŒ¡Òà ¶‹Ò·ʹ¢ŒÍÁÙÅẺã´áÅСÒÃÃѺʋ§¢ŒÍÁÙŪ¹Ô´¹Ñé¹ÁÕÅíҴѺ¤ÇÒÁÊíҤѭÁÒ¡¹ŒÍÂà¾Õ§㴠àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 


ÊÑ觧ҹÍØ»¡Ã³ µÑÇ·Õè 1

ä´ÃàÇÍÏÍØ»¡Ã³ USB

ÊÑ觧ҹÍØ»¡Ã³ µÑÇ·Õè 2

¡ÒÃÌͧ¢Íä»ÂѧÍØ»¡Ã³µÇÑ ·Õè 1

ä´ÃàÇÍÏ USB

USB âÎʵ ¤Í¹â·ÃÅàÅÍÏ

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 1

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 2

à¿ÃÁ¢ŒÍÁÙÅ·Õè 1 ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 1

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 2 ¤ÃÑ駷Õè 1

á¾ç¡à¡çµâ·à¤¹ (Token Packet)

¡ÒÃÌͧ¢Íä»ÂѧÍØ»¡Ã³µÇÑ ·Õè 2

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 3

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 2 ¤ÃÑ駷Õè 1 µÑÇ·Õè 2 ¤ÃÑ駷Õè 2 µÑÇ·Õè 2 ¤ÃÑ駷Õè 3 µÑÇ·Õè 2 ¤ÃÑ駷Õè 4

à¿ÃÁ¢ŒÍÁÙÅ·Õè 2 ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 2

á¾ç¡à¡çµ¢ŒÍÁÙÅ (Data Packet)

à¿ÃÁ¢ŒÍÁÙÅ·Õè 3

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 2 ¤ÃÑ駷Õè 2

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 2 ¤ÃÑ駷Õè 3

¡ÒÃÃѺʋ§¢ŒÍÁÙÅ µÑÇ·Õè 1 ¤ÃÑ駷Õè 3

á¾ç¡à¡çµµÃǨÊͺ (Handcheck Packet)

ÃÙ»·Õè 2-2 ÅíҴѺáÅÐ¢Ñ¹é µÍ¹¡Ò÷íÒ§Ò¹¢Í§«Í¿µáÇϤǺ¤ØÁ¡Ò÷íÒ§Ò¹¢Í§¾Íϵ USB

2.2.3 ä´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏ ËÅѧ¨Ò¡ä´ÃàÇÍÏ USB ¾Ô¨ÒóÒáŌÇNjÒÍØ»¡Ã³áµ‹ÅеÑÇʋ§¢ŒÍÁÙÅ䴌෋Òã´ºŒÒ§ Áѹ¨Ðʋ§¢ŒÍÁÙŢͧÍØ»¡Ã³ ᵋÅеÑÇ·Õ¨è еԴµ‹Íã¹Ãͺ¡ÒõԴµ‹Í¹Ñ¹é æ ÁÒÂѧä´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏ ¨Ò¡¹Ñ¹é ä´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏ ¨Ð¨Ñ´àÃÕ§ÅíҴѺ¢ŒÍÁÙŢͧÍØ»¡Ã³áµ‹ÅЪ¹Ô´Å§à»š¹à¿ÃÁ¢ŒÍÁÙÅ à¾ÔÁè àµÔÁʋǹ»ÃСͺµ‹Ò§æ ¢Í§à¿ÃÁ¢ŒÍÁÙÅãˌ¤Ãº µÒÁÁҵðҹ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺ USB áŌÇʋ§¢ŒÍÁÙŷѧé ËÁ´ä»ÂѧÎÒÏ´áÇÏ USB âÎʵ¤Í¹â·ÃÅàÅÍÏà¾×Íè ʋ§¢ŒÍÁÙŷѧé ËÁ´ÍÍ¡ä»ÂѧÍØ»¡Ã³µÒ‹ §æ ã¹ÃÙ»·Õè 2-2 áÊ´§ÅíҴѺáÅÐ¢Ñ¹é µÍ¹¡Ò÷íÒ§Ò¹¢Í§«Í¿µáÇϤǺ¤ØÁ¡Òà ·íÒ§Ò¹¢Í§¾Íϵ USB

2.3 ʋǹ»ÃСͺ·Ò§ÎÒÏ´áÇÏ ¨Ò¡Ê‹Ç¹»ÃСͺ 3 ʋǹ·Õ¼è ҋ ¹ÁÒ໚¹Ê‹Ç¹»ÃСͺ´ŒÒ¹«Í¿µáÇÏ «Ö§è ¨Ð¤Í¤Ǻ¤ØÁ¨Ñ´¡ÒáÒ÷íÒ§Ò¹¢Í§ ÍØ»¡Ã³·ÁÕè Òµ‹ÍËÇÁ¡Ñ¹·Ñ§é ËÁ´ãˌ໚¹ä»Í‹ҧÃÒºÃ×¹è ã¹Ê‹Ç¹¶Ñ´ä»¨Ð໚¹Ë¹ŒÒ·Õ¢è ͧʋǹ»ÃСͺ·Ò§ÎÒÏ´áÇÏ·Õè ·íÒ˹ŒÒ·ÕÃè ºÑ Ê‹§ÊÑ­­Ò³¡ÑºµÑÇÍØ»¡Ã³µÒ‹ §æ â´Âʋǹ»ÃСͺµÑÇáá·Õ¨è СŋÒǶ֧¤×Í USB âÎʵ¤Í¹â·ÃÅàÅÍÏ (USB controller) áÅÐ USB ÃÙµÎѺ (USB root hub)

2.3.1 USB âÎʵ¤Í¹â·ÃÅàÅÍÏ / USB ÃÙµÎѺ USB âÎʵ¤Í¹â·ÃÅàÅÍÏÁËÕ ¹ŒÒ·ÕÊè ÌҧÊÑ­­Ò³¢ŒÍÁÙŷҧ俿‡Ò áŌÇʋ§ä»ÂѧÃÙµÎѺà¾×Íè ¡ÃШÒÂÍÍ¡ ä»ÂѧÍØ»¡Ã³µÒ‹ §æ â´ÂÁѹ¨ÐÊÌҧÊÑ­­Ò³¢ŒÍÁÙÅ¡ÒõԴµ‹Íµ‹Ò§æ µÒÁ·Õäè ´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏ¡Òí ˹´ÁÒ ¨Ò¡¹Ñ¹é á»Å§¢ŒÍÁÙÅ·Õ¨è Ðʋ§¨Ò¡áºº¢¹Ò¹à»š¹Í¹Ø¡ÃÁà¾×Íè 㪌㹡ÒÃʋ§ àÁ×Íè ÊÑ­­Ò³·Õµè ͌ §¡ÒÃʋ§ÁÒ¶Ö§ÃÙµÎѺ ÃÙµÎѺ ¨Ðʋ§ÊÑ­­Ò³¹Ñ¹é ÍÍ¡ä»ÂѧºÑÊà¾×Íè ʋ§µ‹Íä»ÂѧÍØ»¡Ã³µÒ‹ §æ ¹Í¡¨Ò¡¹Ñ¹é ÃÙµÎѺÂѧÁÕ˹ŒÒ·ÕÊè Òí ¤Ñ­ÍÕ¡ 4 Í‹ҧ¤×Í àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !


1. ¤Çº¤ØÁ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§ÍØ»¡Ã³·ÁÕè Òµ‹Í 2. µÃǨÊͺ¡ÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³Çҋ ÁÕÍ»Ø ¡Ã³µÍ‹ ÍÂÙˋ Ã×ÍäÁ‹ 3. ແ´ËÃ×ÍàÍç¹àÍàºÔÅ¡ÒÃ㪌§Ò¹¾ÍϵàÁ×Íè ÁÕÍ»Ø ¡Ã³µÍ‹ ÍÂً áÅл´ËÃ×Í´ÔÊàÍàºÔÅ¡ÒÃ㪌§Ò¹àÁ×Íè »Å´ÍØ»¡Ã³ÍÍ¡ä»áÅŒÇ 4. ÃÒ§ҹʶҹТͧᵋÅоÍϵàÁ×Íè ä´ÃàÇÍÏâÎʵ¤Í¹â·ÃÅàÅÍÏÃ͌ §¢ÍÁÒ ã¹ÃÙ»·Õè 2-3 áÊ´§¡Ò÷íÒ§Ò¹¢Í§ USB ÃÙµÎѺÍ‹ҧ§‹ÒÂ

2.3.2 USB ÎѺ ˹ŒÒ·ÕËè ÅÑ¡æ ¢Í§ USB ÎѺ¤×Í ¢ÂÒ¡ÒÃàª×Íè Áµ‹ÍãËŒÍ»Ø ¡Ã³¨Òí ¹Ç¹ÁÒ¡æ ÊÒÁÒöàª×Íè Áµ‹ÍࢌҡѺ ÃкººÑÊ䴌 â´Â¡Ò÷íÒ§Ò¹ËÅÑ¡¢Í§ USB ÎѺ¹Ñé¹ÁÕÍÂً 2 ʋǹ¤×Í ·íÒ˹ŒÒ·Õè໚¹µÑǷǹÊÑ­­Ò³ (repeater) áÅеÑǨѴ¡ÒþÅѧ§Ò¹ (power management) ã¹Ê‹Ç¹¢Í§¡Ò÷ǹÊÑ­­Ò³ USB ÎѺ¨ÐµŒÍ§ÃѺÊÑ­­Ò³¨Ò¡âÎʵÁÒ áŌÇʋ§¡ÃШÒÂÍÍ¡ä»Âѧ¾Íϵ·Ø¡æ ¾Íϵ áÅÐÃѺÊÑ­­Ò³¨Ò¡áµ‹ÅоÍϵ áŌǨѺÁÒÃÇÁ¡Ñ¹à¾×Íè ʋ§¡ÅѺ价Õâè Îʵ ÊíÒËÃѺʋǹ¢Í§¡ÒèѴ¡ÒþÅѧ§Ò¹ ¹Ñ¹é ÁÕ˹ŒÒ·Õàè ËÁ×͹¡ÑºÃÙµÎѺ¡ç¤Í× µÃǨÊͺNjÒÁÕ¡Òõ‹Í¢Í§ÍØ»¡Ã³·¾Õè Íϵ㴺ŒÒ§ ËÒ¡ÁÕÍ»Ø ¡Ã³µÍ‹ ÍÂÙ¡‹ àç »´¡ÒÃ㪌 §Ò¹¾Íϵ¹Ñ¹é æ ËÒ¡äÁ‹ÁÍÕ »Ø ¡Ã³µÍ‹ ÍÂÙ¡‹ »ç ´ ¡ÒÃ㪌§Ò¹ µÃǨÊͺ¡ÒÃàª×Íè Áµ‹ÍËÃ×ͻŴÍÍ¡¢Í§ÍØ»¡Ã³à¾×Íè ÃÒ§ҹ ¼ÅàÁ×Íè âÎʵ¤Í¹â·ÃÅàÅÍÏÃ͌ §¢Í áÅл‡Í§¡Ñ¹ÍØ»¡Ã³·µÕè ͋ ÍÂÙ㋠¹áµ‹ÅоÍϵäÁ‹ãˌ´§Ö ¡ÃÐáÊä¿¿‡Òà¡Ô¹¡Ç‹Ò·Õ¡è Òí ˹´

2.3.3 ÍØ»¡Ã³ USB ʋǹ»ÃСͺ·Ò§ÎÒÏ´áÇÏÊNj ¹ÊØ´·ŒÒ·յè ͌ §ÃÙ¨Œ ¡Ñ ¤×Í ÍØ»¡Ã³ USB «Ö§è ¡ç¤Í× ÍØ»¡Ã³µÒ‹ §æ ·Õàè ª×Íè Áµ‹Í ¡Ñº¤ÍÁ¾ÔÇàµÍϴnj ¾Íϵ USB ¹Ñ¹è àͧ ÊÒÁÒöẋ§à»š¹ 2 ª¹Ô´µÒÁ¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙŤ×Í 1. ÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí (low-speed devices) ¶‹Ò·ʹ¢ŒÍÁÙÅ´ŒÇ¤ÇÒÁàÃçÇ 1.5 àÁ¡ÐºÔµµ‹Í ÇÔ¹Ò·Õ (Mb/s) 2. ÍØ»¡Ã³¤ÇÒÁàÃçÇàµçÁ·Õè (full-speed devices) ÃѺʋ§¢ŒÍÁÙÅ´ŒÇ¤ÇÒÁàÃçÇ 12 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ (Mb/s) »˜¨¨Øº¹Ñ ¹ÕÍé »Ø ¡Ã³ USB ·ÕÁè ¨Õ Òí ˹‹ÒÂÍÂÙµ‹ ÒÁ·ŒÍ§µÅÒ´ÁÕÍÂÙà‹ »š¹¨íҹǹÁÒ¡ ÍÒ·Ô ¤Õº ÍÏ´, àÁÒʏ,¨ÍÂʵԡê àËŋҹդé Í× ÍØ»¡Ã³ USB ¤ÇÒÁàÃçǵèÒí ʋǹ¨ÍÁ͹ÔàµÍÏ, ÅíÒ⾧, à¤Ã×Íè §¾ÔÁ¾, ¡ÅŒÍ§¶‹ÒÂÃÙ»´Ô¨µÔ ÍÅ, «Õ´ÃÕ ÍÁä´Ã¿, à¤Ã×Íè §àŋ¹ MP3 ¨Ñ´à»š¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçÇÊÙ§ ÍØ»¡Ã³ºÒ§µÑǨкÃèؤÇÒÁÊÒÁÒö¢Í§ USB ÎѺࢌÒä»´ŒÇ ·íÒãˌÊÒÁÒö¹íÒÍØ»¡Ã³Í¹×è æ ÁÒàª×Íè Áµ‹Í䴌 àËÁ×͹¡Ñº¡Òõ‹ÍࢌҡѺÎѺ ÍØ»¡Ã³Å¡Ñ ɳйÕàé ÃÕÂ¡Ç‹Ò Compound USB Device µÑÇÍ‹ҧ¢Í§ÍØ»¡Ã³·ÁÕè ÎÕ ºÑ ÍÂÙÀ‹ ÒÂã¹ä´Œá¡‹ ¨ÍÁ͹ÔàµÍÏ ËÃ×Íà¤Ã×Íè §¾ÔÁ¾ ໚¹µŒ¹ ¹Í¡¨Ò¡¡ÒÃẋ§ª¹Ô´¢Í§ÍØ»¡Ã³µÒÁ¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙÅáÅŒÇ ÍÒ¨¨Ðẋ§¡Å؋ÁµÒÁ¡ÒÃ㪌 ¾Åѧ§Ò¹¢Í§µÑÇÍØ»¡Ã³àͧ¡ç䴌 «Ö§è ÊÒÁÒöẋ§ä´ŒÍ¡Õ 2 ª¹Ô´¤×Í 1. ÍØ»¡Ã³·ãÕè ªŒä¿àÅÕÂé §¨Ò¡ºÑÊ (bus powered device) ¤×Í ÍØ»¡Ã³·ãÕè ªŒä¿àÅÕÂé §¨Ò¡ºÑÊâ´ÂµÃ§ äÁ‹µŒÍ§ÁÕáËŋ§¨‹ÒÂä¿ÀÒ¹͡à¾ÔèÁàµÔÁ 2. ÍØ»¡Ã³·ãÕè ªŒä¿àÅÕÂé §¨Ò¡µÑÇàͧ (self powered device) ¤×Í ÍØ»¡Ã³·ÁÕè áÕ Ëŋ§¨‹ÒÂä¿ã¹µÑÇ äÁ‹µŒÍ§ÍÒÈÑÂä¿àÅÕ駨ҡºÑÊ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "


¢ŒÍÁÙÅÃѺ/ʋ§¨Ò¡âÎʵ¤Í¹â·ÃÅàÅÍÏ

¢ŒÍÁÙÅ

¢ŒÍÁÙÅ

ແ´/»´

ʋǹ¤Çº¤ØÁ ¡Ò÷íÒ§Ò¹¢Í§ÎѺ

ແ´/»´¡Ò÷íÒ§Ò¹

ແ´/»´

ÍØ»¡Ã³·Ç¹ÊÑ­­Ò³

ä¿¿‡Ò¨Ò¡¤ÍÁ¾ÔÇàµÍÏ

áËŋ§¨‹ÒÂ俵ç

¾Íϵ 1

¾Íϵ 2

ÃÙ»·Õè 2-3 ä´ÍÐá¡ÃÁ¡Ò÷íÒ§Ò¹¢Í§ USB ÃÙ·ÎѺÍ‹ҧ§‹ÒÂ

2.4 â¤Ã§ÊÌҧ¡ÒÃàª×Íè Áµ‹Í (Topology) â¤Ã§ÊÌҧ¡ÒÃàª×Íè Áµ‹Í¢Í§ USB ¹Ñ¹é ໚¹áººÊµÒÏ (STAR) ´Ñ§ÃÙ»·Õè 2-4 â´ÂÎѺ·íÒ˹ŒÒ·Õàè »š¹Èٹ ¡ÅÒ§¨Ø´àª×Íè Áµ‹Íä»ÂѧÍØ»¡Ã³µÒ‹ §æã¹áµ‹ÅÐÃдѺªÑ¹é ÊÒÂàª×Íè Áµ‹ÍᵋÅÐàʌ¹à»š¹¡Òõ‹ÍẺ¨Ø´µ‹Í¨Ø´ (point to point) à¹×èͧ¨Ò¡ “¾Íϵ USB ÁÕÃٻẺ¡ÒÃàª×èÍÁµ‹Í໚¹ÃкººÑÊ áµ‹ÁÕâ¤Ã§ÊÌҧ¡ÒÃàª×èÍÁµ‹ÍẺʵÒϔ «Ö§è ÍÒ¨ÊÌҧ¤ÇÒÁÊѺʹ㹨ش¹Õäé ´Œ ¨Ö§¢Í¢ÂÒ¤ÇÒÁËÁÒÂáÅÐà»ÃÕºà·ÕºãˌàË繤ÇÒÁᵡµ‹Ò§µÃ§¨Ø´¹Õé ¨Ò¡¤íÒÇ‹Ò “â¤Ã§ÊÌҧ¡ÒÃàª×èÍÁµ‹Í” ¨Ð͸ԺÒ¶֧ÅѡɳСÒõ‹ÍÊÒÂʋ§ÊÑ­­Ò³¢Í§ÍØ»¡Ã³áµ‹ÅеÑÇࢌҴŒÇ¡ѹ «Ö觡ç¤×Í ÅѡɳСÒõ‹ÍÊÒÂä¿ÃÐËNjҧ¡Ñ¹·íÒÍ‹ҧäà ¹Ñ¹è àͧ ᵋ¤Òí Ç‹Ò “ÃٻẺ¡ÒÃàª×Íè Áµ‹Í” ¹Ñ¹é ¨Ð͸ԺÒ¶֧¡ÒÃà´Ô¹ ·Ò§¢Í§ÊÑ­­Ò³¢ŒÍÁÙÅÀÒÂã¹ÊÒÂä¿·Õèàª×èÍÁµ‹Í¡Ñ¹ÍÂً¨Ò¡ÍØ»¡Ã³µÑÇ˹Öè§ä»ÂѧÍØ»¡Ã³áµ‹ÅеÑÇ·Õ赋Íàª×èÍÁÍÂً ¤ÇÒÁËÁÒÂâ´ÂÃÇÁ¡ç¤Í× ¾Íϵ USB µ‹ÍÊÒÂࢌҴŒÇ¡ѹẺʵÒÃáµ‹ÃºÑ Ê‹§¢ŒÍÁÙÅẺºÑÊ (â¤Ã§ÊÌҧ¤ÅŒÒ¡Ѻ ÃкºáŹÍÕà·ÍÏà¹çµ) àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #


2.5 ¡ÒõԴµ‹ÍÃÐËNjҧÍØ»¡Ã³áÅÐâÎʵ ¡Òö‹Ò·ʹÊÑ­­Ò³ (transfer type) ¢Í§ºÑÊ USB ¹Ñ¹é ẋ§Í͡໚¹ 4 ª¹Ô´µÒÁ¢¹Ò´ ª¹Ô´¢Í§¢ŒÍÁÙÅ áÅШѧËÇСÒÃʋ§¢ŒÍÁÙŴѧ¹Õé 1. ¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ (Isochronous transfer) 2. ¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡ (Bulk transfer) 3. ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ (Interrupt transfer) 4. ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ (Control transfer) ¡Òö‹Ò·ʹÊÑ­­Ò³ 3 ª¹Ô´áá㪌ÊÒí ËÃѺ¢ŒÍÁÙÅ·ÑÇè ä»·Õµè ͌ §¡ÒÃÃѺËÃ×Íʋ§ä»ÂѧµÑÇÍØ»¡Ã³ ʋǹ¡Òà ¶‹Ò·ʹÊÑ­­Ò³áºº·Õè 4 ¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ㪌¶Ò‹ ·ʹ¢ŒÍÁÙÅ·Õµè ͌ §¡ÒäÇÒÁµ‹Íà¹×Íè §ÊÙ§ ઋ¹ ¢ŒÍÁÙÅàÊÕ§à¾Å§ ʋǹ¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡ãªŒÊÒí ËÃѺ¶‹Ò·ʹ¢ŒÍÁÙÅ·ÕÁè »Õ ÃÔÁÒ³ÁÒ¡æ ᵋäÁ‹µÍŒ § ¡ÒäÇÒÁµ‹Íà¹×Íè §¢Í§¢ŒÍÁÙÅ ã¹¢³Ð·Õ¡è Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µãªŒÊÒí ËÃѺ¶‹Ò·ʹ¢ŒÍÁÙÅ·ÕÁè ¨Õ Òí ¹Ç¹ ¹ŒÍ¤ÃÑé§áÅÐÁÕ»ÃÔÁÒ³¢Í§¢ŒÍÁÙÅäÁ‹ÁÒ¡ 㹡ÒÃÊÑ§è §Ò¹ÍØ»¡Ã³áµ‹ÅФÃÑ§é ¹Ñ¹é âÎʵ¨ÐµŒÍ§ÃкØ໇ÒËÁÒ»ÅÒ·ҧ¢Í§¢ŒÍÁÙÅ·Õµè ͌ §¡ÒèÐÃѺËÃ×Íʋ§ ໇ÒËÁÒ»ÅÒ·ҧ·ÕÇè ҋ ¹Õàé »š¹¡ÅØÁ‹ ¢Í§ÃÕ¨ÊÔ àµÍÏ·ÍÕè ÂÙ㋠¹ÍØ»¡Ã³áµ‹ÅеÑÇ«Ö§è àÃÕ¡NjÒàÍç¹´¾Íµ (Endpoint) â´Â ᵋÅÐàÍç¹´¾Íµ¨ÐÃͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³ª¹Ô´µ‹Ò§æ 4 ª¹Ô´¢ŒÒ§µŒ¹á¡¡Ñ¹ÍÍ¡ä» ´Ñ§¹Ñ¹é ÍØ»¡Ã³áµ‹ÅÐ µÑǨÐÁÕ¨Òí ¹Ç¹àÍç¹´¾ÍµÁÒ¡¡Ç‹Ò 1 àÍç¹´¾Íµà¾×Íè ÃͧÃѺ¡Ò÷íÒ§Ò¹ÃٻẺµ‹Ò§æ ¡µÑÇÍ‹ҧ «Õ´ÃÕ ÍÁ USB Ẻ͋ҹà¢Õ¹䴌¨ÐµŒÍ§ÁÕàÍç¹´¾Íµ·ÃÕè ͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁà¾×Íè ÃѺ¤íÒÊÑ§è ¨Ò¡âÎʵ 1 àÍç¹´¾Íµ ¾ÃŒÍÁ¡Ñ¹¹Ñ¹é ÂѧµŒÍ§ÁÕàÍç¹´¾Íµ·ÃÕè ͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡à¾×Íè ʋ§¢ŒÍÁÙÅ·ÕÍè ҋ ¹ä´ŒËÃ×ÍÃѺ¢ŒÍÁÙÅà¾×Íè à¢Õ¹Ἃ¹«Õ´Õ 1 àÍç¹´¾Íµ áÅеŒÍ§ÁÕàÍç¹´¾Íµ·ÃÕè ͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³äÍâ«â¤Ã¹ÑÊà¾×Íè ʋ§¢ŒÍÁÙÅà¾Å§ «Ö§è ÁÕ¤ÇÒÁµ‹Íà¹×Íè §ã¹¡Ã³Õ·àÕè ŋ¹á¼‹¹«Õ´àÕ ¾Å§ÍÕ¡ 1 àÍç¹´¾Íµ ໚¹µŒ¹

2.6 ´ÔʤÃÔ»àµÍÏ : ¤ÇÒÁËÁÒÂ, ª¹Ô´áÅÐÃٻẺ¡Ò÷íÒ§Ò¹ ÍØ»¡Ã³áµ‹ÅеÑÇÁդسÊÁºÑµÔáÅСÒ÷íÒ§Ò¹·Õèᵡµ‹Ò§¡Ñ¹ âÎʵ¨íÒ໚¹µŒÍ§Ãٌ¤Ø³ÊÁºÑµÔ·Ñé§ËÁ´¢Í§ ÍØ»¡Ã³áµ‹ÅеÑÇà¾×Íè ãˌ¡ÒÃÊÑ§è §Ò¹à»š¹ä»Í‹ҧ¶Ù¡µŒÍ§ áÅÐà¹×Íè §¨Ò¡ºÑÊ¢ŒÍÁÙŷѧé ËÁ´¨Ð¶Ù¡ãªŒ§Ò¹ÃѺʋ§¢ŒÍÁÙÅËÇÁ ¡Ñ¹ÃÐËNjҧÍØ»¡Ã³·Ø¡æ µÑÇ ÊÔ觷ÕèâÎʵ¨íÒ໚¹µŒÍ§ÃٌÍÕ¡Í‹ҧ¤×Í »ÃÔÁÒ³¢ŒÍÁÙÅ·Õ赌ͧ¡ÒÃʋ§ (bandwidth) ¢Í§ÍØ»¡Ã³áµ‹ÅеÑÇ㹺ÑÊ ´Ñ§¹Ñ¹é àÁ×Íè ÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹µÍ‹ ࢌҡѺºÑÊ âÎʵµÍŒ §Í‹Ò¹¢ŒÍÁÙŵ‹Ò§æ ·Õ¨è Òí ໚¹à¢ŒÒÁÒ à¾×Íè 㪌ÍҌ §Íԧ㹡ÒÃÊÑ§è §Ò¹ÍØ»¡Ã³ áÅÐ㪌¾¨Ô ÒóÒNjÒÃкººÑÊÊÒÁÒöÃͧÃѺÍØ»¡Ã³·ÁÕè Òàª×Íè Áµ‹ÍãËÁ‹ä´ŒËÃ×ÍäÁ‹ ¢ŒÍÁÙÅàËŋҹÕÃé ÇÁàÃÕÂ¡Ç‹Ò ´ÔʤÃÔ»àµÍϢͧÍØ»¡Ã³ (device descripters) ÍØ»¡Ã³áµ‹ÅеÑǨÐᨌ§ÃÒÂÃÐàÍÕ´¢Í§µÑÇàͧãˌâÎʵÃٌ¼‹Ò¹´ÔʤÃÔ»àµÍϪ¹Ô´µ‹Ò§æ «Öè§ä´ŒÃѺ¡ÒÃẋ§ á¡໚¹ª¹Ô´µÒÁ¢ŒÍÁÙÅ·Õè¨Ðᨌ§¡ÅѺä»ÂѧâÎʵ â´Â¡ÒÃẋ§á¡ª¹Ô´¢Í§´ÔʤÃÔ»àµÍϹÑ鹨ШѴ໚¹ÅíҴѺªÑé¹ µÒÁÃÙ»·Õè 2-5 ÊÒà˵طµÕè ͌ §¨Ñ´à»š¹ÃдѺªÑ¹é ໚¹à¾ÃÒÐNjÒÍØ»¡Ã³áµ‹ÅеÑǹѹé ÍÒ¨ÁÕ¡Ò÷íÒ§Ò¹·ÕËè ÅÒ¡ËÅÒÂÃٻẺ ઋ¹ ẋ§¡Ò÷íÒ§Ò¹Í͡໚¹ 2 âËÁ´ ᵋÅÐâËÁ´ÁÕ˹ŒÒ·Õ¡è Ò÷íҧҹᵡµ‹Ò§¡Ñ¹ áÅÐᵋÅÐ˹ŒÒ·Õ¡è ¨ç Ð㪌¡ÅØÁ‹ ¢Í§àÍç¹´¾Íµ·áÕè µ¡µ‹Ò§¡Ñ¹ ÊÒÁÒöÊÃػ䴌´§Ñ ¹Õé

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $


USB âÎʵ¤Í¹â·ÃÅàÅÍÏ/ ÃÙµÎѺ (ÎѺËÅÑ¡) («Ö§è ¡ç¤Í× ¤ÍÁ¾ÔÇàµÍÏ) FS

FS

USB 넼 FS

2,)

FS

¾ÃÔ¹àµÍÏ/ÎѺ FS

FS

«Õ´ÃÕ ÍÁä´Ã¿

¨ÍÁ͹ÔàµÍÏ/ÎѺ FS

LS

LS

â·ÃÈѾ·´¨Ô µÔ ÍÅ

àÁÒʏ

¤Õº ÍÏ´

FS : ¤ÇÒÁàÃçÇàµçÁ·Õè (Full Speed) 12 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ

Ê᡹à¹ÍÏ

ÃÙ»·Õè 2-4 áÊ´§â¤Ã§ÊÌҧ¡ÒÃàª×Íè Áµ‹Í¢Í§ USB

2.6.1 ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ (Device descripter) ã¹ÍØ»¡Ã³áµ‹ÅеÑǨÐÁÕ´äÕ Ç«´ÊÔ ¤ÃÔ»àµÍÏà¾Õ§ 1 ªØ´à·‹Ò¹Ñ¹é ÀÒÂ㹨ÐÃкآ͌ ÁÙÅ·Õãè ªŒã¹¡ÒÃàª×Íè Áµ‹Í ¢Ñ¹é áá (default communications pipe) à¾×Íè 㪌㹡ÒáíÒ˹´¢ŒÍÁÙÅʶҹТͧÍØ»¡Ã³à¢ŒÒ¡ÑºâÎʵ ¹Í¡¨Ò¡ ¹Ñ¹é Âѧà¡çº¢ŒÍÁÙŢͧ¢ŒÍ¡íÒ˹´ã¹âËÁ´¡Ò÷íÒ§Ò¹µ‹Ò§æ ¢Í§µÑÇÍØ»¡Ã³ÃÇÁ¶Ö§¨íҹǹ¤Í¹¿¡ÇÔ àÃªÑ¹è ´ŒÇ à¾ÃÒР㹤Ãѧé áá·ÕÍè »Ø ¡Ã³àª×Íè Áµ‹ÍࢌҡѺºÑʹѹé âÎʵäÁ‹Á·Õ Ò§ÃÙäŒ ´ŒàÅÂÇ‹Ò µŒÍ§µÔ´µ‹Í¡ÑºÍØ»¡Ã³·àÕè Íç¹´¾Íµã´ ¨Ö§¨íÒ à»š¹µŒÍ§¢Í¢ŒÍÁÙÅʋǹ¹Õ顋͹·Õè¨ÐµÔ´µ‹Í¡ÑºÊ‹Ç¹Í×è¹

2.6.2 ¤Í¹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏ (Configuration descripter) 㪌 à ¡ç º ¢Œ Í ÁÙ Å ·Õè ¨í Ò à»š ¹ ¢Í§¡Ò÷í Ò §Ò¹ã¹áµ‹ Å ÐâËÁ´¡Ò÷í Ò §Ò¹áÅÐà¡ç º ¨í Ò ¹Ç¹ÍÔ ¹ àµÍÏ à ¿Ê ·Õè㪌§Ò¹ã¹âËÁ´¹Ñé¹æ ઋ¹ ÍØ»¡Ã³ºÒ§µÑÇÁÕ¡Ò÷íÒ§Ò¹ 2 âËÁ´¤×Í âËÁ´ãªŒ¾Åѧ§Ò¹ÊÙ§ áÅÐâËÁ´»ÃÐËÂÑ´ ¾Åѧ§Ò¹ ´ÔʤÃÔ»àµÍϵÑǹÕé¨Ðà¡çº¢ŒÍÁÙÅ·Õè¨íÒ໚¹ã¹¡ÒõÑ駤‹Òµ‹Ò§æ ¢Í§âÎʵàÁ×è͵ŒÍ§¡ÒÃàÅ×͡㪌âËÁ´¡Ò÷íÒ §Ò¹áµ‹ÅÐâËÁ´¢Í§ÍØ»¡Ã³

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %


2.6.3 ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ (Interface descripter) ã¹áµ‹ÅÐâËÁ´¡Ò÷íÒ§Ò¹ËÃ×ͤ͹¿¡ÇÔ àêѹè ÍÒ¨¨ÐÁÕ¡ÒÃàª×Íè Áµ‹ÍËÃ×ÍÍÔ¹àµÍÏà¿Ê 1 ẺËÃ×ÍÁÒ¡¡Ç‹Òà¾×Íè 㪌§Ò¹ã¹Ë¹ŒÒ·Õµè ҋ §æ µÑÇÍ‹ҧ·Õàè Ëç¹ä´Œª´Ñ ·ÕÊè ´Ø ¡ç¤Í× «Õ´ÃÕ ÍÁ â´Âã¹µÑÇ«Õ´ÃÕ ÍÁ¨ÐÁÕ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ»ÃÔÁÒ³ÁÒ¡æ (mass storage), ¡ÒÃʋ§¢ŒÍÁÙÅàÊÕ§ÍÍ´ÔâÍ áÅСÒÃʋ§¢ŒÍÁÙÅÀÒ¾ ¨ÐàËç¹ä´ŒÇҋ ÁÕÍ¹Ô àµÍÏà¿Ê·Õãè ªŒ§Ò¹á¡¡Ñ¹ ÀÒÂã¹ÍÔ¹àµÍÏ à¿Ê´ÔʤÃÔ»àµÍϨкÃèآ͌ ÁÙÅ¡ÒÃ㪌§Ò¹ÍÔ¹àµÍÏà¿Ê¹Ñ¹é æ â´Â¢ŒÍÁÙÅàËŋҹըé ÐÃкØÇҋ ÍØ»¡Ã³¶¡Ù ¨Ñ´ÍÂÙ㋠¹¤ÅÒÊ (class) ËÃ×ͤÅÒÊ‹Í (subclass) ã´ áÅÐÁÕàÍç¹´¾Íµ¨Òí ¹Ç¹à·‹Òã´·Õãè ªŒ§Ò¹ã¹ÍÔ¹àµÍÏà¿Ê¹Õºé Ҍ §

2.6.4 àÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏ (Endpoint descripter) 㪌 à ¡ç º ¢Œ Í ÁÙ Å ¤Ø ³ ÊÁºÑ µÔ ¢ ͧᵋ Å ÐàÍç ¹ ´ ¾ ͵ ઋ ¹ 㪌 ¡ Òö‹ Ò Â·Í´ÊÑ ­ ­Ò³áººã´ (äÍâ«â¤Ã ¹ÑÊ, ºÑÅ¡, ÍÔ¹àµÍÃÃ»Ñ µ ËÃ×ÍÊÑ­­Ò³¤Çº¤ØÁ) áÅж‹Ò·ʹ¢ŒÍÁÙÅ䴌ÁÒ¡·ÕÊè ´Ø ¤Ãѧé ÅÐ෋Òã´

2.6.5 ʵÃÔ§¤´ÊÔ ¤ÃÔ»àµÍÏ (String descripter) ໚¹´ÔʤÃÔ»àµÍÏ·äÕè Á‹ä´ŒÍÂÙÀ‹ ÒÂã¹â¤Ã§ÊÌҧµÒÁÃÙ»·Õè 2-5 à¾ÃÒдÔʤÃÔ»àµÍϪ¹Ô´¹Õ¨é Ðà¡çº¢ŒÍÁÙŵÑÇÍÑ¡Éà ·ÕÊè ÒÁÒö͋ҹࢌÒã¨ä´Œänj͸ԺÒÂʋǹµ‹Ò§æ ¢Í§´ÔʤÃÔ»àµÍÏ·§Ñé ÊÕµè ÇÑ ¢ŒÒ§µŒ¹ ઋ¹ à¡çºª×Íè ºÃÔÉ·Ñ ¼Ù¼Œ ÅÔµ áÅÐËÃ×Í ËÁÒÂàÅ¢»ÃШíÒµÑǢͧÍØ»¡Ã³ ໚¹µŒ¹

2.6.6 ¤ÅÒÊÊ໡«Ô¿¡ ´ÔʤÃÔ»àµÍÏ (Class-specific descripter) ໚¹´ÔʤÃÔ»àµÍϾàÔ ÈÉ·ÕÁè àÕ ©¾ÒÐã¹ÍØ»¡Ã³ºÒ§µÑÇ·Õ¨è ´Ñ ÍÂÙ㋠¹ºÒ§¤ÅÒÊ෋ҹѹé ÀÒÂã¹à¡çº¢ŒÍÁÙÅ੾ÒÐ ¢Í§¤ÅÒʹѹé æ ·ÕÍè ÂÙ¹‹ Í¡à˹×ͨҡ´ÔʤÃÔ»àµÍϾ¹×é °Ò¹ 4 ª¹Ô´áá ´Ñ§¹Ñ鹨֧¾ÍÊÃØ»¡ÒÃ㪌§Ò¹¢Í§´ÔʤÃÔ»àµÍϾ×鹰ҹ䴌´Ñ§¹Õé ¢ŒÍÁÙÅ·ÑÇè 仢ͧµÑÇÍØ»¡Ã³¨Ðà¡çºÍÂÙ㋠¹´ÔʤÃÔ»àµÍϢͧÍØ»¡Ã³ ËÃ×Í´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ ¢ŒÍÁÙÅ¡Ò÷íÒ§Ò¹¢Í§áµ‹ÅÐâËÁ´à¡çºÍÂً㹤͹¿¡ÔÇàêÑè¹´ÔʤÃÔ»àµÍÏ ¢ŒÍÁÙš˹ŒÒ·Õè¡Ò÷íÒ§Ò¹à¡çºÍÂً㹴ÔʤÃÔ»àµÍÏ¡ÒÃàª×èÍÁµ‹ÍËÃ×ÍÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ ¢ŒÍÁÙÅ¡Ò÷íÒ§Ò¹¢Í§áµ‹ÅÐàÍç¹´¾Íµ¨Ðà¡çºÍÂًã¹àÍç¹´¾Íµ´ÔʤÃÔ»àµÍÏ

2.7 ¡ÒèѴ¡ÒáѺÍØ»¡Ã³º¹ºÑÊ USB ·ÕÁè ¤Õ ÇÒÁàÃçǵ‹Ò§¡Ñ¹ ÍØ»¡Ã³ USB ẋ§µÒÁ¤ÇÒÁàÃçǢͧ¡Òö‹Ò·ʹ¢ŒÍÁÙÅ䴌 2 ª¹Ô´¤×Í ÍØ»¡Ã³¤ÇÒÁàÃçÇàµçÁ·Õè¨Ð¶‹Ò ·Í´¢ŒÍÁÙÅ·ÕÍè µÑ ÃÒ 12 Mb/s áÅÐÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ¶‹Ò·ʹ¢ŒÍÁÙÅ·ÕÍè µÑ ÃÒ 1.5 Mb/s ᵋà¹×Íè §¨Ò¡ÍØ»¡Ã³ ·Ñ§é Êͧ»ÃÐàÀ·¹Õµé ͋ ÍÂÙº‹ ¹ºÑÊà´ÕÂǡѹ·Ñ§é ËÁ´ ´Ñ§¹Ñ¹é ¾Íϵ¢Í§ÎѺ·Õãè ËŒÍ»Ø ¡Ã³ USB ࢌÒÁÒàª×Íè Áµ‹Í¨ÐµŒÍ§Ãͧ ÃѺ¡Ò÷íҧҹ䴌·§Ñé 2 Ẻ áÅдŒÇ¤ÇÒÁ·Õàè »š¹ÃкººÑÊ ÍØ»¡Ã³·¡Ø æ µÑǨÐä´ŒÃºÑ ¢ŒÍÁÙÅ·Ø¡æ á¾ç¡à¡çµ·ÕÊè §‹ ࢌÒÁÒ äÁ‹Ç‹Ò¨Ð໚¹¡ÒÃʋ§´ŒÇ¤ÇÒÁàÃçÇÊÙ§ËÃ×͵èíÒ ´Ñ§¹Ñ鹨֧µŒÍ§ÁÕ¡ÒèѴ¡ÒèÃÒ¨ÃÃÐËNjҧ¢ŒÍÁÙÅ·Õèʋ§´ŒÇ â´Â µÑé§à»š¹¢ŒÍ¡íÒ˹´Ç‹Ò ¾Íϵ¢Í§ÍØ»¡Ã³¤ÇÒÁàÃçǵèíÒµŒÍ§äÁ‹à»´·íÒ§Ò¹¨¹¡Ç‹Ò¨Ð䴌ÃѺÊÑ­­Ò³ “»ÃÕáÍÁàºÔŔ (preamble) ¨Ò¡âÎʵ â´ÂËÅѧ¨Ò¡ä´ŒÃºÑ ÊÑ­­Ò³»ÃÕáÍÁàºÔÅáÅŒÇ ÎѺ¨Ðà»ÅÕÂè ¹¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙÅ ä»ÊًâËÁ´¤ÇÒÁàÃçǵèíÒ áŌÇແ´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ·Õè¤ÇÒÁàÃçǵèíÒ ·íÒãˌÍØ»¡Ã³·Õèàª×èÍÁµ‹Í´ŒÇ¤ÇÒÁàÃçǵèíÒ䴌 ÃѺ¢ŒÍÁÙÅ ã¹·Ò§¡ÅѺ¡Ñ¹ ËÅѧ¨Ò¡ä´ŒÃºÑ ÊÑ­­Ò³»ÃÕáÍÁàºÔÅáŌÇÍØ»¡Ã³¤ÇÒÁàÃçÇàµçÁ·Õ¡è ¨ç зÃÒº·Ñ¹·ÕÇҋ ¢ŒÍÁÙÅ ·Õµè ÒÁËÅѧÁÒ¨ÐÍÂÙ㋠¹âËÁ´¤ÇÒÁàÃçǵèÒí äÁ‹µÍŒ §Í‹Ò¹áÅеդÇÒÁ¢ŒÍÁÙÅàËŋҹѹé àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &


´ÕäÇ« ´ÔʤÃÔ»àµÍÏ

¤Í¹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

¤Í¹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

àÍç¹´¾Íµ ´ÔʤÃÔ»àµÍÏ

ÃÙ»·Õè 2-5 áÊ´§ÃдѺ¡Ò÷íÒ§Ò¹¢Í§´ÔʤÃÔ»àµÍÏ㹾Íϵ USB

2.8 ¡ÒÃʋ§ÊÑ­­Ò³ã¹ºÑÊ USB ÊÑ­­Ò³·Õ»è ÃÒ¡¯º¹ÊÒÂÊÑ­­Ò³ÃÐËNjҧÃÙµÎѺáÅÐÍØ»¡Ã³¨Ðʋ§ä»áººÊÑ­­Ò³¼Åµ‹Ò§ (differential signaling) à¾×Íè Å´¡ÒÃá¾Ã‹¡ÃШÒÂʹÒÁáÁ‹àËÅç¡ä¿¿‡Ò (EMI : Electromagnetic Interference) à¹×Íè §¨Ò¡µÒÁ ¸ÃÃÁªÒµÔ¢Í§ÊÑ­­Ò³ä¿¿‡Ò àÁ×Íè ÁÕ¡ÒÃà»ÅÕÂè ¹á»Å§ÃдѺÊÑ­­Ò³´ŒÇ¤ÇÒÁàÃçÇÁÒ¡æ (¡ç¤Í× ¡ÒÃʋ§¢ŒÍÁÙÅ·Õ¤è ÇÒÁ àÃçÇÁÒ¡æ) ¨Ð·íÒãˌà¡Ô´¡ÒÃá¾Ã‹¡ÃШÒ¢ͧʹÒÁáÁ‹àËÅç¡áÅÐʹÒÁä¿¿‡ÒÍÍ¡ÁÒÃͺæ ÊÒÂʋ§ÊÑ­­Ò³ «Öè§ ÍҨú¡Ç¹¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³µÒ‹ §æ Ãͺ¢ŒÒ§ä´Œ ´ŒÇ¡ÒÃʋ§ÊÑ­­Ò³áºº¹Õ¨é зíÒãˌ¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ÊÑ­­Ò³ ã¹ÊÒ¹íÒÊÑ­­Ò³à¡Ô´¢Ö¹é ¾ÃŒÍÁ¡Ñ¹áÅÐà¡Ô´ã¹Åѡɳе碌ÒÁ ·íÒãˌʹÒÁáÁ‹àËÅç¡ä¿¿‡Ò·Õàè ¡Ô´¢Ö¹é ËѡŌҧ¡Ñ¹ äÁ‹ á¾Ã‹ÍÍ¡ÁÒÀÒ¹͡

2.9 ¡Ãкǹ¡ÒáíÒ˹´¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ àÁ×Íè àÃÔÁè ¡Ò÷íÒ§Ò¹¢Í§ USB ËÃ×ÍàÁ×Íè ÁÕ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³µÇÑ ãËÁ‹à¢ŒÒÁÒã¹Ãкº ÅíҴѺ¢Ñ¹é µÍ¹ã¹¡Òà ·íҧҹ໚¹´Ñ§¹Õé 1. ÎѺµÃǨÊͺ¾ºÇ‹ÒÁÕ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³µÇÑ ãËÁ‹à¢ŒÒÊÙË кº áŌÇᨌ§ä»ÂѧâÎʵ¤Í¹â·ÃÅàÅÍÏ 2. âÎʵ¤Í¹â·ÃÅàÅÍÏÊÑè§ãˌÎѺແ´¡Ò÷íÒ§Ò¹¢Í§áËŋ§¨‹ÒÂä¿ã¹âËÁ´»ÃÐËÂÑ´ à¾×èÍãˌ ÍØ»¡Ã³·ÕèÍÒÈѾÅѧ§Ò¹¨Ò¡ºÑÊÊÒÁÒö·íҧҹ䴌 àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ '


3. âÎʵ¤Í¹â·ÃÅàÅÍÏʧÑè ãËŒÎºÑ ÃÕ૵¾Íϵ·ÕÍè »Ø ¡Ã³µÇÑ ãËÁ‹ÁÒàª×Íè Áµ‹Íà¾×Íè ãˌµÇÑ ÍØ»¡Ã³ÃàÕ «µ ¤‹ÒáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ¢Í§µÑÇàͧãˌ໚¹¤‹ÒàÃÔÁè µŒ¹ (default) 4. âÎʵÍҋ ¹´ÔʤÃÔ»àµÍϵҋ §æ ¨Ò¡µÑÇÍØ»¡Ã³áÅоԨÒóÒNjҷÃѾÂҡâͧÃкº¾Íà¾Õ§µ‹Í ¤ÇÒÁµŒÍ§¡ÒâͧµÑÇÍØ»¡Ã³ËÃ×ÍäÁ‹ ·ÃѾÂÒ¡Ãã¹·Õ¹è ¤Õé Í× ¾Åѧ§Ò¹ä¿¿‡ÒáÅлÃÔÁÒ³¢ŒÍÁÙÅ·Õ¨è Ðʋ§¢Í§µÑÇÍØ»¡Ã³ ËÒ¡¾Ô¨ÒóÒáŌÇNjÒäÁ‹ÊÒÁÒö·íҧҹ䴌¡ç¨ÐÊÑè§ãˌÎѺ»´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¹Ñé¹ 5. àÁ×Íè âÎʵ¾¨Ô ÒóÒáŌÇNjÒÊÒÁÒöãˌºÃÔ¡ÒÃá¡‹Í»Ø ¡Ã³µÇÑ ·ÕÁè Òàª×Íè Áµ‹Í䴌 ¨Ð¤Çº¤ØÁãˌáËŋ§ ¨‹ÒÂ俨‹Ò¾Åѧ§Ò¹µÒÁ·ÕÍè »Ø ¡Ã³µÍŒ §¡Òà ÃÇÁ件֧¡ÒÃµÑ§é ¤‹ÒáÍ´à´ÃÊáÅСíÒ˹´¤‹Òµ‹Ò§æ 6. ËÅѧ¨Ò¡µÑ駤‹ÒàÃÕºÌÍ ¤ÍÁ¾ÔÇàµÍÏ¡ç¨ÐÃٌ¨Ñ¡¡ÑºÍØ»¡Ã³µÑÇãËÁ‹áÅÐÊÒÁÒöµÔ´µ‹Í¡Ñº ÍØ»¡Ã³ä´Œ·Ñ¹·Õâ´ÂäÁ‹µŒÍ§»´áÅÐແ´¤ÍÁ¾ÔÇàµÍÏãËÁ‹

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 


º··Õè 3

ÊÒÂàª×Íè Áµ‹ÍáÅФ͹à¹ç¡àµÍϢͧ¾Íϵ USB ¾Íϵ USB ¶Ù¡Í͡ẺÁÒÊíÒËÃѺ¶‹Ò·ʹ¢ŒÍÁÙÅÃÐËNjҧÍØ»¡Ã³µÒ‹ §æ ¡Ñº¤ÍÁ¾ÔÇàµÍÏ«§Öè ÍÒÈÑÂÊÒ ¹íÒÊÑ­­Ò³à»š¹µÑÇ¡ÅÒ§ áÅÐà¹×èͧ¨Ò¡¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹÊÑ­­Ò³¢ŒÍÁÙÅ·ÕèÊÙ§»ÃСͺ¡Ñº¤ÇÒÁÊÒÁÒö·Õè ¨Ðµ‹ÍËÃ×ͻŴÍØ»¡Ã³µÒ‹ §æ 䴌â´ÂäÁ‹µÍŒ §»´à¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏ ·íÒãˌµÍŒ §ÁÕ¡ÒáíÒ˹´¤Ø³ÊÁºÑµ¢Ô ͧÊÒ¹íÒ ÊÑ­­Ò³áÅФ͹à¹ç¡àµÍÏàª×Íè Áµ‹Í à¾×Íè ãˌÊÒÁÒöÃͧÃѺ¡Ò÷íÒ§Ò¹´Ñ§¡Å‹ÒÇ䴌

3.1 ¤Í¹à¹ç¡àµÍÏ USB ÊÒÂàª×Íè Áµ‹Í USB ¶Ù¡Í͡ẺÁÒÊíÒËÃѺ¡ÒÃàª×Íè Áµ‹ÍÃÐËNjҧµÑÇÍØ»¡Ã³ USB ¡ÑºÎѺ «Ö§è ÍÒ¨¨Ð໚¹ÃÙµÎѺ «Ö§è ÍÂÙˋ Åѧà¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏ ÎѺ·ÕÃè ÇÁÍÂÙ㋠¹µÑÇÍØ»¡Ã³ (compound device) ËÃ×ÍÎѺ·Õàè »š¹µÑÇà´ÕÂè Çæ (USB hub) ÍØ»¡Ã³ËÅÒª¹Ô´ÁÕÊÒµ‹Í´ŒÒ¹ÍØ»¡Ã³änjÍ‹ҧ¶ÒÇôŒÒ¹Ë¹Ö§è áÅÐÁդ͹à¹ç¡àµÍϵÇÑ ¼ÙäŒ ÇŒÊÒí ËÃѺµ‹ÍࢌҡѺÎѺÍÕ¡´ŒÒ¹ ˹֧è ᵋÁÍÕ »Ø ¡Ã³Í¡Õ ËÅÒª¹Ô´·Õäè Á‹ÁÊÕ Òµ‹Í¶ÒÇÃänj â´Â·Õµè ÇÑ ÍØ»¡Ã³¨ÐÁդ͹à¹ç¡àµÍÏ USB µÑÇàÁÕÂänjà¾×Íè 㪌§Ò¹ ¡ÑºÊÒ USB ·ÕÁè ËÕ ÇÑ ¤Í¹à¹ç¡àµÍÏ·§Ñé Êͧ´ŒÒ¹ ¨Ò¡ÍØ»¡Ã³·äÕè Á‹ÁÊÕ Ò¶ÒÇõ‹Íänj µŒÍ§ãªŒÊÒÂàª×Íè Áµ‹Í«Ö§è Áդ͹à¹ç¡àµÍÏ ·Ñé§Êͧ´ŒÒ¹ «Ö觶ŒÒ㪌¤Í¹à¹ç¡àµÍÏẺà´ÕÂǡѹ·Ñé§ËÁ´ÍÒ¨¨Ð·íÒãˌ¼ÙŒãªŒ¹íҤ͹à¹ç¡àµÍÏ´ŒÒ¹Ë¹Ö觵‹ÍࢌҡѺ ÎѺ¾Íϵ˹֧è áŌǵ‹Í»ÅÒÂÍÕ¡¢ŒÒ§à¢ŒÒ¡ÑºÎѺÍÕ¡¾Íϵ˹֧è 䴌 (à¾ÃÒÐÎѺ¨ÐÁÕ¾ÍϵÍÂÙˋ ÅÒ¾Íϵ) à¾×Íè »‡Í§¡Ñ¹ à˵ءÒóàª‹¹¹Õ¨é §Ö ÁÕ¡ÒáíÒ˹´Áҵðҹ¢Í§¤Í¹à¹ç¡àµÍÏ USB ãˌÁÕ 2 ÃٻẺ ´Ñ§¹Õé 1. ¤Í¹à¹ç¡àµÍÏ͹ءÃÁ A ໚¹¤Í¹à¹ç¡àµÍϴҌ ¹ÎѺ·Õàè ª×Íè Áµ‹ÍÃÐËNjҧ USB ¾Íϵ¢Í§ÎѺ (·Ñ§é ÃÙ·ÎѺáÅÐ USB ÎѺ·ÑÇè ä») ¡ÑºÊÒÂàª×Íè Áµ‹Í¨Ò¡µÑÇÍØ»¡Ã³ ¹Ñ¹è ¤×ͤ͹à¹ç¡àµÍϵÇÑ àÁÕ¨еԴµÑ§é ÍÂÙ¡‹ ºÑ ÎѺ áÅФ͹à¹ç¡àµÍϵÇÑ ¼Ù¨Œ еԴÍÂÙ¡‹ ºÑ ÊÒ·յè ͋ ÍÍ¡ÁÒ¨Ò¡µÑÇÍØ»¡Ã³ ´Ñ§ã¹ÃÙ»·Õè 3-1 2. ¤Í¹à¹ç¡àµÍÏ͹ءÃÁ B ໚¹¤Í¹à¹ç¡àµÍϴҌ ¹ÍØ»¡Ã³·àÕè ª×Íè Áµ‹ÍÊÒÂࢌҡѺµÑÇÍØ»¡Ã³ USB ¹Ñ¹è ¤×ͤ͹à¹ç¡àµÍϵÇÑ àÁÕ¨еԴµÑ§é ÍÂÙ㋠¹µÑÇÍØ»¡Ã³ USB ʋǹ¤Í¹à¹ç¡àµÍϵÇÑ ¼Ù¡Œ ¨ç ÐÍÂÙ·‹ ÊÕè Ò·յè ͋ ÍÍ¡ÁÒ¨Ò¡ÎѺ (¶ŒÒÍØ»¡Ã³ÁÊÕ Òµ‹ÍÍÍ¡ÁÒÍ‹ҧ¶ÒÇèÐäÁ‹Á¡Õ ÒÃ㪌¤Í¹à¹ç¤àµÍÏẺ¹Õ)é ÁÕû٠ËҧáÊ´§ã¹ÃÙ»·Õè 3-2

ÃÙ»·Õè 3-1 ÃٻËҧáÅТ¹Ò´¢Í§¤Í¹à¹ç¡àµÍÏ ÃÙ»·Õè 3-2 ÃٻËҧáÅТ¹Ò´¢Í§¤Í¹à¹ç¡àµÍÏ USB ã¹Í¹Ø¡ÃÁ A USB ã¹Í¹Ø¡ÃÁ B àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 


¤Í¹à¹ç¡àµÍÏ͹ءÃÁ A µ‹ÍࢌҡѺÎѺ

¤Í¹à¹ç¡àµÍÏ͹ءÃÁ B µ‹ÍࢌҡѺÍØ»¡Ã³

ÃÙ»·Õè 3-3 áÊ´§µÑÇÍ‹ҧÊÒÂÊÑ­­Ò³·Õãè ªŒàª×Íè Áµ‹Í¾Íϵ USB ã¹ÃÙ»·Õè 3-3 áÊ´§¡ÒÃ㪌§Ò¹ÊÒ USB ·Õãè ªŒ¤Í¹à¹ç¡àµÍÏ·§Ñé ÊͧÃٻẺ Í‹ҧäáçµÒÁ à¹×Íè §¨Ò¡ã¹»˜¨¨Øº¹Ñ (ÃÇÁ¶Ö§á¹Ç⹌Áã¹Í¹Ò¤µ) ÍØ»¡Ã³à¤Ã×Íè §ãªŒµÒ‹ §æ ÁÕ¢¹Ò´àÅç¡Å§ ÁÒ¡·íÒãˌà¡Ô´¢ŒÍ¨íÒ¡Ñ´ã¹àÃ×Íè §¢¹Ò´¤Í¹à¹ç¡àµÍϺ¹µÑÇÍØ»¡Ã³ ᵋ¨Ò¡ÃÙ»·Õè 3-2 ¨ÐàËç¹ä´ŒÇҋ ¢¹Ò´¢Í§¤Í¹ à¹ç¡àµÍϹ¹Ñé ãË­‹¾ÍÊÁ¤Çà ·Ò§ºÃÔÉ·Ñ ·Õ¼è ÅÔµÍØ»¡Ã³µÒ‹ §æ ¨Ö§ÁÕ¡ÒÃÅ´¢¹Ò´¢Í§¤Í¹à¹ç¡àµÍÏŧà¾×Íè ãˌÊÒÁÒö 㪌§Ò¹¡ÑºÍØ»¡Ã³¢Í§µÑÇàͧ䴌â´ÂÂѧ¤§ÃٻËҧänj´§Ñ à´ÔÁᵋŴÊѴʋǹ¤ÇÒÁ¡ÇŒÒ§-ÂÒÇŧ ´Ñ§¨ÐàËç¹ä´Œ¨Ò¡¡ÅŒÍ§ ´Ô¨µÔ ÍÅ à¤Ã×Íè §àŋ¹ MP3 Ẻ¾¡¾Ò à¤Ã×Íè §àŋ¹ÁÔ¹´Ô ÊÔ ¡ ໚¹µŒ¹

3.2 àÃ×Íè §äÁ‹ÅºÑ ¢Í§Ë¹ŒÒÊÑÁ¼Ñʤ͹à¹ç¡àµÍÏ USB ¶Ö§áÁŒ¨ÐÁÕ¡ÒÃẋ§¤Í¹à¹ç¡àµÍÏÍ͡໚¹ 2 Ẻ ᵋ·§Ñé ÊͧÃٻẺ¹Ñ¹é 㪌ÊÒ¹íÒÊÑ­­Ò³àËÁ×͹¡Ñ¹ â´Â 㪌ÊÒ 2 àʌ¹ã¹¡ÒÃʋ§ä¿àÅÕÂé §ãËŒá¡‹Í»Ø ¡Ã³ áÅÐÊÒÂÍÕ¡ 2 àʌ¹ÊíÒËÃѺÃѺáÅÐʋ§¢ŒÍÁÙŠᵋà¹×Íè §¨Ò¡Ãкº USB ¹Ñ¹é Í͡ẺÁÒà¾×Íè ãˌÊÒÁÒöàª×Íè Áµ‹ÍËÃ×ͻŴÍØ»¡Ã³ÍÍ¡¨Ò¡Ãкºä´Œã¹ÃÐËNjҧ¡ÒÃ㪌§Ò¹ ´Ñ§¹Ñ¹é ˹ŒÒÊÑÁ¼Ñʢͧ ¤Í¹à¹ç¡àµÍϨ§Ö ÁÕ¡ÒÃÍ͡ẺãˌÁ¤Õ ÇÒÁ¾ÔàÈÉà¾×Íè ãˌÃͧÃѺ¤Ø³ÊÁºÑµ´Ô §Ñ ¡Å‹ÒÇ䴌 ¹Ñ¹è ¤×Í˹ŒÒÊÑÁ¼ÑʢͧÊÒ 2 àʌ¹·Õãè ªŒÊ§‹ ä¿àÅÕÂé §¨ÐÂ×¹è ÍÍ¡ÁÒÂÒǡNjÒ˹ŒÒÊÑÁ¼ÑÊ·Õãè ªŒÃºÑ ʋ§¢ŒÍÁÙÅ (˹ŒÒÊÑÁ¼ÑÊÊíÒËÃѺä¿àÅÕÂé §ÂÒÇ 7.41 ÁÔÅÅÔàÁµÃ ˹ŒÒÊÑÁ¼ÑÊÊíÒËÃѺÃѺʋ§¢ŒÍÁÙÅÂÒÇ 6.41ÁÔÅÅÔàÁµÃ) ¡ÒÃÍ͡Ẻ¤Í¹à¹ç¡àµÍÏઋ¹¹Õ¨é зíÒãˌµÇÑ ÍØ»¡Ã³ä´ŒÃºÑ ä¿àÅÕÂé § ¡‹Í¹·Õ¨è Ðä´ŒÃºÑ ÊÑ­­Ò³¢ŒÍÁÙÅàÁ×Íè àª×Íè Áµ‹ÍÍØ»¡Ã³µÇÑ ãËÁ‹à¢ŒÒã¹Ãкº ·íÒãËŒÍ»Ø ¡Ã³·àÕè ª×Íè Áµ‹ÍࢌÒä»ãËÁ‹ÊÒÁÒö·íÒ §Ò¹ä´Œ·¹Ñ ·Õâ´ÂäÁ‹ä´ŒÃºÑ ¤ÇÒÁàÊÕÂËÒ à¾ÃÒжŒÒËÒ¡ÍØ»¡Ã³ä´ŒÃºÑ ÊÑ­­Ò³¢ŒÍÁÙÅ¡‹Í¹·Õäè ´ŒÃºÑ ä¿àÅÕÂé §¨Ðà¡Ô´¤ÇÒÁàÊÕ ËÒÂᡋäÍ«Õ·ÍÕè ÂÙÀ‹ ÒÂã¹ä´Œ ¢Ò¢Í§¤Í¹à¹ç¡àµÍÏᵋÅеÑÇ·íÒ˹ŒÒ·Õµè ÒÁ·Õáè Ê´§ã¹µÒÃÒ§·Õè 3-1

3.3 ÊÒ¹íÒÊÑ­­Ò³ USB ¡Òö‹Ò·ʹ¢ŒÍÁÙÅÀÒÂã¹ÊÒ USB ¹Ñ¹é ÁÕ¤ÇÒÁàÃçÇÊÙ§ã¹ÃдѺ 1Mb/s ¶Ö§ 12 Mb/s ¡Òö‹Ò·ʹ¢ŒÍÁÙÅ ·Õè¤ÇÒÁàÃçÇÊÙ§¢¹Ò´¹Õé¨Ðà¡Ô´¡ÒÃá¾Ã‹¡ÃШÒÂʹÒÁáÁ‹àËÅç¡ä¿¿‡ÒÍÍ¡ÁÒ¨Ò¡ÊÒÂʋ§ ·íÒãˌµŒÍ§ÁÕ¡ÒáíÒ˹´ ¤Ø³ÊÁºÑµ¢Ô ͧÊÒÂʋ§ã¹ËÅÒÂæ ´ŒÒ¹à¾×Íè äÁ‹ãˌà¡Ô´¡ÒÃá¾Ã‹¡ÃШÒ¢ͧʹÒÁáÁ‹àËÅç¡ä¿¿‡ÒàËŋҹÕé áÅÐà¹×Íè §¨Ò¡ USB ÁÕ¡ÒÃẋ§¤ÇÒÁàÃçǢͧ¡Òö‹Ò·ʹ¢ŒÍÁÙÅÍ͡໚¹ 2 ÃдѺ¤×Í áºº¤ÇÒÁàÃçÇàµçÁ·Õè (full speed) ·ÕÁè ÍÕ µÑ ÃÒàÃçÇ 12Mb/s áÅÐẺ¤ÇÒÁàÃçǵèÒí (low speed) ·ÕÁè ÍÕ µÑ ÃÒàÃçÇ 1.5 Mb/s ·íÒãˌ¤³ Ø ÊÁºÑµ¢Ô ͧÊÒ¹íÒÊÑ­­Ò³¢Í§ ÍØ»¡Ã³áµ‹ÅЪ¹Ô´¨Ð¶Ù¡¡íÒ˹´á¡ᵡµ‹Ò§¡Ñ¹ä» àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹


ËÁÒÂàÅ¢ ¢ÒÊÑ­­Ò³

ª×Íè ¢ÒÊÑ­­Ò³

ÊբͧÊÒÂÊÑ­­Ò³

1 2 3 4

ä¿àÅÕÂé § +5V D- (¢ŒÍÁÙÅź) D+ (¢ŒÍÁÙźǡ) ¡ÃÒÇ´

á´§ ¢ÒÇ à¢ÕÂÇ ´íÒ

µÒÃÒ§·Õè 3-1 ˹ŒÒ·Õ¢è ͧ¢Ò¤Í¹à¹ç¡àµÍÏᵋÅТÒ

3.3.1 ÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁàÃçǵèÒí ¨Ò¡ÃÙ»·Õè 3-4 áÊ´§ãˌàËç¹ÀҾ˹ŒÒµÑ´¢Í§ÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁàÃçǵèÒí ªÑ¹é ¹Í¡ÊØ´¢Í§ÊÒÂÊÑ­­Ò³¨Ð ໚¹©¹Ç¹ËØÁŒ ¸ÃÃÁ´Ò ÀÒÂã¹ÁÕÊÒÂÊÑ­­Ò³¨ÐÁÕÊÒµÑǹíÒ 4 àʌ¹â´Â 2 àʌ¹ãªŒÊ§‹ ä¿àÅÕÂé §¡íÒ˹´ãˌ㪌ÅÇ´·Í§ á´§àºÍÏ 20-28 AWG äÁ‹µàÕ ¡ÅÕÂÇ Ê‹Ç¹ÊÒÂÍÕ¡ 2 àʌ¹ãªŒ¶Ò‹ ·ʹ¢ŒÍÁÙÅ ¡íÒ˹´ãˌ㪌ÅÇ´·Í§á´§àºÍÏ 28 AWG äÁ‹µàÕ ¡ÅÕÂÇ ÊÒÂʋ§¢ŒÍÁÙŤÇÒÁàÃçǵèÒí ¹Õäé Á‹¨Òí ໚¹µŒÍ§ªÕÅ´ ¤ÇÒÁÂÒǷѧé ËÁ´¢Í§ÊÒÂäÁ‹à¡Ô¹ 3 àÁµÃ

3.3.2 ÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁàÃçÇÊÙ§ ¢ŒÍ¡íÒ˹´¢Í§ÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁàÃçÇÊÙ§¢Í§ USB ¨ÐÁÕÁÒ¡¡Ç‹ÒÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁàÃçǵèÒí ÍÂÙˋ ÅÒÂæ ´ŒÒ¹ ÊÒ 2 àʌ¹·Õãè ªŒ¶Ò‹ ·ʹ¢ŒÍÁÙÅ¡íÒ˹´ãˌ㪌ÅÇ´·Í§á´§àºÍÏ 28 AWG ઋ¹à´ÕÂǡѺÊÒ¹íÒÊÑ­­Ò³¤ÇÒÁ àÃçǵèÒí ᵋÊÒ 2 àʌ¹¹Õ¨é еŒÍ§µÕà¡ÅÕÂÇ áÅÐªÑ¹é ¹Í¡ÊØ´¢Í§ÊÒÂÊÑ­­Ò³¶Ñ´¨Ò¡©¹Ç¹¨ÐµŒÍ§¶Ù¡ËØÁŒ ´ŒÇÂÍÅÙÁàÔ ¹ÕÂÁ ¿ÍÂŏ ´Ñ§ã¹ÃÙ»·Õè 3-5 ¤ÇÒÁÂÒǢͧÊÒÂÊÑ­­Ò³äÁ‹à¡Ô¹ 5 àÁµÃ ¨ÐµŒÍ§Áդҋ ˹‹Ç§àÇÅÒÊÑ­­Ò³ (propagation delay) äÁ‹à¡Ô¹ 30 ¹Òâ¹ÇÔ¹Ò·ÕµÅÍ´¤ÇÒÁÂÒÇÊÒ 5 àÁµÃ ᵋ¶ÒŒ ¤‹Ò˹‹Ç§àÇÅÒÁÒ¡¡Ç‹Ò 30 ¹Òâ¹ÇÔ¹Ò·Õ ¤‹Ò¤ÇÒÁ ÂÒÇÊÙ§ÊØ´¢Í§ÊÒÂÊÑ­­Ò³¡ç¨ÐŴŧ໚¹ÊѴʋǹ´Ñ§ã¹µÒÃÒ§·Õè 3-2 ©¹Ç¹Ë،Á¾ÕÇÕ«Õ

©¹Ç¹ËØÁŒ ¾ÕÇ«Õ Õ ¤Ùʋ ÒÂä¿àÅÕÂé § äÁ‹µàÕ ¡ÅÕÂÇ ¤Ùʋ ÒÂÊÑ­­Ò³ äÁ‹µàÕ ¡ÅÕÂÇ

¤Ù‹ÊÒÂä¿àÅÕé§ äÁ‹µÕà¡ÅÕÂÇ ¤Ù‹ÊÒÂÊÑ­­Ò³ µÕà¡ÅÕÂÇ

´ŒÒ¹ã¹¢Í§ÊÒ äÁ‹µÍŒ §ªÕÅ´

Ë،Á´ŒÒ¹ã¹ÊÒ´ŒÇ Aluminum metalized polyester

ÃÙ»·Õè 3-4 â¤Ã§ÊÌҧÀÒÂ㹢ͧÊÒ USB ÃÙ»·Õè 3-5 â¤Ã§ÊÌҧÀÒÂ㹢ͧÊÒ USB Ẻ¤ÇÒÁàÃçǵèÒí Ẻ¤ÇÒÁàÃçÇàµçÁ·Õè

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !


¤‹ÒÍѵÃÒ¡ÒÃ˹‹Ç§àÇÅҢͧÊÒ USB

ÊբͧÊÒÂÊÑ­­Ò³

9.0 ¹Òâ¹ÇÔ¹Ò·Õµ‹ÍàÁµÃ 8.0 ¹Òâ¹ÇÔ¹Ò·Õµ‹ÍàÁµÃ 7.0 ¹Òâ¹ÇÔ¹Ò·Õµ‹ÍàÁµÃ

3.3 àÁµÃ 3.7 àÁµÃ 4.3 àÁµÃ

6.5 ¹Òâ¹ÇÔ¹Ò·Õµ‹ÍàÁµÃ

4.6 àÁµÃ

µÒÃÒ§·Õè 3-2 áÊ´§ÍѵÃÒ¡ÒÃ˹‹Ç§àÇÅҢͧÊÒ USB àÁ×Íè à·Õº¡Ñº¤ÇÒÁÂÒǢͧÊÒÂÊÑ­­Ò³

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "


º··Õè 4

ÊÑ­­Ò³µ‹Ò§æ ã¹Ãкº¢Í§¾Íϵ USB à¹×Íè §¨Ò¡¡Òö‹Ò·ʹ¢ŒÍÁÙÅ㹺ÑÊ USB à¡Ô´¢Ö¹é ´ŒÇ¤ÇÒÁàÃçÇÊÙ§ ·íÒãˌµÍŒ §¹íÒà·¤¹Ô¤¡Òö‹Ò·ʹÊÑ­­Ò³ ÃٻẺµ‹Ò§æ ÁÒ㪌§Ò¹à¾×Íè ãˌ¢ÍŒ ÁÙÅʋ§ä»Âѧ»ÅÒ·ҧ䴌¶¡Ù µŒÍ§ ¡Òö‹Ò·ʹÊÑ­­Ò³áºº¼Åµ‹Ò§à»š¹à·¤¹Ô¤·Õ¹è Òí ÁÒ㪌à¾×Íè Å´¤Å×¹è ú¡Ç¹·Õ¨è Ðá¾Ã‹ÍÍ¡ÁÒ¨Ò¡ÊÒ´ѧ·Õ¡è ŋÒÇä»áŌÇ㹺··Õè 3 ¹Í¡¨Ò¡¹Ñ¹é ÂѧµŒÍ§ÍÒÈÑ¡ÒÃࢌÒÃËÑÊ ¢ŒÍÁÙÅẺ NRZI à¾×Íè ãˌ´ÒŒ ¹ÃѺ·ÃÒº¶Ö§¨Ñ§ËÇТŒÍÁÙÅã¹áµ‹ÅкԵà¾×Íè äÁ‹ãˌà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´ áÅÐÊÒÁÒöµÃǨ Êͺ¡ÒÃàª×Íè Áµ‹ÍËÃ×ͻŴÍÍ¡¢Í§ÍØ»¡Ã³ã¹ºÑÊ ¨Ö§µŒÍ§ÁÕ¡ÒáíÒ˹´ÃٻẺ¢Í§ÊÑ­­Ò³µ‹Ò§æ à¾×Íè 㪌§Ò¹¢Ö¹é

4.1 ¡ÒõÃǨÊͺ¡ÒÃàª×Íè Áµ‹ÍáÅФÇÒÁàÃçǢͧÍØ»¡Ã³ ¤Ø³ÊÁºÑµàÔ ´‹¹¢ŒÍË¹Ö§è ¢Í§ USB ¤×Í ÊÒÁÒöµÃǨÊͺ¡ÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³µÇÑ ãËÁ‹áÅÐµÑ§é ¤‹ÒàÃÔÁè µŒ¹·Õ¨è Òí ໚¹ä´ŒÍµÑ â¹ÁÑµÔ áµ‹à¹×Íè §¨Ò¡ÍØ»¡Ã³ USB ẋ§Í͡໚¹ÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§áÅеèÒí ¶ŒÒʋ§¢ŒÍÁÙżԴ¤ÇÒÁ àÃçÇ¡ç¨ÐäÁ‹ÊÒÁÒöÊ×Íè ÊÒáѺÍØ»¡Ã³¹¹Ñé æ 䴌 ¹Ñ¹è ËÁÒ¤ÇÒÁNjҨеŒÍ§ÁÕÊ­ Ñ ­Ò³ÃٻẺ¾ÔàÈÉ·Õãè ªŒá¨Œ§Ê¶Ò¹Ð ¡ÒÃàª×Íè Áµ‹ÍËÃ×ͻŴÍÍ¡ÃÇÁ¶Ö§ÃкؤÇÒÁàÃçǢͧÍØ»¡Ã³¹¹Ñé æ 䴌´ÇŒ  ¡ÒõÃǨÊͺ¡ÒÃàª×èÍÁµ‹Í¢Í§ USB ¹Ñ鹨еÃǨÊͺ¨Ò¡¡ÒÃà»ÅÕè¹á»Å§¢Í§ÃдѺÊÑ­­Ò³ã¹ÊÒ ÊÑ­­Ò³ D- áÅÐ D+ â´ÂÊÒ¢ŒÍÁÙŷѧé Êͧ·Õ´è Ҍ ¹ÎѺ¨Ð¶Ù¡µ‹Í´ŒÇµÑǵŒÒ¹·Ò¹ 15kW ¾ÙÅ´Òǹänj·Ñé§Êͧàʌ¹ (¡ÒþÙÅ´Òǹ (pull-down) : ໚¹¡Òõ‹Í¢Ò¢ŒÒ§Ë¹Ö§è ¢Í§ÍØ»¡Ã³à¢ŒÒ¡ÑºÊÒÂÊÑ­­Ò³ ÍÕ¡¢ŒÒ§Ë¹Ö§è µ‹Í¡ÃÒÇ´¢Í§ Ãкº) «Ö§è ¨Ðʋ§¼ÅãˌÊÒÂÊÑ­­Ò³·Ñ§é ÊͧÁÕÃдѺáç´Ñ¹à»š¹ 0V ã¹¢³Ð·Õäè Á‹ÁÍÕ »Ø ¡Ã³ã´æ µ‹ÍÍÂً ·Õ´è Ҍ ¹ÍØ»¡Ã³ ÊíÒËÃѺÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ÊÒÂÊÑ­­Ò³ D- ¨Ðµ‹ÍµÑǵŒÒ¹·Ò¹ 1.5kW ¾ÙÅÍÑ»¡Ñºáç´Ñ¹ 3.0-3.6V (¡ÒþÙÅÍÑ» (pull-up) : ໚¹¡Òõ‹Í¢Ò¢ŒÒ§Ë¹Ö§è ¢Í§ÍØ»¡Ã³à¢ŒÒ¡ÑºÊÒÂÊÑ­­Ò³ ÍÕ¡¢ŒÒ§Ë¹Ö§è µ‹Íä¿àÅÕÂé § ·íÒãËŒÊ¶Ò¹Ð·Õ¨è ´Ø ¹Ñ¹é à¡Ô´à»š¹Åͨԡ “1”) ʋǹÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ ÊÒÂÊÑ­­Ò³·Õ¶è ¡Ù ¾ÙÅÍÑ»¤×Í ÊÒÂÊÑ­­Ò³ D+ àÁ×Íè ÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹¶¡Ù µ‹ÍࢌҡѺÎѺ¨Ðà¡Ô´¡ÒÃẋ§áç´Ñ¹¨Ò¡µÑǵŒÒ¹·Ò¹ÊͧµÑÇ¡ç¤Í× µÑǵŒÒ¹·Ò¹ 1.5kW ·Õè¾ÙÅÍÑ»·Ò§ÍØ»¡Ã³áÅеÑǵŒÒ¹·Ò¹ 15kΩ ·Õè¾ÙÅ´ÒǹÍÂً·Ò§ÎѺ ·íÒãˌáç´Ñ¹¢Í§ÊÒÂÊÑ­­Ò³à¾ÔèÁ¨Ò¡ 0V ¢Ö¹é ä»·Õè 90% ¢Í§ä¿àÅÕÂé §·Õ¾è ÅÙ ÍÑ» ¤íҹdz䴌¨Ò¡ 15 × 10 3

(1.5 + 15 )× 103 × Vcc ) ¡ÒÃà»ÅÕÂè ¹áç´Ñ¹¹Õ¨é зíÒãËŒÎºÑ ÃÙnj ҋ ÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹µÍ‹ ࢌҡѺÃкº áÅШзíÒãˌÃÇٌ ҋ ÍØ»¡Ã³¶¡Ù »Å´ÍÍ¡ ¨Ò¡Ãкºàª‹¹à´ÕÂǡѹ â´Â¶ŒÒÊÑ­­Ò³·Õàè ¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§áç´Ñ¹¹Õàé »š¹ÊÑ­­Ò³ D- ËÁÒ¤ÇÒÁNjÒÍØ»¡Ã³·Õè ¹íÒÁÒµ‹Í໚¹ÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ᵋ¶ÒŒ ÊÑ­­Ò³ D+ à»ÅÕÂè ¹á»Å§áç´Ñ¹ËÁÒ¤ÇÒÁNjÒÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§¶Ù¡ ¹íÒÁÒµ‹ÍࢌҡѺÃкº´Ñ§ÃÙ»·Õè 4-1

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #


+3.0-3.6V +5V

âÎʵËÃ×ÍÎѺ

1.5k

D+ DGND

D+

ÊÒÂ USB

D-

ÍØ»¡Ã³ ¤ÇÒÁàÃçÇÊÙ§

15k

15k

+3.0-3.6V +5V

âÎʵËÃ×ÍÎѺ

1.5k

D+

ÊÒÂ USB

DGND

D+ D-

ÍØ»¡Ã³ ¤ÇÒÁàÃçǵíÒè

15k

15k

ÃÙ»·Õè 4-1 ¡ÒõÃǨÊͺ¡ÒÃàª×Íè Áµ‹Í¢Í§Ãкº USB ã¹ÃÙ»·Õè 4-2 áÊ´§ãˌàË繶֧ÃдѺáç´Ñ¹ã¹ÊÒÂÊÑ­­Ò³àÁ×Íè ÁÕ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³ãËÁ‹ áÅÐàÁ×Íè »Å´ ÍØ»¡Ã³ÍÍ¡¨Ò¡ºÑÊ ¶ŒÒáç´Ñ¹¢Í§ÊÑ­­Ò³ D- ËÃ×Í D+ µ¡Å§µèÒí ¡Ç‹Ò¤‹Ò VSE(min) ËÃ×Í 0.8 V໚¹àÇÅÒ¹Ò¹¡Ç‹Ò 2.5 äÁâ¤ÃÇÔ¹Ò·Õ ÎѺ¨Ð¶×ÍNjÒÍØ»¡Ã³ä´Œ¶¡Ù »Å´ÍÍ¡¨Ò¡ºÑÊ ã¹·Ò§¡ÅѺ¡Ñ¹àÁ×Íè áç´Ñ¹¢Í§ÊÑ­­Ò³ D- ËÃ×Í D+ à¾ÔÁè ¢Ö¹é ÊÙ§¡Ç‹Ò¤‹Ò VSE(max) ËÃ×Í 2.0 V ໚¹àÇÅÒ¹Ò¹¡Ç‹Ò 2.5 äÁâ¤ÃÇÔ¹Ò·Õ ¨Ð¶×ÍNjÒÁÕ¡Òõ‹ÍÍØ»¡Ã³µÇÑ ãËÁ‹ ࢌÒÁÒã¹Ãкº ¼Å¡ÒõÃǨÊͺ·Õäè ´ŒÎºÑ ¨Ðà¡çºänjã¹ÃÕ¨ÊÔ àµÍÏʶҹР«Ö§è âÎʵ¨Ð¤ÍÂÁÒ͋ҹ໚¹ÃÐÂÐæ à¾×Íè µÃǨ Êͺ¡ÒÃàª×èÍÁµ‹Í¢Í§ÍØ»¡Ã³

4.2 à·¤¹Ô¤¡ÒÃࢌÒÃËÑÊÊÑ­­Ò³ ¡ÒÃࢌÒÃËÑÊÊÑ­­Ò³¢ŒÍÁÙÅ¡‹Í¹¨Ðʋ§Í͡仹ѹé 㪌෤¹Ô¤ 2 Ẻ»ÃСͺ¡Ñ¹¤×Í ¡ÒÃࢌÒÃËÑÊẺ NRZI áÅСÒÃàµÔÁºÔµÊµÑ¿ (bit stuffing)

4.2.1 ¡ÒÃࢌÒÃËÑÊ NRZI ¡‹Í¹Ê‹§¢ŒÍÁÙÅä»ã¹ÊÒ ¢ŒÍÁÙŨеŒÍ§¶Ù¡à¢ŒÒÃËÑÊẺ NRZI (Non Return to Zero,Inverted) »ÃР⪹¢Í§¡ÒÃࢌÒÃËÑÊẺ¹Õ¤é Í× ÊÒÁÒöὧÊÑ­­Ò³¹Ò́¡Òʋ§ä»¡Ñº¢ŒÍÁÙÅ䴌 ·íÒãËŒÍ»Ø ¡Ã³»ÅÒ·ҧÊÒÁÒö «Ô§â¤Ã乫Ê­ Ñ ­Ò³¹Ò́¡Ò¢Í§µÑÇàͧãˌµÃ§¡ÑºÊÑ­­Ò³¹Ò́¡Ò¢Í§âÎʵä´Œ ·íÒãˌÊÒÁÒö͋ҹ¢ŒÍÁÙÅ·ÕÊè §‹ ÁÒ䴌 Í‹ҧ¶Ù¡µŒÍ§ ã¹ÃÙ»·Õè 4-3 áÊ´§ãˌàË繡ÒÃࢌÒÃËÑÊẺ NRZI ¢Í§¢ŒÍÁÙÅ ¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ÃдѺÊÑ­­Ò³¨Ò¡ÃдѺ Ê٧仵èÒí ËÃ×ͨҡÃдѺµèÒí ä»ÊÙ§¨Ð¶×Í໚¹¢ŒÍÁÙÅ “0” ᵋ¶ÒŒ äÁ‹à¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ÊÑ­­Ò³¨Ð¶×Í໚¹¢ŒÍÁÙÅ “1” ᵋ´ÇŒ ¡ÒÃࢌÒÃËÑÊÇÔ¸¹Õ Õé ËÒ¡¢ŒÍÁÙÅ·ÕÊè §‹ ໚¹ “1” àÃÕ§¡Ñ¹ËÅÒÂæ ºÔµ¡ç¨ÐäÁ‹à¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§ÃдѺáç ´Ñ¹ã¹ÊÒÂÊÑ­­Ò³àÅ ÍÒ¨·íÒãˌà¡Ô´¤ÇÒÁ¼Ô´¾ÅҴ㹡ÒÃʋ§¢ŒÍÁÙÅ䴌 ¨Ö§µŒÍ§ÁÕÍ¡Õ à·¤¹Ô¤Ë¹Ö§è 㹡ÒÃʋ§à¢ŒÒÁÒ ª‹Ç»‡Í§¡Ñ¹¡ç¤×Í¡ÒÃàµÔÁºÔµÊµÑ¿ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $


VOH (max)

3.6 Vdc

VOH (min)

2.8 Vdc

VSE (max)

2.0 Vdc

VSE (min)

0.8 Vdc

VOL (max)

0.3 Vdc

8SS

>2.5us

ÍØ»¡Ã³ »Å´ÍÍ¡¨Ò¡ºÑÊ VOH (max)

3.6 Vdc

VOH (min)

2.8 Vdc

VSE (max)

2.0 Vdc

D+

VSE (min)

0.8 Vdc D-

VOL (max)

0.3 Vdc

VSS

>2.5µs

ÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ àª×èÍÁµ‹Í¡ÑººÑÊ VOH (max)

3.6 Vdc

VOH (min)

2.8 Vdc

VSE (max)

2.0 Vdc

D-

VSE (min) VOL (max)

0.8 Vdc D+

0.3 Vdc

8SS

>2.5µs

ÍØ»¡Ã³¤ÇÒÁàÃçǵíÒè àª×èÍÁµ‹Í¡ÑººÑÊ

ÃÙ»·Õè 4-2 ÃдѺÊÑ­­Ò³ÀÒÂã¹ÊÒ D+,D- àÁ×Íè ÁÕ¡ÒÃàª×Íè Áµ‹ÍáÅлŴÍØ»¡Ã³

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %


Idle

0

1

0

0

0

1

1

0

1

1

0

0

0

1

0

¢ŒÍÁÙŠࢌÒÃËÑÊ NRZI

ÃÙ»·Õè 4-3 ¡ÒÃࢌÒÃËÑÊ NRZI

4.2.2 ¡ÒÃàµÔÁºÔµÊµÑ¿ (Bit Stuffing) ¡ÒÃàµÔÁºÔµÊµÑ¿¨Ðà¡Ô´¢Ö¹é àÁ×Íè ¢ŒÍÁÙÅ·Õ¨è Ðʋ§à»š¹ “1” µ‹Íà¹×Íè §¡Ñ¹ 6 ºÔµ ËÅѧ¨Ò¡¢ŒÍÁÙÅ “1” àÃÕ§¡Ñ¹ ¤Ãº 6 µÑǨÐà¡Ô´¡ÒÃàµÔÁ “0” “ ŧ㹢ŒÍÁÙÅ·Õ¨è Ðʋ§â´ÂÍѵâ¹ÁÑµÔ «Ö§è ºÔµ¢ŒÍÁÙÅ “0” ¹Õàé ÃÕÂ¡Ç‹Ò “ºÔµÊµÑ¿” ¶Ö§áÁŒ NjҺԵ¢ŒÍÁÙÅ·Õè 7 ¶Ñ´ä»¨Ð໚¹ “0” ¡ç处 ¤§à¡Ô´¡ÒÃàµÔÁºÔµÊµÑ¿¹Õ´é nj  ¡Ò÷íÒઋ¹¹Õ·é Òí ãˌ¡ÒÃʋ§¢ŒÍÁÙÅ·Õàè ¢ŒÒÃËÑÊ áºº NRZI à¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§Í‹ҧ¹ŒÍ·ءæ 7 ºÔµ¢ŒÍÁÙÅ àÁ×Íè ½˜§› ÃÑºä´ŒÃºÑ ¢ŒÍÁÙÅ “1” àÃÕ§¡Ñ¹ 6 ºÔµ¡ç¨ÐµÑ´ ¢ŒÍÁÙÅ “0” ·Õµè ÒÁÁÒ·Ô§é ä»·íÒãˌ¢ÍŒ ÁÙÅ·Õäè ´ŒÃºÑ ¶Ù¡µŒÍ§ ¨Ò¡ÃÙ»·Õè 4-4 ໚¹µÑÇÍ‹ҧ¢Í§¡ÒÃàµÔÁºÔµÊµÑ¿Å§ã¹¢ŒÍÁÙÅ â´Âá¶Çº¹ÊØ´¢Í§ÃÙ»áÊ´§ãˌàË繶֧¢ŒÍÁÙÅ ·Õ¨è Ðʋ§¨ÃÔ§æ ᵋà¹×Íè §¨Ò¡¢ŒÍÁÙÅ·Õ¨è Ðʋ§à»š¹¢ŒÍÁÙÅ “1” µÔ´¡Ñ¹¶Ö§ 8 µÑÇ ´Ñ§¹Ñ¹é ËÅѧ¨Ò¡Ê‹§¢ŒÍÁÙÅ “1” ·Õµè ´Ô ¡Ñ¹ 6 ºÔµàÊÃç¨áÅŒÇ ¨ÐÁÕ¡ÒÃàµÔÁ¢ŒÍÁÙÅ “0” ŧ㹢ŒÍÁÙÅËÅÑ¡ ´Ñ§ã¹ÃÙ»·Õè 4-4 (¢) à¾×Íè ãˌà¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§ÃдѺ ÊÑ­­Ò³¢Í§¡ÒÃࢌÒÃËÑÊẺ NRZI ´Ñ§ã¹ÃÙ»·Õè 4-4 (¤) áÅÐËÅѧ¨Ò¡¡ÒÃàµÔÁºÔµÊµÑ¿áÅŒÇ ¡ç¨Ðʋ§¢ŒÍÁÙÅËÅÑ¡·Õè ÍÂÙµ‹ ͋ ËÅѧä»àÃ×Íè Âæ ¨¹¤Ãº ã¹¢³Ð·Õ½è §˜› ʋ§ÁÕ¡ÒÃàµÔÁºÔµÊµÑ¿ ·Ò§½˜§› ÃѺ¡çµÍŒ §ÁÕ¡ÒõѴºÔµÊµÑ¿·Ô§é à¾×Íè ãËŒä´ŒÃºÑ ¢ŒÍÁÙÅ·Õ¶è ¡Ù µŒÍ§â´Â¡ÒõѴ¡ç¨ÐãªŒÇ¸Ô àÕ ´ÕÂǡѹ¡Ñº¡ÒÃá·Ã¡¤×ÍàÁ×Íè µÃǨ¾º¢ŒÍÁÙÅ “1” àÃÕ§µ‹Íà¹×Íè §¡Ñ¹¤Ãº 6 µÑǨРµÑ´¢ŒÍÁÙÅ “0” ·Õµè ÒÁËÅѧÁÒ·Ô§é â´ÂÍѵâ¹ÁÑµÔ áµ‹ËÒ¡¾ºÇ‹ÒËÅѧ¢ŒÍÁÙÅ “1” µÔ´¡Ñ¹ 6 ºÔµäÁ‹à»š¹ “0” ¡çáÊ´§Ç‹Ò à¡Ô´¤ÇÒÁ¼Ô´¾ÅҴ㹡ÒÃʋ§¢ŒÍÁÙÅà¡Ô´¢Ö¹é Idle

0

1

0

0

1

1

1

1

1

1

(¡) ¢ŒÍÁÙÅàÃÔèÁµŒ¹

1

1

0

0

1

ºÔµÊµÑ¿ 0

1

0

0

1

1

1

1

1

1

0

1

1

0

0

1

0

1

0

0

1

1

1

1

1

1

0

1

1

0

0

1

(¢) ¡ÒÃàµÔÁºÔµÊµÑ¿

(¤) ࢌÒÃËÑÊ NRZI

ÃÙ»·Õè 4-4 ¡ÒÃàµÔÁºÔµÊµÑ¿

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &


4.3 ¡ÒÃʋ§¢ŒÍÁÙÅã¹ÊÒÂÊÑ­­Ò³ ËÅѧ¨Ò¡¢ŒÍÁÙŶ١ࢌÒÃËÑÊàÃÕºÌÍÂáÅŒÇ ¢ŒÍÁÙÅàËÅ‹Ò¹Ñ¹é ¡ç¨Ð¶Ù¡Ê‹§ÍÍ¡ä»ÂѧÍØ»¡Ã³µÒ‹ §æ ·Õµè ͋ ÍÂÙ¡‹ ºÑ ÎѺ ᵋà¹×Íè §¨Ò¡ USB ʋ§¢ŒÍÁÙÅ´ŒÇ¤ÇÒÁàÃçÇ·ÕÊè §Ù ÁÒ¡ â´Â㪌ÊÒÂÊÑ­­Ò³·ÕÂè ÒÇ (àÁ×Íè à·Õº¡ÑºÊÒÂÊÑ­­Ò³¢ŒÍÁÙÅ ÀÒÂ㹤ÍÁ¾ÔÇàµÍÏ) ·íÒãˌäÁ‹ÊÒÁÒö㪌¡ÒÃʋ§ÊÑ­­Ò³áºº¢ÑÇé à´ÕÂÇ (single end) 䴌à¾ÃÒШзíÒãˌà¡Ô´¡Òà á¾Ã‹¡ÃШÒ¢ͧ¤Å×è¹áÁ‹àËÅç¡ä¿¿‡Ò仡ǹÍØ»¡Ã³Í×è¹æ áÅÐÂѧ·íÒãˌÊÑ­­Ò³Ãº¡Ç¹¨Ò¡ÀÒ¹͡ࢌÒ仡ǹ ¢ŒÍÁÙÅ·Õ赌ͧ¡ÒÃʋ§ã¹ÊÒÂÊÑ­­Ò³ä´Œ§‹Ò ¡ÒÃʋ§ÊÑ­­Ò³·Õáè ¡Œä¢»˜­ËÒ 2 ¢ŒÍ·Õ¡è ŋÒÇÁÒ¡ç¤Í× ¡ÒÃʋ§ÊÑ­­Ò³¼Åµ‹Ò§ (differential pair signaling) à¹×èͧ¨Ò¡¡ÒÃʋ§ÊÑ­­Ò³´ŒÇÂÇÔ¸Õ¹Õé¨Ð·íÒãˌʹÒÁáÁ‹àËÅç¡ä¿¿‡Ò·Õèà¡Ô´¢Ö鹨ҡÊÒÂÊÑ­­Ò³·Ñé§Êͧàʌ¹ËѡŌҧ¡Ñ¹ à¹×Íè §¨Ò¡ÁÕÈ¡Ñ ÂµÃ§¢ŒÒÁ¡Ñ¹ ¨Ö§äÁ‹à¡Ô´¡ÒÃá¾Ã‹¡ÃШÒÂä»Ãº¡Ç¹ÍØ»¡Ã³Í¹×è æ àÁ×Íè ÁÕÊ­ Ñ ­Ò³Ãº¡Ç¹¨Ò¡ÀÒ¹͡ ࢌÒÁÒã¹ÊÒ ÃдѺ¢Í§ÊÑ­­Ò³Ãº¡Ç¹¨Ð෋ҡѹ à¾ÃÒÐÊÒÂÊÑ­­Ò³ 2 àʌ¹ÍÂÙ¤‹ ¡Ù‹ ¹Ñ àÁ×Íè ÊÑ­­Ò³Ãº¡Ç¹à˹ÕÂè Ç ¹íÒࢌÒÊًÊÒÂàʌ¹Ë¹Ö觡ç¨Ðà˹ÕèÂǹíÒࢌÒÊًÊÒÂÍÕ¡àʌ¹ã¹¢¹Ò´·Õè෋ҡѹ àÁ×èͶ֧»ÅÒ·ҧã¹Ç§¨ÃÀÒ¤ÃѺ¨Ð㪌ǧ¨Ã ¢ÂÒ¼ŵ‹Ò§ (differential amplifier) ໚¹µÑÇÃѺÊÑ­­Ò³ «Ö§è ǧ¨Ã¹Õ¨é ÐÁÕ¤³ Ø ÊÁºÑµ¢Ô ÂÒÂÊÑ­­Ò³·ÕÁè ¢Õ ¹Ò´µ‹Ò§ ¡Ñ¹áÅÐÅ´·Í¹ÊÑ­­Ò³·ÕÁè ¢Õ ¹Ò´à·‹Ò¡Ñ¹ ´Ñ§¹Ñ¹é ÊÑ­­Ò³¢ŒÍÁÙÅ«Ö§è ÁÕÈ¡Ñ ÂµÃ§¢ŒÒÁ¡Ñ¹¨Ð¶Ù¡¢ÂÒÂà¾×Íè ʋ§µ‹Íä»Âѧʋǹ ¶Ñ´ä» ᵋʭ Ñ ­Ò³Ãº¡Ç¹«Ö§è ÁÕ¢¹Ò´à·‹Ò¡Ñ¹ã¹ÊÒ·ѧé 2 àʌ¹¨Ð¶Ù¡Å´·Í¹ËÃ×͵Ѵ·Ô§é ä»

ǧ¨Ãàª×Íè Áµ‹Í´ŒÒ¹ÎѺ

Vcc

D+

ǧ¨ÃÃѺ Ẻ¼Åµ‹Ò§

ǧ¨Ãä´ÃàÇÍÏ Ẻ¼Åµ‹Ò§

D-

ʶҹТͧºÑÊ ¢ŒÍÁÙÅ àÍç¹àÍàºÔÅ

ǧ¨Ãàª×Íè Áµ‹Í´ŒÒ¹ÍØ»¡Ã³ 1.5k

ǧ¨ÃÃѺ Ẻ¼Åµ‹Ò§

ʶҹТͧºÑÊ Ç§¨Ãä´ÃàÇÍÏ ¢ŒÍÁÙÅ àÍç¹àÍàºÔŠẺ¼Åµ‹Ò§

D+

D+

ǧ¨ÃÃѺ Ẻ¢ÑéÇà´ÕÂÇ

ǧ¨ÃÃѺ Ẻ¢ÑéÇà´ÕÂÇ

D-

D-

15k

15k

ÃÙ»·Õè 4-5 ǧ¨Ãàª×Íè Áµ‹ÍÃÐËNjҧÀҤʋ§ (ÎѺ) áÅÐÀÒ¤ÃѺ (µÑÇÍØ»¡Ã³)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ '


 '

#

 

àÇÅҢͺ¢Ò¢Ö¹é (rise time)

àÇÅҢͺ¢Òŧ (fall time)

ÃÙ»·Õè 4-6 áÊ´§ª‹Ç§àÇÅҢͺ¢Ò¢Ö¹é (rise time) áÅТͺ¢Òŧ (fall time) ¢Í§ÊÑ­­Ò³ ¨Ò¡ÃÙ»·Õè 4-5 áÊ´§ãˌàËç¹Ç§¨ÃÀҤʋ§áÅÐÀÒ¤ÃѺ¢Í§ÎѺáÅÐÍØ»¡Ã³ ¨ÐàËç¹ä´ŒÇҋ ·Ñ§é Êͧ´ŒÒ¹ÁÕǧ¨Ã·Õè àËÁ×͹¡Ñ¹à¹×Íè §¨Ò¡ USB ໚¹ºÑÊ·ÕÃè ºÑ Ê‹§¢ŒÍÁÙÅẺÎÒŏ¿´Ùà¾Åç¡« ¹Ñ¹è ¤×ͷѧé Êͧ´ŒÒ¹ÊÒÁÒöÃѺʋ§¢ŒÍÁÙÅ䴌·§Ñé ¤Ù‹ ᵋ¤¹ÅЪ‹Ç§àÇÅҡѹ ·íÒãˌ·§Ñé Êͧ´ŒÒ¹ÁÕª´Ø ǧ¨Ã·Õàè ËÁ×͹¡Ñ¹ áÅÐà¹×Íè §¨Ò¡¡ÒÃÃѺʋ§¢ŒÍÁÙÅẺ¹Õ¨é ÐÁÕÍ»Ø ¡Ã³ à¾Õ§µÑÇà´ÕÂÇ·ÕÊè ÒÁÒöÃѺËÃ×Íʋ§¢ŒÍÁÙÅ䴌㹪‹Ç§àÇÅÒ˹֧è æ ÍØ»¡Ã³·àÕè ËÅ×Í·Õäè Á‹ä´ŒãªŒ§Ò¹ ºÑʨíÒ໚¹¨ÐµŒÍ§»Å‹Í ºÑÊÊÑ­­Ò³ãˌÁÊÕ ÀÒ¾ÍÔÁ¾Õá´¹«Ê§Ù (high impedance) ´Ñ§¹Ñ¹é ǧ¨ÃÀҤʋ§¢Í§ÍØ»¡Ã³áµ‹ÅеÑǨеŒÍ§ÊÒÁÒö ¡íÒ˹´Ê¶Ò¹Ð¢Í§àÍÒµ¾Øµãˌ໚¹ÊÀÒ¾ÍÔÁ¾Õá´¹«Ê٧䴌 ʋǹǧ¨Ã¢Ñºáºº¼Åµ‹Ò§ (differential driver) ·íÒ˹ŒÒ·ÕèÊÌҧÊÑ­­Ò³¢ŒÍÁÙÅẺ¼Åµ‹Ò§Ê‹§ä»ã¹ÊÒ ÊÑ­­Ò³ D+ áÅÐ D- â´ÂÊÑ­­Ò³ã¹ÊÒ·ѧé 2 àʌ¹¨ÐÁÕà¿Êµ‹Ò§¡Ñ¹ 180 ͧÈÒ Ç§¨Ã¢Ñºáºº¼Åµ‹Ò§·ÕÍè ÂÙ㋠¹ÎѺ ¨ÐµŒÍ§ÃͧÃѺ¡Òö‹Ò·ʹ¢ŒÍÁÙÅ䴌·§Ñé Ẻ¤ÇÒÁàÃçÇÊÙ§áÅеèÒí à¾×Íè ãˌÊÒÁÒö¶‹Ò·ʹ¢ŒÍÁÙÅä»ÂѧÍØ»¡Ã³ä´Œ·§Ñé Êͧª¹Ô´ ᵋǧ¨Ã½˜§› µÑÇÍØ»¡Ã³¹¹Ñé ÃͧÃѺ¡ÒÃʋ§à¾Õ§ª¹Ô´à´ÕÂǵÒÁª¹Ô´¢Í§ÍØ»¡Ã³¹¹Ñé æ ¡çà¾Õ§¾Í ¤Ø³ÊÁºÑµÔÊíҤѭÍÕ¡»ÃСÒÃ˹Ö觷Õè¨íÒ໚¹ã¹¡ÒÃÍ͡Ẻǧ¨Ã¢Ñº¤×Í ¤‹ÒàÇÅҢͺ¢Ò¢Öé¹áÅÐŧ¢Í§ ÊÑ­­Ò³ â´ÂàÇÅҢͺ¢Ò¢Ö¹é ËÃ×Í rise time ¤×Í àÇÅÒ·Õãè ªŒã¹¡ÒÃà»ÅÕÂè ¹ÃдѺáç´Ñ¹¨Ò¡ 10% 仨¹¶Ö§ 90% ¢Í§áç ´Ñ¹ÊÙ§ÊØ´ ã¹¢³Ð·Õàè ÇÅҢͺ¢ÒŧËÃ×Í fall time ¤×Í àÇÅÒ·Õãè ªŒã¹¡ÒÃà»ÅÕÂè ¹ÃдѺáç´Ñ¹¨Ò¡ 90% ¶Ö§ 10% ¢Í§áç ´Ñ¹ÊÙ§ÊØ´ ´Ùû٠·Õè 4-6 »ÃСͺ ¤‹ÒàÇÅҢͺ¢Ò¢Ö¹é áÅÐŧ¢Í§¡Òö‹Ò·ʹ¢ŒÍÁÙŤÇÒÁàÃçÇÊÙ§µŒÍ§ÍÂÙ㋠¹ª‹Ç§ 4 ¶Ö§ 20 ¹Òâ¹ÇÔ¹Ò·Õ à¾×Íè äÁ‹ãˌà¡Ô´¼Å¡Ãзºµ‹ÍºÔµ¢ŒÍÁÙŠʋǹ¡Òö‹Ò·ʹ¢ŒÍÁÙÅ·Õ¤è ÇÒÁàÃçǵèÒí ¤‹ÒàÇÅҢͺ¢Ò¢Ö¹é áÅÐŧ¨Ð ÍÂÙ㋠¹ª‹Ç§ 75 ¶Ö§ 300 ¹Òâ¹ÇÔ¹Ò·Õà¾×Íè ãˌ໚¹ä»µÒÁÁҵðҹ FCC class B ¤‹Ò¢ŒÍÁÙÅ “1” áÅÐ “0” ¢Í§¡ÒÃʋ§áºº¼Åµ‹Ò§¹Ñ¹é ¨Ð´Ù¨Ò¡¤ÇÒÁᵡµ‹Ò§¢Í§ÃдѺáç´Ñ¹ã¹ÊÒÂÊÑ­­Ò³·Ñ§é 2 àʌ¹ ઋ¹ ¶ŒÒáç´Ñ¹ã¹ÊÒ D+ ÁÒ¡¡Ç‹Ò D- ¨Ð¶×Í໚¹¢ŒÍÁÙÅ “1” ᵋ¶ÒŒ áç´Ñ¹ã¹ÊÒ D- ÁÒ¡¡Ç‹Ò D+ ¨Ð¶×Í໚¹ ¢ŒÍÁÙÅ “0” ¨Ò¡µÑÇÍ‹ҧ¨ÐàËç¹ä´ŒÇҋ ÁÕ¡ÒõդÇÒÁËÁÒ¢ͧ¢ŒÍÁÙÅ䴌 2 ¡Ã³Õ ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺ¤ÇÒÁàÃçÇÊÙ§ áÅеèÒí ¨ÐµÕ¤ÇÒÁËÁÒÂÊÑ­­Ò³·Ñ§é 2 Ẻ¹Õµé ҋ §¡Ñ¹¤×Í ã¹âËÁ´¤ÇÒÁàÃçÇÊÙ§¢ŒÍÁÙÅ “1” ¨Ðá·¹´ŒÇÂÃдѺáç´Ñ¹ ã¹ÊÒ D+ ÁÒ¡¡Ç‹Ò D- áÅТŒÍÁÙÅ 0 ¨Ð¡ÅѺµÃ§¢ŒÒÁ¡Ñ¹ ʋǹã¹âËÁ´¤ÇÒÁàÃçǵèÒí ¢ŒÍÁÙÅ “1” ¨Ðá·¹´ŒÇÂáç´Ñ¹ ã¹ÊÒ D- ÁÒ¡¡Ç‹Ò D+ áÅТŒÍÁÙÅ 0 ¨Ð¡ÅѺµÃ§¢ŒÒÁઋ¹à´ÕÂǡѹ ËÃ×͡ŋÒÇÍ‹ҧ§‹ÒÂæ 䴌Çҋ ¡Òö‹Ò·ʹ¢ŒÍÁÙÅã¹ âËÁ´¤ÇÒÁàÃçÇÊÙ§áÅФÇÒÁàÃçǵèÒí ÁÕ¢ÇÑé µÃ§¢ŒÒÁ¡Ñ¹ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !


ʶҹТͧºÑÊ

ÃÒÂÅÐàÍÕ´

ʶҹÐàµÃÕÂÁ¾ÃŒÍÁ (idle) ¡Ã³Õ¤ÇÒÁàÃçǵíÒè (LS) ¡Ã³Õ¤ÇÒÁàÃçÇàµçÁ·Õè (FS) ʶҹеԴµ‹Í«íÒé (resume) ¢ŒÍÁÙÅã¹ÊÒÂÊÑ­­Ò³ÁÕʶҹе碌ÒÁ¡ÑºÊÀÒÇÐàµÃÕÂÁ¾ÃŒÍÁ àÃÔèÁʋ§¢ŒÍÁÙÅ (SOP : Start Of Packet)

¢ŒÍÁÙÅã¹ÊÒÂÊÑ­­Ò³ÁÕʶҹе碌ÒÁ¡ÑºÊÀÒÇÐàµÃÕÂÁ¾ÃŒÍÁ

ÊÔ¹é ÊØ´¢ŒÍÁÙÅ (SOP : Start Of Packet)

áç´Ñ¹·Õ¢è Ò D+ áÅÐ D- µíÒè ¡Ç‹Ò 0.8V ໚¹àÇÅÒ 2 ºÔµ¢ŒÍÁÙÅ áŌǵÒÁËÅѧ´ŒÇÂʶҹÐàµÃÕÂÁ¾ÃŒÍÁËÃ×Í idle ໚¹àÇÅÒ 1 ºÔµ¢ŒÍÁÙÅ

áç´Ñ¹·Õ¢è Ò D+ ËÃ×Í D- (¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§ÍØ»¡Ã³) ÊÙ§¡Ç‹Ò 2V ¹Ò¹¡Ç‹Ò 2.5 äÁâ¤ÃÇÔ¹Ò·Õ ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³ ¡ÒûŴÍÍ¡¢Í§ÍØ»¡Ã³ áç´Ñ¹·Õ¢è Ò D+ ËÃ×Í D- (¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§ÍØ»¡Ã³) µíÒè ¡Ç‹Ò 0.8V ¹Ò¹¡Ç‹Ò 2.5 äÁâ¤ÃÇÔ¹Ò·Õ

ÃÕ૵

áç´Ñ¹·Õ¢è Ò D+ áÅÐ D- µíÒè ¡Ç‹Ò 0.8V ໚¹àÇÅÒ¹Ò¹ 10 ÁÔÅÅÔÇ¹Ô Ò·Õ

µÒÃÒ§·Õè 4-1 ʶҹТͧºÑÊ USB ʋǹǧ¨ÃÃѺẺ¼Åµ‹Ò§ (differential receiver) ·íÒ˹ŒÒ·ÕÃè ºÑ áÅТÂÒÂÊÑ­­Ò³¢ŒÍÁÙÅ·ÕÁè àÕ ¿ÊµÃ§¢ŒÒÁ áÅеѴÊÑ­­Ò³·ÕÃè º¡Ç¹·ÕÁè àÕ ¿ÊàËÁ×͹¡Ñ¹·Ô§é ä» Ê‹Ç¹Ç§¨ÃÃѺẺ¢ÑÇé à´ÕÂÇ (single-ended receiver) ·Ñ§é 2 ªØ´¹Ñ¹é 㪌ÊÒí ËÃѺµÃǨÊͺʶҹТͧºÑÊ à¾ÃÒÐÇ‹Ò Ê¶Ò¹Ðµ‹Ò§æ ¢Í§ºÑʨеŒÍ§¾Ô¨ÒóҨҡÃдѺáç´Ñ¹ã¹ÊÒ·ѧé 2 àʌ¹á¡¨Ò¡¡Ñ¹ ઋ¹ ¡ÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³µÇÑ ãËÁ‹¨Ðà¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ÊÑ­­Ò³à¾Õ§àʌ¹à´ÕÂÇ «Ö§è ǧ ¨ÃÃѺẺ¼Åµ‹Ò§äÁ‹ÊÒÁÒöµÃǨÊͺ¡ÒÃà»ÅÕè¹á»Å§¢Í§ÊÑ­­Ò³ã¹ÊÒÂà¾Õ§àʌ¹à´ÕÂǹÕé䴌 à¹×èͧ¨Ò¡Ç§¨Ã ÊÒÁÒöµÃǨÊͺ䴌Çҋ à¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ÊÑ­­Ò³ ᵋäÁ‹·ÃҺNjÒà¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§·ÕÊè ÒÂàʌ¹ã´ µÒÃÒ§ ·Õè 4-1 áÊ´§ãˌàËç¹Ê¶Ò¹Ðµ‹Ò§æ ¢Í§ºÑÊ USB

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !


àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !


º··Õè 5

¡ÒèѴ¡ÒôŒÒ¹¾Åѧ§Ò¹¢Í§ USB à¹×Íè §¨Ò¡¾Íϵ USB ÊÒÁÒö¨‹Ò¾Åѧ§Ò¹ãËŒá¡‹Í»Ø ¡Ã³·¹Õè Òí ÁÒàª×Íè Áµ‹Í䴌 ᵋÂ͋ ÁµŒÍ§Áբ͌ ¨íÒ¡Ñ´Ç‹Ò ÊÒÁÒö¨‹Ò¾Åѧ§Ò¹ÍÍ¡ä»ä´ŒÁÒ¡¹ŒÍÂà¾Õ§㴠â´Â੾ÒСѺ¾Íϵ USB ·ÕÂè ÍÁãËŒÍ»Ø ¡Ã³ÁÒàª×Íè Áµ‹Í䴌ÁÒ¡¶Ö§ 127 µÑÇ âÎʵ¨ÐµŒÍ§ÁÕ¡ÒèѴ¡ÒôŒÒ¹¾Åѧ§Ò¹·Õè´Õ ¾ÍÁԩйÑ鹨Ðà¡Ô´¡Òô֧¾Åѧ§Ò¹¨Ò¡ºÑÊÁÒ¡ ¨¹à¤Ã×èͧ ¤ÍÁ¾ÔÇàµÍÏäÁ‹ÊÒÁÒö·íҧҹ䴌

5.1 ¡ÒÃÃÒ§ҹÍѵÃÒ¡ÒÃ㪌¾Åѧ§Ò¹ âÎʵ¨ÐÃٌ¢ŒÍÁÙÅà¡ÕèÂǡѺ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§ÎѺáÅÐÍØ»¡Ã³áµ‹ÅеÑǨҡ¡ÒÃ͋ҹ¤Í¹¿¡ÔÇàêÑè¹´ÔʤÃÔ »àµÍÏ«Ö觨ж١͋ҹÍÍ¡ÁÒµÑé§áµ‹¤ÃÑé§áá·ÕèÁÕÍØ»¡Ã³µÑÇãËÁ‹àª×èÍÁµ‹ÍࢌÒÁÒ㹺ÑÊ â´Â¢ŒÍÁÙÅ·Õèà¡ÕèÂǡѺ¡ÒÃ㪌 ¾Åѧ§Ò¹¨ÐÁÕÍÂً 2 ʋǹ ʋǹáá¨ÐºÍ¡âÎʵÇҋ µÑÇÍØ»¡Ã³¹ãÕé ªŒ¾Åѧ§Ò¹¨Ò¡ºÑÊËÃ×Í㪌¾Åѧ§Ò¹¨Ò¡áËŋ§¾Åѧ§Ò¹ ¢Í§µÑÇàͧ áÅÐʋǹ·ÕÊè ͧºÍ¡Ç‹Ò¨Ð¢Í㪌¾Åѧ§Ò¹¨Ò¡ºÑÊ໚¹»ÃÔÁҳ෋Òã´ ÁÕ˹‹ÇÂ໚¹ÁÔÅÅÔáÍÁ»Š (mA) âÎʵËÃ×ÍÎѺ ·ÕÁè áÕ Ëŋ§¨‹ÒÂä¿ ¢Í§µÑÇàͧ áç´Ñ¹äÁ‹µÒèí ¡Ç‹Ò 4.75V

ÎѺ·ÕÍè ÒÈѾÅѧ§Ò¹ ¨Ò¡ºÑÊ áç´Ñ¹äÁ‹µÒèí ¡Ç‹Ò 4.40V

ÍØ»¡Ã³·ÍèÕ ÒÈÑ ¾Åѧ§Ò¹¨Ò¡ºÑÊ

ÃÙ»·Õè 5-1 ¢ŒÍ¨íÒ¡Ñ´´ŒÒ¹áç´Ñ¹·Õ¨è ´Ø àª×Íè Áµ‹Íµ‹Ò§æ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !!


㹡óշÁÕè ¡Õ ÒÃàª×Íè Áµ‹ÍÎѺࢌҡѺºÑÊ âÎʵ¨Ð͋ҹ¤Í¹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏä»à¾×Íè ¾Ô¨ÒóҡÒÃ㪌¾Åѧ §Ò¹ ᵋà¹×Íè §¨Ò¡ÎѺ¨íÒ໚¹¨ÐµŒÍ§¨‹Ò¾Åѧ§Ò¹ä»àÅÕÂé §ÍØ»¡Ã³·ÁÕè Òàª×Íè Áµ‹ÍÍÂÙ¡‹ ºÑ µÑÇÁѹ´ŒÇ ¨Ö§µŒÍ§Áբ͌ ¡íÒ˹´ ã¹´ŒÒ¹áç´Ñ¹¢Í§ä¿àÅÕÂé §·Õ¨è Ш‹ÒÂÍÍ¡¨Ò¡µÑÇÎѺà¾×Íè äÁ‹ãˌáç´Ñ¹»ÅÒ·ҧ·Õµè ÇÑ ÍØ»¡Ã³¹ÍŒ Âà¡Ô¹ä»¨¹äÁ‹ÊÒÁÒö ·íҧҹ䴌 â´Â¡íÒ˹´änjÇҋ áç´Ñ¹·Õ¨è ҋ ÂãËŒá¡‹ÎºÑ à¾×Íè ãËŒÎºÑ ·íÒ§Ò¹¹Ñ¹é ¨ÐµŒÍ§äÁ‹µÒèí ¡Ç‹Ò 4.75V áÅÐáç´Ñ¹·ÕÎè ºÑ ¨‹ÒÂÍÍ¡ä»ÂѧµÑÇÍØ»¡Ã³áµ‹ÅеÑǨеŒÍ§äÁ‹µÒèí ¡Ç‹Ò 4.40 V (´Ùû٠·Õè 5-1 »ÃСͺ) ¹Ñ¹è ËÁÒ¤ÇÒÁNjÒÍØ»¡Ã³ USB ·Ø¡æ µÑǨеŒÍ§ÊÒÁÒö·íҧҹ䴌·áÕè ç´Ñ¹ä¿àÅÕÂé §Í‹ҧ¹ŒÍ 4.40 V

5.2 ¡ÒèíÒ¡Ñ´¡ÃÐáÊ ¢ŒÍ¡íÒ˹´ÍÕ¡Ê‹Ç¹Ë¹Ö§è ·Õµè ͌ §¡Å‹ÒǶ֧¤×Í ¢ŒÍ¡íÒ˹´àÃ×Íè §¡ÃÐáÊ ¤‹Ò¡ÃÐáʵèÒí ÊØ´·ÕÎè ºÑ ¨ÐµŒÍ§¨‹ÒÂãˌᵋÅÐ ¾Íϵ¨ÐµŒÍ§äÁ‹¹ÍŒ Â¡Ç‹Ò 100mA áÅШ‹ÒÂ䴌ÁÒ¡·ÕÊè ´Ø 500mA ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ÍØ»¡Ã³·ÁÕè Òàª×Íè Áµ‹Í¡ÑººÑÊ USB â´Â㪌¾Åѧ§Ò¹¨Ò¡ºÑÊ¹Ñ¹é ¨ÐäÁ‹ÊÒÁÒö´Ö§¡ÃÐáÊ䴌ÁÒ¡¡Ç‹Ò 500mA ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§µÑÇÍØ»¡Ã³ËÃ×ÍÎѺ¨Ðẋ§ ‹ÍÂ໚¹Ë¹‹ÇÂÅÐ 100mA ËÁÒ¤ÇÒÁÇ‹Ò ÍØ»¡Ã³·ãÕè ªŒ¾Åѧ§Ò¹¹ŒÍ·ÕÊè ´Ø ¨Ð㪌¡ÃÐáÊä¿¿‡Ò 1 ˹‹ÇÂËÃ×Í 100mA ÊíÒËÃѺÎѺ·Õãè ªŒä¿àÅÕÂé §¨Ò¡ºÑÊ µÑÇÎѺàͧ¨Ð㪌¾Åѧ§Ò¹¨Ò¡ºÑÊà¾×Íè ¤Çº¤ØÁ¡Ò÷íÒ§Ò¹ÀÒÂ㹢ͧµÑÇÎѺàͧ 1 ˹‹ÇÂ෋ҡѺ 100mA áÅШҡ¢ŒÍ¡íÒ˹´´ŒÒ¹¡ÃÐáÊ·ÕÇè ҋ ºÑʨШ‹Ò¡ÃÐáÊ䴌äÁ‹à¡Ô¹ 500mA ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ÎѺ¨ÐàËÅ×;Åѧ§Ò¹·ÕÊè ÒÁÒö¨‹ÒÂãˌᡋ¾Íϵµ‹Ò§æ ä´ŒÍ¡Õ 4 ˹‹Ç «Ö§è à·‹Ò¡ÑºÇ‹Ò ¨ÐÁÕ¾Íϵ䴌ÁÒ¡·ÕÊè ´Ø 4 ¾Íϵ â´ÂᵋÅоÍϵµŒÍ§´Ö§¡ÃÐáÊäÁ‹à¡Ô¹ 100mA ᵋ㹡óբͧÎѺ·ÕÁè áÕ Ëŋ§¨‹ÒÂ俢ͧµÑÇàͧ¨ÐäÁ‹¾º¡Ñº»˜­ËÒ ¹Õàé ¾ÃÒÐÊÒÁÒö¨‹Ò¡ÃÐáÊãˌᵋÅоÍϵ䴌àµçÁ 500mA ¹Í¡¨Ò¡¢ŒÍ¡íÒ˹´ã¹àÃ×Íè §¡Òô֧¡ÃÐáʢͧᵋÅоÍϵáÅŒÇ ã¹áµ‹ÅоÍϵ¨ÐµŒÍ§ÁÕǧ¨Ã¨íÒ¡Ñ´¡ÃÐáÊ (current limit) äÁ‹ãˌà¡Ô¹ 5A ÊíÒËÃѺ¾ÍϵᵋÅоÍϵ à¾×èÍ»‡Í§¡Ñ¹¡ÒÃÅѴǧ¨ÃÃÐËNjҧä¿àÅÕé§áÅСÃÒǹ ᵋ㹡óբͧÎѺ·ÕÍè ÒÈÑÂä¿àÅÕÂé §¨Ò¡ºÑÊäÁ‹¨Òí ໚¹µŒÍ§ÁÕǧ¨Ã»‡Í§¡Ñ¹Ê‹Ç¹¹Õàé ¾ÃÒÐÃÙµÎѺËÃ×ÍÎѺµÑÇ¡‹Í¹Ë¹ŒÒ (·ÕÁè Õ áËŋ§¨‹ÒÂ俢ͧµÑÇàͧ) ¨ÐÁÕǧ¨Ã»‡Í§¡Ñ¹ÍÂÙá‹ ÅŒÇ ¢ºÇ¹¢ŒÍÁÙÅ¢Ò¢Ö¹é áËŋ§¨‹Ò¾Åѧ§Ò¹ ÎѺ¤Í¹â·ÃÅàÅÍÏ

àáÙàÅàµÍÏ ǧ¨Ã¨íÒ¡Ñ´ ¡ÃÐáÊ

ǧ¨Ã¨íÒ¡Ñ´ ¡ÃÐáÊ

¨‹ÒÂä»àÅÕÂé §ÍØ»¡Ã³·µèÕ Í‹ ¡Ñº¾Íϵ

¢ºÇ¹¢ŒÍÁÙÅ¢Òŧä»ÂѧÍØ»¡Ã³

ÃÙ»·Õè 5-2 ¡ÒèѴ¡ÒþÅѧ§Ò¹¢Í§ÎѺ·ÕÁè áÕ Ëŋ§¨‹ÒÂä¿àÅÕÂé § àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !"


5.3 ¡ÒÃແ´-»´ä¿àÅÕÂé §¢Í§ÎѺ ¹Í¡¨Ò¡ÎѺ¨Ðẋ§Í͡໚¹ 2 ª¹Ô´µÒÁ¡ÒÃ㪌¾Åѧ§Ò¹¤×Í ÎѺ·Õãè ªŒ¾Åѧ§Ò¹¨Ò¡ºÑÊ áÅÐÎѺ·Õãè ªŒ¾Åѧ§Ò¹ ¢Í§µÑÇàͧáÅŒÇ ÎѺÂѧẋ§ª¹Ô´Â‹ÍµÒÁ¡ÒÃແ´¡Òè‹Ò¾Åѧ§Ò¹ãËŒá¡‹Í»Ø ¡Ã³·¾Õè Íϵµ‹Ò§æ ´ŒÇ â´Âẋ§ÍÍ¡ ໚¹ 3 ª¹Ô´¤×Í 1. ¨‹Ò¾Åѧ§Ò¹â´ÂµÃ§ ã¹áºº¹Õ¨é Ш‹Ò¾Åѧ§Ò¹ä»Âѧ¾Íϵµ‹Ò§æ änjµÅÍ´àÇÅÒ 2. ແ´»´¡Òè‹Ò¾Åѧ§Ò¹áººÃÇÁ ã¹áºº¹ÕÎé ºÑ ÊÒÁÒöÊÑ§è »´ËÃ×Íແ´¡Òè‹Ò¾Åѧ§Ò¹á¡‹¾Íϵ µ‹Ò§æ 䴌 ᵋ¨Ð໚¹¡ÒáÃзíҡѺ¾Íϵ·Ø¡æ ¾Íϵ¾ÃŒÍÁ¡Ñ¹ ¹Ñ¹è ¤×Í ¶ŒÒແ´¡çແ´·Ñ§é ËÁ´ ¶ŒÒ»´¡ç»´ ·Ñ§é ËÁ´ 3. ແ´»´¡Òè‹Ò¾Åѧ§Ò¹áººá¡¾Íϵ ã¹áºº¹ÕÎé ºÑ ÊÒÁÒöÊÑ§è »´à»´¡Òè‹Ò¾Åѧ§Ò¹áµ‹ ÅоÍϵᡡѹ͋ҧÍÔÊÃÐ âÎʵ¨Ð·ÃÒº¶Ö§ÅѡɳСÒè‹Ò¾Åѧ§Ò¹¢Í§ÎѺ䴌¨Ò¡¡ÒÃ͋ҹÎѺ¤ÅÒÊ´ÔʤÃÔ»àµÍÏ (໚¹¤ÅÒÊÊ໡ «Ô¿¡ ´ÔʤÃÔ»àµÍϪ¹Ô´Ë¹Ö§è : ´ÙÃÒÂÅÐàÍÕ´¢Í§´ÔʤÃÔ»àµÍϪ¹Ô´µ‹Ò§æ 䴌¨Ò¡º··Õè 2)

5.4 ¡ÒÃ㪌¾Åѧ§Ò¹ã¹ª‹Ç§µÑ§é ¤‹ÒàÃÔÁè µŒ¹·íÒ§Ò¹ËÃ×ͤ͹¿¡ ÍØ»¡Ã³ USB àÁ×Íè àª×Íè Áµ‹ÍࢌÒÁÒ㹺ÑʵŒÍ§ä´ŒÃºÑ ¡ÒáíÒ˹´ÅѡɳСÒ÷íÒ§Ò¹¨Ò¡âÎʵ¡Í‹ ¹àÃÔÁè ·íÒ§Ò¹ ·Ø¡¤Ãѧé à¾×Íè ãˌâÎʵ·ÃÒº¶Ö§¢ŒÍÁÙÅ·Õ¨è Òí ໚¹ã¹¡ÒõԴµ‹Í¡ÑºÍØ»¡Ã³¹¹Ñé æ ´ŒÇ¡ÒÃ͋ҹ¢ŒÍÁÙÅ´ÔʤÃÔ»àµÍϵҋ §æ à¾×è͵Ñ駤‹ÒàÃÔèÁµŒ¹ãˌᡋÃкºáÅеÑÇÍØ»¡Ã³ 㹪‹Ç§¡ÒõÑ駤‹ÒàÃÔèÁµŒ¹¹Õé¨ÐÁÕ¢ŒÍ¡íÒ˹´Ç‹Ò ÍØ»¡Ã³¨ÐÊÒÁÒö´Ö§ ¾Åѧ§Ò¹ä»ãªŒä´ŒäÁ‹à¡Ô¹ 1 ˹‹ÇÂËÃ×Í 100mA ᵋËÅѧ¨Ò¡âÎʵ¾¨Ô ÒóҷÃѾÂҡ÷ÕÃè кºÁÕ Ç‹Òà¾Õ§¾Íµ‹Í¤ÇÒÁ µŒÍ§¡ÒâͧÍØ»¡Ã³áÅÐµÑ§é ¤‹Òµ‹Ò§æ ãˌ¨¹àÊÃç¨àÃÕºÌÍÂáÅŒÇ ÍØ»¡Ã³ËÃ×ÍÎѺ¨ÐÊÒÁÒö´Ö§¡ÃÐáÊ䴌àµçÁ¤ÇÒÁ µŒÍ§¡Ò÷Õèᨌ§änj㹴ÔʤÃÔ»àµÍÏ

5.5 ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§ÍØ»¡Ã³ USB ÍØ»¡Ã³ USB ÊÒÁÒöẋ§ª¹Ô´¨Ò¡ÅѡɳСÒÃ㪌¾Åѧ§Ò¹ä´Œ 2 ¡ÅØÁ‹ ¤×Í ÍØ»¡Ã³·ãÕè ªŒ¾Åѧ§Ò¹¨Ò¡ºÑÊ (㪌¾Åѧ§Ò¹µèÒí ) ઋ¹ àÁÒʏ ¤Õº ÍÏ´ áÅÐÍØ»¡Ã³·ãÕè ªŒ¾Åѧ§Ò¹¢Í§µÑÇàͧ (㪌¾Åѧ§Ò¹ÊÙ§) ઋ¹ à¤Ã×Íè §¾ÔÁ¾ «Õ´ÃÕ ÍÁä´Ã¿ ÍØ»¡Ã³·ãÕè ªŒ¾Åѧ§Ò¹¨Ò¡ºÑÊÊÒÁÒö´Ö§¡ÃÐáÊ䴌µ§Ñé ᵋ 100 ¶Ö§ 500mA ´Ñ§·Õäè ´Œ¡Å‹ÒÇä»áÅŒÇ áµ‹¡µç ͌ §¢Ö¹é ÍÂÙ¡‹ ºÑ ¤ÇÒÁÊÒÁÒö㹡Òè‹Ò¾Åѧ§Ò¹¢Í§ÎѺ´ŒÇÂÇ‹Ò ÎѺ¹Ñ¹é æ ÁÕÍ»Ø ¡Ã³µÍ‹ ÍÂÙዠŌǡյè ÇÑ áµ‹ÅеÑÇ ´Ö§¾Åѧ§Ò¹ä»áŌÇ෋Òã´ àËÅ×;Åѧ§Ò¹ãˌà¾Õ§¾Í¡Ñº·ÕÍè »Ø ¡Ã³µÇÑ ãËÁ‹µÍŒ §¡ÒÃËÃ×ÍäÁ‹ ËÒ¡âÎʵ¾¨Ô ÒóÒáÅŒÇ Ç‹ÒäÁ‹ÊÒÁÒö¨‹Ò¾Åѧ§Ò¹ãËŒÍ»Ø ¡Ã³µÇÑ ãËÁ‹¹äÕé ´Œà¾Õ§¾Í ¡ç¨ÐäÁ‹µ§Ñé ¤‹ÒàÃÔÁè µŒ¹ãËŒÍ»Ø ¡Ã³¹¹Ñé æ ·íÒãËŒÍ»Ø ¡Ã³µÇÑ ¹Ñé¹äÁ‹ÊÒÁÒö·íҧҹ䴌 ÊíÒËÃѺÍØ»¡Ã³·ÁÕè ãÕ ªŒ¾Åѧ§Ò¹§Ò¹¢Í§µÑÇàͧ¨ÐäÁ‹à¡Ô´à˵ءÒó´§Ñ ¡Å‹ÒÇ¢Ö¹é à¾ÃÒÐäÁ‹µÍŒ §ãªŒ¾Åѧ§Ò¹¨Ò¡ ºÑÊàÅ ᵋÁÍÕ »Ø ¡Ã³Í¡Õ »ÃÐàÀ·Ë¹Ö§è ·ÕÁè ÃÕ »Ù Ẻ¡ÒÃ㪌¾Åѧ§Ò¹·Õµè ҋ §ÍÍ¡ä» â´Â¨Ð㪌¾Åѧ§Ò¹¨Ò¡ºÑÊÊíÒËÃѺǧ¨Ã ʋǹµÔ´µ‹Í¡Ñº USB ᵋ㪌¾Åѧ§Ò¹¢Í§µÑÇàͧÊíÒËÃѺ¡Ò÷íÒ§Ò¹ËÅÑ¡¢Í§µÑÇÍØ»¡Ã³ ÍØ»¡Ã³·ãÕè ªŒ¾Åѧ§Ò¹ÅѡɳР¹Õàé ÃÕÂ¡Ç‹Ò ÍØ»¡Ã³äκÃÔ´ (hybrid) ¢ŒÍ´Õ¢Í§ÍØ»¡Ã³¹¤Õé Í× âÎʵÊÒÁÒöÃÙʌ ¶Ò¹Ð¢Í§µÑÇÍØ»¡Ã³ä´Œ áÁŒÍ»Ø ¡Ã³ µÑÇ¹Ñ¹é ¨ÐÂѧäÁ‹ä´Œ¨Ò‹ Âä¿àÅÕÂé § ¹Í¡¨Ò¡¹Ñ¹é Âѧ·íÒãˌÊÒÁÒöÍ͡ẺÍØ»¡Ã³·ÁÕè ¿Õ §˜ ¡ª¹Ñ ¡Ò÷íÒ§Ò¹ 2 ÃٻẺ·Õè µ‹Ò§¡Ñ¹ã¹¨Ñ§ËÇзÕèÁÕáÅÐäÁ‹ÁÕä¿àÅÕé§䴌

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !#


ä¿àÅÕÂé §¨Ò¡ºÑÊ

áËŋ§¨‹Ò¾Åѧ§Ò¹

¢ºÇ¹¢ŒÍÁÙÅ USB

ʋǹàª×èÍÁµ‹Í¡Ñº USB

àáÙàÅàµÍÏ

˹ŒÒ·Õè¡Ò÷íÒ§Ò¹ËÅÑ¡

ÃÙ»·Õè 5-3 ¡ÒÃ㪌¾Åѧ§Ò¹¢Í§ÍØ»¡Ã³äκÃÔ´

5.6 ¡ÒûÃÐËÂÑ´¾Åѧ§Ò¹¢Í§¾Íϵ USB ¹Í¡¨Ò¡¢ŒÍ¨íÒ¡Ñ´´ŒÒ¹¡ÒÃ㪌¾Åѧ§Ò¹ã¹ÊÀÒÇл¡µÔ USB ÂѧÁբ͌ ¡íÒ˹´ÊíÒËÃѺ¡ÒûÃÐËÂÑ´¾Åѧ§Ò¹ ¢Í§ÍØ»¡Ã³ã¹ºÑÊ´ŒÇ â´Â¡ÒÃࢌÒÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹àÃÕÂ¡Ç‹Ò Suspend áÅСÒáÅѺÁÒ·íÒ§Ò¹ã¹ÊÀÒÇÐ »¡µÔàÃÕÂ¡Ç‹Ò Resume áÅÐà¹×Íè §¨Ò¡ USB ໚¹ÃкººÑÊ·íÒãˌ¡ÒÃࢌÒáÅÐÍÍ¡¨Ò¡âËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹¨íÒ໚¹ µŒÍ§ÁÕÅÒí ´Ñº¢Ñ¹é µÍ¹ã¹¡ÒÃʋ§ÊÑ­­Ò³µ‹Ò§æ ·ÕÊè ÁÑ ¾Ñ¹¸¡¹Ñ µÑ§é ᵋ¨´Ø àÃÔÁè µŒ¹¤×Í ÃÙµÎѺ¼‹Ò¹ÎѺä»ÂѧµÑÇÍØ»¡Ã³µÒ‹ §æ ¡ÒÃࢌÒÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹Áմnj ¡ѹ 2 ª¹Ô´¤×Í ¡Òà Suspend ÍØ»¡Ã³·§Ñé ºÑÊ áÅÐ ¡Òà Suspend ÍØ»¡Ã³à©¾ÒеÑÇ

5.6.1 ¡Ãкǹ¡ÒÃࢌÒÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ËÃ×Í Suspend USB ໚¹ºÑÊ·Õ¤è Ǻ¤ØÁ¡Ò÷íÒ§Ò¹¨Ò¡âÎʵ«§Öè ¡ç¤Í× à¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏà¾Õ§¨Ø´à´ÕÂÇ â´Â¢ŒÍÁÙŷѧé ËÁ´¨Ð ¶Ù¡Ê‹§ã¹ÅѡɳТͧà¿ÃÁ¢ŒÍÁÙÅ ã¹áµ‹ÅÐà¿ÃÁ¨ÐàÃÔÁè µŒ¹¡ÒÃʋ§¢ŒÍÁÙÅ´ŒÇ SOF á¾ç¡à¡çµ áŌǨ֧µÒÁ´ŒÇ¢ŒÍÁÙÅ·Õè µŒÍ§¡ÒÃʋ§ËÃ×ÍÃѺ ¨Ñ§ËÇСÒÃʋ§¢ŒÍÁÙÅ¡íÒ˹´änjÇҋ µŒÍ§àÃÔÁè ʋ§ SOF á¾ç¡à¡çµà¾×Íè àÃÔÁè µŒ¹à¿ÃÁ·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ ÍØ»¡Ã³·¡Ø æ µÑÇ㹺ÑʨеŒÍ§ä´ŒÃºÑ ¢ŒÍÁÙÅ SOF á¾ç¡à¡çµà¾×Íè ໚¹ÊÑ­­Ò³ ºÍ¡¡ÒÃàÃÔÁè à¿ÃÁ¢ŒÍÁÙÅ ¶ŒÒÍØ»¡Ã³äÁ‹ä´ŒÃºÑ ¢ŒÍÁÙÅã´æ àŨҡºÑÊ໚¹àÇÅÒÁÒ¡¡Ç‹Ò 3 ÁÔÅÅÔÇ¹Ô Ò·Õ ÍØ»¡Ã³¹¹Ñé æ ¨Ðà¢ŒÒ ÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ËÃ×Í Suspend â´Â㹪‹Ç§¹ÕÍé »Ø ¡Ã³¨Ð´Ö§¡ÃÐáʨҡºÑÊ䴌äÁ‹à¡Ô¹¾ÍϵÅÐ 500mA ¡Ãкǹ¡ÒâŒÒ§µŒ¹à»š¹¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³¤ÇÒÁàÃçÇÊ٧෋ҹѹé ÊíÒËÃѺÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ¨Ðᵡµ‹Ò§ ÍÍ¡ä» à¾ÃÒÐÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ¨ÐäÁ‹ä´ŒÃºÑ ¢ŒÍÁÙŤÇÒÁàÃçÇÊÙ§ áÅÐ SOF á¾ç¡à¡çµ·Õ¶è ¡Ù ʋ§ÍÍ¡ÁÒ·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ ã¹¢³Ð·ÕÍè »Ø ¡Ã³¤ÇÒÁàÃçǵèÒí àÁ×Íè äÁ‹ä´ŒÃºÑ ¢ŒÍÁÙÅ ºÑʨÐÍÂÙ㋠¹Ê¶Ò¹ÐʧºËÃ×ÍäÍà´ÔÅ (Idle) ´Ñ§¹Ñ¹é ¨Ö§à»š¹Ë¹ŒÒ·Õ¢è ͧ ÎѺ·Õ¨è еŒÍ§·íÒãˌ¾Íϵ·Õàè ª×Íè Á¡ÑºÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ÁÕ¡ÒÃà»ÅÕÂè ¹¡ÅѺ¢ÑÇé ÊÑ­­Ò³¨Ò¡Ê¶Ò¹ÐäÍà´ÔÅ໚¹µÃ§¡Ñ¹¢ŒÒÁ ÀÒÂã¹·Ø¡æ 3 ÁÔÅÅÔÇ¹Ô Ò·Õ à¾×Íè »‡Í§¡Ñ¹¡ÒÃࢌÒÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹¢Í§ÍØ»¡Ã³ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !$


¡Ãкǹ¡Òà Suspend ¢Í§ÍØ»¡Ã³·¡Ø æ µÑÇ㹺ÑÊ àÃÔÁè ¨Ò¡âÎʵÊ§Ñè ãˌõ٠ÎѺࢌÒÊÙÀ‹ ÒÇлÃÐËÂÑ´¾Åѧ§Ò¹ àÁ×Íè ÃÙµÎÑºä´ŒÃºÑ ¤íÒÊÑ§è ¡ç¨ÐËÂØ´¡ÒÃʋ§¢ŒÍÁÙÅ㹺ÑÊ àÁ×Íè ÃÙµÎѺËÂشʋ§¢ŒÍÁÙÅ ËÁÒ¤ÇÒÁÇ‹Ò ·Ñ§é ÎѺáÅÐÍØ»¡Ã³·§Ñé ËÁ´·ÕÍè ÂÙÀ‹ ÒÂ㹺ÑÊ¡ç¨ÐäÁ‹ä´ŒÃºÑ ¢ŒÍÁÙÅä»´ŒÇ àÁ×Íè àÇÅÒ¼‹Ò¹ä» 3 ÁÔÅÅÔÇ¹Ô Ò·Õ ÍØ»¡Ã³·¡Ø µÑÇáÅÐÎѺ¡ç¨ÐࢌÒÊÙ⋠ËÁ´ »ÃÐËÂÑ´¾Åѧ§Ò¹¾ÃŒÍÁ¡Ñ¹ ᵋ¶ÒŒ âÎʵµÍŒ §¡Òà Suspend ÍØ»¡Ã³à©¾ÒеÑÇ âÎʵ¨ÐµÃǨÊͺNjÒÍØ»¡Ã³µÇÑ ¹Ñ¹é µ‹ÍÍÂÙ¡‹ ºÑ ÎѺ¾Íϵ㴠ËÅѧ¨Ò¡¹Ñ¹é ¡ç¨ÐࢌÒä»à¢Õ¹ÃÕ¨ÊÔ àµÍϢͧÎѺ¾Íϵ¹Ñ¹é æ à¾×Íè Êѧè Suspend àÁ×Íè ÎÑºä´ŒÃºÑ ¤íÒÊÑ觨ҡâÎʵ¡ç¨Ð»´¡ÒÃʋ§¢ŒÍÁÙŢͧ¾Íϵ¹Ñé¹·íÒãˌÍØ»¡Ã³·Õ赋͡Ѻ¾Íϵ¹Ñé¹à¢ŒÒÊًâËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ ¢³Ð·ÕÍè ÂÙ㋠¹âËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ ¶Ö§áÁŒÇҋ µÑÇÍØ»¡Ã³¨Ð´Ö§¡ÃÐáÊäÁ‹à¡Ô¹ 500mA ᵋµÇÑ ÎѺ¨ÐµŒÍ§ ÃͧÃѺ¡ÒÃ㪌¾Åѧ§Ò¹ÃдѺ»¡µÔ¢Í§ÍØ»¡Ã³áµ‹ÅеÑÇ´ŒÇÂà¾×èÍãˌµÑÇÍØ»¡Ã³ÊÒÁÒöÍÍ¡¨Ò¡âËÁ´»ÃÐËÂÑ´ ¾Åѧ§Ò¹à¾×èÍ¡ÅѺࢌÒÊً¡Ò÷íÒ§Ò¹»¡µÔ䴌àÁ×è͵ŒÍ§¡ÒÃʋ§¢ŒÍÁÙÅ¡ÅѺ

5.6.2 ¡Ãкǹ¡ÒÃÍÍ¡¨Ò¡âËÁ´»ÃÐËÂÑ´¾ÅѧҹËÃ×Í Resume ¡Òà Resume ¤×Í¡ÒáÅѺࢌÒÊÙʋ ÀÒÇСÒÃ㪌¾Åѧ§Ò¹»¡µÔáÅÐÁÕ¡Òö‹Ò·ʹ¢ŒÍÁÙŵÒÁ»¡µÔ ÊÑ­­Ò³ ·Õãè ªŒ Resume ¤×Í ¡ÒáÅѺ¢ÑÇé ¢Í§ÊÑ­­Ò³ D- áÅÐ D+ ãˌµÃ§¢ŒÒÁ¡ÑºÊ¶Ò¹ÐäÍà´ÔÅ ¡Ãкǹ¡Òà Resume ÊÒÁÒö à¡Ô´¢Öé¹ä´Œ¨Ò¡ËÅÒÂà§×è͹䢴ѧ¹Õé

àÁ×Íè ÃÙµÎÑºä´ŒÃºÑ Ê¶Ò¹Ð Resume ¨ÐÊÌҧʶҹРResume ¡ÅѺŧä»à»š¹àÇÅÒ äÁ‹¹ŒÍÂ¡Ç‹Ò 20ms

ÃÙµÎѺ

ÎѺ ÎѺʋ§Ê¶Ò¹Ð Resume ¡ÅѺ仴ŒÒ¹º¹¾ÃŒÍÁ¡ÑºÊÌҧ Resume ·Ø¡¾Íϵ´ŒÒ¹Å‹Ò§ ÀÒÂã¹àÇÅÒ 100µ s

ÍØ»¡Ã³ 1 ÎѺʋ§Ê¶Ò¹Ð Resume ¡ÅѺ仴ŒÒ¹º¹¾ÃŒÍÁ¡ÑºÊÌҧ Resume ·Ø¡¾Íϵ´ŒÒ¹Å‹Ò§ ÀÒÂã¹àÇÅÒ 100µ s

ÍØ»¡Ã³ 2

넼

ÍØ»¡Ã³ 3

ÍØ»¡Ã³ 4 ÍØ»¡Ã³Ê§‹ ʶҹРResume ÁÒÂѧÎѺ

ÃÙ»·Õè 5-4 ¡Òà Resume ¨Ò¡ÍØ»¡Ã³ USB àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !%


Resume ÍØ»¡Ã³·§Ñé ËÁ´â´ÂÃÙµÎѺ l Resume ÍØ»¡Ã³·§Ñé ËÁ´¨Ò¡µÑÇÍØ»¡Ã³ l Resume ¨Ò¡¡ÒÃàª×Í è Áµ‹Í¢Í§ÍØ»¡Ã³µÇÑ ãËÁ‹ l Resume ¨Ò¡¡ÒûŴÍØ»¡Ã³ÍÍ¡¨Ò¡ºÑÊ l Resume ¨Ò¡¡ÒÃÃÕ૵ºÑÊ l Resume ÍØ»¡Ã³à©¾ÒеÑǨҡÃÙµÎѺ l

¡Òà Resume ÍØ»¡Ã³·§Ñé ËÁ´¨Ò¡ÃÙµÎѺ¨Ðà¡Ô´¨Ò¡ÃÙµÎѺʋ§Ê¶Ò¹Ð Resume ÍÍ¡ÁÒ㹺ÑÊ໚¹àÇÅÒÁÒ¡ ¡Ç‹Ò 20 ÁÔÅÅÔÇ¹Ô Ò·Õ «Ö§è ʶҹРResume ¡ç¨Ð¶Ù¡ÎѺ¡ÃШÒÂÍÍ¡ä»ÂѧÍØ»¡Ã³·¡Ø æ µÑÇ ·íÒãËŒÍ»Ø ¡Ã³·¡Ø µÑÇ¡ÅѺ ࢌÒÊً¡Ò÷íÒ§Ò¹µÒÁ»¡µÔ ¡Òà Resume ¨Ò¡ÍØ»¡Ã³Á¡Õ Ãкǹ¡Ò÷Õáè µ¡µ‹Ò§áÅÐ¢Ñ¹é µÍ¹·ÕÁè Ò¡¢Ö¹é àÃÔÁè ¨Ò¡ÍØ»¡Ã³·µÕè ͌ §¡Òà Resume ¢ÑºÊ¶Ò¹Ð Resume ࢌÒä»ÂѧºÑÊà¾×Íè ʋ§¢Ö¹é ä»ÂѧÎѺ·Õµè ͋ ÍÂً àÁ×Íè ÎÑºä´ŒÃºÑ Ê¶Ò¹Ð Resume ¡ç¨Ðʋ§Ê¶Ò¹Ð¹Õ¢é ¹Öé ä»´ŒÒ¹º¹ ¹Í¡¨Ò¡¹Ñ¹é Âѧʋ§Ê¶Ò¹Ð¹ÕÅé §ä»Âѧ¾Íϵ·Ø¡¾Íϵ (ÃÇÁ¾Íϵ¢Í§ÍØ»¡Ã³·ÊÕè Ìҧ Resume ¢Ö¹é ÁÒ´ŒÇÂ) ÀÒÂã¹àÇÅÒ 100 äÁâ¤ÃÇÔ¹Ò·Õ ¶ŒÒ´ŒÒ¹º¹ÎѺÁÕ뼄 µ‹ÍÍÂÙ͋ ¡Õ ªÑ¹é Ë¹Ö§è ¡ç¨Ðà¡Ô´¡Ãкǹ¡ÒÃÅѡɳÐà´ÕÂǡѹ ¨¹¡Ãзѧè ʶҹРResume ¶Ù¡Ê‹§¢Ö¹é 件֧ÃÙµÎѺ àÁ×Íè ÃÙµÎÑºä´ŒÃºÑ Ê¶Ò¹Ð Resume áŌǨÐÊÌҧʶҹРResume ¡ÅѺŧÁÒÍա໚¹àÇÅÒÁÒ¡¡Ç‹Ò 20 ÁÔÅÅÔÇ¹Ô Ò·Õ ¡ÒèºÊ¶Ò¹Ð Resume ·íÒ䴌â´Â¡ÒÃÊÌҧʶҹРEOP ໚¹àÇÅÒ 2 ºÔµ¢Í§¡ÒÃʋ§¢ŒÍÁÙŤÇÒÁàÃçǵèÒí ËÃ×Í 1.33 äÁâ¤ÃÇÔ¹Ò·Õ (¡ÒÃʋ§¢ŒÍÁÙŤÇÒÁàÃçǵèÒí 1.5Mbit/s àÇÅÒ 1 ºÔµà·‹Ò¡Ñº 6.67 äÁâ¤ÃÇÔ¹Ò·Õ ´Ñ§¹Ñ¹é àÇÅÒ 2 ºÔµ¨Ö§à·‹Ò¡Ñº 1.33 äÁâ¤ÃÇÔ¹Ò·Õ)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !&


º··Õè 6

â¤Ã§ÊÌҧ¾×é¹°Ò¹¡ÒÃʋ§¢ŒÍÁÙŢͧ ¾Íϵ USB ¡Òõ‹ÍÍØ»¡Ã³ÃNj Á¡Ñ¹º¹ºÑÊàʌ¹à´ÕÂÇ㹨íҹǹÁÒ¡æ ¹Ñ¹é ¨íÒ໚¹µŒÍ§ÁÕ¡ÒèѴ¡ÒÃ·Õ´è ¾Õ Í·Ñ§é ã¹´ŒÒ¹¢¹Ò´¢Í§ ¢ŒÍÁÙÅ·Õ¨è Ðʋ§ ÃдѺ¤ÇÒÁÊíҤѭ¢Í§áµ‹ÅÐÍØ»¡Ã³ áÅСÒèѴ¨Ñ§ËÇСÒÃÃѺʋ§¢ŒÍÁÙÅ à¾ÃÒÐÍØ»¡Ã³·µÕè ͋ ËÇÁ¡Ñ¹ã¹ ºÑÊ¹Ñ¹é ¨ÐÃѺËÃ×Íʋ§¢ŒÍÁÙŷѧé ËÁ´Ã‹ÇÁ¡Ñ¹ÀÒÂã¹ÊÒÂÊÑ­­Ò³·Õµè ͋ ÍÂً 㹺·¹Õ¨é СŋÒǶ֧¡ÒèѴ¢ŒÍÁÙŨҡÍØ»¡Ã³µÒ‹ §æ ࢌÒ໚¹à¿ÃÁ¢ŒÍÁÙŠ͸ԺÒ¶֧¡ÒÃʋ§¢ŒÍÁÙŪ¹Ô´µ‹Ò§æ áÅЧҹ·Õàè ËÁÒÐÊÁ¡Ñº¡ÒÃʋ§¢ŒÍÁÙÅᵋÅÐẺ

6.1 ÀÒ¾ÃÇÁ¢Í§¡ÒÃʋ§ÊÑ­­Ò³ ´Ñ§·Õ¡è ŋÒÇä»áŌÇNjÒÅѡɳСÒÃàª×Íè Áµ‹Í¢Í§ USB ÍÂÙ㋠¹ÃٻẺ¢Í§ºÑÊ ¤Ø³ÊÁºÑµ´Ô Ҍ ¹¡ÒÃʋ§¢ŒÍÁÙŢͧ ¡ÒÃàª×èÍÁµ‹ÍẺ¹Õé¤×Í ÍØ»¡Ã³·Ø¡æ µÑǨеŒÍ§Ê‹§¢ŒÍÁÙÅËÇÁ¡Ñ¹ä»ã¹ÊÒÂÊÑ­­Ò³à¾Õ§àʌ¹à´ÕÂÇ·íÒãˌÍØ»¡Ã³ ·Ø¡æ µÑÇä´ŒÃºÑ ¢ŒÍÁÙÅàËÁ×͹¡Ñ¹·Ñ§é ËÁ´ ᵋ¨ÐàÅ×Í¡ÃѺ੾ÒТŒÍÁÙÅ·Õàè »š¹¢Í§µÑÇàÍ§à·‹Ò¹Ñ¹é «Ö§è ¨Ð·íÒãˌà¡Ô´»˜­ËÒ Ç‹Ò¨Ð·íÒÍ‹ҧäÃãËŒÍ»Ø ¡Ã³áµ‹ÅеÑÇÃÙnj ҋ ¢ŒÍÁÙŪشã´à»š¹¢Í§µ¹¨ÐÃѺʋ§¢ŒÍÁÙÅ䴌àÁ×Íè ã´ áŌǨеÃǨÊͺÍ‹ҧäà NjҢŒÍÁÙÅ·Õè䴌¹Ñ鹶١µŒÍ§ ¨Ö§µŒÍ§¡íÒ˹´ÃٻẺ¡ÒÃÃѺʋ§¢ŒÍÁÙÅᵋÅЪشãˌÁÕ¤ÇÒÁ¹‹Òàª×èͶ×ÍÁÒ¡¢Öé¹ ¡ÒÃʋ§¢ŒÍÁÙŢͧÍØ»¡Ã³ËÅÒÂæ ª¹Ô´ÃÇÁ¡Ñ¹ä»ã¹ÊÒÂÊÑ­­Ò³àʌ¹à´ÕÂÇ¹Ñ¹é ¨ÐµŒÍ§ÁÕ¡ÒÃẋ§ª‹Ç§¢ŒÍÁÙŠᵋÅÐʋǹÍÍ¡¨Ò¡¡Ñ¹Í‹ҧªÑ´à¨¹ à¾×Íè äÁ‹ãˌà¡Ô´¤ÇÒÁÊѺʹ㹡ÒÃÊ×Íè ÊÒà ¢ŒÍÁÙÅ·Õ¶è ¡Ù áº‹§Í͡໚¹Ê‹Ç¹æ ¹Õàé ÃÕ¡ Ç‹Ò á¾ç¡à¡çµ (packet) â´ÂᵋÅÐá¾ç¡à¡çµ¹Í¡¨Ò¡¨Ð»ÃСͺ仴ŒÇ¢ŒÍÁÙÅ·Õµè ͌ §¡ÒèÐÃѺËÃ×Íʋ§¨ÃÔ§æ áÅŒÇ ÂѧµŒÍ§»ÃСͺ´ŒÇ¢ŒÍÁÙÅʋǹÍ×¹è æ ÃÇÁä»´ŒÇÂà¾×Íè ¤Çº¤ØÁ¡ÒÃʋ§¢ŒÍÁÙÅãˌà¡Ô´¤ÇÒÁ¶Ù¡µŒÍ§ ઋ¹ áÍ´à´Ãʢͧ ÍØ»¡Ã³ ËÁÒÂàÅ¢à¿ÃÁ¢ŒÍÁÙÅ áÅÐʋǹµÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅÒ´ â´Â¢ŒÍÁÙÅàËŋҹըè ж١¹íÒä»ÃÇÁ¡Ñº¢ŒÍÁÙÅ·Õè ¨Ðʋ§¨ÃÔ§æ ´ŒÒ¹Ë¹ŒÒáÅдŒÒ¹ËÅѧ Ãкºá¾ç¡à¡çµ¨Ö§à»š¹â¤Ã§ÊÌҧ¾×¹é °Ò¹¡Òö‹Ò¹·Í´¢ŒÍÁÙŢͧ USB à¹×Íè §¨Ò¡¢ŒÍÁÙÅ·ÕÊè §‹ ä»ÀÒÂã¹ÊÒ USB ¹Ñ¹é ÁÕÍÂÙˋ ÅÒª¹Ô´ ·Ñ§é ¢ŒÍÁÙŨÃÔ§æ ¢ŒÍÁÙŤǺ¤ØÁ ¢ŒÍÁÙÅ¡íÒ˹´ ¨Ñ§ËÇТͧà¿ÃÁ ¹Í¡¨Ò¡¹Ñ¹é ·ÔÈ·Ò§¢Í§¢ŒÍÁÙÅÂѧÁÕ·§Ñé 2 ·ÔÈ·Ò§ ´Ñ§¹Ñ¹é á¾ç¡à¡çµ¢ŒÍÁÙŨ֧¶Ù¡áº‹§Í͡໚¹ª¹Ô´µ‹Ò§æ µÒÁ¨Ø´»ÃÐʧ¤ã¹¡ÒÃʋ§áÅТŒÍÁÙÅ·Õºè ÃèØÍÂÙÀ‹ ÒÂã¹ â´Âá¾ç¡à¡çµ¢ŒÍÁÙÅẋ§à»š¹ 4 ª¹Ô´¤×Í â·à¤ç¹á¾ç¡à¡çµ (token packets), ´ÒµŒÒá¾ç¡à¡çµ (data packets),áι´àªç¡á¾ç¡à¡çµ (handshake packets) áÅÐ á¾ç¡à¡çµ¾ÔàÈÉ (special packets) àÁ×Íè ¹íÒá¾ç¡à¡çµ¢ŒÍÁÙŵ‹Ò§ª¹Ô´¡Ñ¹ÁÒÃÇÁ¡Ñ¹à¾×Íè ÊÌҧ¡ÒõԴµ‹ÍÊ×Íè ÊÒÃ¢Ö¹é ¡ÒõԴµ‹Í·ÕÊè Ìҧ¢Ö¹é ¹Õàé ÃÕÂ¡Ç‹Ò ·Ãҹ᫡ªÑ¹è (transaction) «Ö§è ¡ç¨Ð¶Ù¡áº‹§µÒÁÅѡɳСÒõԴµ‹ÍÊ×Íè ÊÒÃ໚¹ 3 ª¹Ô´µÒÁ·ÔÈ·Ò§¢Í§¡ÒÃʋ§¢ŒÍÁÙŤ×Í ·Ãҹ᫡ªÑ¹è ¢Òà¢ŒÒ (In transaction), ·Ãҹ᫡ªÑ¹è ¢ÒÍÍ¡ (Out transaction) áÅÐ à«çµÍÑ»·Ãҹ᫡ªÑ¹è (Setup transaction) ᵋÅзÃҹ᫡ªÑ¹è ʋǹãË­‹¨Ð»ÃСͺ´ŒÇ 3 ʋǹ¢ŒÍÁÙÅËÃ×ÍàÃÕÂ¡Ç‹Ò “à¿Ê” 䴌ᡋ à¿Êâ·à¤ç¹ (㪌 â·à¤ç¹á¾ç¡à¡çµ), à¿Ê¢ŒÍÁÙÅ (㪌´ÒµŒÒá¾ç¡à¡çµ) áÅÐ à¿Êáι´àªç¡ (㪌áι´àªç¡á¾ç¡à¡çµ) àÁ×Íè ÊÌҧ·Ãҹ᫡ ªÑ¹è ¢Ö¹é ÁÒ¨Ò¡á¾ç¡à¡çµµ‹Ò§æ áŌǨж١¹íÒ仨ѴàÃÕ§ã¹à¿ÃÁ¢ŒÍÁÙÅ·ÕÁè ¡Õ ÒÃʋ§ã¹·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ !'


¢ŒÍÁÙÅã¹ÊÒ USB 1 à¿ÃÁ¢ŒÍÁÙÅ

1 à¿ÃÁ¢ŒÍÁÙÅ SOF

ISO

Bulk

Int

SOF

ISO

Bulk

Int

1 à¿ÃÁ¢ŒÍÁÙÅ ISO

SOF

Bulk

Int

1 à¿ÃÁ¢ŒÍÁÙÅ SOF

ISO

Int

1 à¿ÃÁ¢ŒÍÁÙÅ

Bulk

SOF

ISO Int

1 à¿ÃÁ¢ŒÍÁÙÅ

Bulk

SOF

ISO

Int

Bulk

¢ŒÍÁÙÅã¹áµ‹ÅÐà¿ÃÁ SOF

Setup Transaction

Out Transaction

Out Transaction

Out Transaction

In Transaction

¢ŒÍÁÙÅã¹áµ‹ÅзÃҹ᫡ªÑ¹è Token Packet

¢ŒÍÁÙÅã¹áµ‹ÅзÃҹ᫡ªÑ¹è Token Packet

Handshake Packet

Data Packet

Data Packet

Handshake Packet

SOF = àÃÔÁè µŒ¹à¿ÃÁ¢ŒÍÁÅÙ ISO = ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺäÍâ«â¤Ã¹ÑÊ (Isochronous Transfer) Int = ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺÍÔ¹àµÍÏÃÑ»µ (Interrupt Transfer) Bulk = ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺºÑŤ (Bulk Transfer) Con = ¡Òö‹Ò·ʹ¢ŒÍÁÙŤǺ¤ØÁ (Control Transfer)

¢ŒÍÁÙÅã¹áµ‹ÅÐá¾ç¡à¡çµ Sync PID

Device Address

Endpoint Number

CRC

¢ŒÍÁÙÅã¹áµ‹ÅÐá¾ç¡à¡çµ Sync PID

¢ŒÍÁÙÅã¹áµ‹ÅÐá¾ç¡à¡çµ Sync PID

Data

(µÒÁᵋÅЪ¹Ô´¢Í§·Ãҹ᫡ªÑ¹è )

CRC

ÃÙ»·Õè 6-1 â¤Ã§ÊÌҧ¡ÒÃʋ§¢ŒÍÁÙŢͧ USB ¡ÒèѴÃٻẺ¢Í§·Ãҹ᫡ªÑè¹µ‹Ò§æ ¢Í§áµ‹ÅÐà¿ÃÁ¢ŒÍÁÙŨж١¡íÒ˹´à»š¹ª¹Ô´¢Í§¡Òö‹Ò·ʹ ¢ŒÍÁÙÅËÃ×ÍàÃÕ¡·ÑºÈѾ·Ç‹Ò ·ÃÒ¹Êà¿ÍÏ (transfer) «Öè§áº‹§Í͡໚¹ª¹Ô´µ‹Ò§æ µÒÁÃٻẺ㹡Òö‹Ò·ʹ ¢ŒÍÁÙÅã¹áµ‹ÅÐà¿ÃÁ (ᵋÅÐ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ) µÒÁ¤ÇÒÁµŒÍ§¡ÒÃ㹡ÒÃ㪌§Ò¹¢Í§µÑÇÍØ»¡Ã³à»š¹ 4 ª¹Ô´¤×Í ¡Òö‹Ò ·Í´ÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ (Isochronous transfer), ¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡ (Bulk transfer), ¡Òö‹Ò ·Í´ÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ (Interrupt transfer) áÅÐ ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ (Control transfer)

6.2 ª¹Ô´¢Í§¡Òö‹Ò·ʹÊÑ­­Ò³ (transfer type) à¹×Íè §¨Ò¡ USB Í͡ẺänjÃͧÃѺ¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ËÅÒÂæ »ÃÐàÀ· «Ö§è ᵋÅлÃÐàÀ·¨ÐÁÕ¤ÇÒÁ µŒÍ§¡ÒÃ㹡ÒÃÃѺËÃ×Íʋ§¢ŒÍÁÙÅ·Õáè µ¡µ‹Ò§¡Ñ¹Í͡仵ÒÁª¹Ô´ ˹ŒÒ·Õ¢è ͧÍØ»¡Ã³¹¹Ñé æ ´Ñ§¹Ñ¹é ¡ÒÃÃѺʋ§ÊÑ­­Ò³ ¨Ö§µŒÍ§Í͡Ẻänjãˌ¤Ãͺ¤ÅØÁ¡Ò÷íÒ§Ò¹·Ø¡æ »ÃÐàÀ·¢Í§ÍØ»¡Ã³·¡Ø æ ª¹Ô´ ·íÒãˌ USB ¡íÒ˹´ª¹Ô´¢Í§ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅÍ͡໚¹ 4 ª¹Ô´¤×Í l

¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ (Isochronous transfer)

l

¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡ (Bulk transfer)

l

¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ (Interrupt transfer)

l

¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ (Control transfer)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "


㹺··Õè 2 䴌¡Å‹ÒÇà¡ÕÂè ǡѺàÍç¹´¾Íµä»áŌÇÇ‹Ò àÍç¹´¾Íµà»š¹ªØ´ÃÕ¨ÊÔ àµÍÏ·ãÕè ªŒµ´Ô µ‹Í¡ÑºÍØ»¡Ã³ â´Â ᵋÅÐàÍç¹´¾Íµ¨ÐÁÕ˹ŒÒ·Õãè ¹¡Ò÷íÒ§Ò¹·Õµè ҋ §¡Ñ¹ ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò áµ‹ÅÐàÍç¹´¾Íµ¨Ð㪌ª¹Ô´¡ÒÃÃѺʋ§¢ŒÍÁÙŠ໚¹¢Í§µÑÇàͧà¾Õ§ª¹Ô´à´ÕÂÇᡨҡàÍç¹´¾ÍµÍ×è¹æ 㹡ÒõԴµ‹Í¡ÑºâÎʵ ઋ¹ ã¹ÍØ»¡Ã³µÑÇ˹Ö觨ÐÁÕ àÍç¹´¾Íµ·Õè㪌¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁà¾×èÍÃѺʋ§¢ŒÍÁÙŤǺ¤ØÁ¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ ã¹¢³Ð·ÕèÍÕ¡ àÍç¹´¾ÍµË¹Ö§è 㪌¡Òö‹Ò·ʹẺäÍâ«â¤Ã¹ÑÊà¾×Íè ʋ§¢ŒÍÁÙŢͧ¡Ò÷íҧҹ˹ŒÒ·ÕËè ¹Ö§è áÅÐãªŒÍ¡Õ àÍç¹´¾Íµ ˹Ö觷Õè㪌¡Òö‹Ò·ʹẺºÑÅ¡à¾×èÍÃѺʋ§¢ŒÍÁÙŨҡ¡Ò÷íÒ§Ò¹Íա˹ŒÒ·Õè˹Öè§ à»š¹µŒ¹

6.2.1 ¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ ¡Òö‹Ò·ʹÊÑ­­Ò³áºº¹ÕÁé ¡Õ ÒÃʋ§ËÃ×ÍÃѺ¢ŒÍÁÙÅã¹·Ø¡æ à¿ÃÁ¢ŒÍÁÙÅ (·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ) ·íÒãˌà¡Ô´ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ´ŒÇÂÍѵÃÒàÃçÇ·Õ¤è §·Õè ¨Ö§·íÒãˌµÍŒ §ÁÕ¡ÒÃÊíÒÃͧ¡ÒÃÃѺʋ§¢ŒÍÁÙÅã¹áµ‹ÅÐà¿ÃÁ 1 ÁÔÅÅÔÇ¹Ô Ò·ÕänjµÅÍ´ àÇÅÒ´ŒÇ »ÃÐàÀ·¢Í§§Ò¹·Õãè ªŒ¡ÒÃÃѺʋ§¢ŒÍÁÙŪ¹Ô´¹Õ¤é Í× §Ò¹·Õµè ͌ §¡ÒÃÍѵÃÒ¡ÒÃʋ§¢ŒÍÁÙÅ·Õ¤è §·Õµè ÅÍ´àÇÅÒ àª‹¹ ¡ÒÃʋ§ ¢ŒÍÁÙÅàÊÕ§à¾Å§ä»ÂѧÅíÒ⾧ USB ËÃ×Í¡ÒÃÃѺ¢ŒÍÁÙŨҡäÁâ¤Ã⿹ USB à¾ÃÒÐÇ‹Ò ÅѡɳЧҹ»ÃÐàÀ·¹Õ·é Ò§»ÅÒ ·Ò§¨Ð¹íÒ¢ŒÍÁÙÅ·Õäè ´ŒÃºÑ á»Å§¡ÅѺ໚¹¢ŒÍÁÙÅÍйÒÅÍ¡ «Ö§è ¨Ðà¡Ô´¤ÇÒÁ¼Ô´à¾ÕÂé ¹·Ò§¤ÇÒÁ¶Õäè ´ŒËÒ¡¢ŒÍÁÙÅ·ÕÊè §‹ à¡Ô´¡Òà ¢Ò´ª‹Ç§äÁ‹ÊÁèÒí àÊÁÍ áµ‹¨Ò¡¢ŒÍ¡íÒ˹´·ÕÇè ҋ µŒÍ§Ê‹§ËÃ×ÍÃѺ¢ŒÍÁÙŵ‹Íà¹×Íè §ã¹·Ø¡æ à¿ÃÁ¢ŒÍÁÙÅ ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ËÒ¡à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¢ŒÍÁÙŨÐäÁ‹Á¡Õ ÒÃʋ§¢ŒÍÁÙÅ·Õ¼è ´Ô ¹Ñ¹é ¡ÅѺä»ãËÁ‹ à¾ÃÒжŒÒËÒ¡ÁÕ¡ÒÃʋ§ãËÁ‹¨Ð·íÒãËŒÍµÑ ÃÒ ¡ÒÃʋ§¢ŒÍÁÙÅà»ÅÕÂè ¹ä» ¨Ö§·íÒãˌ¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺ¹Õ¨é ÐäÁ‹Á¡Õ ÒÃÃѺ»ÃСѹ¤ÇÒÁ¶Ù¡µŒÍ§¢Í§¢ŒÍÁÙÅ ¡‹Í¹àÃÔÁè ¡Ò÷íÒ§Ò¹ ÍØ»¡Ã³¨ÐµŒÍ§·íÒ¡Òëԧâ¤Ã乫¡Ò÷íÒ§Ò¹¢Í§µÑÇàͧࢌҡѺÊÑ­­Ò³àÃÔÁè µŒ¹¢Í§áµ‹ÅÐ à¿ÃÁ (SOF : Start Of Frame) ¢Í§ USB à¾×Íè ãËŒÍ»Ø ¡Ã³ÊÒÁÒöÃѺËÃ×Íʋ§¢ŒÍÁÙÅã¹·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ䴌·¹Ñ ·íÒãˌà¡Ô´¡ÒÃÃѺáÅÐʋ§¢ŒÍÁÙÅ㹨ѧËÇÐ·Õ¶è ¡Ù µŒÍ§ ¡Òëԧâ¤Ã乫à¢ŒÒ¡Ñºà¿ÃÁ¢ŒÍÁÙŹѹé ÁÕÍÂً 3 ÇÔ¸´Õ §Ñ ¹Õé 1. ÍЫԧâ¤Ã¹ÑÊ (asynchronous) ¡Òëԧâ¤Ã乫Ç¸Ô ¹Õ ÊÕé ­ Ñ ­Ò³¹Ò́¡Ò¢Í§ÍØ»¡Ã³äÁ‹¨Òí ໚¹µŒÍ§ ࢌҨѧËÇСѺÊÑ­­Ò³¢ŒÍÁÙŢͧ USB ÊÑ­­Ò³¹Ò́¡Ò·Õ¤è Ǻ¤ØÁ¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³¨Ð໚¹ÍÔÊÃÐäÁ‹¢¹Öé ÍÂÙ¡‹ ºÑ ÊÑ­­Ò³ SOF áµ‹ÍµÑ ÃÒ¡ÒÃʋ§¢ŒÍÁÙŨеŒÍ§¶Ù¡¡íÒ˹´änjµÒµÑÇ·Õ¤è ҋ ã´¤‹ÒË¹Ö§è «Ö§è ¡íÒ˹´µÍ¹àÃÔÁè µŒ¹¡ÒÃàª×Íè Áµ‹Í äÁ‹ÊÒÁÒöà»ÅÕÂè ¹á»Å§¤ÇÒÁàÃçÇ䴌 µÑÇÍ‹ҧ¢Í§ÍØ»¡Ã³·«Õè §Ô â¤Ã乫´ÇŒ ÂÇÔ¸¹Õ ¤Õé Í× «Õ´ÃÕ ÍÁã¹âËÁ´¡ÒÃàŋ¹à¾Å§ «Õ´àÕ ¾Å§ÁÕ굄 ÃÒ¡ÒÃÊØÁ‹ ¢ŒÍÁÙŤ§·Õàè ·‹Ò¡Ñº 44.1kHz «Ö§è ÍѵÃÒ¡ÒÃʋ§¢ŒÍÁÙŹըé Ð໚¹ÍÔÊÃШҡ¡ÒÃʋ§ÊÑ­­Ò³ SOF ¢Í§ USB 2. «Ô§â¤Ã¹ÑÊ (synchronous) ã¹ÇÔ¸¹Õ ÊÕé ­ Ñ ­Ò³¹Ò́¡Ò·Õãè ªŒ¡ºÑ ÊÑ­­Ò³ SOF ¢Í§ USB ¨ÐµŒÍ§ ࢌҨѧËÇСѹ â´Â¡‹Í¹àÃÔÁè ·íÒ§Ò¹ ÍØ»¡Ã³¨ÐµŒÍ§ÁÕ¡ÒûÃѺÊÑ­­Ò³¹Ò́¡Ò¢Í§µÑÇàͧãˌࢌҡѺ¨Ñ§ËÇÐ SOF ᵋ¶ÒŒ ËÒ¡äÁ‹ÊÒÁÒö»ÃѺÊÑ­­Ò³¹Ò́¡Ò¢Í§µÑÇàͧ䴌 USB ¨ÐÂÍÁãˌ㪌¨§Ñ ËÇСÒÃʋ§ SOF ¢Í§µÑÇÍØ»¡Ã³¹¹Ñé ໚¹ËÅÑ¡ áŌǻÃѺ¨Ñ§ËÇСÒÃʋ§ SOF ¢Í§µÑÇâÎʵàͧãˌࢌҡѺ¡ÒÃʋ§¢ŒÍÁÙŢͧÍØ»¡Ã³¹¹Ñé 䴌 â´ÂÍØ»¡Ã³µÇÑ ¹Ñ¹é ¨ÐàÃÕÂ¡Ç‹Ò ÍØ»¡Ã³ÁÒÊàµÍÏ (master device) ᵋ USB ͹حҵãˌÁÍÕ »Ø ¡Ã³ÁÒÊàµÍÏ䴌à¾Õ§µÑÇà´ÕÂÇ෋ҹѹé ã¹Ãкº ¤ÇÒÁ àÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙÅÇÔ¸¹Õ Õé µŒÍ§¡íÒ˹´änjµÒµÑǵѧé ᵋàÃÔÁè µŒ¹¡ÒÃàª×Íè Áµ‹Íઋ¹à´ÕÂǡѺẺÍЫԧâ¤Ã¹ÑÊ µÑÇÍ‹ҧ ¢Í§ÍØ»¡Ã³··Õè Òí §Ò¹Åѡɳйդé Í× äÁâ¤Ã⿹ USB ·ÕÁè ÍÕ µÑ ÃÒ¡ÒÃÊØÁ‹ ¢ŒÍÁÙÅࢌҨѧËÇСѺÊÑ­­Ò³ SOF ¹Ñ¹è àͧ ÍÕ¡ µÑÇÍÂ‹Ò§Ë¹Ö§è ¡ç¤Í× âÁà´çÁ ISDN ¤ÇÒÁàÃçÇ 64Kbit/s ¨ÐµŒÍ§à¡Ô´¡Òëԧâ¤Ã乫Ê­ Ñ ­Ò³ SOF ¢Í§âÎʵà¢ŒÒ¡ÑºÊÑ­­Ò³ ¹Ò́¡Ò¢Í§Ãкº ISDN ¡‹Í¹¨Ö§¨Ðà¡Ô´¡Òö‹Ò·ʹ¢ŒÍÁÙÅ·Õ¤è ÇÒÁàÃçǤ§·Õè 64Kbit/s 䴌

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "


3. ÍÐá´»µÕ¿ (adaptive) ÇÔ¸¹Õ àÕé »š¹ÇÔ¸·Õ µÕè ÇÑ ÍØ»¡Ã³Á¤Õ ÇÒÁÊÒÁÒöÁÒ¡·ÕÊè ´Ø à¾ÃÒÐÍØ»¡Ã³ ÊÒÁÒö»ÃѺ¤ÇÒÁàÃçÇ㹡Òö‹Ò·ʹ¢ŒÍÁÙÅ䴌㹪‹Ç§·Õ¡è njҧÁÒ¡ äÁ‹¶¡Ù ¡íÒ˹´änjµÒµÑÇ·Õ¤è ҋ ã´¤‹Ò˹֧è ÊÒÁÒö à»ÅÕÂè ¹á»Å§¤ÇÒÁàÃçÇ䴌ã¹ÃÐËNjҧ¡ÒÃ㪌§Ò¹ ÊÑ­­Ò³¹Ò́¡ÒÀÒÂã¹Ãкº¢Í§ÍØ»¡Ã³¨ÐࢌҨѧËÇСѺÊÑ­­Ò³ ¢ŒÍÁÙÅ·ÕÊè §‹ ã¹ÊÒ (ᵡµ‹Ò§¨Ò¡ÇÔ¸«Õ §Ô â¤Ã¹ÑÊ·Õàè ¢ŒÒ¨Ñ§ËÇСѺÊÑ­­Ò³ SOF) µÑÇÍ‹ҧ¢Í§ÍØ»¡Ã³··Õè Òí §Ò¹ÅѡɳР¹Õ¤é Í× «Õ´ÃÕ ÍÁàŋ¹à¾Å§·ÕÁè ÍÕ »Ø ¡Ã³¾àÔ ÈÉ㹡ÒÃà»ÅÕÂè ¹ÍѵÃÒ¡ÒÃÊØÁ‹ ¢ŒÍÁÙÅ (sample rate converter : SRC) «Ö§è ´ŒÇÂÍØ»¡Ã³µÇÑ ¹Õ¨é зíÒãˌ¤ÇÒÁàÃçÇ㹡ÒÃÊØÁ‹ ¢ŒÍÁÙÅäÁ‹¨Òí ໚¹µŒÍ§¤§·Õàè ·‹Ò¡Ñº 44.1kHz ᵋ¨ÐÊÒÁÒö»ÃѺà»ÅÕÂè ¹ 仵ÒÁ¢Íºà¢µ¡Ò÷íÒ§Ò¹¢Í§µÑÇ SRC ¨Ñ§ËÇСÒö‹Ò·ʹ¢ŒÍÁÙÅẺäÍâ«â¤Ã¹Ñʨж١¡íÒ˹´ãˌʧ‹ ¢ŒÍÁÙÅã¹·Ø¡æ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ à¾×Íè ãˌà¡Ô´ ÍѵÃÒ¡ÒÃʋ§¢ŒÍÁÙÅ·Õ¤è §·Õ¢è ¹Öé ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ¨ÐµŒÍ§¨Í§áº¹´Ç´Ô ¸¢Í§ÊÒÂänj¤§·Õµè ÅÍ´àÇÅÒ ¢¹Ò´¢ŒÍÁÙÅãË­‹ ·ÕèÊØ´·ÕèÊÒÁÒöʋ§ä´Œã¹áµ‹ÅÐà¿ÃÁ෋ҡѺ 1,023 亵 â´ÂÍØ»¡Ã³¨Ðᨌ§¢¹Ò´¢Í§¡ÒÃÃѺʋ§¢ŒÍÁÙÅ·Õ赌ͧ¡Òà 㪌ã¹áµ‹ÅÐà¿ÃÁᡋâÎʵ·Ò§àÍç¹´¾Íµ´ÔʤÃÔ»àµÍÏ «Öè§âÎʵ¨Ð¹íÒä»ãªŒ¾Ô¨ÒóҤÇÒÁÊÒÁÒö¢Í§ÃкºÇ‹Ò ÃͧÃѺ¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ä´ŒËÃ×ÍäÁ‹ ËÒ¡¾Ô¨ÒóÒáŌÇÇ‹Ò áº¹´Ç´Ô ¸¢ÍŒ ÁÙŢͧÃкºäÁ‹à¾Õ§¾Íµ‹Í¤ÇÒÁµŒÍ§ ¡ÒâͧµÑÇÍØ»¡Ã³ ¡ç¨ÐäÁ‹µ§Ñé ¤‹Ò·Õ¨è Òí ໚¹ã¹¡Ò÷íÒ§Ò¹ãˌᡋµÇÑ ÍØ»¡Ã³ áÅл´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¹Ñ¹é æ ·íÒãˌ ÍØ»¡Ã³µÑǹÑé¹äÁ‹ÊÒÁÒö·íҧҹ䴌 à¹×èͧ¨Ò¡ã¹¡Òö‹Ò·ʹ¢ŒÍÁÙÅẺ¹Õ鵌ͧ¡ÒäÇÒÁàÃçÇ·Õ褧·ÕèµÅÍ´àÇÅÒ àÁ×èÍà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§ ¢ŒÍÁÙŨ֧äÁ‹ÊÒÁÒöʋ§ãËÁ‹ä´Œ à¾ÃÒШзíÒãˌà¡Ô´¡Òëԧâ¤Ã乫¢Í§¢ŒÍÁÙŤÅÒ´à¤Å×Íè ¹ä» Ê‹§¼Åãˌ¡ÒÃÃѺ¢ŒÍÁÙÅ à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´ ´Ñ§¹Ñ鹡Òö‹Ò·ʹ¢ŒÍÁÙÅẺäÍâ«â¤Ã¹Ñʨ֧äÁ‹ÁÕ¡ÒõÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¡ÒÃʋ§ ¢ŒÍÁÙÅáÅÐäÁ‹ÁÕ¡ÒÃʋ§¢ŒÍÁÙÅ«éíÒ ·íÒãˌÇÔ¸Õ¡ÒùÕéäÁ‹àËÁÒСѺ§Ò¹·Õ赌ͧ¡ÒäÇÒÁ¶Ù¡µŒÍ§¢Í§¢ŒÍÁÙÅ໚¹ÊíҤѭ

6.2.2 ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ ¡ÒÃÃÑ º ʋ § ¢Œ Í ÁÙ Å ª¹Ô ´ ¹Õé Ê ÃŒ Ò §¢Öé ¹ à¾×è Í àÅÕ Â ¹áºº¡ÒÃÊÌ Ò §ÊÑ ­ ­Ò³ÍÔ ¹ àµÍÏ ÃÑ » µ ¢ ͧÍØ » ¡Ã³ ãˌᡋÃкº ÇÔ¸¡Õ ÒÃàÅÕ¹ẺÍÒÈÑ¡ÒÃǹ͋ҹ¢ŒÍÁÙŨҡµÑÇÍØ»¡Ã³µÒ‹ §æ ã¹ÃÐÂÐàÇÅÒ·Õ¡è Òí ˹´Í‹ҧÊÁèÒí àÊÁÍ ËÃ×ÍàÃÕÂ¡Ç‹Ò â¾ÅÅÔ§è (polling) â´ÂÍѵÃÒ¡ÒÃǹ͋ҹ¢ŒÍÁÙŹըé еŒÍ§äÁ‹ªÒŒ à¡Ô¹ä»à¾ÃÒШзíÒãˌà¡Ô´¡ÒÃÊÙ­àÊÕ¢ŒÍÁÙÅ ·Õè͋ҹäÁ‹·Ñ¹ä´Œ ã¹¢³Ðà´ÕÂǡѹ¡ç¨ÐµŒÍ§äÁ‹àÃçÇà¡Ô¹ä» ¨¹à¡Ô¹à¢ŒÒä»ã¹áº¹´ÇÔ´¸¢ŒÍÁÙÅÁÒ¡à¡Ô¹¨íÒ໚¹ ¶ŒÒËÒ¡ ÍØ»¡Ã³äÁ‹Á¢Õ ͌ ÁÙÅ·Õµè ͌ §¡ÒÃʋ§ ¡ç¨Ðʋ§ÊÑ­­Ò³ No Acknowledge (NAK) µÍº¡ÅѺ ¤ÒºàÇÅÒ㹡ÒÃǹ͋ Ò ¹¢Œ Í ÁÙ Å ¢Í§ÍØ » ¡Ã³ á µ‹ Å ÐµÑ Ç ¨Ð¢Öé ¹ ÍÂً ¡Ñ º ¤ÇÒÁµŒ Í §¡ÒâͧÍØ » ¡Ã³ ᵋÅЪ¹Ô´ ¤ÒºàÇÅÒ¹ÕÊé ÒÁÒöà»ÅÕÂè ¹ä´Œã¹ª‹Ç§¡ÇŒÒ§µÑ§é ᵋǹ͋ҹ·Ø¡æ 1 à¿ÃÁ (1 ÁÔÅÅÔÇ¹Ô Ò·Õ) 仨¹¶Ö§·Ø¡æ 255 à¿ÃÁ (255 ÁÔÅÅÔÇ¹Ô Ò·Õ) ᵋ¶ÒŒ ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ¤ÒºàÇÅÒ·ÕÊè ¹Ñé ·ÕÊè ´Ø (¤ÇÒÁ¶ÕÊè §Ù ÊØ´) ·ÕÊè ÒÁÒöǹ ͋ҹ䴌¤Í× ·Ø¡æ 10 à¿ÃÁ (10 ÁÔÅÅÔÇ¹Ô Ò·Õ) âÎʵ¨ÐÃÙ¤Œ ÒºàÇÅÒ㹡ÒÃǹ͋ҹ¢Í§àÍç¹´¾Íµ·ãÕè ªŒÇ¸Ô ¡Õ Òö‹Ò·ʹ ÊÑ­­Ò³áͺºÍÔ¹àµÍÏÃÑ»µ¨Ò¡¡ÒÃ͋ҹàÍç¹´¾Íµ´ÔʤÃÔ»àµÍÏ ¡ÒÃʋ§¢ŒÍÁÙÅᵋÅФÃÑé§ÊÒÁÒö¡íÒ˹´ãˌʋ§ä´ŒÁÒ¡·ÕèÊØ´ 64 亵 (¶ŒÒËҡ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçǵèíҨРʋ§ä´ŒÊ§Ø ÊØ´ 8 亵) ËÒ¡¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃʋ§·Ñ§é ËÁ´ÁÕÁÒ¡¡Ç‹Ò¡ç¨ÐµŒÍ§áº‹§à»š¹Ê‹Ç¹æ â´ÂᵋÅÐʋǹ¨ÐµŒÍ§Ê‹§ ãˌàµçÁ¨íҹǹ¢ŒÍÁÙÅ·ÕÊè ÒÁÒöʋ§ä´ŒÊ§Ù ÊØ´ (à¾×Íè ãˌâÎʵÃºÑ ·ÃҺNjÒÂѧʋ§¢ŒÍÁÙÅäÁ‹¤Ãº) áŌÇ㹡ÒÃʋ§¤Ãѧé ÊØ´·ŒÒ «Ö§è ¨Ðʋ§äÁ‹àµçÁ¨íҹǹÊÙ§ÊØ´¨Ð໚¹µÑǺ͡ãˌâÎʵ·ÃÒºàÍ§Ç‹Ò ¨º¡ÒÃʋ§¢ŒÍÁÙÅáŌÇ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "


Í‹ҧäáçµÒÁ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ¹Õé ¡çµÍŒ §¡ÒÃÍѵÃÒ¡ÒÃǹ͋ҹ¢ŒÍÁÙÅ·Õ¤è §·Õ¤è ŌÒ¡Ѻ ¡ÒÃẺäÍâ«â¤Ã¹ÑÊ à¾ÃÒжŒÒËÒ¡âÎʵäÁ‹ÊÒÁÒöǹ͋ҹ¢ŒÍÁÙÅ䴌µÒÁ·Õáè ¨Œ§änjã¹àÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏ ÍÒ¨ ·íÒãˌà¡Ô´¡ÒÃŌ¹¢Í§¢ŒÍÁÙÅ·Õµè ͌ §¡ÒèÐʋ§¨Ò¡ÍØ»¡Ã³¡ÅѺÁÒÂѧâÎʵä´ŒËÃ×Íà¡Ô´âÍàÇÍÏâ¿ÅÇ (overflow) à¹×Íè § ¨Ò¡âÎʵäÁ‹Íҋ ¹¢ŒÍÁÙÅÍ͡仨¹¡ÃÐ·Ñ§è ¢ŒÍÁÙÅ·Õàè µÃÕÂÁ¨Ðʋ§ÅŒ¹ºÑ¿à¿ÍÏ ´Ñ§¹Ñ¹é ¡‹Í¹àÃÔÁè ¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ âÎʵ¨ÐµŒÍ§Í‹Ò¹àÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏÍÍ¡ÁÒáŌǾԨÒóÒNjÒÃкºÊÒÁÒöÃͧÃѺ¡Ò÷íҧҹ䴌ËÃ×ÍäÁ‹ ¶ŒÒ䴌 ¡ç¨ÐµÑ§é ¤‹Ò·Õ¨è Òí ໚¹ã¹¡Ò÷íÒ§Ò¹áŌÇàÃÔÁè ¡Ò÷íÒ§Ò¹ ᵋ¶ÒŒ äÁ‹ÊÒÁÒöÃͧÃѺ䴌¡¨ç ÐäÁ‹µ§Ñé ¤‹ÒãˌáÅл´¡Ò÷íÒ§Ò¹ ¢Í§¾Íϵ¹Ñé¹ ¡Òö‹ Ò Â·Í´ÊÑ ­ ­Ò³áººÍÔ ¹ àµÍÏ ÃÑ » µ ¹Õé ¶Ö § áÁŒ ¨ еŒ Í §¡ÒÃÍÑ µ ÃÒ¡ÒÃǹ͋ Ò ¹¢Œ Í ÁÙ Å ·Õè ¤ §·Õè á µ‹ ¡çäÁ‹¨íÒ໚¹µŒÍ§«Ô§â¤Ã乫ÍѵÃÒ¡ÒÃʋ§¢ŒÍÁÙÅࢌҡѺÃкº ´Ñ§¹Ñé¹àÁ×èÍà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¡ÒÃʋ§¢ŒÍÁÙÅ¢Ö鹡ç ÊÒÁÒöʋ§ãËÁ‹ä´Œ ·íÒãˌ¡Òö‹Ò·ʹÊÑ­­Ò³áºº¹Õ¨é §Ö µŒÍ§ÁÕ¡ÒõÃǨÊͺ¤ÇÒÁ¶Ù¡µŒÍ§¢Í§¢ŒÍÁÙÅáÅÐÁÕ¡ÒÃʋ§ ¢ŒÍÁÙÅãËÁ‹ã¹Ãͺ¡ÒÃǹ͋ҹ¶Ñ´ä»ËÒ¡à¡Ô´¤ÇÒÁ¼Ô´¾ÅҴ㹡ÒÃʋ§ µÑÇÍ‹ҧ¢Í§ÍØ»¡Ã³·Õè㪌¡Òö‹Ò·ʹ ÊÑ­­Ò³áºº¹Õ¤é Í× ¤Õº ÍÏ´áÅÐàÁÒʏ ໚¹µŒ¹

6.2.3 ¡Òö‹Ò·ʹÊÑ­­Ò³áºººÑÅ¡ ໚¹¡ÒÃÃѺʋ§¢ŒÍÁÙż‹Ò¹¾Íϵ USB ÊíÒËÃѺ§Ò¹·ÕèäÁ‹µŒÍ§¡ÒÃÍѵÃÒàÃçÇ㹡Òö‹Ò·ʹÊÑ­­Ò³·Õ褧·Õè ÍØ»¡Ã³·àÕè Ëç¹ä´Œª´Ñ ਹ·ÕÊè ´Ø ÊíÒËÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³ã¹Åѡɳйդé Í× à¤Ã×Íè §¾ÔÁ¾ à¾ÃÒТŒÍÁÙÅ·Õ¼è ãٌ ªŒ§Ò¹µŒÍ§ ¡ÒÃʋ§ä»¾ÔÁ¾¹¹Ñé äÁ‹µÍŒ §¡ÒäÇÒÁàÃçÇ㹡ÒÃʋ§·ÕÊè ÁèÒí àÊÁÍ ¡ÒÃʋ§ªŒÒËÃ×ÍàÃçÇ¡ç¨Ðʋ§¼Å¡Ãзºã¹´ŒÒ¹àÇÅÒ·Õµè ͌ § 㪌ÁÒ¡¢Ö¹é ෋ҹѹé ᵋ¢ÍŒ ÁÙÅ·Õäè ´Œ¡Âç §Ñ äÁ‹àÊÕÂËÒÂᵋÍ‹ҧ㴠à¹×èͧ¨Ò¡¡Òö‹Ò·ʹÊÑ­­Ò³áºº¹ÕéäÁ‹ÊÒÁÒö¨Í§¡ÒÃ㪌§Ò¹áº¹´ÇÔ´¸¢Í§ºÑÊ䴌 ´Ñ§¹Ñ鹡ÒÃÃѺʋ§ ¢ŒÍÁÙŨÐà¡Ô´¢Ö¹é ¡çµÍ‹ àÁ×Íè ºÑÊNjҧ¨Ò¡¡ÒÃʋ§¢ŒÍÁÙÅÍ×¹è æ ·Ñ§é ËÁ´áŌÇ෋ҹѹé ËÃ×͡ŋÒÇÍ‹ҧ§‹ÒÂæ Ç‹Ò ¡Òö‹Ò·ʹ ÊÑ­­Ò³áºººÑÅ¡¨Ðà¡Ô´¢Ö¹é 䴌¡µç ͋ àÁ×Íè àËÅ×Í·ÕÇè ҋ §¢Í§¢ŒÍÁÙÅã¹áµ‹ÅÐà¿ÃÁ෋ҹѹé ËÒ¡äÁ‹Á·Õ ÇÕè ҋ §àËÅ×Í¡ç¨ÐµŒÍ§ ÃÍä»àÃ×Íè Âæ ¨¹¡Ç‹Ò¨ÐÊÒÁÒöʋ§ä´Œ ᵋ㹷ҧ¡ÅѺ¡Ñ¹¶ŒÒ㹺ÑÊäÁ‹ÁÍÕ »Ø ¡Ã³µÇÑ ã´ãªŒ§Ò¹ÍÂÙà‹ Å¡ç¨ÐÊÒÁÒöʋ§ ¢ŒÍÁÙÅ䴌àµçÁ¤ÇÒÁÊÒÁÒö·Õºè ÊÑ ¨Ðʋ§ä´Œ·¹Ñ ·Õ·Òí ãˌ¤ÇÒÁàÃçÇ㹡ÒÃʋ§¢ŒÍÁÙÅÊÙ§ÁÒ¡ ÍÒ¨ÊÙ§¶Ö§ 1 àÁ¡Ð亵µÍ‹ ÇÔ¹Ò·Õ àÅ·Õà´ÕÂÇ (¢¹Ò´¢ŒÍÁÙÅ 1 亵 = 8 ºÔµ à¾ÃÒЩйѹé 12 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ ¨Ö§à·‹Ò¡Ñº 1.5 àÁ¡Ð亵µÍ‹ ÇÔ¹Ò·Õ) ¶Ö § áÁŒ Nj Ò ºÑ Ê ¨ÐNj Ò §ÁÒ¡à¾Õ  §ã´ ᵋ ¡ Òö‹ Ò Â·Í´ÊÑ ­ ­Ò³áºººÑ Å ¡ ¡ç ä Á‹ Ê ÒÁÒöʋ § ¢Œ Í ÁÙ Å ¢¹Ò´ãË­‹ä»ã¹¤ÃÒÇà´ÕÂÇ䴌 à¾ÃÒÐàÊÕ觵‹Í¡ÒÃà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¢ŒÍÁÙÅÃÐËNjҧʋ§ ¢ŒÍÁÙŨеŒÍ§¶Ù¡áº‹§ Í͡໚¹Ê‹Ç¹æ áŌǷÂÍÂʋ§µ‹Í¡Ñ¹ä»ã¹à¿ÃÁà´ÕÂǡѹ â´Â¢¹Ò´¢Í§ªÔ¹é ¢ŒÍÁÙÅ·Õãè Ë­‹·ÊÕè ´Ø ËÅѧ¨Ò¡áº‹§áŌǨР෋ҡѺ 8, 16, 32 ËÃ×Í 64 亵 ¡ÒÃʋ§¢ŒÍÁÙÅ·Õ¶è ¡Ù áº‹§¨ÐµŒÍ§Ê‹§ã¹¢¹Ò´ãË­‹·ÊÕè ´Ø ·Õµè ¡Å§¡Ñ¹änj¡ºÑ âÎʵà¾×Íè ãˌâÎʵ·ÃÒºÇ‹Ò ÂѧäÁ‹¨º¡ÒÃʋ§¢ŒÍÁÙÅ áÅÐâÎʵ¨Ð·ÃҺNjҨº¡ÒÃʋ§ àÁ×Íè ¾ºÇ‹Ò¢¹Ò´¢Í§¢ŒÍÁÙÅ·ÕÊè §‹ äÁ‹àµçÁ¢¹Ò´ ãË­‹Ê´Ø ·Õ¡è Òí ˹´änj (àËÁ×͹¡ÑºáººÍÔ¹àµÍÃÃ»Ñ µ) à¹×è Í §¨Ò¡ÍØ » ¡Ã³ ·Õè ã ªŒ ¡ Òö‹ Ò Â·Í´ÊÑ ­ ­Ò³áºº¹Õé ʋ Ç ¹ãË­‹ µŒ Í §¡ÒäÇÒÁ¶Ù ¡ µŒ Í §¢Í§¢Œ Í ÁÙ Å ÊÙ§ ઋ¹ «Õ´ÃÕ ÍÁ (ã¹Ê‹Ç¹¢Í§¡ÒÃ͋ҹ¢ŒÍÁÙÅ·Õäè Á‹ãª‹à¾Å§) à¤Ã×Íè §¾ÔÁ¾ ËÃ×ÍÊ᡹à¹ÍÏ ´Ñ§¹Ñ¹é ¡ÒõÃǨÊͺ¢ŒÍÁÙÅ ¨Ö§à»š¹àÃ×Íè §¨íÒ໚¹ 㹡ÒÃʋ§¢ŒÍÁÙÅᵋÅФÃÑ§é ¨Ö§ÁÕ¡ÒõÃǨÊͺ¤ÇÒÁ¶Ù¡µŒÍ§ã¹·Ø¡æ ¤Ãѧé áÅШÐà¡Ô´¡ÒÃʋ§ãËÁ‹ ¶ŒÒÁÕ¤ÇÒÁ¼Ô´¾ÅÒ´à¡Ô´¢Öé¹

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "!


6.2.4 ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ ¡ÒÃÃѺʋ§¢ŒÍÁÙÅẺ¹ÕéÍÒ¨¶×Í䴌NjÒÁÕ¤ÇÒÁÊíҤѭ·ÕèÊØ´¡çNjÒ䴌 à¾ÃÒÐ㪌ʋ§¤íÒÊÑ觤Ǻ¤ØÁ¡Ò÷íÒ§Ò¹ ·Ñ§é ËÁ´¢Í§ÍØ»¡Ã³·¡Ø æ µÑÇ µÑ§é ᵋàÃÔÁè ááàÁ×Íè ÍØ»¡Ã³¶¡Ù àª×Íè Áµ‹ÍࢌҡѺÃкº à¡Ô´¡ÒÃ͋ҹ¢ŒÍÁÙÅ´ÔʤÃÔ»àµÍÏ µ‹Ò§æ àÁ×Íè 䴌¢ÍŒ ÁÙÅÁÒâÎʵ¡¨ç оԨÒóÒNjÒÊÒÁÒöÃͧÃѺ¡Ò÷íҧҹ䴌ËÃ×ÍäÁ‹ àÁ×Íè ¾Ô¨ÒóÒNjÒ䴌 ¡ç¨ÐµÑ§é ¤‹Ò¡Òà ·íÒ§Ò¹µ‹Ò§æ áÅÐàÃÔÁè ¡Ò÷íÒ§Ò¹ ·Ñ§é ËÁ´·Õ¡è ŋÒÇÁÒ¹Õ¨é Ð㪌¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁà¾×Íè µÔ´µ‹Í¡ÑºàÍç¹´¾Íµ ¤Í¹â·ÃÅ໚¹¡Ø­á¨ËÅÑ¡·Ñé§ÊÔé¹ ¡Òö‹Ò·ʹÊÑ­­Ò³·Ñé§ 3 Ẻ·Õ輋ҹÁÒŌǹáŌÇᵋ໚¹¡ÒÃÃѺʋ§¢ŒÍÁÙÅ·Õèà¡Ô´¨Ò¡¿˜§¡ªÑ蹡Ò÷íÒ§Ò¹ ¢Í§µÑÇÍØ»¡Ã³·§Ñé ËÁ´ ᵋÊÒí ËÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ¹Ñ¹é ໚¹¡ÒÃʋ§¢ŒÍÁÙŤǺ¤ØÁµÑÇÍØ»¡Ã³«§Öè ¤ÇÒÁ ¼Ô´¾ÅҴ㹡ÒÃʋ§¢ŒÍÁÙÅ໚¹àÃ×Íè §·ÕÂè ÍÁÃѺäÁ‹ä´Œ ´Ñ§¹Ñ¹é ¡ÒÃʋ§¢ŒÍÁÙŪ¹Ô´¹Õ¨é ж١Í͡ẺÁÒ¾ÔàÈɡNjҡÒÃʋ§ª¹Ô´ Í×¹è æ à¾×Íè »‡Í§¡Ñ¹¤ÇÒÁ¼Ô´¾ÅÒ´·Õ¨è Ðà¡Ô´¢Ö¹é ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ»ÃСͺ´ŒÇ ¡ÒÃʋ§¢ŒÍÁÙÅ 3 ª‹Ç§ ª‹Ç§·ÕËè ¹Ö§è ¤×Í ª‹Ç§àµÃÕÂÁµÑÇµÑ§é ¤‹Ò (setup stage) ª‹Ç§·Õè 2 ¤×Í ª‹Ç§¢ŒÍÁÙÅ (data stage) áÅЪ‹Ç§ÊØ´·ŒÒ¤×Í ª‹Ç§µÃǨÊͺ (handshake stage) ¨ÐàËç¹ä´ŒÇҋ ¤ÅŒÒ ¡Ñº¡ÒÃẋ§·Ãҹ᫡ªÑ¹è ໚¹ 3 à¿Ê·Õ¡è ŋÒÇä»áŌÇ㹵͹µŒ¹ ¨Ðᵡµ‹Ò§¡Ñ¹µÃ§·Õè ᵋÅÐÊ൨¤×Í 1 ·Ãҹ᫡ªÑ¹è «Ö§è »ÃСͺ´ŒÇ¡ÒÃʋ§¢ŒÍÁÙÅ 3 ª‹Ç§àÃÕºÌÍÂáÅŒÇ áŌǹíÒÁÒ»ÃСͺ¡Ñ¹ÍÕ¡ªÑ¹é Ë¹Ö§è ´Ñ§ÃÙ»·Õè 6-2 ᵋÊÒí ËÃѺºÒ§¤íÒÊÑ§è ·Õäè Á‹µÍŒ §¡ÒáÒÃÃѺËÃ×Íʋ§¢ŒÍÁÙÅ¡çäÁ‹¨Òí ໚¹µŒÍ§ÁժNj §¢ŒÍÁÙÅ ·íÒãˌàËÅ×Íà¾Õ§ 2 ª‹Ç§¤×Í ª‹Ç§µÑ§é ¤‹ÒáÅЪ‹Ç§µÃǨÊͺ 㹪‹Ç§µÑ§é ¤‹Ò¨ÐºÃèآ͌ ÁÙÅÂÒÇ 8 亵«§Öè ÀÒÂã¹à»š¹¤íÒÊÑ§è µ‹Ò§æ à¾×Íè ʋ§ä»ÂѧµÑÇÍØ»¡Ã³ ʋǹª‹Ç§¢ŒÍÁÙŨРºÃèآ͌ ÁÙÅ·Õµè ͌ §¡ÒÃʋ§ËÃ×ÍÃѺ¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§¤íÒÊѧè áÅÐʋǹÊØ´·ŒÒª‹Ç§µÃǨÊͺ໚¹¡ÒõÃǨÊͺ¡Òõͺ ÃѺ¤íÒÊÑ§è «Ö§è ʋǹ¹Õàé »š¹Ê‹Ç¹·Õ¾è àÔ ÈɡNjҡÒÃʋ§¢ŒÍÁÙÅẺ»¡µÔ¤Í× ¨Ð㪌·Ãҹ᫡ªÑ¹è ¢ÒÍÍ¡·ÕÁè ¤Õ ÇÒÁÂÒÇ¢ŒÍÁÙÅ໚¹ 0 㹡Òõͺáι´àªç¡ÍÕ¡ªÑ¹é ˹֧è (ÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅзÃҹ᫡ªÑ¹è ÍÂÙ㋠¹Ê‹Ç¹¶Ñ´ä») «Ö§è ¨ÐàËç¹ä´ŒÇҋ 㹡ÒÃʋ§ ¤íÒÊѧè ᵋÅФÃÑ§é ¹Ñ¹é ÁÕ¡ÒõÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅÒ´¡Ñ¹Í‹ҧࢌÁ§Ç´¡Ç‹Ò¡ÒÃʋ§¢ŒÍÁÙÅẺÍ×¹è æ Í‹ҧàËç¹ä´Œª´Ñ USB ¨ÐÊíÒÃͧẹ´Ç´Ô ¸¡ÒÃʋ§¢ŒÍÁÙŢͧºÑÊänj 10 % à¾×Íè 㪌ÊÒí ËÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁâ´Â ੾ÒÐ à¾×Íè äÁ‹ãˌà¡Ô´»˜­ËÒ¡ÒäǺ¤ØÁÍØ»¡Ã³Åҋ ªŒÒàÁ×Íè ÁÕ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ»ÃÔÁÒ³ÁÒ¡æ à¾ÃÒÐÍÒ¨¨Ð¶Ù¡ÍØ»¡Ã³ ºÒ§µÑǴ֧ẹ´ÇÔ´¸ä»ãªŒÃѺʋ§¢ŒÍÁÙŨ¹äÁ‹ÊÒÁÒöʋ§ÊÑ­­Ò³¤Çº¤ØÁ䴌

6.3 â¤Ã§ÊÌҧÃдѺŋҧ¢Í§¡ÒÃÃѺʋ§¢ŒÍÁÙÅ â¤Ã§ÊÌҧÃдѺŋҧÊØ´¢Í§ USB ¤×Í ¡ÒèѴ¢ŒÍÁÙÅ໚¹á¾ç¡à¡çµ «Ö§è µÑÇá¾ç¡à¡çµàͧẋ§ä´ŒËÅÒª¹Ô´ àÁ×Íè ¹íÒá¾ç¡à¡çµµ‹Ò§ª¹Ô´¡Ñ¹ÁÒàÃÕ§µ‹Í¡Ñ¹¡ç¨Ð䴌·Ãҹ᫡ªÑ¹è ¢Ö¹é ÁÒ ´Ñ§¹Ñ¹é ·Ãҹ᫡ªÑ¹è ¨Ö§ÁÕËÅÒª¹Ô´¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§á¾ç¡à¡çµ·Õ»è ÃСͺ¢Ö¹é ÁÒ áÅÐàÁ×Íè ¹íÒ·Ãҹ᫡ªÑ¹è µ‹Ò§æ ÁҨѴàÃÕ§ŧã¹à¿ÃÁ¢ŒÍÁÙÅ·Õµè ͌ §Ê‹§ã¹·Ø¡ 1 ÁÔÅÅÔÇ¹Ô Ò·Õã¹ÅíҴѺµ‹Ò§æ ¡Ñ¹¡ç䴌໚¹¡Òö‹Ò·ʹÊÑ­­Ò³ª¹Ô´µ‹Ò§æ ઋ¹ ¶ŒÒʋ§¢ŒÍÁÙÅ·Ø¡æ à¿ÃÁ´ŒÇ¢¹Ò´¤§ ·Õ¡è ¨ç Ð໚¹¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ áµ‹¶ÒŒ ʋ§´ŒÇ¤ҺàÇÅÒ·Õáè ¹‹¹Í¹áµ‹äÁ‹·¡Ø à¿ÃÁ¡ç¨Ð໚¹¡Òö‹Ò ·Í´ÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ ໚¹µŒ¹ ᵋ ŠзÃҹ᫡ªÑè ¹ »ÃСͺ¢Öé ¹ ¨Ò¡á¾ç ¡ à¡ç µ µ‹ Ò §æ «Öè § â´Âʋ Ç ¹ÁÒ¡¨Ð»ÃСͺ´Œ Ç Â 3 à¿Ê ËÃ×Íá¾ç¡à¡çµ (ËÁÒ¶֧ á¾ç¡à¡çµ¢ŒÍÁÙÅàËÁ×͹¡Ñ¹ ᵋ¤Òí Ç‹Ò “à¿Ê” ¨ÐÊ×Íè ãˌàË繡ÒÃẋ§ª‹Ç§¢ŒÍÁÙÅÁÒ¡¡Ç‹Ò) ´Ñ§ÃÙ»·Õè 6-3 ᵋ·Ãҹ᫡ªÑ¹è ºÒ§ª¹Ô´ÍÒ¨¨ÐÁÕà¾Õ§ 2 à¿ÊËÃ×ÍÁÕà¾Õ§à¿Êà´ÕÂÇ¡ç䴌 ¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§·ÃÒ¹ á«¡ªÑ¹è ÊíÒËÃѺÃÒÂÅÐàÍÕ´ÁÕ´§Ñ ¹Õé àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ ""


ª‹Ç§·Õè 1 ૵ÍÑ» â·à¤ç¹

¢ŒÍÁÙŤíÒÊÑ§è ¤Çº¤ØÁ

ª‹Ç§·Õè 2 á¾ç¡à¡çµ µÃǨÊͺ (áι´àªç¡)

¢ŒÍÁÙÅ·Õâè ÎʵµÍŒ §¡ÒÃ͋ҹ¡ÅѺ ¨Ò¡¤íÒÊÑ§è ·ÕÊè §‹ ä»

â·à¤ç¹ ¢ÒࢌÒ

·Ãҹ᫡ªÑ¹è ૵ÍÑ»

ª‹Ç§·Õè 3 á¾ç¡à¡çµ µÃǨÊͺ (áι´àªç¡)

·Ãҹ᫡ªÑ¹è ¢ÒࢌÒ

â·à¤ç¹ ¢ÒÍÍ¡

á¾ç¡à¡çµ µÃǨÊͺ (áι´àªç¡)

·Ãҹ᫡ªÑ¹è ¢ÒÍÍ¡

¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ *** ÊíÒËÃѺ·Ãҹ᫡ªÑ¹è ¢ÒÍ͡㹪‹Ç§ÊØ´·ŒÒ¢ͧ¡ÒäǺ¤ØÁ¡Òö‹Ò·ʹ¢ŒÍÁÙÅ¹Ñ¹é ¨Ð¡íÒ˹´ãˌ¢¹Ò´¢ŒÍÁÙÅ໚¹ 0 à¾×Íè 㪌ÊÒí ËÃѺáι´àªç¡

ÃÙ»·Õè 6-2 áÊ´§ÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅÐÊ൨¢Í§¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ à¿Êâ·à¤¹

à¿Ê¢ŒÍÁÙÅ

à¿Êáι´àªç¡

1 ·Ãҹ᫡ªÑ¹è

ÃÙ»·Õè 6-3 ʋǹ»ÃСͺ¢Í§áµ‹ÅзÃҹ᫡ªÑ¹è ÅíҴѺ¢ŒÍÁÙÅà¾×Íè ¡Òëԧâ¤Ã乫

¢ŒÍÁÙÅ੾ÒÐ µÒÁª¹Ô´¢Í§á¾ç¡à¡çµ

á¾ç¡à¡çµäÍ´Õ

CRC

EOP

¢ŒÍÁÙÅ 1 á¾ç¡à¡çµ

ÃÙ»·Õè 6-4 ʋǹ»ÃСͺ¢Í§¢ŒÍÁÙÅã¹áµ‹ÅÐá¾ç¡à¡çµ à¿Êâ·à¤¹ (Token packet phase) ໚¹à¿ÊàÃÔÁè µŒ¹¢Í§·Ø¡æ ·Ãҹ᫡ªÑ¹è ÀÒÂ㹨кÃÃ¨Ø ¢ŒÍÁÙÅ·Õºè Í¡ª¹Ô´¢Í§·Ãҹ᫡ªÑ¹è ÃÇÁ件֧áÍ´à´ÃʢͧÍØ»¡Ã³·¨Õè еԴµ‹Í´ŒÇ l à¿Ê¢ŒÍÁÙÅ (Data packet phase) ·Ãҹ᫡ªÑ¹ è ʋǹãË­‹¨ÐÁÕà¿Ê¢ŒÍÁÙÅÃÇÁÍÂÙ´‹ nj Âà¾×Íè ʋ§ ËÃ×ÍÃѺµÑÇ¢ŒÍÁÙÅ»ÃÔÁÒ³ÁÒ¡æ â´Â¢ŒÍÁÙÅ·ÕÊè ÒÁÒöʋ§ËÃ×ÍÃѺ䴌ÁÒ¡·ÕÊè ´Ø µ‹Í¤Ãѧé ෋ҡѺ 1024 亵 ᵋ¢¹Ò´ ¢ŒÍÁÙÅÁÒ¡·ÕèÊØ´·ÕèÊÒÁÒöʋ§ä´Œ¨Ð¶Ù¡¡íÒ˹´¨Ò¡ª¹Ô´¢Í§¡ÒÃʋ§¢ŒÍÁÙÅÍÕ¡·Õ˹Öè§ l à¿Êáι´àªç¡ (Handshake packet phase) à¹×Í è §¨Ò¡·Ø¡æ ¤ÃÑ§é ·Õàè ¡Ô´¡ÒÃʋ§¢ŒÍÁÙÅ¡ànj¹áµ‹ ¡ÒÃʋ§¢ŒÍÁÙÅẺäÍâ«â¤Ã¹ÑʨÐÁÕ¡ÒÃÃѺ»ÃСѹ¤ÇÒÁ¶Ù¡µŒÍ§¢Í§¡ÒÃʋ§ ´Ñ§¹Ñ¹é à¿Ê¹Õ¨é §Ö ໚¹¢ŒÍÁÙÅ·Õ½è ҆ ÂÃѺʋ§¡ÅѺ ä»Âѧ½†ÒÂʋ§à¾×è͵ÃǨÊͺ¤ÇÒÁ¶Ù¡µŒÍ§¢Í§¡ÒÃÊ×èÍÊÒà l

ᵋ Å Ðá¾ç ¡ à¡ç µ à¡Ô ´ ¨Ò¡¢Œ Í ÁÙ Å ËÅÒÂʋ Ç ¹ÁÒ¨Ñ ´ àÃÕ Â §µ‹ Í ¡Ñ ¹ ´Ñ § ÃÙ » ·Õè 6-4 ¡‹ Í ¹¨ÐàÃÔè Á ʋ § á¾ç ¡ à¡ç µ ¢ŒÍÁÙÅ·Ø¡¤ÃÑ§é ¨ÐµŒÍ§àÃÔÁè ´ŒÇ ÅíҴѺ¢ŒÍÁÙÅà¾×Íè ¡Òëԧâ¤Ã乫 (synchronization sequence) à¾×Íè ¡ÃеعŒ ãËŒÍ»Ø ¡Ã³ »ÅÒ·ҧÃÙnj ҋ ¨Ðà¡Ô´¡ÒÃʋ§¢ŒÍÁÙÅ¢Ö¹é áÅŒÇ ¹Í¡¨Ò¡¹Ñ¹é ÅíҴѺ¢ŒÍÁÙŹÕàé Á×Íè á»Å§à»š¹ÊÑ­­Ò³ NRZI áŌǨÐà¡Ô´¡Òà à»ÅÕÂè ¹á»Å§ÃдѺÊÑ­­Ò³·Ø¡æ ºÔµ¢ŒÍÁÙÅ·íÒãËŒÍ»Ø ¡Ã³»ÅÒ·ҧÊÒÁÒö»ÃѺÊÑ­­Ò³¹Ò́¡Ò¢Í§µÑÇàͧãËŒà¢ŒÒ ¨Ñ§ËÇСѺÊÑ­­Ò³¢ŒÍÁÙÅ·Õè¨ÐÃѺ䴌 àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "#


ÅíҴѺ¢ŒÍÁÙÅÊíÒËÃѺ¡Òëԧâ¤Ã乫 Idle

0

0

0

0

0

0

0

ʋǹµÃǨÊͺ 21,

21, 1

LSB 1

0

1

MSB 0

LSB 0

1

0

MSB 1

¢ŒÍÁÙÅ

NRZI

ÃÙ»·Õè 6-5 ÅíҴѺ¢ŒÍÁÙÅà¾×Íè ¡Òëԧâ¤Ã乫 ª¹Ô´¢Í§á¾ç¡à¡çµ

ª×èÍá¾ç¡à¡çµ

á¾ç¡à¡çµ ID

ʋǹµÃǨÊͺ

˹ŒÒ·Õè

ª¹Ô´¢Í§ CRC

â·à¤ç¹

SOF

0101b

1010b

ᨌ§¡ÒÃàÃÔèÁµŒ¹Ê‹§¢ŒÍÁÙŢͧᵋÅÐà¿ÃÁ ÀÒÂ㹺ÃèØËÁÒÂàÅ¢¢Í§à¿ÃÁà¾×èÍ㪌ÊíÒËÃѺ¡Òëԧâ¤Ã乫 ¢Í§äÍâ«â¤Ã¹ÑÊ·ÃÒ¹Êà¿ÍÏ ÊíÒËÃѺ·Ãҹ᫡ªÑè¹¹ÕéäÁ‹ÁÕà¿Ê¢ŒÍÁÙÅáÅÐáι´àªç¤µ‹Í·ŒÒÂ

CRC5

â·à¤ç¹

Setup

1101b

0010b

Ãкت¹Ô´Ç‹Ò໚¹à«çµÍÑ»·Ãҹ᫡ªÑè¹ ÀÒÂ㹺ÃèØáÍ´à´ÃÊáÅÐËÁÒÂàÅ¢àÍç¹´¾Íµ·Õ赌ͧ¡Òà ʋ§¤íÒÊÑè§ä»¤Çº¤ØÁ

CRC5

â·à¤ç¹

Out

0001b

1110b

Ãкت¹Ô´Ç‹Ò໚¹·Ãҹ᫡ªÑè¹¢ÒÍÍ¡ ÀÒÂ㹺ÃèØáÍ´à´ÃÊáÅÐËÁÒÂàÅ¢àÍç¹´¾Íµ·Õ赌ͧ¡Òà ʋ§¢ŒÍÁÙÅä»

CRC5

â·à¤ç¹

In

1001b

0110b

Ãкت¹Ô´Ç‹Ò໚¹·Ãҹ᫡ªÑè¹¢Òà¢ŒÒ ÀÒÂ㹺ÃèØáÍ´à´ÃÊáÅÐËÁÒÂàÅ¢àÍç¹´¾Íµ·Õ赌ͧ¡Òà ÃѺ¢ŒÍÁÙÅࢌÒÁÒ

CRC5

´ÒµŒÒ

Data0

0011b

1100b

ºÃèآŒÍÁÙÅ·Õ赌ͧ¡ÒÃÃѺËÃ×Íʋ§ÃÐËNjҧâÎʵ¡ÑºÍØ»¡Ã³

CRC16

´ÒµŒÒ

Data1

1011b

0100b

ºÃèآŒÍÁÙÅ·Õ赌ͧ¡ÒÃÃѺËÃ×Íʋ§ÃÐËNjҧâÎʵ¡ÑºÍØ»¡Ã³

CRC16

áι´àªç¡

ACK

0010b

1101b

µÍº¡ÅѺ½†ÒÂʋ§¢ŒÍÁÙÅà¾×èÍºÍ¡Ç‹Ò ä´ŒÃѺ¢ŒÍÁÙŤú¶Ù¡µŒÍ§

äÁ‹ÁÕ

áι´àªç¡

NAK

1010b

0101b

µÍº¡ÅѺ½†ÒÂʋ§¢ŒÍÁÙÅà¾×èÍºÍ¡Ç‹Ò ã¹¢³Ð¹Ñé¹äÁ‹ÊÒÁÒöÃѺ ¢ŒÍÁÙÅ䴌ªÑèÇ¢³ÐËÃ×Íà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¡Ñº¢ŒÍÁÙÅ·Õè䴌ÃѺ ÊíÒËÃѺ㹡Òö‹Ò·ʹẺÍÔ¹àµÍÏÃÑ»µ ¨ÐËÁÒ¶֧ äÁ‹ÁÕ¢ŒÍÁÙÅ·Õ赌ͧ¡ÒÃʋ§ã¹¡ÒÃâ¾ÅËÃ×ÍÃÍã¹Ãͺ¹Ñé¹æ

äÁ‹ÁÕ

áι´àªç¡

Stall

1110b

0001b

µÍº¡ÅѺä»Âѧ½†ÒÂʋ§Ç‹Ò ¢³Ð¹Ñé¹à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Ö鹡Ѻ ¡Ò÷íÒ§Ò¹ÀÒÂã¹·íÒãˌäÁ‹ÊÒÁÒöÃѺ¢ŒÍÁÙÅ䴌 âÎʵ¨ÐµŒÍ§ ʋ§¤íÒÊÑ觤Ǻ¤ØÁà¾×èÍᡌ䢢ŒÍ¼Ô´¾ÅÒ´¹Ñé¹ËÃ×ÍÃÕ૵ÍØ»¡Ã³

äÁ‹ÁÕ

¾ÔàÈÉ

Preamble

1100b

0011b

໚¹á¾ç¡à¡çµ¾ÔàÈÉ·Õèʋ§ä»à¾×èÍºÍ¡Ç‹Ò ËÅѧ¨Ò¡á¾ç¡à¡çµ¹Õé ¨Ð໚¹¢ŒÍÁÙÅ·Õèʋ§ã¹âËÁ´¤ÇÒÁàÃçǵíèÒ (low speed) ËÒ¡ÍØ»¡Ã³¤ÇÒÁàÃçÇÊ٧䴌ÃѺá¾ç¡à¡çµ¹Õé¡ç¨ÐäÁ‹Ê¹ã¨ á¾ç¡à¡çµ¶Ñ´ä»·ÕèµÒÁÁÒ áµ‹¶ŒÒÎѺ䴌ÃѺá¾ç¡à¡çµ¹Õé ÎѺ¨Ðແ´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ ¤ÇÒÁàÃçǵíèÒà¾×èÍãˌ¢ŒÍÁÙÅ·ÕèµÒÁËÅѧÁÒÊÒÁÒöʋ§ä»Âѧ ÍØ»¡Ã³¤ÇÒÁàÃçǵíèÒ䴌

äÁ‹ÁÕ

µÒÃÒ§·Õè 6-1 á¾ç¡à¡çµª¹Ô´µ‹Ò§æ ¢Í§ USB àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "$


LSB 1

Idle

MSB LSB 0

1

0

0

1

0

0

1 0

á¾ç¡à¡çµ In

MSB LSB 1

1

PID

MSB LSB

0

0

0

1

1

1

MSB LSB

Addr6 EndP0

Addr0

áÍ´à´ÃÊÍØ»¡Ã³

MSB LSB

0 1

0

1

1

0

0

MSB LSB

Addr6 EndP0

Addr0

áÍ´à´ÃÊÍØ»¡Ã³

MSB LSB

0

MSB MSB

LSB

EndP3 CR4

CR0 CRC5

0

0 0

MSB MSB

LSB CR0 CRC5

1

MSB MSB

0-1023 亵

1

LSB

CR15

¢ŒÍÁÙÅ

MSB LSB

1

EOP

CR0 CRC 16

EOP

ʋǹµÃǨÊͺ

PID

1

EOP

EndP3 CR4

ËÁÒÂàÅ¢àÍç¹´¾Íµ

á¾ç¡à¡çµ Data0

MSB LSB

Sync

LSB

EOP

ʋǹµÃǨÊͺ

PID

1

CRC5

ËÁÒÂàÅ¢àÍç¹´¾Íµ

á¾ç¡à¡çµ Setup

MSB LSB

Sync

1

LSB CR0

ʋǹµÃǨÊͺ

PID

LSB

MSB MSB EndP3 CR4

ËÁÒÂàÅ¢àÍç¹´¾Íµ

á¾ç¡à¡çµ Out

MSB LSB

Sync

1

EOP

ʋǹµÃǨÊͺ MSB LSB

LSB

CR0

CRC5

Addr6 EndP0

0 Addr0

áÍ´à´ÃÊÍØ»¡Ã³

0

LSB

Fr10 CR4

Sync

1

Idle

MSB MSB

Fr0

PID

MSB LSB

LSB

Idle

1

ʋǹµÃǨÊͺ

PID

Idle

0

ËÁÒÂàÅ¢à¿ÃÁ

LSB

Idle

1

Sync PID

Idle

á¾ç¡à¡çµ SOF

MSB LSB

0

1 0

á¾ç¡à¡çµ Data1

MSB LSB 0

MSB MSB

0-1023 亵

1 0

¢ŒÍÁÙÅ

Sync

LSB

CR15

CR0 CRC 16

EOP

ʋǹµÃǨÊͺ

PID

á¾ç¡à¡çµ ACK LSB 0 Idle

MSB LSB 1

0

0

1

MSB 0

1

1

Sync

EOP

ʋǹµÃǨÊͺ

PID

á¾ç¡à¡çµ NAK LSB 0 Idle

PID

MSB LSB 1

0

1

1

MSB 0

1

0

Sync

EOP

ʋǹµÃǨÊͺ

PID

á¾ç¡à¡çµ Stall LSB 0 Idle

PID

MSB LSB 1

1

1

1

MSB 0

0

0

Sync

EOP PID

ʋǹµÃǨÊͺ PID

á¾ç¡à¡çµ Preamble LSB 0

Idle

MSB LSB 0

1

1

1

MSB 1

0

0

໚¹àÇÅÒÍ‹ҧ¹ŒÍ 4 ºÔµ¢ŒÍÁÙÅ à¾×Íè ÃÍãˌ ÎѺແ´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¤ÇÒÁàÃçǵíÒè

àÃÔÁè ¡ÒÃʋ§¢ŒÍÁÙÅ ¤ÇÒÁàÃçǵíèÒ

Idle

Sync (Low Speed)

Sync PID

ʋǹµÃǨÊͺ PID

ÃÙ»·Õè 6-6 ¡ÒèѴàÃÕ§¢ŒÍÁÙÅÀÒÂ㹢ͧᵋÅÐá¾ç¡à¡çµ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "%


µ‹Í¨Ò¡Ê‹Ç¹ÅíҴѺ¢ŒÍÁÙŨÐ໚¹Ê‹Ç¹àÃÔÁè µŒ¹¢Í§á¾ç¡à¡çµ¤×Í á¾ç¡à¡çµäÍ´Õ (Packet ID : PID) ໚¹Ê‹Ç¹ ·Õºè Í¡ª¹Ô´¢Í§á¾ç¡à¡çµ ¢ŒÍÁÙÅã¹Ê‹Ç¹¹ÕÁé ¢Õ ¹Ò´ 8 ºÔµâ´Â 4 ºÔµáá໚¹ª¹Ô´¢Í§á¾ç¡à¡çµáÅÐ 4 ºÔµËÅѧ໚¹ ʋǹµÃǨÊͺ«Ö§è ¨Ð໚¹¢ŒÍÁÙŤÍÁ¾ÅÕàÁ¹µ¢Í§ 4 ºÔµáá ઋ¹ ¶ŒÒ¤‹Òá¾ç¡à¡çµäÍ´Õ໚¹ 0110 ¨ÐµŒÍ§µ‹ÍËÅѧ ÍÕ¡ 4 ºÔµ´ŒÇ 1001 »ÃÐ⪹à¾×Íè 㪌µÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¡ÒÃʋ§ ¶ŒÒ¾ºÇ‹Ò¢ŒÍÁÙŪشáá¡ÑºªØ´ËÅѧäÁ‹ ໚¹¤‹Ò¤ÍÁ¾ÅÕàÁ¹µ¢Í§¡Ñ¹áÅСѹ áÊ´§Ç‹Òà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Ö¹é ËÅѧ¨Ò¡Ê‹Ç¹á¾ç¡à¡çµäÍ´Õ¨Ð໚¹Ê‹Ç¹¢Í§¢ŒÍÁÙÅ੾ÒеÒÁª¹Ô´¢Í§á¾ç¡à¡çµµ‹Ò§æ «Ö§è ¨Ðᵡµ‹Ò§¡Ñ¹ä» µÒÁ˹ŒÒ·Õ¢è ͧᵋÅÐá¾ç¡à¡çµ ઋ¹ áÍ´à´Ãʢͧ¼ÙÌ ºÑ ËÁÒÂàÅ¢à¿ÃÁ ËÃ×ÍÍÒ¨¨Ð໚¹µÑÇ¢ŒÍÁÙÅ·ÕÊè §‹ ËÃ×ÍÃѺ¨Ò¡ µÑÇÍØ»¡Ã³ ËÅѧ¨Ò¡Ê‹Ç¹¹Õ¡é ¨ç еÒÁËÅѧ´ŒÇÂʋǹµÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅҴẺ CRC â´Â¨Ð㪌 CRC 16 ºÔµàÁ×Íè á¾ç¡à¡çµ¹Ñ¹é ໚¹á¾ç¡à¡çµ¢ŒÍÁÙÅ áÅÐ㪌 CRC 5 ºÔµã¹¡Ã³Õ·àÕè »š¹á¾ç¡à¡çµª¹Ô´Í×¹è æ ËÅѧ¨Ò¡Ê‹Ç¹¢Í§ CRC ¡ç¨Ð »´·ŒÒ´ŒÇÂÊÑ­­Ò³ EOP à¾×Íè ໚¹¡ÒÃᨌ§ãˌ·ÃÒºÇ‹Ò ¨ºá¾ç¡à¡çµáµ‹ÅÐá¾ç¡à¡çµàÃÕºÌÍ ¨Ò¡µÒÃÒ§·Õè 6-1 áÅÐ ÃÙ»·Õè 6-6 áÊ´§ãˌàË繶֧˹ŒÒ·Õáè ÅСÒèѴàÃÕ§¢ŒÍÁÙŢͧá¾ç¡à¡çµ·Ñ§é ËÁ´ «Ö§è àÁ×Íè ¹íÒá¾ç¡à¡çµ·Ñ§é ËÁ´ÁҨѴàÃÕ§¡Ñ¹¨Ð䴌·Ãҹ᫡ªÑ¹è ÊíÒËÃѺʋ§ËÃ×ÍÃѺ¢ŒÍÁÙÅ¢Ö¹é ÁÒ â´Â·Ãҹ᫡ªÑ¹è ·Ñ§é ËÁ´ ÁÕÍÂً 3 ª¹Ô´¤×Í·Ãҹ᫡ªÑ¹è ¢Òà¢ŒÒ ·Ãҹ᫡ªÑ¹è ¢ÒÍÍ¡ áÅзÃҹ᫡ªÑ¹è µÑ§é ¤‹Ò «Ö§è áÊ´§änjáŌÇã¹ÃÙ»·Õè 6-2 ·Ãҹ᫡ªÑ¹è ¢Òà¢ŒÒ àÃÔÁè µŒ¹´ŒÇ½˜§› âÎʵÊ§‹ â·à¤ç¹á¾ç¡à¡çµ In «Ö§è ÀÒÂ㹨ÐÃкØáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ ·Õµè ͌ §¡ÒÃÃѺ¢ŒÍÁÙÅࢌÒÁÒ ËÅѧ¨Ò¡¹Ñ¹é ÍØ»¡Ã³¨Ðʋ§á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” ËÃ×Í “1” (¡ÒÃ㪌§Ò¹á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” áÅÐ “1” ¨Ð͸ԺÒÂã¹Ê‹Ç¹¶Ñ´ä») ·Õºè Ãèآ͌ ÁÙŵÒÁáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ·ÃÕè кءÅѺÁÒÂѧâÎʵ àÁ×Íè âÎʵä´ŒÃºÑ ¢ŒÍÁÙŤúáÅеÃǨÊͺáŌÇNjҶ١µŒÍ§âÎʵ¨Ðʋ§áι´àªç¤á¾ç¡à¡çµ ACK ¡ÅѺä»ÂѧµÑÇÍØ»¡Ã³ ᵋ¶ÒŒ µÑÇÍØ»¡Ã³äÁ‹ÊÒÁÒöʋ§á¾ç¡à¡çµ¢ŒÍÁÙÅ¡ÅѺÁÒÂѧâÎʵä´Œ ¡ç¨Ðʋ§áι´àªç¡á¾ç¡à¡çµ NAK ËÃ×Í Stall ¢Öé ¹ ÍÂً ¡Ñ º ÅÑ ¡ ɳФÇÒÁ¼Ô ´ ¾ÅÒ´·Õè à ¡Ô ´ ¢Öé ¹ Êí Ò ËÃÑ º ¡Òö‹ Ò Â·Í´ÊÑ ­ ­Ò³áººÍÔ ¹ àµÍÏ ÃÑ » µ · ¹Ñé ¹ ¡Òõͺáι´àªç¡á¾ç¡à¡çµ NAK ËÁÒ¤ÇÒÁÇ‹Ò äÁ‹ÁÕ¢ŒÍÁÙŨÐʋ§¡ÅѺã¹Ãͺ¡ÒÃâ¾Å¹Ñé¹æ áÅÐÊíÒËÃѺäÍâ« â¤Ã¹ÑÊ·ÃÒ¹Êà¿ÍÏËÅѧ¨Ò¡âÎʵä´ŒÃºÑ ¢ŒÍÁÙÅ¡ÅѺÁÒ¨Ò¡ÍØ»¡Ã³áŌǨÐäÁ‹Á¡Õ ÒÃʋ§áι´àªç¡á¾ç¡à¡çµ¡ÅѺä»Âѧ µÑÇÍØ»¡Ã³ ·Ãҹ᫡ªÑ¹è ¢ÒÍÍ¡ àÃÔÁè µŒ¹¨Ò¡½˜§› âÎʵÊ§‹ â·à¤ç¹á¾ç¡à¡çµ Out «Ö§è ÃкØáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ»ÅÒ ·Ò§·Õ¨è Ðʋ§¢ŒÍÁÙÅä» ËÅѧ¨Ò¡¹Ñ¹é âÎʵ¨Ðʋ§á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” ËÃ×Í “1” ·Õºè Ãèآ͌ ÁÙÅ·Õµè ͌ §¡ÒÃʋ§µÒÁÍÍ¡ ä» àÁ×Íè ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙŤúáŌǡç¨Ðʋ§áι´àªç¡á¾ç¡à¡çµ ACK ¡ÅѺÁÒÂѧâÎʵ ᵋ¶ÒŒ µÑÇÍØ»¡Ã³äÁ‹ÊÒÁÒöÃѺá¾ç¡à¡çµ¢ŒÍÁÙÅ䴌¨Ðʋ§áι´àªç¡á¾ç¡à¡çµ NAK ËÃ×Í Stall ¡ÅѺÁÒÂѧ âÎʵà¾×Íè ºÍ¡Ç‹Ò¡ÒÃʋ§¢ŒÍÁÙÅäÁ‹ÊÒí àÃç¨ áÅÐઋ¹à´ÕÂǡѹ¡Ñº·Ãҹ᫡ªÑ¹è ¢Òà¢ŒÒ ÊíÒËÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³áºº äÍâ«â¤Ã¹ÑÊàÁ×èÍÍØ»¡Ã³ä´ŒÃѺ¢ŒÍÁÙÅàÃÕºÌÍÂáŌǨÐäÁ‹ÁÕ¡ÒÃʋ§áι´àªç¡á¾ç¡à¡çµ¡ÅѺÁÒÂѧâÎʵ ·Ãҹ᫡ªÑ¹è µÑ§é ¤‹Ò ·Ãҹ᫡ªÑ¹è ¹Õ¤é Í× ª‹Ç§·Õè 1 ¢Í§¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ àÃÔÁè µŒ¹¨Ò¡½˜§› âÎʵ ʋ§â·à¤ç¹á¾ç¡à¡çµ Setup «Ö§è ÀÒÂ㹺ÃèØáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ·¨Õè ФÍÂÃѺ¤íÒÊÑ§è ¢Í§µÑÇÍØ»¡Ã³ä» ËÅѧ¨Ò¡ ¹Ñ¹é ¡ç¨ÐµÒÁ´ŒÇÂá¾ç¡à¡çµ¢ŒÍÁÙÅ·Õºè ÃèؤÒí ÊÑ§è ·Õµè ͌ §¡ÒÃʋ§ä»¤Çº¤ØÁ àÁ×Íè ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙÅáŌǡç¨Ðʋ§áι´àªç¡ á¾ç¡à¡çµ¡ÅѺÁÒ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "&


º··Õè 7

¤ÇÒÁ¼Ô´¾ÅÒ´áÅСÒÃᡌä¢ã¹¡Òà Ê×Íè ÊÒâŒÍÁÙż‹Ò¹¾Íϵ USB ¨Ò¡º··Õáè ŌÇ䴌¡Å‹ÒǶ֧¡Òö‹Ò·ʹÊÑ­­Ò³¢ŒÍÁÙŪ¹Ô´µ‹Ò§æ 令ú·Ø¡ª¹Ô´áÅŒÇ «Ö§è ¶ŒÒ¹íÒ¢ŒÍ¡íÒ˹´ ´Ñ§¡Å‹ÒÇÁÒ㪌·§Ñé ËÁ´â´ÂäÁ‹à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Ö¹é àÅ¡礧¨ÐäÁ‹Á»Õ ­ ˜ ËÒ áµ‹ã¹¤ÇÒÁ໚¹¨ÃÔ§ ¢ŒÍÁÙÅ·Õàè ¡Ô´¡ÒÃÃѺ ËÃ×Íʋ§ÀÒÂ㹺Ñʹѹé ÁÕâÍ¡ÒÊ·Õ¨è Ðà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Ö¹é 䴌 Áҵðҹ USB ¨Ö§¡íÒ˹´¤ÇÒÁ¼Ô´¾ÅÒ´ª¹Ô´µ‹Ò§æ ¢Ö¹é ÃÇÁ件֧¡ÒõÃǨÊͺËÒ¤ÇÒÁ¼Ô´¾ÅÒ´¹Ñ¹é æ áÅСÒÃᡌä¢

7.1 ¤ÇÒÁ¼Ô´¾ÅÒ´ª¹Ô´µ‹Ò§æ ã¹ÃÐËNjҧ¡ÒÃʋ§¢ŒÍÁÙŨҡâÎʵä»ÂѧÍØ»¡Ã³ËÃ×ͨҡÍØ»¡Ã³¡ÅѺÁÒÂѧâÎʵ ÍÒ¨à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´ ¢Ö¹é ³ àÇÅÒã´¡ç䴌 ´Ñ§¹Ñ¹é ¨Ö§µŒÍ§ÁÕ¡ÒáíÒ˹´ÇÔ¸¤Õ ¹Œ ËÒ¤ÇÒÁ¼Ô´¾ÅÒ´´Ñ§¡Å‹ÒÇãˌ¾ºà¾×Íè äÁ‹ãˌà¡Ô´¡ÒùíÒ¢ŒÍÁÙÅ ·Õ¼è ´Ô ä»ãªŒ§Ò¹ ¤ÇÒÁ¼Ô´¾ÅÒ´·Õ¶è ¡Ù ¡íÒ˹´¢Ö¹é ã¹Áҵðҹ USB ÁÕ´§Ñ ¹Õé l ¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒÂã¹á¾ç¡à¡çµ l ʶҹРEOP ¼Ô´¾ÅÒ´ l ºÑÊä·ÁàÍÒµ (äÁ‹ä´ŒÃº Ñ ¡Òõͺʹͧ) l ʋ§¢ŒÍÁÙÅ«éÒí à¹×Í è §¨Ò¡¤ÇÒÁ¼Ô´¾ÅҴ㹡ÒÃá¾ç¡à¡çµáι´àª¡ l ʶҹкÑʤŒÒ§ (babble) l ¡ÒÃÊÙ­àÊÕÂÃٻẺ¡ÒÃʋ§¢ŒÍÁÙÅ (LOA : Loss of Activity)

7.2 ¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒÂã¹á¾ç¡à¡çµ ¡ÒõÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒÂã¹á¾ç¡à¡çµ¢ŒÍÁÙÅÊÒÁÒö·íÒ䴌 3 ¨Ø´´Ñ§¹Õé 1. PID ã¹¢ŒÍÁÙÅ·Ø¡æ á¾ç¡à¡çµ¨ÐàÃÔÁè µŒ¹´ŒÇÂʋǹ PID ËÃ×Í Packet ID àÊÁÍ â´Â¨Ð໚¹¢ŒÍÁÙÅ PID ¢¹Ò´ 4 ºÔµáŌǵÒÁ´ŒÇÂʋǹµÃǨÊͺÍÕ¡ 4 ºÔµ«Ö§è ໚¹¢ŒÍÁÙŤÍÁ¾ÅÕàÁ¹µ¢Í§ 4 ºÔµáá (¤ÍÁ¾ÅÕàÁ¹µ : complement ËÁÒ¶֧ ¡ÒáÅѺʶҹТŒÍÁÙÅãˌ໚¹µÃ§¢ŒÒÁ) ¶ŒÒ¾ºÇ‹Ò·Ñ§é ÊͧʋǹäÁ‹à»š¹¤ÍÁ¾ÅÕàÁ¹µ¢Í§¡Ñ¹ áÅСѹ ¹Ñ¹è ËÁÒ¤ÇÒÁNjҢŒÍÁÙÅ·Õäè ´ŒÃºÑ ¹Õ¼é ´Ô ¾ÅҴṋ¹Í¹ áÅÐàÁ×Íè à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§ PID ÍØ»¡Ã³à»‡ÒËÁÒ ¨ÐäÁ‹Ê¹ã¨¢ŒÍÁÙÅã¹á¾ç¡à¡çµ¹Ñé¹·Ñé§ËÁ´à¾ÃÒÐäÁ‹ÊÒÁÒö·ÃҺ䴌NjÒ໚¹·Ãҹ᫡ªÑ蹪¹Ô´ã´

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ "'


2. CRC ´Ñ§·Õ¡è ŋÒÇä»áŌÇNjÒã¹áµ‹ÅÐá¾ç¡à¡çµ¨ÐÁÕÊNj ¹µÃǨÊͺ¤ÇÒÁ¼Ô´¾ÅҴẺ CRC µÒÁ»´·ŒÒ àÊÁÍ â´Â¨íҹǹºÔµ¢Í§ CRC ·Õãè ªŒÁ¢Õ ¹Ò´ 5 áÅÐ 16 ºÔµ¢Ö¹é ÍÂÙ¡‹ ºÑ ª¹Ô´¢Í§á¾ç¡à¡çµ àÁ×Íè ¹íÒ¤‹Ò¹Õäé »¤íҹdz µÒÁ¡Ãкǹ¡Òà CRC áŌǾºÇ‹Ò äÁ‹¶¡Ù µŒÍ§ ËÁÒ¤ÇÒÁNjҢŒÍÁÙÅá¾ç¡à¡çµ¹Ñ¹é à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´ 3. ºÔµÊµÑ¿ ã¹ÃÐËNjҧ¡ÒÃʋ§¢ŒÍÁÙŶŒÒÁբ͌ ÁÙÅ “1” àÃÕ§µ‹Íà¹×Íè §¡Ñ¹ 6 ºÔµ¨ÐÁÕ¡ÒÃá·Ã¡¢ŒÍÁÙÅ “0” Å§ä» 1 ºÔµ «Ö§è ËÒ¡¾ºÇ‹ÒÁբ͌ ÁÙÅ “1” àÃÕ§¡Ñ¹ 6 ºÔµáŌǺԵ¶Ñ´ÁÒäÁ‹à»š¹ “0” áÊ´§Ç‹Òà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¢ŒÍÁÙÅ ¡ÒõÃǨÊͺ·Ñé§ 3 ¨Ø´¢ŒÒ§µŒ¹¨ÐÃÒ§ҹ¼ÅÍÍ¡ÁÒàËÁ×͹¡Ñ¹¤×Í à¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒÂã¹á¾ç¡à¡çµ áÅÐàÁ×Íè ¾º¤ÇÒÁ¼Ô´¾ÅÒ´ª¹Ô´¹Õé ÍØ»¡Ã³ËÃ×ÍâÎʵ·àÕè »š¹¼ÙÌ ºÑ ¨ÐäÁ‹Ê¹ã¨¢ŒÍÁÙÅá¾ç¡à¡çµ¹Ñ¹é áÅÐäÁ‹µÍºáι´ àªç¡¡ÅѺ¨¹¡ÃзÑ觷ҧ½˜›§Ê‹§µÃǨ¾ººÑÊä·ÁàÍÒµ·íÒãˌ·Ò§ÃٌNjÒà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Öé¹áÅШÐà¡Ô´¡ÒÃʋ§ËÃ×ÍÃѺ ¢ŒÍÁÙÅ·ÕèàÊÕÂ仹Ñé¹ãËÁ‹ã¹Ãͺ¶Ñ´ä»

7.3 ʶҹРEOP ¼Ô´¾ÅÒ´ ¤ÇÒÁ¼Ô´¾ÅÒ´¹Õàé ¡Ô´¢Ö¹é ¨Ò¡¡ÒõÃǨ¾ºÊ¶Ò¹Ð EOP ã¹¢³Ð·ÕÂè §Ñ Ê‹§¢ŒÍÁÙÅäÁ‹àÊÃç¨ÊÔ¹é «Ö§è ÍÒ¨·íÒãˌà¡Ô´ ¡Ò깡ѹ¢Í§¢ŒÍÁÙŶŒÒÍØ»¡Ã³»ÅÒ·ҧ¾ºÊ¶Ò¹Ð EOP «Ö§è ¶×ÍNjÒ໚¹µÑǨºá¾ç¡à¡çµ ËÅѧ¨Ò¡¹Ñ¹é ÍØ»¡Ã³¡¨ç Ð ¾ÂÒÂÒÁʋ§¢ŒÍÁÙÅËÃ×Íáι´àªç¡¡ÅѺ ·íÒãˌà¡Ô´¡Ò깡ѹ¢Í§¢ŒÍÁÙÅ àÁ×Íè µÃǨ¾º¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§Ê¶Ò¹Ð EOP ¡Ãкǹ¡Òõͺʹͧ¨ÐàËÁ×͹¡Ñº¤ÇÒÁ¼Ô´¾ÅÒ´ÀÒ ã¹á¾ç¡à¡çµ¤×Í ÍØ»¡Ã³·¾Õè º¤ÇÒÁ¼Ô´¾ÅÒ´¨ÐäÁ‹µÍºáι´àªç¡ËÃ×Í¢ŒÍÁÙÅ¡ÅѺ¨¹¡ÃÐ·Ñ§è ½†ÒÂʋ§¢ŒÍÁÙŵÃǨ¾º ºÑÊä·ÁàÍÒµ¨Ö§¨ÐàÃÔèÁʋ§¢ŒÍÁÙÅãËÁ‹

7.4 ºÑÊä·ÁàÍÒµ ·Ãҹ᫡ªÑ¹è µ‹Ò§æ ¢Í§ USB ŌǹÁÕ¡Òõͺ¡ÅѺä»ÁÒÃÐËNjҧâÎʵáÅÐÍØ»¡Ã³àÊÁÍ ànj¹áµ‹·ÃÒ¹ á«¡ªÑè¹¢ÒÍÍ¡¢Í§¡Òö‹Ò·ʹÊÑ­­Ò³áººäÍâ«â¤Ã¹ÑÊ ÃÐÂÐàÇÅÒ·ÕèÃÍ¡Òõͺ¡ÅѺ¨Ò¡ÍÕ¡½†Ò¹ҹ·ÕèÊØ´¨Ð ¤íҹdz¨Ò¡¤‹Ò˹‹Ç§àÇÅҢͧÊÑ­­Ò³ÀÒÂã¹ÊÒÂʋ§áÅÐÀÒÂã¹ÎѺ â´Â¤‹Ò·Õ¤è Òí ¹Ç³â´Â»ÃÐÁÒ³¨Ð෋ҡѺàÇÅÒ 18 ºÔµ¢Í§¡ÒÃʋ§¢ŒÍÁÙÅ «Ö§è µÑÇàÅ¢¹ÕÊé ÒÁÒö㪌䴌·§Ñé ¡ÒÃʋ§¢ŒÍÁÙŤÇÒÁàÃçÇÊÙ§áÅФÇÒÁàÃçǵèÒí

7.5 ʋ§¢ŒÍÁÙÅ«éÒí à¹×Íè §¨Ò¡¤ÇÒÁ¼Ô´¾ÅҴ㹡ÒÃá¾ç¡à¡çµáι´àª¡ ÊÒà˵طµÕè ͌ §ÁÕ¡ÒáíÒ˹´á¾ç¡à¡çµ¢ŒÍÁÙÅÍ͡໚¹ 2 ª¹Ô´¡çà¾×Íè ᡌ»­ ˜ ËÒ¡ÒÃÃѺʋ§¢ŒÍÁÙÅäÁ‹¶¡Ù µŒÍ§ã¹ ºÒ§ÃٻẺ «Ö§è ໚¹ª‹Í§Ç‹Ò§¨Ò¡¡ÒõÃǨÊͺ·Ñ§é ËÁ´·Õäè ´Œ¾´Ù ¶Ö§ ´Ñ§µÑÇÍ‹ҧµ‹Í仹Õé 㹡óբͧ·Ãҹ᫡ªÑ¹è ¢Òà¢ŒÒ àÃÔÁè µŒ¹¨Ò¡âÎʵÊ§‹ á¾ç¡à¡çµâ·à¤ç¹ IN ä»ÂѧÍØ»¡Ã³ ¶ŒÒËÒ¡¡ÒÃʋ§¢ŒÍÁÙÅ àÊÃç¨ÊÁºÙó µÑÇÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙŶ١µŒÍ§ ÍØ»¡Ã³¨Ðʋ§á¾ç¡à¡çµ¢ŒÍÁÙÅ·Õâè ÎʵµÍŒ §¡ÒáÅѺÁÒ ¶ŒÒËÒ¡âÎʵä´ŒÃºÑ Í‹ҧ¶Ù¡µŒÍ§ ¡ç¨Ðʋ§á¾ç¡à¡çµáι´àªç¡¡ÅѺä»ÂѧµÑÇÍØ»¡Ã³ ·Ç‹Òã¹¢³Ð·Õ¡è Òí Åѧʋ§á¾ç¡à¡çµáι´àªç¡à¡Ô´¤ÇÒÁ¼Ô´ ¾ÅÒ´¢Ö¹é ¡ÑºµÑÇá¾ç¡à¡çµáι´àªç¡ µÑÇÍØ»¡Ã³àÁ×Íè ä´ŒÃºÑ ¢ŒÍÁÙÅ·Õ¼è ´Ô ¡ç¨ÐäÁ‹Ê¹ã¨á¾ç¡à¡çµ¹Ñ¹é æ ¼Å·Õµè ÒÁÁÒ¤×Í ÍØ»¡Ã³ ¨ÐࢌÒã¨Ç‹ÒâÎʵÂ§Ñ äÁ‹ä´ŒÃºÑ ¢ŒÍÁÙÅ·ÕÊè §‹ ä» àÁ×Íè ¶Ö§·Ãҹ᫡ªÑ¹è ¢ÒࢌҤÃÑ§é ¶Ñ´ä» ÍØ»¡Ã³¡¨ç Ðʋ§¢ŒÍÁÙŪشà´ÔÁ·Õ¤è ´Ô Ç‹Ò âÎʵÂ§Ñ äÁ‹ä´ŒÃºÑ ä»ÍÕ¡¤ÃÑÇé ã¹¢³Ð·Õâè Îʵà¢ŒÒã¨Ç‹Ò ¢ŒÍÁÙŹդé Í× ¢ŒÍÁÙŪشãËÁ‹ ·íÒãˌà¡Ô´à»š¹¡ÒÃÃѺ¢ŒÍÁÙÅ«éÒí ¨Ò¡»˜­ËÒ ¹Õ¨é §Ö ÁÕ¡ÒäԴËÒÇÔ¸áÕ ¡Œä¢ «Ö§è á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” áÅÐ “1” ¡ç¤Í× à¤Ã×Íè §Á×Í·Õàè ¢ŒÒÁÒª‹ÇÂ㹧ҹ¹Õé àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #


ÇÔ¸·Õ ãÕè ªŒá¡Œä¢»˜­ËÒ¹Õàé ÃÕÂ¡Ç‹Ò ¡ÒáÅѺʶҹЪش¢ŒÍÁÙÅ (data toggle) ÇÔ¸¹Õ àÕé »š¹¡ÒèѴÅíҴѺ¡ÒÃ㪌§Ò¹ á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” áÅÐ “1” à¾×Íè ãˌâÎʵËÃ×͵ÑÇÍØ»¡Ã³·ÃÒº¶Ö§¤ÇÒÁ¼Ô´¾ÅÒ´¢Í§¡ÒÃʋ§¢ŒÍÁÙÅâ´Â¡Ãкǹ ¡ÒÃʋ§¢ŒÍÁÙŨÐàÃÔÁè µŒ¹·Õ¡è ÒÃʋ§¢ŒÍÁÙÅã¹·Ãҹ᫡ªÑ¹è áá«Ö§è ¨Ð㪌á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” 㹡ÒÃʋ§ËÃ×ÍÃѺ¢ŒÍÁÙÅ áÅÐ àÁ×Íè ÁÕ¡ÒÃʋ§¢ŒÍÁÙŤÃÑ§é µ‹Í仡ç¨ÐÊÅѺä»ãªŒá¾ç¡à¡çµ¢ŒÍÁÙÅ “1” áÅÐÊÅѺ¡Ñ¹ä»àÃ×Íè Âæ ¨Ò¡µÑÇÍ‹ҧ»˜­ËÒ àÃÔÁè ¨Ò¡âÎʵÊ§‹ á¾ç¡à¡çµâ·à¤ç¹ä»ÂѧÍØ»¡Ã³àÃÕºÌͶ١µŒÍ§ ÍØ»¡Ã³¡¨ç Ðʋ§á¾ç¡ à¡çµ¢ŒÍÁÙÅ¡ÅѺÁÒÂѧâÎʵ áÅÐà¹×Íè §¨Ò¡à»š¹¡ÒÃʋ§á¾ç¡à¡çµ¢ŒÍÁÙŤÃѧé áá¨Ö§µŒÍ§ãªŒá¾ç¡à¡çµ¢ŒÍÁÙÅ “0” àÁ×Íè âÎʵ 䴌ÃѺ¢ŒÍÁÙŶ١µŒÍ§¡ç¨Ðʋ§á¾ç¡à¡çµáι´àªç¡ä»ÂѧµÑÇÍØ»¡Ã³áŌÇà¡Ô´¤ÇÒÁ¼Ô´¾ÅÒ´¢Ö鹡Ѻá¾ç¡à¡çµ¢ŒÍÁÙŹÕé·íÒ ãˌµÑÇÍØ»¡Ã³¤Ô´Ç‹ÒâÎʵäÁ‹ä´ŒÃѺ¢ŒÍÁÙÅ àÁ×Íè ¶Ö§·Ãҹ᫡ªÑ¹è ¢ÒࢌҤÃÑ§é ¶Ñ´ä» µÑÇÍØ»¡Ã³¡¨ç Ðʋ§¢ŒÍÁÙŪشà´ÔÁ·Õ¤è ´Ô NjÒâÎʵÂ§Ñ äÁ‹ä´ŒÃºÑ ¡ÅѺÁÒÍÕ¡ ¤Ãѧé â´Â㪌á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” àËÁ×͹à´ÔÁ à¾ÃÒж×ÍNjҡÒÃʋ§¤ÃÑ§é ·Õáè ŌÇäÁ‹ÊÁºÙó¨§Ö äÁ‹ÊÅѺ໚¹á¾ç¡à¡çµ “1” «Ö§è àÁ×Íè âÎʵä´ŒÃºÑ á¾ç¡à¡çµ¢ŒÍÁÙÅ “0” «éÒí ÍÕ¡¤ÃÑ§é ¡ç¨ÐÃÙäŒ ´ŒÇҋ ¹Õàè »š¹¢ŒÍÁÙŪشà´ÔÁäÁ‹µÍŒ §àÍÒä»ãªŒ§Ò¹ ¡ÒÃʋ§¢ŒÍÁÙŤÃÑ§é ·Õè 1 âÎʵ 5. âÎʵäÁ‹ä´ŒÃºÑ áι´àªç¡ËÃ×Íä´ŒÃºÑ áµ‹äÁ‹ÊÁºÙó ¨Ö§à¢ŒÒã¨àͧNjÒÍØ»¡Ã³ ÂѧäÁ‹ä´ŒÃºÑ ¢ŒÍÁÙÅ ¡ÒÃʋ§ã¹¤Ãѧé ˹ŒÒ㪌 á¾ç¡à¡çµ Data 0 àËÁ×͹à´ÔÁ

âÎʵ 5. âÎʵä´ŒÃºÑ áι´àªç¡ÊÁºÙó µÑ§é ¤‹ÒÃÕ¨ÊÕ àµÍÏÀÒÂã¹ Ç‹Ò ¤ÃÑ§é ¶Ñ´ä»ãˌ㪌 á¾ç¡à¡çµ Data1 㹡ÒÃʋ§¢ŒÍÁÙÅ

ÍØ»¡Ã³ 1. âÎʵÊ§‹ Out Token ä»ÂѧÍØ»¡Ã³ 2. âÎʵÊ§‹ ¢ŒÍÁÙÅÍÍ¡ä»â´Â㪌á¾ç¡à¡çµ Data0 4. ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙŶ١µŒÍ§¨Ö§Ê‹§áι´àªç¡¡ÅѺ ᵋà¡Ô´¤ÇÒÁ¼Ô´¾ÅҴʋ§äÁ‹¶§Ö âÎʵ

¡ÒÃʋ§¢ŒÍÁÙŤÃÑ§é ·Õè 2 1. âÎʵÊ§‹ Out Token ä»ÂѧÍØ»¡Ã³ 2. âÎʵÊ§‹ ¢ŒÍÁÙÅÍÍ¡ä»â´Â㪌á¾ç¡à¡çµ Data 0 4. ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙŶ١µŒÍ§¨Ö§Ê‹§áι´àªç¡¡ÅѺ

3. ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙÅ ¶Ù¡µŒÍ§ ·íÒ¡ÒÃµÑ§é ¤‹ÒÃÕ¨ÊÕ àµÍÏ ÀÒÂã¹Ç‹Ò ¤ÃÑ§é ¶Ñ´ä» µŒÍ§ä´ŒÃºÑ á¾ç¡à¡çµ Data1

ÍØ»¡Ã³ 3. ÍØ»¡Ã³ä´ŒÃºÑ ¢ŒÍÁÙÅ ¶Ù¡µŒÍ§ ᵋ¾ºÇ‹Ò ໚¹á¾ç¡à¡çµ Data 0 ¨Ö§ÃÙnj ҋ ¢ŒÍÁÙÅÀÒÂ㹠໚¹¢ŒÍÁÙÅà´ÔÁ µÑ§é ¤‹ÒÃÕ¨ÊÕ àµÍÏÀÒÂã¹ Ç‹Ò µŒÍ§ä´ŒÃºÑ á¾ç¡à¡çµ Data 1 àËÁ×͹à´ÔÁ

ÃÙ»·Õè 7-1 µÑÇÍ‹ҧ¡ÒÃ㪌§Ò¹¡Ãкǹ¡ÒáÅѺʶҹТŒÍÁÙÅËÃ×Í´ÒµŒÒ·çÍ¡à¡ÔÅ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #


7.6 ʶҹкÑʤŒÒ§áÅСÒÃÊÙ­àÊÕÂÃٻẺ¡ÒÃʋ§¢ŒÍÁÙÅ ¤ÇÒÁ¼Ô´¾ÅÒ´ 2 ª¹Ô´¹Õ¨é Т͡ŋÒÇÃÇÁ¡Ñ¹à¾ÃÒмŷÕàè ¡Ô´¨Ò¡¤ÇÒÁ¼Ô´¾ÅÒ´·Ñ§é ¤Ù¨‹ зíÒãˌºÊÑ ·Ñ§é ºÑÊäÁ‹ ÊÒÁÒö㪌§Ò¹µ‹Íä»ä´Œ ¹Ñ¹è ¤×Í äÁ‹ÁÍÕ »Ø ¡Ã³µÇÑ ã´¨ÐÊÒÁÒöʋ§ËÃ×ÍÃѺ¢ŒÍÁÙÅä´ŒÍ¡Õ (deadlock) ʶҹкÑʤŒÒ§ (babble) ¤×Í ¡ÒõÃǨ¾ºÇ‹ÒºÑÊäÁ‹ÍÂÙ㋠¹Ê¶Ò¹ÐäÍà´ÔÅ ËÅѧ¨Ò¡ºÑÊࢌÒÊÙʋ ¶Ò¹ÐÊÔ¹é ÊØ´ à¿ÃÁ¢ŒÍÁÙÅ (EOF : End of frame) µÒÁ»¡µÔàÁ×Íè ºÑÊࢌÒÊÙʋ ¶Ò¹Ð EOF á¾ç¡à¡çµà¾Õ§ª¹Ô´à´ÕÂÇ·ÕÊè ÒÁÒöà¡Ô´ ¢Ö¹é 䴌¤Í× á¾ç¡à¡çµ SOF à¾×Íè àÃÔÁè µŒ¹à¿ÃÁãËÁ‹ «Ö§è ¶ŒÒµÃǨ¾ºÇ‹ÒʶҹТͧºÑÊäÁ‹à»š¹äÍà´ÔÅ ¨Ö§·íÒãËŒÍ»Ø ¡Ã³·¡Ø µÑÇÃÇÁ¶Ö§âÎʵ¤´Ô NjÒÁÕ¡ÒÃ㪌§Ò¹ºÑÊÍÂً ¨Ö§äÁ‹ÊÒÁÒöʋ§¢ŒÍÁÙÅã´æ ŧÁÒ㹺ÑÊ䴌 ¡ÒÃÊÙ­àÊÕÂÃٻẺ¡ÒÃʋ§¢ŒÍÁÙÅ (Loss of Activity : LOA) ¨Ðà¡Ô´¢Ö¹é ¨Ò¡¡Ò÷ÕÁè ÍÕ »Ø ¡Ã³µÇÑ ã´µÑÇ Ë¹Ö§è ʋ§¢ŒÍÁÙÅࢌÒÁÒ㹺ÑÊᵋäÁ‹ÁÊÕ ¶Ò¹Ð EOP »´·ŒÒÂá¾ç¡à¡çµ ʋ§¼ÅãËŒÍ»Ø ¡Ã³·àÕè ËÅ×ÍäÁ‹ÊÒÁÒö·íÒ§Ò¹µ‹Í䴌 à¾ÃÒÐࢌÒã¨Ç‹ÒºÑÊäÁ‹Ç‹Ò§ ¤ÇÒÁ¼Ô´¾ÅÒ´·Ñ§é Êͧª¹Ô´¹Õ¶é Í× à»š¹¤ÇÒÁ¼Ô´¾ÅÒ´¢Ñ¹é ÌÒÂáç â´Â»¡µÔËÒ¡âÎʵµÃǨ¾ºÇ‹ÒÍØ»¡Ã³ã´ ໚¹µÑÇÊÌҧ»˜­ËҨзíÒ¡Òû´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¹Ñ¹é æ à¾×Íè ãˌºÊÑ Âѧ¤§ÊÒÁÒö·íÒ§Ò¹µ‹Íä»ä´Œ ᵋ¶ÒŒ ËÒ¡âÎʵ àͧäÁ‹ÊÒÁÒö»´¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¹Ñé¹ä´Œ «Öè§ÍÒ¨à¡Ô´¨Ò¡¡Ò÷ÕèÍØ»¡Ã³äÁ‹ÂÍÁ»Å‹ÍºÑÊNjҧ ·íÒãˌâÎʵäÁ‹ ÊÒÁÒöʋ§¤íÒÊÑè§Å§ä»ÂѧÎѺà¾×èÍ»´¡Ò÷íҧҹ䴌 âÎʵ¨ÐµŒÍ§ÃÕ૵ºÑÊ·Ñé§ËÁ´à¾×èÍàÃÔèÁ¡Ò÷íÒ§Ò¹ãËÁ‹

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #


º··Õè 8

´ÔʤÃÔ»àµÍÏáÅСÃкǹ¡ÒõÑ駤‹Ò º·¹Õé໚¹º·ÊØ´·ŒÒÂã¹Ê‹Ç¹¢Í§·ÄÉ®Õ ¨Ð¡Å‹ÒǶ֧ÃÒÂÅÐàÍÕ´¢Í§´ÔʤÃÔ»àµÍϪ¹Ô´µ‹Ò§æ «Ö觨зíÒãˌ ·ÃÒº¢ŒÍÁÙÅ¡Ò÷íÒ§Ò¹·Õ¨è Òí ໚¹¢Í§ÍØ»¡Ã³áµ‹ÅЪ¹Ô´·Õàè ¢ŒÒÁÒàª×Íè Áµ‹Í¡ÑººÑÊ ÃÇÁ件֧ÅíҴѺ¢Ñ¹é µÍ¹¡ÒÃµÑ§é ¤‹Ò ¢Í§ÍØ»¡Ã³·µÕè ͋ ÍÂÙ㋠¹ºÑÊà¾×Íè ãˌâÎʵÃ¨ÙŒ ¡Ñ áÅÐÊÒÁÒö㪌§Ò¹ä´ŒàµçÁ¤ÇÒÁÊÒÁÒö »´·ŒÒ´ŒÇ¤íÒÊÑ§è ·Õãè ªŒ¤Çº¤ØÁ ÍØ»¡Ã³ã¹ºÑÊ¡‹Í¹·Õè¨ÐࢌÒÊًÀÒ¤»¯ÔºÑµÔà¾×èÍ·íÒ¡Ò÷´Åͧµ‹Íä»

8.1 ¢ŒÍÁÙÅÀÒÂã¹´ÔʤÃÔ»àµÍÏ 㹺··Õè 2 䴌¡Å‹ÒǶ֧´ÔʤÃÔ»àµÍϪ¹Ô´µ‹Ò§æ ä»áŌÇÇ‹Ò áµ‹ÅЪ¹Ô´ãªŒà¡çº¢ŒÍÁÙÅ´ŒÒ¹ã´ 㹺·¹Õ¨é СŋÒÇ ¶Ö§ÃÒÂÅÐàÍÕ´Ẻà¨ÒÐÅ֡NjÒᵋÅÐ亵¢Í§¢ŒÍÁÙÅ¢ŒÒ§ã¹à¡çº¤‹ÒÍÐäÃÍÂًºŒÒ§ l ´ÕäÇ«´Ê Ô ¤ÃÔ»àµÍÏ ÁÕÃÒÂÅÐàÍÕ´´Ñ§ã¹µÒÃÒ§·Õè 8-1 l ¤Í¹¿¡Ç Ô àêѹ´ÔʤÃÔ»àµÍÏ ÁÕÃÒÂÅÐàÍÕ´´Ñ§ã¹µÒÃÒ§·Õè 8-2 l ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ ÁÕÃÒÂÅÐàÍÕ´´Ñ§ã¹µÒÃÒ§·Õè 8-3 l àÍç¹´¾Íµ´Ê Ô ¤ÃÔ»àµÍÏ ÁÕÃÒÂÅÐàÍÕ´´Ñ§ã¹µÒÃÒ§·Õè 8-4 l ÎѺ¤ÅÒÊ´ÔʤÃÔ»àµÍÏ ໚¹´ÔʤÃÔ»àµÍÏ㪌ÊÒí ËÃѺÃÒ§ҹ¢ŒÍÁÙŢͧÍØ»¡Ã³·Á Õè Òàª×Íè Áµ‹Í·Õè ¾Íϵµ‹Ò§æ ¡ÅѺä»ÂѧâÎʵ ÁÕÃÒÂÅÐàÍÕ´´Ñ§ã¹µÒÃÒ§·Õè 8-5 ¢ŒÍÁÙÅ亵

ª×Íè

¢¹Ò´ (亵)

ª¹Ô´¢ŒÍÁÙÅ

0 1 2

Length Descripter type

¨íҹǹ ¤‹Ò¤§·Õè

USB

1 1 2

BCD

àÇÍϪ¹Ñ ¢Í§ USB ·ÕÍè »Ø ¡Ã³¹ãéÕ ªŒ§Ò¹ à¡çºã¹ÃٻẺ¢Í§ BCD

4

Device class

1

Class

ºÍ¡¡ÒèѴËÁÇ´ËÁÙ¢‹ ͧÍØ»¡Ã³Çҋ ÍÂÙ㋠¹¤ÅÒÊã´ (¡ÒÃẋ§¤ÅÒʵ‹Ò§æ ¡íÒ˹´â´Â¡ÅØÁ‹ ¼Ùʌ ÌҧÁҵðҹ USB)

5

Device subclass

1

Subclass

ºÍ¡¡ÒèѴËÁÇ´ËÁÙ¢‹ ͧÍØ»¡Ã³Çҋ ÍÂÙ㋠¹«Ñº¤ÅÒÊã´ (ẋ§«Ñº¤ÅÒÊâ´Â¡ÅØÁ‹ ¼Ùʌ ÌҧÁҵðҹ USB)

6

Device protocal

1

Protocal

ºÍ¡ÃٻẺ¡ÒõԴµ‹ÍËÃ×ÍÃËÑÊâ»ÃⵤÍŢͧÍØ»¡Ã³ (¡íÒ˹´â´Â¡ÅØÁ‹ ¼Ùʌ ÌҧÁҵðҹ USB)

7

MaxPacket size0

1

¨íҹǹ

8 10 12 14 15 16 17

Vendor

2 2 2 1 1 1 1

ID

Product Device Manufacturer Product Serial number NumConfiguration

ID BCD

ÍÔ¹à´ç¡« ÍÔ¹à´ç¡« ÍÔ¹à´ç¡« ¨íҹǹ

¤íÒ͸ԺÒ ¤ÇÒÁÂÒǢͧ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏã¹Ë¹‹ÇÂ亵 ¤‹ÒÃкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ Device Descriptor = 01H

ºÍ¡¢¹Ò´¢ŒÍÁÙÅ·ÕÊè ÒÁÒöʋ§ä´ŒµÍ‹ á¾ç¡à¡çµ¢Í§àÍç¹´¾Íµ 0 (¤‹Ò·Õãè ªŒ§Ò¹ä´Œ¤Í× 8,16,32 ËÃ×Í 64 亵à·‹Ò¹Ñ¹é ) ¤‹Ò ID ¢Í§ Vendor ·Õ·è Ò§ USB ¡íÒ˹´änj ª¹Ô´¢Í§ÍØ»¡Ã³·¼èÕ ÅÔµ ¡íÒ˹´â´ÂµÑǼټŒ ÅÔµàͧ àÇÍϪ¹Ñ ¢Í§µÑÇÍØ»¡Ã³ à¡çºã¹ÃٻẺ BCD ¤‹ÒÍÔ¹à´ç¡«¢Í§ÊµÃÔ§´ÔʤÃÔ»àµÍÏ·áèÕ Ê´§¢ŒÍÁÙŪ×Íè ¼Ù¼Œ ÅÔµ ¤‹ÒÍÔ¹à´ç¡«¢Í§ÊµÃÔ§´ÔʤÃÔ»àµÍÏáÊ´§ª¹Ô´¢Í§ÍØ»¡Ã³ ¤‹ÒÍÔ¹à´ç¡«¢Í§ÊµÃÔ§´ÔʤÃÔ»àµÍÏáÊ´§Ãع‹ ¢Í§ÍØ»¡Ã³ ºÍ¡¨íҹǹ¤Í¹¿¡ÇÔ àÃªÑ¹è ·Ñ§é ËÁ´·ÕÍè »Ø ¡Ã³ÃͧÃѺ䴌

µÒÃÒ§·Õè 8-1 ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅᵋÅÐ亵¢Í§´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #!


¢ŒÍÁÙÅ亵

ª×Íè

¢¹Ò´ (亵)

ª¹Ô´¢ŒÍÁÙÅ

0 1

Length Descripter type

1 1

¨íҹǹ ¤‹Ò¤§·Õè

¤íÒ͸ԺÒ ¢¹Ò´¢ŒÍÁÙŢͧ¤Í¹¿¡ÇÔ àêѹ´ÔʤÃÔ»àµÍϹãéÕ ¹Ë¹‹ÇÂ亵 Ãкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ Configuration Descriptor = 02H

2

TotalLength

2

¨íҹǹ

¢¹Ò´¢ŒÍÁÙŷѧé ËÁ´·Õäè ´Œ¨Ò¡¡ÒÃ͋ҹ´ÔʤÃÔ»àµÍÏ

4

NumInterface

1

¨íҹǹ

ºÍ¡¨íҹǹÍÔ¹àµÍÏà¿Ê·Ñ§é ËÁ´·ÕÍè »Ø ¡Ã³ÃͧÃѺ䴌

5

ConfigurationValue

1

¨íҹǹ

¤‹ÒËÁÒÂàÅ¢¤Í¹¿¡ÇÔ àêѹ·Õãè ªŒàÅ×Í¡¤Í¹¿¡ÇÔ àêѹ¹Õé (àÁ×Íè âÎʵµÍŒ §¡ÒÃàÅ×͡㪌¤Í¹¿¡ÇÔ àêѹ¢Í§ÍØ»¡Ã³ µŒÍ§Ãкؤ‹ÒËÁÒÂàÅ¢¹ÕéࢌÒä»ã¹¤íÒÊÑè§ Set_Configuration : ͋ҹÃÒÂÅÐàÍÕ´䴌ã¹ËÑÇ¢ŒÍ Data Request)

6

Configuration

1

ÍÔ¹à´ç¡«

¤‹ÒÍÔ¹à´ç¡«¢Í§ÊµÃÔ§´ÔʤÃÔ»àµÍÏ㪌͸ԺÒ¢ŒÍÁÙŢͧ¤Í¹¿¡ÔÇàêѹ¹Õé

7

Attributes

1

(àÁ×Íè ʋ§¤íÒÊÑ§è ¢Í͋ҹ¤Í¹¿¡ÇÔ àêѹ´ÔʤÃÔ»àµÍÏ ¢ŒÍÁÙÅ·Õäè ´Œ¨Ð໚¹¢ŒÍÁÙŢͧ´ÔʤÃÔ»àµÍÏ·§éÑ ËÁ´àÃÕ§¡Ñ¹ àÃÔÁè ¨Ò¡¤Í¹¿¡ÇÔ àêѹ´ÔʤÃÔ»àµÍÏ ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ áÅÐàÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏ ´Ñ§¹Ñ¹é ¢¹Ò´¢Í§¢ŒÍÁÙŤ×ͤÇÒÁÂÒǢͧ¢ŒÍÁÙŷѧé ËÁ´ÃÇÁ¡Ñ¹)

¡íÒ˹´à»š¹ ᵋÅкԵºÍ¡¤Ø³ÊÁºÑµ¢Ô ͧ¤Í¹¿¡ÇÔ àêѹ´Ñ§¹Õé ºÔµ D7 㪌¾Åѧ§Ò¹¨Ò¡ºÑÊ (Bus Powered) ºÔµ

ºÔµ D6 㪌áËŋ§§Ò¹¢Í§µÑÇàͧ (Self Powered) ºÔµ D5 ¡ÒÃÃͧÃѺ Remote Wakeup ºÔµ D4-D0 ʧǹänjäÁ‹ãªŒ§Ò¹ (䴌¤‹Ò໚¹ 0) ËÒ¡ºÔµã´Áդҋ ໚¹ "1" ¤×ÍÁÕ¤³ Ø ÊÁºÑµ¹Ô ¹éÑ æ

8

MaxPower

2

ÁÔÅÅÔáÍÁ»Š ºÍ¡¤‹Ò¡ÃÐáÊä¿¿‡Ò·Õ¤è ͹¿¡ÇÔ àêѹ¹Õµé ͌ §¡ÒÃ

àÁ×Íè ·íÒ§Ò¹àµçÁ¤ÇÒÁÊÒÁÒö¢Í§Áѹ ᵋÅÐ˹‹ÇÂ෋ҡѺ 2mA ઋ¹ ¶ŒÒ¤‹Òã¹äºµ¹Õé෋ҡѺ 50 ¨Ð´Ö§¡ÃÐáÊ 100mA

µÒÃÒ§·Õè 8-2 ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅᵋÅÐ亵¢Í§¤Í¹¿¡ÇÔ àêѹ´ÔʤÃÔ»àµÍÏ

8.2 ¢Ñ¹é µÍ¹¡ÒÃµÑ§é ¤‹ÒÍØ»¡Ã³ (Configuration process) ¨Ò¡à¹×Íé ËÒ·Õ¼è ҋ ¹Áҷѧé ËÁ´ ·íÒãˌ·ÃÒº¶Ö§Ê‹Ç¹»ÃСͺµ‹Ò§æ ·Ñ§é ËÁ´¢Í§ USB µ‹Í仨Ð໚¹¢Ñ¹é µÍ¹ ¡Ò÷íÒ§Ò¹¢Í§Ãкº àÃÔÁè µÑ§é ᵋÁÍÕ »Ø ¡Ã³µÇÑ ãËÁ‹àª×Íè Áµ‹ÍࢌÒÁÒã¹ÃкºÇ‹ÒÁÕÅÒí ´Ñº¢Ñ¹é Í‹ҧäúŒÒ§ ¡ÒÃÊ×Íè ÊÒâŒÍÁÙÅ ÃÐËNjҧâÎʵáÅеÑÇÍØ»¡Ã³ µÑ§é áµ‹Í»Ø ¡Ã³¶¡Ù àª×Íè Áµ‹Í¡ÑºÃкºä»¨¹¶Ö§µÑÇÍØ»¡Ã³ÊÒÁÒö·íÒ§Ò¹µÒÁ˹ŒÒ·Õ¢è ͧ Áѹ䴌 ¢Ñ¹é µÍ¹·Ñ§é ËÁ´¹Õàé ÃÕ¡ÃÇÁÇ‹Ò ¡ÒÃµÑ§é ¤‹Ò (config) ÍØ»¡Ã³à¢ŒÒ¡ÑºÃкº àÁ×Íè ÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹àª×Íè Áµ‹ÍࢌÒÁÒã¹Ãкº ¡‹Í¹·Õµè ÇÑ ÍØ»¡Ã³¨Ð·íҧҹ䴌 âÎʵ¨Òí ໚¹µŒÍ§·ÃÒº¢ŒÍÁÙÅ ·Õãè ªŒ¤Çº¤ØÁ¡Ò÷íÒ§Ò¹¢Í§µÑÇÍØ»¡Ã³¹¹Ñé æ ÃÇÁ仨¹¶Ö§¤ÇÒÁµŒÍ§¡Ò÷ÃѾÂҡôŒÒ¹µ‹Ò§æ äÁ‹Çҋ ¨Ð໚¹ä¿àÅÕÂé § ËÃ×ͤÇÒÁàÃçÇ㹡ÒÃÃѺʋ§¢ŒÍÁÙÅà¾×Íè ¾Ô¨ÒóÒÇ‹Ò Ãкº ³ ¢³Ð¹Ñ¹é ÊÒÁÒöÃͧÃѺ¡Ò÷íÒ§Ò¹¢Í§µÑÇÍØ»¡Ã³ãËÁ‹ ¹Õäé ´ŒËÃ×ÍäÁ‹ «Ö§è ¢ŒÍÁÙŵ‹Ò§æ àËŋҹըé кÃèØÍÂÙ㋠¹´ÔʤÃÔ»àµÍϵҋ §æ ÀÒÂã¹µÑÇÍØ»¡Ã³ ¡Ãкǹ¡ÒÃ㹡ÒÃ͋ҹ ´ÔʤÃÔ»àµÍϵҋ §æ ¹Õé àÃÕÂ¡Ç‹Ò ¡ÒÃÌͧ¢Í¢ŒÍÁÙÅ (data request) «Ö§è ¨Ð¡Å‹ÒÇâ´ÂÅÐàÍÕ´ã¹ËÑÇ¢ŒÍ¶Ñ´ä» ¡‹Í¹¨Ð͸ԺÒ¢Ñ鹵͹¡ÒõÑ駤‹Ò¨Ð¢Í¢ÂÒ¤ÇÒÁã¹àÃ×èͧâ¤Ã§ÊÌҧºÑʢͧ USB à¾ÔèÁàµÔÁÍÕ¡àÅ硹ŒÍ à¾×Íè äÁ‹ãˌà¡Ô´¤ÇÒÁÊѺʹ¨Ò¡¤íÒÇ‹Ò “ºÑʔ ¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³áºººÑʹѹé ÍØ»¡Ã³·¡Ø µÑÇã¹Ãкº¨Ðä´ŒÃºÑ ¢ŒÍÁÙÅ ·Ø¡æ á¾ç¡à¡çµ ᵋ¨ÐàÅ×Í¡à¡çºà©¾ÒТŒÍÁÙÅ·Õàè »š¹¢Í§µÑÇàͧ෋ҹѹé â´ÂÊѧࡵ¨Ò¡áÍ´à´ÃÊ·Õ¹è Òí ˹ŒÒ¢Í§áµ‹ÅÐ á¾ç¡à¡çµ «Ö§è ¶ŒÒµÕ¤ÇÒÁ¨Ò¡¢ŒÍ¤ÇÒÁ¢ŒÒ§µŒ¹ ÎѺ«Ö§è ໚¹ÍØ»¡Ã³·¢Õè ÂÒ¡ÒÃàª×Íè Áµ‹Í¨Ð·íÒ˹ŒÒ·Õ¡è ÃШÒ¢ŒÍÁÙÅÍÍ¡ ä»ÂѧÍØ»¡Ã³·¡Ø æ µÑÇ·ÕÁè Òµ‹ÍÍÂÙà‹ ·‹Ò¹Ñ¹é ઋ¹à´ÕÂǡѺÎѺ¢Í§Ãкºà¹çµàÇÔᏠLAN àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #"


¢ŒÍÁÙÅ亵

ª×èÍ

¢¹Ò´ (亵)

ª¹Ô´¢ŒÍÁÙÅ

0 1

Length

1 1

¨íҹǹ ¤‹Ò¤§·Õè

1

¨íҹǹ

2

Descripter type Interface Number

¤íÒ͸ԺÒ ¢¹Ò´¢ŒÍÁÙŢͧÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍϹãéÕ ¹Ë¹‹ÇÂ亵 ¤‹ÒÃкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ Interface Descriptor = 04H ¤‹ÒËÁÒÂàÅ¢ÍÔ¹àµÍÏà¿Ê·Õãè ªŒàÅ×Í¡ÍÔ¹àµÍÏà¿Ê¹Õé ¤‹ÒËÁÒÂàÅ¢¹Õàé ¢ŒÒä»ã¹¤íÒÊѧè Set_Interface : ͋ҹÃÒÂÅÐàÍÕ´䴌㹠ËÑÇ¢ŒÍ Data Request)

3

Alternate Setting

1

¨íҹǹ

¤‹ÒËÁÒÂàÅ¢ AlternateSetting ã¹áµ‹ÅÐÍÔ¹àµÍÏà¿Ê (㹡ÒáíÒ˹´ÍÔ¹àµÍÏà¿Ê¢Í§ÍØ»¡Ã³µÍŒ §ÃÐºØ Í‹Ò¹ÃÒÂÅÐàÍÕ´䴌ã¹ËÑÇ¢ŒÍ Data Request )

4

NumEndPoints

1

¨íҹǹ

ºÍ¡¨íҹǹàÍç¹´¾Í¹·ãèÕ ªŒ§Ò¹ã¹ÍÔ¹àµÍÏà¿Ê¹Õé (äÁ‹ÃÇÁàÍç¹´¾Íµ 0)

5

Interface Class

1

Class

ºÍ¡¡ÒèѴËÁÇ´ËÁÙ¢‹ ͧÍØ»¡Ã³Çҋ ÍÂÙ㋠¹¤ÅÒÊ㴠㹡óշáèÕ µ‹ÅÐÍÔ¹àµÍÏà¿ÊÁÕÍÂÙ㋠¹¤ÅÒÊ·Õµè ҋ §¡Ñ¹ (¡ÒÃẋ§¤ÅÒʵ‹Ò§æ ¡íÒ˹´â´Â¡Å؋Á¼ÙŒÊÌҧÁҵðҹ USB)

6

Interface subclass

1

Subclass

7

Interface Protocal

1

Interface

8

Interface

1

ÍÔ¹à´ç¡«

㹡óշáèÕ µ‹ÅÐÍÔ¹àµÍÏà¿ÊÍÂÙ㋠¹¤ÅÒÊ‹Í·յè ҋ §¡Ñ¹ (ẋ§¤ÅÒÊ‹ÍÂâ´Â¡Å؋Á¼ÙŒÊÌҧÁҵðҹ USB) ºÍ¡ÃËÑÊâ»ÃⵤÍŢͧÍØ»¡Ã³Çҋ 㪌â»ÃⵤÍÅÅѡɳÐ㴠㹡óշáèÕ µ‹ÅÐÍÔ¹àµÍÏà¿Ê㪌â»ÃⵤÍÅ·Õµè ҋ §¡Ñ¹ (¡íÒ˹´â´Â¡ÅØÁ‹ ¼Ùʌ ÌҧÁҵðҹ USB)

µÒÃÒ§·Õè 8-3 ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅᵋÅÐ亵¢Í§ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ ᵋà¹×èͧ¨Ò¡ USB ÁÕʶҹкҧʶҹзÕè¡íÒ˹´¨Ò¡ÃдѺáç´Ñ¹ÀÒÂã¹ÊÒÂÊÑ­­Ò³â´ÂµÃ§ ઋ¹ ʶҹÐÃÕ૵ ʶҹлÃÐËÂÑ´¾Åѧ§Ò¹ áÅÐʶҹÐàª×Íè Áµ‹ÍËÃ×ͻŴÍÍ¡¨Ò¡Ãкº ໚¹µŒ¹ «Ö§è ʶҹÐàËŋҹѹè äÁ‹ÊÒÁÒöʋ§¼‹Ò¹¨Ò¡ÎѺÃÇÁ仡Ѻ¢ŒÍÁÙÅÍ×¹è æ 䴌 ´Ñ§¹Ñ¹é ÎѺ¢Í§ USB ¨ÐµŒÍ§·íÒ˹ŒÒ·ÕÁè Ò¡¡Ç‹Ò¡ÒáÃШÒ¢ŒÍÁÙÅ µÒÁ»¡µÔ ¹Ñ¹è ¤×͵ŒÍ§ÁÕ¡ÒõÃǨÊͺ¡ÒÃàª×Íè Áµ‹ÍËÃ×ͻŴÍÍ¡¢Í§ÍØ»¡Ã³ä´Œ ÃѺ¤íÒÊѧè ÃÕ૵à¾×Íè ÃÕ૵ºÑÊ੾ÒÐ ¾Íϵ·Õ¡è Òí ˹´ä´Œ ´Ñ§¹Ñ¹é ¶ŒÒ¡Å‹ÒǶ֧¡ÒÃʋ§Ê¶Ò¹Ð¾ÔàÈÉàËŋҹÕäé »ÂѧµÑÇÍØ»¡Ã³¨ÐËÁÒ¤ÇÒÁÇ‹Ò âÎʵÊ§‹ ¤íÒÊѧè ä»ÂѧÎѺ·Õµè ÇÑ ÍØ»¡Ã³àª×Íè Áµ‹ÍÍÂً áŌÇÎѺ¨Ð¹íÒ¤íÒÊѧè ä»á»Å§à»š¹ÃдѺÊÑ­­Ò³ã¹ÊÒÂÊÑ­­Ò³à©¾ÒоÍÏµà·‹Ò ¹Ñ¹é äÁ‹ãª‹¡ÒÃʋ§Ê¶Ò¹ÐÍÍ¡ÁÒ¨Ò¡âÎʵâ´ÂµÃ§áŌǡÃШÒÂä»ÂѧÍØ»¡Ã³·¡Ø æ µÑÇ ÅíҴѺ¢Ñ¹é µÍ¹·Õ¨è СŋÒǶ֧¹Õàé »š¹ÅíҴѺ¡Ò÷íÒ§Ò¹¾×¹é °Ò¹ 㹡ÒÃ㪌§Ò¹¨ÃÔ§ÍÒ¨¨ÐÁÕ¡ÒõѴËÃ×Íà¾ÔÁè ºÒ§ ¢Ñ¹é µÍ¹ ËÃ×ÍÍÒ¨¨ÐÁÕ¡ÒÃÊÅѺºÒ§¢Ñ¹é µÍ¹ à¾×Íè ãˌà¡Ô´¤ÇÒÁàËÁÒÐÊÁ¡Ñº¡Ò÷íҧҹᵋÅÐÍ‹ҧ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ ##


¢ŒÍÁÙÅ亵

ª×èÍ

¢¹Ò´ (亵)

ª¹Ô´¢ŒÍÁÙÅ

0 1

Length

1 1

¨íҹǹ ¤‹Ò¤§·Õè

1

àÍ繾͵

2

Descripter type Endpoint Address

¤íÒ͸ԺÒ ¢¹Ò´¢ŒÍÁÙŢͧàÍç¹´¾Íµ´ÔʤÃÔ»àµÍϹÕéã¹Ë¹‹ÇÂ亵 ¤‹ÒÃкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ Endpoint Descriptor = 05H ºÔµ D0-D3 ºÍ¡ËÁÒÂàÅ¢áÍ´à´ÃʢͧàÍç¹´¾Íµ ºÔµ D4-D6 ʧǹänjäÁ‹ãªŒ§Ò¹ (䴌¤‹Ò໚¹ 0) ºÔµ D7 ºÍ¡·ÔÈ·Ò§¡ÒÃʋ§¢ŒÍÁÙŢͧàÍç¹´¾Íµ ໚¹ "1" ¤×ÍÃѺ¢ŒÍÁÙŨҡâÎʵ (In Endpoint)

3

Attributes

1

¡íÒ˹´à»š¹ ºÍ¡ª¹Ô´¢Í§¡ÒÃÃѺʋ§¢ŒÍÁÙÅ·ÕèàÍç¹´¾Íµ¹Õé㪌 D1=0 D0=0 Control Transfer ºÔµ D1=0 D0=1 Isochronous Transfer D1=1 D0=0

Bulk Transfer

D1=1 D0=1

Interrupt Transfer

ºÔµ·ÕèàËÅ×͹͡¨Ò¡¹ÕéʧǹänjäÁ‹ãªŒ§Ò¹

4

MaxPacketSize

2

¨íҹǹ ÊíÒËÃѺäÍâ«â¤Ã¹ÑÊàÍç¹´¾Í¹ ¤‹Ò¹ÕéËÁÒ¶֧¤‹Òẹ´ÇÔ´¸¢Í§¢ŒÍÁÙÅ·ÕèàÍç¹´¾Íµ¹Õ鵌ͧ¡ÒÃ㪌 㹡ÒÃʋ§¢ŒÍÁÙÅᵋÅÐÃͺ (1 ÁÔÅÅÔÇÔ¹Ò·Õ) â´ÂâÎʵ¨ÐµŒÍ§ÊíÒÃͧẹÇÔ´¸¢Í§ÊÒÂänjãˌ ÊíÒËÃѺºÑ¤ÅáÅÐÍÔ¹àµÍÏÃÑ»µàÍç¹´¾Íµ ¤‹Ò¹ÕéËÁÒ¶֧¢¹Ò´á¾ç¡à¡çµ·ÕèãË­‹·ÕèÊØ´·ÕèÊÒÁÒöʋ§ä´Œ

6

Interval

1

¨íҹǹ

ÊíÒËÃѺºÑ¤ÅáÅФ͹â·ÃÅàÍç¹´¾Íµ ¨ÐäÁ‹Ê¹ã¨¿Å´¢ÍŒ ÁÙŹÕé ¤‹Ò¹Õ¨é Ð෋ҡѺ 1 (à¾ÃÒеŒÍ§ ÊíÒËÃѺäÍâ«â¤Ã¹ÑÊàÍç¹´¾Íµ ÃѺʋ§¢ŒÍÁÙÅ·Ø¡æ Ãͺ) ¤‹Ò¹Õ¨é ÐÍÂÙË ÐËNjҧ 1 ¶Ö§ 255 ÊíÒËÃѺÍÔ¹àµÍÃÃ»Ñ µàÍç¹´¾Íµ (10 ¶Ö§ 255 ã¹ÍØ»¡Ã³¤ÇÒÁàÃçǵíÒè ) ¢Ö¹é ÍÂÙ¡‹ ºÑ àÇÅÒ·Õµè ͌ §¡ÒÃãˌâÎʵÁÒǹ͋ҹ¢ŒÍÁÙÅ

µÒÃÒ§·Õè 8-4 ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅᵋÅÐ亵¢Í§àÍç¹´¾Í¹´ÊÔ ¤ÃÔ»àµÍÏ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #$


¢ŒÍÁÙÅ亵

ª×èÍ

¢¹Ò´ (亵)

ª¹Ô´¢ŒÍÁÙÅ

0 1 2

Length Descripter type NbrPorts

1 1 1

¨íҹǹ ¤‹Ò¤§·Õè ¨íҹǹ

3

0K>+D=H=?JAHEIJE?I

2

¤íÒ͸ԺÒ ¢¹Ò´¢ŒÍÁÙÅ੾ÒТͧÎѺ¤ÅÒÊ´ÔʤÃÔ»àµÍϹÕéã¹Ë¹‹ÇÂ亵 ¤‹ÒÃкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ Hubclass Descriptor = 29H

¡íÒ˹´à»š¹ D1-D0 ºÍ¡¢ŒÍÁÙÅ¡Òè‹Ò¾Åѧ§Ò¹¢Í§ÎѺ 00 = ແ´¨‹Ò¾Åѧ§Ò¹·Ø¡¾Íϵ㹤ÃÑé§à´ÕÂÇ ºÔµ

äÁ‹ÊÒÁÒöá¡ແ´à»š¹¾Íϵæ 䴌 (Ganged power switching) 01 = ᡨ‹Ò¾Åѧ§Ò¹à»š¹¾Íϵæ ᡡѹ 10 áÅÐ 11 = äÁ‹ÊÒÁÒö»´¡Òè‹Ò¾Åѧ§Ò¹ä´Œ (ແ´µÅÍ´) D2 ÃкØNjÒ໚¹¤ÍÁ¾Òǹ´ÕäÇ«ËÃ×ÍäÁ‹ (ÃÒÂÅÐàÍÕ´͋ҹ䴌¨Ò¡º··Õè 2) 0 = äÁ‹à»š¹¤ÍÁ¾Òǹ´äÕ Ç« 1 = ໚¹¤ÍÁ¾Òǹ´ÕäÇ« D4-D3 ºÍ¡¢ŒÍÁÙÅ¡Òû‡Í§¡Ñ¹¡ÃÐáÊà¡Ô¹ 00 = »‡Í§¡Ñ¹¡ÃÐáÊà¡Ô¹áººÃÇÁ ÎѺÃÒ§ҹ¡Òô֧¡ÃÐáÊà¡Ô¹¨Ò¡¼ÅÃÇÁ¢Í§¡Òô֧¡ÃÐáÊ ·Ø¡æ ¾Íϵ äÁ‹ÊÒÁÒöá¡ÃÒ§ҹ໚¹¾Íϵæ 䴌 01 = á¡»‡Í§¡Ñ¹ä´ŒÍÔÊÃÐã¹áµ‹ÅоÍϵ ÎѺÊÒÁÒöÃÒ§ҹä»ÂѧâÎʵä´ŒÇ‹Ò¾Íϵã´ÁÕ¡Òô֧¡ÃÐáÊ à¡Ô¹ ໚¹ÍÔÊÃе‹Í¡Ñ¹ 10 áÅÐ 11 = äÁ‹ÊÒÁÒö»‡Í§¡Ñ¹¡Òô֧¡ÃÐáÊà¡Ô¹ä´Œ 㪌䴌¡ºÑ ÎѺ·ÕÍè ÒÈѾÅѧ§Ò¹¨Ò¡ºÑÊà·‹Ò¹Ñ¹é ºÔµÍ×è¹æ ·ÕèàËÅ×ÍʧǹänjäÁ‹ãªŒ§Ò¹

5

PowerOn2Power Good

1

¨íҹǹ

6

HubContrCurrent

1

¨íҹǹ

7

DeviceRemovable

1

¨¹¡ÃÐ·Ñ§è ·íҧҹ䴌ÊÁºÙó ÊÒÁÒöÃѺ¤íÒÊѧè 䴌 㪌ÊíÒËÃѺ¡íÒ˹´¤‹Ò˹‹Ç§àÇÅÒËÅѧ¨Ò¡¨‹ÒÂä¿àÅÕé§

¡íÒ˹´à»š¹ ¢ŒÍÁÙÅ 1 ºÔµá·¹¾Íϵ 1 ¾Íϵ ºÔµ ËÃ×͵‹Í¶ÒÇà ᵋ¶ŒÒ໚¹ "1" á·¹¶Ö§ÍØ»¡Ã³·Õ赋ͶÒÇà ºÔµ D0 ʧǹänjäÁ‹ãªŒ§Ò¹ ºÔµ D1 á·¹¾Íϵ·Õè 1 ºÔµ D2 á·¹¾Íϵ·Õè 2 äŋàÃÕ§µÒÁÅíҴѺ¨¹¤Ãº·Ø¡¾Íϵ

-

PortPwrCtrlMask

-

¡íÒ˹´à»š¹ ¢ŒÍÁÙÅÀÒÂ㹶١᷹¤‹Ò໚¹ºÔµàËÁ×͹¡Ñ¹ ºÔµ ẺÃÇÁ (Gang-mode) µ‹Ò§ËÒ¡ÊíÒËÃѺ¾Íϵ¹Õé ºÔµ D0 ʧǹänjäÁ‹ãªŒ§Ò¹ ºÔµ D1 á·¹¾Íϵ·Õè 1 ºÔµ D2 á·¹¾Íϵ·Õè 2 äŋàÃÕ§µÒÁÅíҴѺ¨¹¤Ãº·Ø¡¾Íϵ

µÒÃÒ§·Õè 8-5 ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅᵋÅÐ亵¢Í§ÎѺ¤ÅÒÊ´ÔʤÃÔ»àµÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #%


¢Ñ¹é ·Õè 1 µÃǨÊͺʶҹСÒÃàª×Íè Áµ‹ÍáÅЪ¹Ô´¢Í§ÍØ»¡Ã³ àÁ×Íè ÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹àª×Íè Áµ‹ÍࢌÒÁÒã¹Ãкº ÎѺ¨Ð·ÃÒº¨Ò¡¡ÒõÃǨÊͺÃдѺáç´Ñ¹¢Í§ÊÒ ÊÑ­­Ò³Ç‹ÒÍÂÙ㋠¹Ê¶Ò¹Ðã´ «Ö§è ¨Ð·ÃÒº´ŒÇÂÇ‹Ò ÍØ»¡Ã³·àÕè ª×Íè Áµ‹ÍࢌÒÁҹѹé ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ËÃ×ͤÇÒÁàÃçǵèÒí (͋ҹÃÒÂÅÐàÍÕ´䴌¨Ò¡º··Õè 4) ËÅѧ¨Ò¡¹Ñ¹é ¨Ð૵á¿Å¡Ê¶Ò¹Ð¢Í§¾Íϵ¹Ñ¹é æ à¾×Íè ÃÍ¡ÒÃ͋ҹ¡ÅѺ¨Ò¡âÎʵ ã¹¢Ñ鹵͹¹ÕéÂѧäÁ‹ÁÕ¡Òè‹ÒÂä¿àÅÕé§ä»ÂѧµÑÇÍØ»¡Ã³

¢Ñ¹é ·Õè 2 ¨‹ÒÂä¿àÅÕÂé §ä»Âѧ¾Íϵ ËÅѧ¨Ò¡âÎʵ·ÃÒºÇ‹Ò ¾Íϵã´ÁÕÍØ»¡Ã³µÑÇãËÁ‹µ‹ÍࢌÒÁÒ â´Â͋ҹ¨Ò¡á¿Å¡Ê¶Ò¹Ð¢Í§ÎѺ âÎʵ¨ÐÊѧè ãËŒÎºÑ ¨‹ÒÂä¿àÅÕÂé §á¡‹¾Íϵ¢Í§µÑÇÍØ»¡Ã³ãËÁ‹¹¹Ñé (㹡óշÎÕè ºÑ äÁ‹ÊÒÁÒö¤Çº¤ØÁ¡Òè‹ÒÂä¿àÅÕÂé § 䴌ÊÒÁÒö¢ŒÒÁ¢Ñ鹵͹¹Õéä»ä´Œ) â´Âã¹¢Ñ鹵͹¹ÕéÍØ»¡Ã³¨Ð´Ö§¡ÃÐáÊ䴌äÁ‹à¡Ô¹ 100mA ÍØ»¡Ã³¨Ð´Ö§¡ÃÐáÊ ä´ŒàµçÁ·Õ¡è µç ͋ àÁ×Íè ä´ŒÃºÑ ¡ÒÃµÑ§é ¤‹Ò¨Ò¡âÎʵáŌÇ෋ҹѹé (͋ҹÃÒÂÅÐàÍÕ´㹺··Õè 5)

¢Ñ¹é ·Õè 3 ÃÕ૵¾Íϵ¢Í§ÍØ»¡Ã³·àÕè ª×Íè Áµ‹ÍãËÁ‹ àÁ×Íè ÍØ»¡Ã³µÇÑ ãËÁ‹ä´ŒÃºÑ ä¿àÅÕÂé §áÅŒÇ âÎʵ¨Ðʋ§Ê¶Ò¹ÐÃÕ૵ä»Âѧ¾Íϵ¹Ñ¹é æ â´Âʋ§¤íÒÊѧè ä» ÂѧÎѺ·Õ¤è Ǻ¤ØÁ¡Ò÷íÒ§Ò¹¢Í§¾Íϵ¹Ñ¹é àÁ×Íè ÍØ»¡Ã³ä´ŒÃºÑ ʶҹйÕáé ÅŒÇ ¨ÐµŒÍ§ÃÕ૵µÑÇàͧáÅлÃѺ¤‹Òµ‹Ò§æ ä» ÂѧʶҹÐàÃÔèÁµŒ¹ ·íÒãˌáÍ´à´ÃʢͧÍØ»¡Ã³·Õè䴌ÃѺ¡ÒÃÃÕ૵ä»ÍÂً·Õè 0 ·íÒãˌâÎʵÊÒÁÒöµÔ´µ‹ÍÍØ»¡Ã³µÑÇ ãËÁ‹¹äÕé ´Œ à¾ÃÒжŒÒäÁ‹Á¡Õ Òõѧé áÍ´à´ÃÊãËÁ‹âÎʵ¨ÐäÁ‹·ÃÒºÇ‹Ò µŒÍ§Ê‹§¤íÒÊѧè ä»·Õãè ´)

¢Ñ¹é ·Õè 4 âÎʵÃ͌ §¢Í¢ŒÍÁÙÅ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍϨҡµÑÇÍØ»¡Ã³ ËÅѧ¨Ò¡áÍ´à´ÃʢͧÍØ»¡Ã³µÑÇãËÁ‹¶Ù¡ÃÕ૵໚¹ÈٹáÅŒÇ âÎʵ¨ÐàÃÔèÁÌͧ¢Í¢ŒÍÁÙÅ´ÔʤÃÔ »àµÍϵҋ §æ ¨Ò¡µÑÇÍØ»¡Ã³à¾×Íè ¹íÒÁÒ¾Ô¨ÒóÒNjÒÊÒÁÒöÃͧÃѺÍØ»¡Ã³µÇÑ ãËÁ‹ä´ŒËÃ×ÍäÁ‹ â´Â´ÔʤÃÔ»àµÍϵÇÑ áá·Õ¨è ж١͋ҹÍÍ¡ÁÒ¡ç¤Í× ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ ¡ÒÃ͋ҹ´ÔʤÃÔ»àµÍϨҡµÑÇÍØ»¡Ã³¡¤ç Í× ¡ÒÃʋ§¤íÒÊѧè Ìͧ¢Íà¢ŒÒ ä»ÂѧµÑÇÍØ»¡Ã³ »ÅÒ·ҧ·Õ¨è ФÍÂÃѺ¤íÒÊÑ§è ¤×Í àÍç¹´¾Íµ¤Çº¤ØÁ ·ÕÁè ËÕ ÁÒÂàÅ¢àÍç¹´¾Íµà»š¹ 0 ´Ñ§¹Ñ¹é ¡Òà ͋ҹ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ¡¤ç Í× ¡ÒÃʋ§¤íÒÊѧè Ìͧ¢Í´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏä»ÂѧÍØ»¡Ã³áÍ´à´ÃÊ 0 àÍç¹´¾Íµ 0 ¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃ໚¹¤‹Òáá¤×Í ¢¹Ò´á¾ç¡à¡çµ¢ŒÍÁÙÅãË­‹·ÊÕè ´Ø ·ÕÊè ÒÁÒöÃѺʋ§ä´ŒµÍ‹ ¤ÃÑ§é «Ö§è ¢ŒÍÁÙÅ ¹Õ¨é ÐÍÂÙ㋠¹¿Å´ MaxPacketSize0 (¡‹Í¹Í‹Ò¹¢ŒÍÁÙŹÕÍé Í¡ÁÒ¡íÒ˹´¢¹Ò´á¾ç¡à¡çµãË­‹·ÊÕè ´Ø à»š¹ 8 亵)

¢Ñ¹é ·Õè 5 ¡íÒ˹´áÍ´à´ÃÊãˌᡋµÇÑ ÍØ»¡Ã³ àÁ×Íè ·ÃÒº¢¹Ò´á¾ç¡à¡çµ¢ŒÍÁÙÅ·Õ¨è Ð㪌㹡ÒõԴµ‹Í¨Ò¡¡ÒÃ͋ҹ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏáÅŒÇ âÎʵ¨Ð ¡íÒ˹´áÍ´à´ÃÊãˌᡋµÇÑ ÍØ»¡Ã³ â´Â㪌¤Òí Êѧè Set_Address «Ö§è ¤‹ÒáÍ´à´ÃÊ·Õ¡è Òí ˹´¢Ö¹é ¹Õ¨é Ð໚¹áÍ´à´ÃÊ·Õè äÁ‹«Òéí ¡ÑºÍØ»¡Ã³µÇÑ Í×¹è æ ã¹ÃкºàÅÂà¾×Íè ãˌâÎʵÊÒÁÒöµÔ´µ‹ÍÊ×Íè ÊÒáѺÍØ»¡Ã³áµ‹ÅеÑÇ䴌

¢Ñ¹é ·Õè 6 âÎʵÍҋ ¹´ÔʤÃÔ»àµÍϵҋ §æ à¾×Íè ¾Ô¨ÒóҡÒÃÃͧÃѺ䴌¢Í§Ãкº ¡‹Í¹·ÕèâÎʵ¨ÐµÑ駤‹ÒµÑÇÍØ»¡Ã³ âÎʵ¨ÐµŒÍ§Í‹Ò¹´ÔʤÃÔ»àµÍϵ‹Ò§æ ÀÒÂã¹µÑÇÍØ»¡Ã³à¾×èÍ ¾Ô¨ÒóÒNjÒÃкºÁÕ·ÃѾÂÒ¡Ãà¾Õ§¾ÍµÒÁ·Õµè ÇÑ ÍØ»¡Ã³µÍŒ §¡ÒÃËÃ×ÍäÁ‹ ¢ŒÍÁÙÅËÅÑ¡æ ·Õ¨è Òí ໚¹ã¹¡ÒþԨÒóҤ×Í ¡ÃÐáÊä¿¿‡ÒáÅФÇÒÁàÃçÇ㹡ÒÃÃѺʋ§¢ŒÍÁÙÅ·Õ赌ͧ¡Òà â´Â¢ŒÍÁÙÅ´ŒÒ¹¡ÃÐáÊä¿¿‡Ò¨Ð䴌¨Ò¡¿Å´ MaxPower ÀÒÂ㹤͹¿¡ÔÇàêѹ´ÔʤÃÔ»àµÍÏ ʋǹ¢ŒÍÁÙÅ´ŒÒ¹¤ÇÒÁàÃçǨÐ䴌¨Ò¡¿Å´ MaxPacketSize ÀÒÂã¹áµ‹ÅÐ àÍç¹´¾Íµ´ÔʤÃÔ»àµÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #&


¡ÒþԨÒóÒàÃÔèÁ¨Ò¡µÃǨÊÍºÇ‹Ò ÍØ»¡Ã³µÑǹÕéÁÕâËÁ´¡Ò÷íÒ§Ò¹¡ÕèâËÁ´ (¡Õè¤Í¹¿¡ÔÇàêѹ) ¨Ò¡¢ŒÍÁÙÅ㹿Å´ Num-Configurations ¢Í§´ÕäÇ«´ÔʤÃÔ»àµÍÏ ËÅѧ¨Ò¡¹Ñé¹Ê‹§¤íÒÊÑè§ÃŒÍ§¢Í¤Í¹¿¡ÔÇàêѹ ´ÔʤÃÔ»àµÍÏä»ÂѧµÑÇÍØ»¡Ã³ ´ŒÇ¤íÒÊÑ觹ÕéÍØ»¡Ã³¨Ðʋ§´ÔʤÃÔ»àµÍÏ·ÕèàËÅ×Í·Ñé§ËÁ´ÍÍ¡ÁÒäÁ‹Ç‹Ò¨Ð໚¹¤Í¹ ¿¡ÇÔ àêѹ ÍÔ¹àµÍÏà¿Ê áÅÐàÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏ㹤Ãѧé à´ÕÂÇ àÁ×Íè 䴌¢ÍŒ ÁÙŷѧé ËÁ´ÍÍ¡ÁÒáŌǨеŒÍ§¹íÒÁÒ µÑ´á¡໚¹áµ‹ÅÐʋǹ àÁ×Íè ᡤ͹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏÍÍ¡ÁÒ䴌áÅŒÇ âÎʵ¨Ð·ÃÒºÇ‹Ò ¶ŒÒµÑ§é ¤‹ÒãËŒÍ»Ø ¡Ã³ ·íÒ§Ò¹ã¹áµ‹ÅÐâËÁ´¨ÐµŒÍ§¨‹Ò¡ÃÐáÊÍÍ¡ä»à·‹Òã´¨Ò¡¢ŒÍÁÙÅ㹿Å´ MaxPower ·íÒãˌâÎʵ·ÃÒºÇ‹Ò ÊÒÁÒö ¨‹ÒÂä¿àÅÕé§ãˌᡋÍØ»¡Ã³ã¹¤Í¹¿¡ÔÇàêѹã´ä´ŒºŒÒ§ ¢ŒÍÁÙÅʋǹ¶Ñ´ÁÒ¤×Í ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ ¨Ðãˌ¢ÍŒ ÁÙÅÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅÐÍÔ¹àµÍÏà¿Ê (à»ÃÕºàÊÁ×͹ᵋÅÐ˹ŒÒ·Õ¡è Ò÷íÒ§Ò¹) Ç‹Ò ¨Ñ´ÍÂÙ㋠¹¤ÅÒÊ㴠㪌â»ÃⵤÍžÔàÈÉẺã´ã¹¡ÒõԴµ‹Í ÃÇÁä» ¶Ö§¨íҹǹàÍç¹´¾Íµ·µÕè ͌ §ãªŒµ´Ô µ‹Íã¹ÍÔ¹àµÍÏà¿Ê¹Ñ¹é æ ËÅѧ¨Ò¡ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍϢ͌ ÁÙÅ·Õµè ÒÁÁÒ¤×Í àÍç¹´¾Íµ´ÊÔ ¤ÃÔ»àµÍÏ«§Öè ¨Ðᨌ§¤ÇÒÁµŒÍ§¡ÒôŒÒ¹»ÃÔÁÒ³¡ÒÃÃѺʋ§¢ŒÍÁÙÅNjÒᵋÅÐàÍç¹´¾ÍµÃºÑ ʋ§¢ŒÍÁÙÅẺ ã´áÅеŒÍ§¡ÒäÇÒÁàÃçÇ㹡ÒÃÃѺʋ§¢ŒÍÁÙÅ෋Òã´ â´Âª¹Ô´¢Í§¡ÒÃÃѺʋ§¢ŒÍÁÙÅ·ÃҺ䴌¨Ò¡¿Å´ Attributes ʋǹ ¤ÇÒÁàÃçÇ㹡ÒÃÃѺʋ§¢ŒÍÁÙÅ·ÃҺ䴌¨Ò¡¿Å´ MaxPacketSize àÁ×Íè 䴌¢ÍŒ ÁÙÅàËŋҹÕÁé ÒâÎʵ¨Ð¹íÒä»à»ÃÕºà·Õº¡Ñº·ÃѾÂҡ÷ÕÃè кºàËÅ×ÍÍÂÙNj ҋ ÊÒÁÒöÃͧ ÃѺ¡Òè‹ÒÂä¿àÅÕé§áÅФÇÒÁàÃçÇ㹡ÒÃÃѺʋ§¢ŒÍÁÙÅà¾Õ§¾Í¡Ñº·ÕèÍØ»¡Ã³µŒÍ§¡ÒÃËÃ×ÍäÁ‹ ËÒ¡¾Ô¨ÒóÒáŌÇÇ‹Ò ÊÒÁÒöÃͧÃѺ䴌¡¨ç ТŒÒÁä»ÊÙ¡‹ ÒÃµÑ§é ¤‹Òã¹¢Ñ¹é ¶Ñ´ä»ä´Œ ᵋ¶ÒŒ ¾Ô¨ÒóÒáŌǾºÇ‹Ò ÃкºàËÅ×Í·ÃѾÂÒ¡ÃäÁ‹à¾Õ§¾Í âÎʵ¨Ð¾Ô¨ÒóҤ͹¿¡ÇÔ àêѹËÃ×ÍÍÔ¹àµÍÏà¿ÊÍ×¹è æ ·Õµè ͌ §¡Ò÷ÃѾÂҡùŒÍ¡NjÒ㹡óշÍÕè »Ø ¡Ã³¹¹Ñé Áդ͹ ¿¡ÇÔ àêѹáÅÐÍÔ¹àµÍÏà¿ÊÁÒ¡¡Ç‹Ò˹֧è ᵋËÒ¡¾Ô¨ÒóҤ͹¿¡ÇÔ àêѹËÃ×ÍÍÔ¹àµÍÏà¿Ê·Ñ§é ËÁ´áŌÇÂѧäÁ‹ÊÒÁÒö ÃͧÃѺ¤ÇÒÁµŒÍ§¡ÒâͧÍØ»¡Ã³ä´Œ âÎʵ¨ÐËÂØ´¡ÒÃµÑ§é ¤‹ÒÍØ»¡Ã³ ·íÒãËŒÍ»Ø ¡Ã³¹¹Ñé äÁ‹ÊÒÁÒö·íҧҹ䴌

¢Ñ¹é ·Õè 7 âÎʵ¡Òí ˹´àÅ×Í¡¤Í¹¿¡ÇÔ àêѹáÅÐÍÔ¹àµÍÏà¿Ê ËÅѧ¨Ò¡¾Ô¨ÒóÒáŌÇNjÒÃкºÊÒÁÒöÃͧÃѺ¤ÇÒÁµŒÍ§¡ÒâͧÍØ»¡Ã³µÑÇãËÁ‹ä´ŒâÎʵ¨Ð ʋ§¤íÒÊѧè Set_Configuration áÅÐ Set_Interface â´ÂÃкØËÁÒÂàÅ¢¤Í¹¿¡ÇÔ àêѹáÅÐËÁÒÂàÅ¢ÍÔ¹àµÍÏà¿Ê·Õè àÅ×͡ࢌÒä»ã¹µÑǤíÒÊѧè ËÅѧ¨Ò¡ÊÔ¹é ÊØ´¢Ñ¹é µÍ¹¹Õé ÍØ»¡Ã³¨Ð´Ö§ä¿àÅÕÂé §¨Ò¡ÎѺàµçÁ¾Ô¡´Ñ ·ÕÃè кØänj㹤͹¿¡ÇÔ àêѹ ´ÔʤÃÔ»àµÍÏáÅÐàÃÔèÁ·íÒ§Ò¹µÒÁ˹ŒÒ·Õè¢Í§Áѹ ¶×Í໚¹¡Ò躡Ãкǹ¡ÒõÑ駤‹ÒµÑÇÍØ»¡Ã³ áÅÐÊíÒËÃѺ¡Ã³Õ·µÕè ͌ §µÑ§é ¤‹ÒÍØ»¡Ã³ËÅÒÂæ µÑǾÌÍÁ¡Ñ¹ ઋ¹ ¡ÒÃແ´à¤Ã×Íè §¤ÍÁ¾ÔÇàµÍÏ¢¹Öé ÁÒã¹¢³Ð ·ÕÁè ÍÕ »Ø ¡Ã³àª×Íè Áµ‹ÍÍÂÙÁ‹ Ò¡¡Ç‹Ò 1 µÑÇ âÎʵ¨ÐµÑ§é ¤‹ÒÍØ»¡Ã³ä»·ÕÅеÑǵÒÁ¡Ãкǹ¡ÒâŒÒ§µŒ¹¨¹¤Ãº·Ñ§é ËÁ´ ·Õ輋ҹÁÒ¢ŒÒ§µŒ¹¤×Í¡Ãкǹ¡Ò÷íÒ§Ò¹¢Í§ USB µÑé§áµ‹ÍØ»¡Ã³¶Ù¡µ‹ÍࢌÒÁÒÂѧÃкº¨¹ÃзÑè§ÍØ»¡Ã³ ÊÒÁÒö·íҧҹ䴌 ᵋà¹×Íè §¨Ò¡ÅíҴѺ¢Ñ¹é µÍ¹¹Õäé Á‹ä´Œ¶¡Ù ¡íÒ˹´à»š¹ÁҵðҹµÒµÑÇ ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ÅíҴѺ¢Ñ¹é µÍ¹µ‹Ò§æ ÍÒ¨ÊÅѺÅíҴѺ, à¾ÔÁè ¢Ñ¹é µÍ¹ËÃ×͵Ѵ¢Ñ¹é µÍ¹ä´ŒµÒÁ¤ÇÒÁàËÁÒÐÊÁ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ #'


¢ŒÍÁÙÅ亵

ª×èÍ

¢¹Ò´ (亵)

0

Request type

1

ª¹Ô´¢ŒÍÁÙÅ

¤íÒ͸ԺÒÂ

¡íÒ˹´à»š¹ áÊ´§¤Ø³ÊÁºÑµ¢Ô ͧªØ´¤íÒÊѧè D7 áÊ´§·ÔÈ·Ò§¢Í§¤íÒÊÑè§ ºÔµ

0 = ʋ§¨Ò¡âÎʵä»ÂѧµÑÇÍØ»¡Ã³ 1 = ʋ§¨Ò¡ÍØ»¡Ã³ä»ÂѧâÎʵ D6-D5 ª¹Ô´¢Í§¤íÒÊÑè§ 00 = ¤íÒÊѧè Áҵðҹ (Standard) 01 = ¤íÒÊѧè ੾ÒТͧ¤ÅÒÊ 10 = ¤íÒÊѧè ੾ÒТͧ¼Ù¼Œ ÅÔµ 11 = ʧǹänjäÁ‹ãªŒ§Ò¹ D1-D0 ÃкؼٌÃѺ 00 = µÑÇÃѺ¤íÒÊѧè ËÅÑ¡¢Í§ÍØ»¡Ã³ 01 = ÍÔ¹àµÍÏà¿Ê 10 = àÍç¹´¾Íµ (ËÁÒ¶֧ àÍç¹´¾ÍµÍ¹è× æ) ºÔµÍ×è¹æ ·ÕèàËÅ×ÍʧǹänjäÁ‹ãªŒ§Ò¹

1

Request

1

¤‹Ò·Õè¡íÒ˹´ ¢ŒÍÁÙÅ亵¹¤éÕ Í× ¤íÒÊÑ§è ·Õµè ͌ §¡ÒÃʋ§ä»Âѧ»ÅÒ·ҧ

2

Value

2

¤‹Ò·Õè¡íÒ˹´ ໚¹Ê‹Ç¹¢ÂÒ¢ͧªØ´¤íÒÊѧè

4 6

Index

2 2

Length

¢Ö¹é ÍÂÙ¡‹ ºÑ ᵋÅФíÒÊѧè NjҨÐ㪌ʧ‹ ¢ŒÍÁÙÅÍÐäÃ

ÍÔ¹à´ç¡« ¨íҹǹ

ÍÔ¹à´ç¡«ÍҌ §ÍÔ§ÊíÒËÃѺºÒ§¤íÒÊѧè

µÒÃÒ§·Õè 8-6 ªØ´¤íÒÊѧè 8 亵·ºÕè ÃèØã¹à¿Ê¢ŒÍÁÙŢͧà«çµÍÑ»Ê൨

8.3 ¡ÒÃÌͧ¢Í¢ŒÍÁÙÅ (Data request) ¨Ò¡¡Ãкǹ¡ÒÃµÑ§é ¤‹ÒÍØ»¡Ã³·¼Õè ҋ ¹ÁÒ ¨ÐàËç¹ä´ŒÇҋ âÎʵ¨ÐµŒÍ§Ê‹§¤íÒÊѧè ËÅÒÂæ ª¹Ô´à¢ŒÒä»ÂѧµÑÇÍØ»¡Ã³ äÁ‹Çҋ ¨Ð໚¹¡ÒÃ͋ҹ´ÔʤÃÔ»àµÍÏà¾×Íè ËÒ¢ŒÍÁÙŵ‹Ò§æ·Õ¨è Òí ໚¹ã¹¡ÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³ ¡ÒÃÊѧè ãËŒÎºÑ ÃÕ૵¾Íϵ ·Õµè ͌ §¡Òà ¡ÒáíÒ˹´áÍ´à´ÃÊ·Õáè ¹‹¹Í¹ãˌᡋµÇÑ ÍØ»¡Ã³ 仨¹¶Ö§¡ÒÃàÅ×Í¡¤‹Ò¤Í¹¿¡ÇÔ àêѹáÅÐÍÔ¹àµÍÏà¿Ê ¡ÒÃʋ§¤íÒÊÑ§è ¤Çº¤ØÁ·Ñ§é ËÁ´¹ÕÃé ÇÁàÃÕÂ¡Ç‹Ò ¡ÒÃÌͧ¢Í¢ŒÍÁÙÅ (data request) ÊÒÁÒöẋ§Í͡໚¹ 2 ª¹Ô´¤×Í ¡ÒÃÌͧ¢Í¢ŒÍÁÙŨҡµÑÇÍØ»¡Ã³ (device request) áÅÐ ¡ÒÃÌͧ¢Í¢ŒÍÁÙžÔàÈɨҡÎѺ (hub request) ¡Ãкǹ¡Òâͧ¡ÒÃÌͧ¢Í¢ŒÍÁÙŤ×Í ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ·Õºè ÃèؤÒí ÊÑ§è µ‹Ò§æ ʋ§ä»ÂѧµÑÇÍØ»¡Ã³ ¹Ñ¹è àͧ «Ö§è àÃ×Íè §ÃÒǢͧ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ¹Ñ¹é 䴌¡Å‹ÒÇä»áŌÇ㹺··Õ¼è ҋ ¹ÁÒ ã¹º·¹Õ¨é §Ö ¢Í¢ÂÒ¤ÇÒÁ ã¹Ê‹Ç¹·ÕÂè §Ñ äÁ‹ä´Œ¡Å‹ÒǶ֧෋ҹѹé (͋ҹÃÒÂÅÐàÍÕ´¢Ñ¹é µŒ¹ä´Œ¨Ò¡º··Õè 6)

8.3.1 ªØ´¤íÒÊѧè Ìͧ¢Í¢ŒÍÁÙŨҡµÑÇÍØ»¡Ã³ ´Ñ§·Õ¡è ŋÒÇä»ã¹º··Õè 6 Ç‹Ò ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ»ÃСͺ´ŒÇ 3 ª‹Ç§¤×Í ª‹Ç§µÑ§é ¤‹Ò ª‹Ç§¢ŒÍÁÙÅ áÅЪ‹Ç§áι´àª¡ ªØ´¤íÒÊÑ§è ·Õ¨è СŋÒǶ֧¹Õ¨é ж١ºÃèØÍÂÙ㋠¹ª‹Ç§µÑ§é ¤‹Ò (setup stage)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $


4AGKAIJ6OFA

¤íÒÊѧè

¤‹Ò¢ŒÍÁÙÅ

ÍÔ¹à´ç¡«

¤ÇÒÁÂÒÇ

¢ŒÍÁÙÅã¹Ê‹Ç¹´ÒµŒÒÊ൨

00000000b 00000001b 00000010b

Clear_Feature (01H)

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

0/ÍÔ¹àµÍÏà¿Ê/àÍç¹´¾Íµ

0

äÁ‹ÁÕ

10000000b

Set_Configuration (08H)

0

0

1

¤Í¹¿¡ÔÇàêÑè¹·Õè㪌§Ò¹ÍÂً

10000000b

Get_Descripter (06H)

ª¹Ô´¢Í§ ´ÔʤÃÔ»àµÍÏ ·Õè¨Ð͋ҹ*

0

¤ÇÒÁÂÒÇ ¢Í§´ÔʤÃÔ»àµÍÏ

¢ŒÍÁÙÅ´ÔʤÃÔ»àµÍÏ·Õè͋ҹ

10000001b

Get_Interface (0AH)

0

ËÁÒÂàÅ¢ÍÔ¹àµÍÏà¿Ê

0

¤‹Ò Alternate Setting ·Õè㪌

10000000b 10000001b 10000010b

Get_Status (00H)

0

0/ÍÔ¹àµÍÏà¿Ê/àÍç¹´¾Íµ

2

¤‹ÒʶҹÐ

00000000b

Set_Address (05H)

¤‹ÒáÍ´à´ÃÊ ·Õè¡íÒ˹´

0

0

äÁ‹ÁÕ

00000000b

Set_Configuration (09H)

¤‹ÒËÁÒÂàÅ¢ ¤Í¹¿¡ÔÇàêÑè¹ ·Õè¨ÐàÅ×Í¡

0

0

äÁ‹ÁÕ

00000000b

Set_Descripter (07H)

ª¹Ô´¢Í§ ´ÔʤÃÔ»àµÍÏ ·Õè¨Ð¡íÒ˹´¤‹Ò *

0

¤ÇÒÁÂÒǢͧ ´ÔʤÃÔ»àµÍÏ

¢ŒÍÁÙÅ´ÔʤÃÔ»àµÍÏ·Õèà¢Õ¹

00000000b 00000001b 00000010b

Set_Feature (03H)

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

0/ÍÔ¹àµÍÏà¿Ê/àÍç¹´¾Íµ

0

äÁ‹ÁÕ

00000001b

Set_Interface (0BH)

¤‹Ò Alternate Setting

ËÁÒÂàÅ¢ÍÔ¹àµÍÏà¿Ê

0

äÁ‹ÁÕ

10000010b

Sync_Frame (0CH)

0

ËÁÒÂàÅ¢àÍç¹´¾Íµ

2

ËÁÒÂàÅ¢à¿ÃÁ

* ´Ù¤‹Ò·Õè¡íÒ˹´ä´Œ¨Ò¡µÒÃÒ§ã¹ÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅФíÒÊÑè§

µÒÃÒ§·Õè 8-7 ÃÒÂÅÐàÍÕ´ªØ´¤íÒÊÑ§è ·Ñ§é ËÁ´·Õãè ªŒ§Ò¹¡ÑºÍØ»¡Ã³ USB

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $


ÃٻẺ¢Í§¢ŒÍÁÙÅ ·ÕèÌͧ¢Í 00100000b

00100011b

¤íÒÊѧè Clear_Hub_Feature

(01h)

Clear_Port_Feature

(01h)

¤‹Ò¢ŒÍÁÙÅ

ÍÔ¹à´ç¡«

¤ÇÒÁÂÒÇ

¢ŒÍÁÙÅã¹Ê‹Ç¹´ÒµŒÒÊ൨

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

0

0

äÁ‹ÁÕ

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

ËÁÒÂàÅ¢¾Íϵ

0

äÁ‹ÁÕ

10100011b

Get_Bus_State (02h)

0

ËÁÒÂàÅ¢¾Íϵ

1

ʶҹТͧᵋÅоÍϵ

10100000b

Get_Descriptor (06h)

ª¹Ô´¢Í§ ´ÔʤÃÔ»àµÍÏ

0

¤ÇÒÁÂÒǢͧ ´ÔʤÃÔ»àµÍÏ

¢ŒÍÁÙÅ´ÔʤÃÔ»àµÍÏ·Õè͋ҹ

10100000b

Get_Hub_Status (00h)

0

0

4

ʶҹТͧÎѺ

10100011b

Get_Port_Status (00h)

0

ËÁÒÂàÅ¢¾Íϵ

4

ʶҹТͧ¾Íϵ

00100000b

Set_Hub_Feature (03h)

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

0

0

äÁ‹ÁÕ

00100011b

Set_Port_Feature (03h)

¤‹Ò Feature ·Õ赌ͧ¡ÒáíÒ˹´*

ËÁÒÂàÅ¢¾Íϵ

0

äÁ‹ÁÕ

* ´Ù¤‹Ò·Õè¡íÒ˹´ä´Œ¨Ò¡µÒÃÒ§ã¹ÃÒÂÅÐàÍÕ´¢Í§áµ‹ÅФíÒÊÑè§

µÒÃÒ§·Õè 8-8 ÃÒÂÅÐàÍÕ´ªØ´¤íÒÊÑ§è ·Ñ§é ËÁ´·Õãè ªŒ§Ò¹à©¾ÒСѺÎѺ USB 㹪‹Ç§µÑ§é ¤‹Ò»ÃСͺ¢Ö¹é ¨Ò¡á¾ç¡à¡çµ¢ŒÍÁÙÅ 3 à¿Ê à¿Êáá¤×Íâ·à¤ç¹á¾ç¡à¡çµ «Ö§è ã¹·Õ¹è ¨Õé Ð໚¹¡ÒÃµÑ§é ¤‹Òâ·à¤ç¹ «Ö§è ¨ÐÃкØáÍ´à´ÃÊáÅÐàÍç¹´¾Íµ»ÅÒ·ҧ·Õ¨è Ðʋ§¢ŒÍÁÙÅ ª‹Ç§·ÕÊè ͧ¤×Í á¾ç¡à¡çµ¢ŒÍÁÙÅ ÀÒÂ㹨кÃÃ¨Ø ¤íÒÊÑ§è ·Õµè ͌ §¡ÒÃʋ§ä»¤Çº¤ØÁ«Ö§è ¨Ð¡Å‹ÒǶ֧ã¹Ê‹Ç¹µ‹Íä» áÅЪ‹Ç§ÊØ´·ŒÒ¤×Íá¾ç¡à¡çµáι´àªç¡«Ö§è 㪌µÃǨÊͺ¤ÇÒÁ ¶Ù¡µŒÍ§ ÊíÒËÃѺ¢ŒÍÁÙÅ㹪‹Ç§¢Í§á¾ç¡à¡çµ¢ŒÍÁÙŹѹé ÀÒÂ㹺Ãèآ͌ ÁÙÅ¢¹Ò´ 8 亵â´Â¨ÐÁÕ¤ÇÒÁËÁÒ¢ͧᵋ ÅÐ亵áÊ´§ã¹µÒÃÒ§·Õè 8-6 ʋǹµÒÃÒ§·Õè 8-7 ໚¹ÊÃØ»ÃÇÁ¤íÒÊÑ§è ·Ñ§é ËÁ´¢Í§¡ÒÃÌͧ¢Í¢ŒÍÁÙŨҡµÑÇÍØ»¡Ã³ (device request) áÅеÒÃÒ§·Õè 8-8 ໚¹ÊÃØ»ÃÇÁ¤íÒÊÑ§è ·Ñ§é ËÁ´¢Í§¡ÒÃÌͧ¢Í¢ŒÍÁÙžÔàÈɨҡÎѺ (hub request)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $


ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ·ÍèÕ Ò‹ ¹

¢ŒÍÁÙÅ·Õ¹è Òí ä»ã»ãʋ㹿Å´ Value

´ÕäÇ«´ÔʤÃÔ»àµÍÏ

1

¤Í¹¿¡ÔÇàêѹ´ÔʤÃÔ»àµÍÏ

2

ʵÃÔ§´ÔʤÃÔ»àµÍÏ

3

ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ àÍç¹´¾Í¹´ÔʤÃÔ»àµÍÏ

4 5

µÒÃÒ§·Õè 8-9 ¤‹Ò¿Å´ Value 㹪ش¤íÒÊѧè ÊíÒËÃѺ´ÔʤÃÔ»àµÍϪ¹Ô´µ‹Ò§æ 8.3.1.1 ¤íÒÊѧè Set/Clear Feature

ª¹Ô´¢Í§ Feature Device_Remote_Wakeup Endpoint_Stall

»ÅÒ·ҧ ÍØ»¡Ã³ àÍç¹´¾Íµ

¤‹Ò·Õ¹è Òí ä»ãʋ㹪ش¤íÒÊѧè 1 0

㪌àÅ×Í¡ËÃ×Í¡àÅÔ¡âËÁ´¡Ò÷íÒ§Ò¹ Device Remote Wakeup ໚¹¡ÒáÃеعŒ ãËŒÍ»Ø ¡Ã³¡ÅѺÁÒ·íÒ§Ò¹ ã¹ÀÒÇл¡µÔ¨Ò¡âÎʵ ʋǹ Endpoint Stall ¤×Í¡ÒÃà¤ÅÕÂÏʶҹРStall ¢Í§àÍç¹´¾Íµ·¡Õè Òí ˹´ã¹¿Å´ index

8.3.1.2 ¤íÒÊѧè Set/Get Configuration 㪌ÊíÒËÃѺàÅ×Í¡¤Í¹¿¡ÔÇàêѹ·Õ赌ͧ¡ÒÃáÅТʹ٤͹¿¡ÔÇàêѹ»˜¨¨ØºÑ¹·Õè㪌§Ò¹ÍÂً

8.3.1.3 ¤íÒÊѧè Set/Get Descripter 㪌 ͋ Ò ¹¤‹ Ò ´Ô Ê ¤ÃÔ » àµÍÏ ¨ Ò¡µÑ Ç ÍØ » ¡Ã³ àÅ× Í ¡ä´Œ 3 ª¹Ô ´ ¤× Í ´Õ ä Ç« ´Ô Ê ¤ÃÔ » àµÍÏ , ¤Í¹¿ ¡Ô Ç àêѹ´ÔʤÃÔ»àµÍÏ áÅÐʵÃÔ§¤´ÊÔ ¤ÃÔ»àµÍÏ ¢Ö¹é ¡Ñº¡ÒáíÒ˹´¤‹Ò㹿Å´ Value ´Ñ§ã¹µÒÃÒ§·Õè 8-9 ¡ÒÃ͋ Ò ¹¤Í¹¿ ¡Ô Ç àÃªÑ ¹ ´Ô Ê ¤ÃÔ » àµÍÏ ¨ Ð䴌 ¢Œ Í ÁÙ Å ¢Í§ÍÔ ¹ àµÍÏ à ¿ÊáÅÐàÍç ¹ ´ ¾ ͵ ´Ô Ê ¤ÃÔ » àµÍÏÁҾÌÍÁ¡Ñ¹ ÊíÒËÃѺʵÃÔ§¤´ÊÔ ¤ÃÔ»àµÍÏ㪌Íҋ ¹¢ŒÍÁÙŵÑÇÍÑ¡ÉÃ·Õ¼è ¼ÙŒ ÅÔµ¡íÒ˹´ÁÒ àª‹¹ ËÁÒÂàÅ¢»ÃШíÒµÑÇ ÍØ»¡Ã³ (àÁ×Íè ͋ҹ´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ¢¹Öé ÁÒʋǹ·Õºè Í¡¢ŒÍÁÙÅà¡ÕÂè ǡѺ¼Ù¼Œ ÅÔµ¨Ð໚¹à¾Õ§¢ŒÍÁÙÅ 1 亵«§Öè µŒÍ§¹íÒ ¢ŒÍÁÙŹѹé ÁÒãʋ㹿Å´ Index ¢Í§¡ÒÃ͋ҹʵÃÔ§¤´ÊÔ ¤ÃÔ»àµÍÏ) ʋǹ¤íÒÊѧè Set Descripter ¹Ñ¹é 㪌¡ºÑ ÍØ»¡Ã³·Õè ÊÒÁÒöà»ÅÕÂè ¹¤‹Ò´ÔʤÃÔ»àµÍÃä´Œà·‹Ò¹Ñ¹é «Ö§è â´Â·ÑÇè 仨зíÒäÁ‹ä´é

8.3.1.4 ¤íÒÊѧè Set/Get Interface 㪌àÅ×Í¡ÍÔ¹àµÍÏà¿Ê·Õ赌ͧ¡ÒÃáÅТʹÙÍÔ¹àµÍÏà¿Ê»˜¨¨ØºÑ¹·Õè㪌§Ò¹ÍÂً ʋǹ·Õèᵡµ‹Ò§¡Ñ¹¤×Í ¨ÐµŒÍ§ ¡íÒ˹´¤‹Ò AlternateSetting «Ö§è à»ÃÕºàÊÁ×͹ËÑÇ¢ŒÍ‹ÍÂ㹡Ò÷íҧҹࢌÒä»ã¹µÑǤíÒÊÑ§è ´ŒÇ áÅÐàÁ×Íè ͋ҹ¢ŒÍÁÙÅ ¡ÅѺ¨Ð䴌¤Ò‹ AlternateSetting ·Õ¡è Òí ˹´änj

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $!


8.3.1.5 ¤íÒÊѧè Get Status 㪌Íҋ ¹Ê¶Ò¹Ð¢Í§µÑÇÍØ»¡Ã³áº‹§Í͡໚¹ 3 ÃдѺ¤×Í Ê¶Ò¹Ð¢Í§µÑÇÍØ»¡Ã³ (device status), ʶҹР¢Í§¡ÒÃÍÔ¹àµÍÏà¿Ê (interface status) áÅÐʶҹТͧàÍç¹´¾Íµ (endpoint status) â´Â¢ŒÍÁÙÅ·Õ¨è Ðä´ŒÃºÑ ¡ÅѺ ÁÒÁÕ¢¹Ò´ 2 亵à·‹Ò¡Ñ¹·Ñ§é 3 ÃдѺ ·Õ¢è ͌ ÁÙŢͧʶҹТͧµÑÇÍØ»¡Ã³ ºÔµ 1 ¨ÐºÍ¡¢ŒÍÁÙÅ Remote Wakeup ã¹¢³Ð·Õºè µÔ 0 ᨌ§Ê¶Ò¹Ð¡ÒÃ㪌¾Åѧ§Ò¹¨Ò¡ºÑÊ (self Power) ʋǹºÔµÍ×¹è æ ·Õàè ËÅ×ÍʧǹänjäÁ‹ãªŒ§Ò¹ ã¹¢³Ð ·ÕÊè ¶Ò¹Ð¢Í§àÍç¹´¾ÍµºµÔ 0 㪌ᨌ§Ê¶Ò¹Ð Stall ¢Í§àÍç¹´¾Í¹ ʋǹºÔµÍ×¹è æ ·Õàè ËÅ×Íʧǹänj·§Ñé ËÁ´ ÊíÒËÃѺ ʶҹТͧÍÔ¹àµÍÏà¿Ê¶Ù¡Ê§Ç¹änjäÁ‹ãªŒ§Ò¹ ¹Ñ¹è ¤×ͨÐ͋ҹ䴌¤Ò‹ 0 ¡ÅѺÁҷѧé 2 亵

8.3.1.6 ¤íÒÊѧè Sync Frame 㪌㹡ÒÃʋ§¢ŒÍÁÙÅẺäÍâ«â¤Ã¹ÑÊà¾×Íè «Ô§â¤Ã乫¨Òí ¹Ç¹à¿ÃÁ¢ŒÍÁÙÅ à¾×Íè ãˌ½Ò† Âʋ§áÅÐÃѺ·ÃÒºËÁÒ àÅ¢à¿ÃÁ¢ŒÍÁÙÅ·Õãè ªŒ§Ò¹ÍÂً «Ö§è ¨Ð·íÒãˌ·ÃҺNjҡÒÃʋ§¢ŒÍÁÙżԴ¾ÅÒ´ËÃ×ÍäÁ‹ ·Ñ§é ¹Õàé ¹×Íè §¨Ò¡¡Òö‹Ò·ʹÊÑ­­Ò³ ẺäÍâ«â¤Ã¹ÑÊäÁ‹ÁÕ¡ÒÃáι´àªç¡à¾×è͵ÃǨÊͺËÅѧʋ§¢ŒÍÁÙÅàÊÃç¨

8.3.2 ªØ´¤íÒÊѧè Ìͧ¢Í¢ŒÍÁÙžÔàÈɨҡÎѺ 㪌͋ҹʶҹТͧÎѺáÅÐʶҹТͧ¾Íϵµ‹Ò§æ â´Âẋ§Í͡໚¹ 2 ª¹Ô´¤×Í Ê¶Ò¹Ð¢Í§ÎѺ (hub status) áÅÐʶҹТͧ¾Íϵ (port status) «Ö§è ¨Ð㪌ÃËÑʤíÒÊÑ§è ·Õµè ҋ §¡Ñ¹ ¢ŒÍÁÙÅ·Õäè ´Œ¡ÅѺÁÒ໚¹¢ŒÍÁÙÅ¢¹Ò´ 4 亵 â´Â 2 亵áá¨Ð໚¹Ê¶Ò¹Ð»˜¨¨Øº¹Ñ ¢Í§ÎѺËÃ×;Íϵ ã¹¢³Ð·Õè 2 亵ËÅѧ¨Ðᨌ§¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§ ʶҹР·íÒãˌâÎʵ·ÃҺNjÒà¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§ÍÐäúŒÒ§¢Ö¹é ·ÕÎè ºÑ ã¹µÒÃÒ§·Õè 8-10 áÊ´§ãˌàËç¹¢ŒÍÁÙÅʶҹл˜¨¨Øº¹Ñ ¢Í§ÎѺ (2 亵áá) áÅТŒÍÁÙÅ¡ÒÃà»ÅÕÂè ¹Ê¶Ò¹Ð ¢Í§ÎѺ (2 亵ËÅѧ) ¨Ò¡¡ÒÃ㪌¤Òí Êѧè Get_Hub_Status ʋǹµÒÃÒ§·Õè 8-11 áÊ´§ãˌàËç¹¢ŒÍÁÙÅʶҹл˜¨¨Øº¹Ñ ¢Í§¾Íϵ (2 亵áá) áÅТŒÍÁÙÅ¡ÒÃà»ÅÕÂè ¹Ê¶Ò¹Ð¢Í§¾Íϵ (2 亵ËÅѧ) ¨Ò¡¡ÒÃ㪌¤Òí Êѧè Get_Port_Status ,#

,"

,!

,

,

,

,'

,&

,

,

,

áÊ´§ÀÒÇÐ ¡ÃÐáÊà¡Ô¹

ʶҹоÅѧ§Ò¹

,

,'

,&

,

,

,

áÊ´§Ê¶Ò¹Ð ¡ÒÃà»ÅÕÂè ¹á»Å§ ¡ÃÐáÊà¡Ô¹

áÊ´§Ê¶Ò¹Ð ¡ÒÃà»ÅÕÂè ¹á»Å§ ¾Åѧ§Ò¹

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0" ,%

,$

,#

,"

,!

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

(¡) ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅ 2 亵áá ,#

,"

,!

,

,

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0" ,%

,$

,#

,"

,!

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

(¢) ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅ 2 亵ËÅѧ

µÒÃÒ§·Õè 8-10 ¢ŒÍÁÙÅʶҹТͧÎѺ·Õäè ´Œ¨Ò¡¤íÒÊѧè Get_Hub_Status àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $"


,#

,"

,!

,

,

,

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

,%

,$

,#

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

,'

,&

ʶҹР¡ÒÃàª×Íè Áµ‹Í ¢Í§ÍØ»¡Ã³ ¤ÇÒÁàÃçǵíÒè

ʶҹоÅѧ§Ò¹ ¢Í§¾Íϵ

,"

,!

,

,

,

ʶҹÐÃÕ૵

áÊ´§ÀÒÇÐ ¡ÃÐáÊà¡Ô¹

ʶҹРSuspense

àÍç¹àÍàºÔÅ ¡Ò÷íÒ§Ò¹ ¢Í§¾Íϵ

ʶҹР¡Òè‹Ò¡ÃÐáÊ

,

,'

,&

,

,

,

(¡) ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅ 2 亵áá ,#

,"

,!

,

,

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

,%

,$

ʧǹänjäÁ‹ãªŒ§Ò¹ Áդҋ ໚¹ "0"

,#

,"

,!

áÊ´§Ê¶Ò¹Ð áÊ´§Ê¶Ò¹Ð áÊ´§Ê¶Ò¹Ð áÊ´§Ê¶Ò¹Ð áÊ´§Ê¶Ò¹Ð ¡ÒÃà»ÅÕÂè ¹á»Å§ ¡ÒÃà»ÅÕÂè ¹á»Å§ ¢Í§¡ÒÃàÍç¹àÍàºÔÅ ¡ÒÃà»ÅÕÂè ¹á»Å§ ¡ÒÃà»ÅÕÂè ¹á»Å§ ¡ÒÃà»ÅÕÂè ¹á»Å§ ã¹âËÁ´ ¡Ò÷íÒ§Ò¹¢Í§ ¢Í§¡ÒÃàª×Íè Áµ‹Í ÊÑ­­Ò³ÃÕ૵ ¡ÃÐáÊà¡Ô¹ Suspense ¾Íϵ

(¢) ÃÒÂÅÐàÍÕ´¢ŒÍÁÙÅ 2 亵ËÅѧ

µÒÃÒ§·Õè 8-11 ¢ŒÍÁÙÅʶҹТͧ¾Íϵ¨Ò¡¤íÒÊѧè Get_Port_Status ÃÒÂÅÐàÍÕ´¡Ò÷íÒ§Ò¹ã¹áµ‹ÅкԵ¢Í§áµ‹ÅФíÒÊÑè§Áմѧ¹Õé ʶҹоÅѧ§Ò¹ (local power status) 㪌ᨌ§Ê¶Ò¹Ðä¿àÅÕÂé §¢Í§ÎѺ “0” ¤×ÍÁÕä¿àÅÕÂé § “1” ¤×ÍäÁ‹ÁäÕ ¿àÅÕÂé § ÊÀÒÇСÃÐáÊà¡Ô¹ (over-current indicator) 㪌ᨌ§Ê¶Ò¹Ð¡ÒÃ㪌¡ÃÐáÊä¿¿‡Òà¡Ô¹â´ÂÃÇÁ¢Í§·Ø¡¾Íϵ «Ö§è Áդҋ ÊÙ§ÊØ´äÁ‹à¡Ô¹ 5A (͋ҹÃÒÂÅÐàÍÕ´䴌¨Ò¡º··Õè 5) “0” áÊ´§Ç‹Ò¡ÒÃ㪌§Ò¹à»š¹»Ã¡µÔ “1” áÊ´§Ç‹ÒÁÕ¡Òô֧¡ÃÐáÊà¡Ô¹ ʶҹСÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³ (current connect status) 㪌ᨌ§Ê¶Ò¹Ð¡Òô֧¡ÃÐáʨҡÍØ»¡Ã³ ·Õµè ͋ ÍÂÙ¡‹ ºÑ ¾Íϵ à¾×Íè áÊ´§¶Ö§¡ÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³ “0” ËÁÒ¤ÇÒÁÇ‹Ò äÁ‹ÁÍÕ »Ø ¡Ã³µÍ‹ ÍÂً “1” áÊ´§Ç‹Ò ÁÕÍ»Ø ¡Ã³µÍ‹ ÍÂً àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $#


ʶҹÐàÍç¹àÍàºÔÅËÃ×Í´ÔÊàÍàºÔžÍϵ (port enable/disable) áÊ´§Ê¶Ò¹Ð¢Í§¾ÍÏµÇ‹Ò ແ´ãˌ㪌§Ò¹ ËÃ×Í»´ÍÂً «Ö§è ÊÒÁÒöÊѧè ãˌແ´ËÃ×Í»´ä´Œâ´ÂâÎʵ “0” áÊ´§Ç‹Ò ¾Íϵ¹Õ»é ´ ¡ÒÃ㪌§Ò¹ÍÂÙˋ Ã×Í´ÔÊàÍàºÔÅ “1” áÊ´§Ç‹Ò ແ´ãªŒ§Ò¹ÍÂÙˋ Ã×ÍàÍç¹àÍàºÔÅ ÀÒÇлÃÐËÂÑ´¾Åѧ§Ò¹ (suspend) 㪌ᨌ§Ê¶Ò¹Ð¡ÒûÃÐËÂÑ´¾Åѧ§Ò¹¢Í§µÑÇÍØ»¡Ã³ “0” áÊ´§Ç‹Ò ÍØ»¡Ã³·Òí §Ò¹µÒÁ»¡µÔ “1” áÊ´§Ç‹Ò ÍØ»¡Ã³ÍÂÙ㋠¹âËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ ÀÒÇСÃÐáÊà¡Ô ¹ (over-current indicator) 㪌 á ¨Œ § ʶҹСÒÃ㪌 ¡ ÃÐáÊà¡Ô ¹ ¢Í§ÍØ » ¡Ã³ ·Õ赋ÍÍÂً¡Ñº¾Íϵ “0” áÊ´§Ç‹Ò 㪌¡ÃÐáÊä¿¿‡ÒµÒÁ»¡µÔ “1” áÊ´§Ç‹Ò ÁÕ¡ÒÃ㪌¡ÃÐáÊà¡Ô¹ Í‹ҧäáçµÒÁ㹡óշÎÕè ºÑ äÁ‹ÊÒÁÒöµÃǨÊͺ¡ÒÃ㪌¡ÃÐáÊà¡Ô¹ä´Œ ¨Ðʋ§¤‹ÒºÔµ¹Õàé »š¹ “0” ÀÒÇÐÃÕ૵ (reset) 㪌ᨌ§Ê¶Ò¹Ð¡ÒÃÃÕ૵¢Í§¾Íϵ »¡µÔºµÔ ¹Õ¨é Ð૵໚¹ “1” µÑ§é ᵋâÎʵàÃÔÁè Êѧè ãˌ à¡Ô ´ ¡ÒÃÃÕ à «µ áÅÐÎÑ º ¨Ðà¤ÅÕ Â Ã ¤‹ Ò ¡ÅÑ º ໚ ¹ “0” àÁ×è Í ¡ÒÃÃÕ à «µàÊÃç ¨ ÊÔé ¹ ÎÑ º ¨ÐÊÌ Ò §Ê¶Ò¹Ð ÃÕ૵·Õáè µ‹ÅоÍϵ໚¹àÇÅÒ»ÃÐÁÒ³ 10 ÁÔÅÅÔÇ¹Ô Ò·Õ (͋ҹÃÒÂÅÐàÍÕ´à¾ÔÁè àµÔÁ䴌¨Ò¡º··Õè 3) ÀÒÇÐä¿àÅÕÂé §¾Íϵ (port power) 㪌ᨌ§Ê¶Ò¹Ð¡ÒÃແ´ä¿àÅÕÂé §ãËŒá¡‹Í»Ø ¡Ã³¢Í§¾Íϵ “0” ¤×Í äÁ‹à»´ä¿àÅÕÂé § “1” ¤×Í à»´ä¿àÅÕÂé § ÀÒÇСÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí (low speed device attached) 㪌ᨌ§Ç‹Ò ÍØ»¡Ã³·µÕè ͋ ÍÂً ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ËÃ×͵èíÒ “0” áÊ´§Ç‹Ò ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ “1” áÊ´§Ç‹Ò ໚¹ÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí ¢ŒÍÁÙÅ 2 亵ËÅѧ¹Õ¨é ÐÊÑÁ¾Ñ¹¸â´ÂµÃ§¡Ñº¢ŒÍÁÙÅ 2 亵ááઋ¹à´ÕÂǡѺʶҹТͧÎѺ ᵋ¨Ò¡µÒÃÒ§·Õè 8-11 ¨ÐàËç¹Ç‹ÒÁÕÍÂً 2 ʶҹзÕäè Á‹ÁºÕ µÔ ¢ŒÍÁÙÅÊíÒËÃѺµÃǨÊͺ¡ÒÃà»ÅÕÂè ¹á»Å§ ¹Ñ¹è ¤×Í Ê¶Ò¹Ð¡ÒÃແ´ä¿àÅÕÂé § áÅÐʶҹЪ¹Ô´¢Í§ÍØ»¡Ã³ à¹×Íè §¨Ò¡·Ñ§é Êͧʶҹйըé ÐäÁ‹Á¡Õ ÒÃà»ÅÕÂè ¹á»Å§àÅÂËÅѧ¨Ò¡ÍØ»¡Ã³àª×Íè Áµ‹Íà¢ŒÒ ÁÒÂѧÃкº â´Â¨Ðà¡Ô´¡ÒÃà»ÅÕÂè ¹á»Å§¡çµÍ‹ àÁ×Íè ÁÕ¡ÒûŴÍÍ¡ áŌÇÁÕÍ»Ø ¡Ã³µÇÑ ãËÁ‹ÁÒµ‹Í෋ҹѹé ÊíÒËÃѺÃÒÂÅÐàÍÕ´¢Í§¢ŒÍÁÙÅã¹áµ‹ÅкԵ¨Ð¶Ù¡¡íÒ˹´µíÒá˹‹§änjµÃ§¡Ñº¢ŒÍÁÙÅʶҹР2 亵áá ʋǹ ¤ÇÒÁËÁÒ¢ͧᵋÅкԵ¨ÐËÁÒ¶֧¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§Ê¶Ò¹Ð¹Ñ¹é æ ¹Ñ¹è ¤×ͶŒÒ໚¹ “1” ËÁÒ¶֧ÁÕ¡ÒÃà»ÅÕÂè ¹ ʶҹР¶ŒÒ໚¹ “0” ËÁÒ¶֧äÁ‹Á¡Õ ÒÃà»ÅÕÂè ¹Ê¶Ò¹Ð áµ‹¨ÐÁÕÍÂً 2 ºÔµÊ¶Ò¹Ð·Õµè ¤Õ ÇÒÁäÁ‹àËÁ×͹ºÔµÍ×¹è æ ¤×Í ºÔµáÊ´§Ê¶Ò¹Ð¡ÒÃà»ÅÕÂè ¹á»Å§ã¹âËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹ËÃ×Í Suspend Change áÅкԵáÊ´§Ê¶Ò¹Ð¡ÒÃÃÕ૵ ËÃ×Í Reset Complete â´Â·Õè 2 ºÔµ¹ÕËé ҡ໚¹ “1” ËÁÒ¶֧ ¡ÒÃÊѧè ãËŒÍ»Ø ¡Ã³à¢ŒÒÊÙ⋠ËÁ´»ÃÐËÂÑ´¾Åѧ§Ò¹àÊÃç¨ ÊÁºÙó áÅСÒÃÊѧè ÃÕ૵¾ÍϵµÒÁÅíҴѺ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $$


¤‹Ò Feature ·ÕèàÅ×Í¡ Clear_Hub_Local_Power Clear_Hub_Over_Current

»ÅÒ·ҧ

넼 넼

Value

ÍÔ¹à´ç¡«

D

D

D

D

µÒÃÒ§·Õè 8-12 ¤‹Ò Value ·Õµè ͌ §ãʋ㹪ش¤íÒÊѧè ÊíÒËÃѺàÅ×Í¡ feature µ‹Ò§æ ¢Í§ÎѺ ¤‹Ò Feature ·ÕèàÅ×Í¡

»ÅÒ·ҧ

Value

ÍÔ¹à´ç¡«

Port_Connection

¾Íϵ

00h

ËÁÒÂàÅ¢¾Íϵ

Port_Enable

¾Íϵ

01h

ËÁÒÂàÅ¢¾Íϵ

Port_Suspend

¾Íϵ

02h

ËÁÒÂàÅ¢¾Íϵ

Port_Over_Current

¾Íϵ

03h

ËÁÒÂàÅ¢¾Íϵ

Port_Reset

¾Íϵ

04h

ËÁÒÂàÅ¢¾Íϵ

Port_Power

¾Íϵ

08h

ËÁÒÂàÅ¢¾Íϵ

Port_Low_Speed

¾Íϵ

09h

ËÁÒÂàÅ¢¾Íϵ

Clear_Port_Connection

¾Íϵ

10h (16d)

ËÁÒÂàÅ¢¾Íϵ

Clear_Port_Enable

¾Íϵ

11h (17d)

ËÁÒÂàÅ¢¾Íϵ

Clear_Port_Suspend

¾Íϵ

12h (18d)

ËÁÒÂàÅ¢¾Íϵ

Clear_Port_Over_Current

¾Íϵ

13h (19d)

ËÁÒÂàÅ¢¾Íϵ

Clear_Port_Reset

¾Íϵ

14h (20d)

ËÁÒÂàÅ¢¾Íϵ

µÒÃÒ§·Õè 8-13 ¤‹Ò Value ·Õµè ͌ §ãʋ㹪ش¤íÒÊѧè ÊíÒËÃѺàÅ×Í¡ feature µ‹Ò§æ ¢Í§¾Íϵ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $%


8.3.2.1 ¤íÒÊѧè Set/Clear Feature Request 㪌૵ËÃ×Íà¤ÅÕÂϺԵʶҹе‹Ò§æ ·Õè¡Å‹ÒÇÁÒ¢ŒÒ§µŒ¹ «Ö觡ÒÃ૵ËÃ×Íà¤ÅÕÂϺҧºÔµ¨Ð໚¹¡ÒÃÊÑè§ãˌÎѺ ·íÒ§Ò¹ºÒ§Ë¹ŒÒ·Õè ઋ¹ ¡ÒÃÊѧè ÃÕ૵ ã¹¢³Ð·Õ¡è Ò÷íÒ§Ò¹¡ÑººÒ§ºÔµà»š¹à¾Õ§¡ÒÃáÊ´§ãËŒÎºÑ ·ÃÒºÇ‹Ò âÎʵÃºÑ ·ÃÒº ʶҹйѹé æ áŌÇãˌà¤ÅÕÂϺµÔ ¹Ñ¹é 䴌 ઋ¹ ¡ÒÃÃѺ·ÃҺʶҹСÒÃ㪌¡ÃÐáÊä¿¿‡Òà¡Ô¹ ઋ¹à´ÕÂǡѺ Get Status Request ¤íÒÊѧè Set/Clear Feature ¹Õ¡é ¨ç Ðẋ§Í͡໚¹ 2 ʋǹ¤×Í Set/Clear Hub Feature áÅÐ Set/Clear Port Feature µÒÃÒ§·Õè 8-12 áÅÐ 8-13 áÊ´§ãˌàË繺Ե¢ŒÍÁÙÅ·Õµè ͌ §Ê‹§ä»ÂѧÍØ»¡Ã³ÊÒí ËÃѺᵋÅФíÒÊѧè

8.3.2.2 ¤íÒÊѧè Get Bus State ໚¹¤íÒÊÑ§è ·Õãè ªŒµÃǨÊͺʶҹТͧÊÒÂÊÑ­­Ò³ D+ áÅÐ D- â´Â¨Ð䴌¤Ò‹ ¢Í§ÊÒÂÊÑ­­Ò³ D+ ÁҡѺ ¢ŒÍÁÙźԵ D1 áÅТͧÊÒÂÊÑ­­Ò³ D- ¨Ò¡¢ŒÍÁÙźԵ D0 â´Â¤‹Ò·ÕÍè ҋ ¹¡ÅѺÁÒ¹Õ¨é ÐÍÂÙ㋠¹ª‹Ç§¨Ñ§ËÇÐ EOF ÊØ´ ·ŒÒ¢ͧ¡ÒÃʋ§¢ŒÍÁÙÅã¹áµ‹ÅÐà¿ÃÁ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $&


º··Õè 9

Ãٌ¨Ñ¡¡Ñº HID Áҵðҹ¢Í§ÍØ»¡Ã³ USB ã¹ÃдѺàª×èÍÁµ‹Í¡Ñº¼ÙŒ 㪌§Ò¹ HID Class (Human Interface Device Class) ໚¹ÅѡɳСÒÃàª×Íè Áµ‹Í¢Í§ÍØ»¡Ã³ USB ·Õàè ¹Œ¹ä»·Õè ¡ÒõԴµ‹Í¡ÑºÁ¹Øɏ (human) ËÃ×ͼÙ㌠ªŒ§Ò¹¹Ñ¹è àͧ «Ö§è ÍØ»¡Ã³ USB ·Õãè ªŒÃдѺ¡ÒÃàª×Íè Áµ‹ÍẺ¹Õ«é §Öè ÃÙ¨Œ ¡Ñ ¡Ñ¹´Õ ¤×Í ¤Õº ÍÏ´áÅÐàÁÒʏ 㹺·¹Õ¨é Ð͸ԺÒ¶֧ÃٻẺ Áҵðҹ ÅѡɳСÒÃàª×Íè Áµ‹ÍáÅж‹Ò·ʹ¢ŒÍÁÙÅ à¹×Íè § ¨Ò¡ã¹Ê‹Ç¹¢Í§¡Ò÷´Åͧ¨Ð㪌ἧǧ¨Ãàª×Íè Áµ‹Í¾Íϵ USB ·Õãè ªŒÁҵðҹ¡ÒÃàª×Íè Áµ‹Íã¹ÃдѺ HID ¹Õé ´Ñ§¹Ñ¹é ¡Ò÷íÒ¤ÇÒÁÃÙ¨Œ ¡Ñ ¡Ñº HID ¨Ö§à»š¹ÊÔ§è ·Õ¼è Êٌ ¹ã¨àª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¤Ç÷ ÃÒº ¡Í»Ã¡ÑºÃдѺ¡ÒÃàª×èÍÁµ‹ÍẺ¹Õé໚¹ÃдѺ¡ÒÃàª×èÍÁµ‹Í·ÕèÊÒÁÒö·íÒ¤ÇÒÁࢌÒã¨ä´Œ§‹ÒÂáÅÐ໚¹·Õè¹ÔÂÁ¹íÒ ÁÒ㪌ÊÌҧÍØ»¡Ã³ USB ÁÒ¡·ÕÊè ´Ø

9.1 ÃдѺ¢Í§ÍØ»¡Ã³ USB (USB device class) ÊÒÁÒöẋ§ä´ŒÍ‹ҧ¡ÇŒÒ§æ 5 Ẻ¤×Í 1. ÍØ»¡Ã³áÊ´§¼Å (display class) 䴌ᡋ ¨ÍÁ͹ÔàµÍÏ 2. ÍØ»¡Ã³ÊÍ×è ÊÒâŒÍÁÙÅ (communication class) 䴌ᡋ âÁà´çÁ 3. ÍØ»¡Ã³àÊÕ§ (audio class) 䴌ᡋ ÅíÒ⾧ 4. ÍØ»¡Ã³à¡çº¢ŒÍÁÙÅ (mass storage class) 䴌ᡋ ÎÒÏ´´ÔÊ¡ä´Ã¿ 5. ÍØ»¡Ã³µ´Ô µ‹Í¡Ñº¼Ù㌠ªŒ§Ò¹ (human interface class) 䴌ᡋ ¤Õº ÍÏ´, àÁÒʏ, ¨ÍÂʵԡê ÊíÒËÃѺ㹺·¹Õ¨é Ð์¹ä»·Õè ÃдѺ¢Í§ÍØ»¡Ã³ USB ẺµÔ´µ‹Í¼Ù㌠ªŒ§Ò¹ (HID Class)

9.2 ÊÔ§è ·Õ¤è ÇÃÃÙàŒ º×Íé §µŒ¹à¡ÕÂè ǡѺ HID ¤ÅÒÊ ÊÒÁÒöÊÃػ䴌´Ñ§¹Õé 1. ¡ÒÃà»ÅÕÂè ¹á»Å§¢Í§¢ŒÍÁÙÅ·Õàè ¡Ô´¢Ö¹é ã¹â¤Ã§ÊÌҧ¡Ò÷íÒ§Ò¹¨ÐàÃÕÂ¡Ç‹Ò ÃÒ§ҹËÃ×ÍÃÕ¾Íϵ (report) ÍØ»¡Ã³¤Çº¤ØÁËÅÑ¡¢Í§ÍØ»¡Ã³ USB ¨ÐµŒÍ§ÊÒÁÒöÃͧÃѺÃٻẺ¢Í§¢ŒÍÁÙÅ·Õàè »š¹ä»µÒÁ¢ŒÍ¡íÒ˹´ ¢Í§ HID ÃÕ¾Íϵ â´ÂâÎʵ¨Ð·íÒ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ´ŒÇ¡ÒÃʋ§áÅÐÌͧ¢ÍÃÕ¾Íϵ㹡ÒäǺ¤ØÁËÃ×ÍÁÕÅ¡Ñ É³Ð໚¹ ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÏÃÑ»µ Í‹ҧäáçµÒÁÃٻẺ¢Í§ÃÕ¾Íϵ¹ÕéÂѧäÁ‹ÁÕ¢ŒÍÊÃØ»ªÑ´à¨¹ ᵋ¡çÁÕ¤ÇÒÁ ͋͹µÑÇÊÙ§ ·íÒãˌÊÒÁÒöÃͧÃѺ¡Ñº¢ŒÍÁÙÅ䴌·¡Ø ÃٻẺ 2. ÍØ»¡Ã³ USB ÊÒÁÒöʋ§¢ŒÍÁÙÅ¡ÅѺä»ÂѧâÎʵ («Ö§è ʋǹãË­‹¤Í× ¤ÍÁ¾ÔÇàµÍÏ) 䴌µÅÍ´ àÇÅÒ â´ÂäÁ‹ÊÒÁÒö¤Ò´ËÁÒÂŋǧ˹ŒÒ ´Ñ§¹Ñ¹é ¨Ö§à»š¹Ë¹ŒÒ·Õ¢è ͧâÎʵàͧ·Õµè ͌ §¤ÍÂǹµÃǨÊͺÍÂÙµ‹ ÅÍ´àÇÅÒ à¾×èÍãˌÊÒÁÒöÃͧÃѺ¡Ñº¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡³ä´Œ·Ñ¹·‹Ç§·Õ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ $'


3. 㹡Òö‹Ò·ʹÊÑ­­Ò³ËÃ×Í¢ŒÍÁÙź¹ºÑʢͧ USB äÁ‹ÊÒÁÒö·ÃÒº¶Ö§ÍѵÃÒ¡ÒÃʋ§¼‹Ò¹¢ŒÍÁÙŠ䴌Í‹ҧṋ¹Í¹ ÊÔ§è ·Õ¡è Òí ˹´ä´ŒÁàÕ ¾Õ§¤ÒºàÇÅÒã¹áµ‹ÅзÃҹ᫡ªÑ¹è áÅФ‹ÒàÇÅÒÃÐËNjҧ·Ãҹ᫡ªÑ¹è ¹Ñ¹é ÍÒ¨ ¹ŒÍ¡Njҡç䴌 Í‹ҧäáçµÒÁ Ãкº¨Ð¾ÂÒÂÒÁ·íÒãˌà¡Ô´ÍѵÃÒ¡ÒÃʋ§¼‹Ò¹¢ŒÍÁÙÅàÃçÇ·ÕÊè ´Ø à·‹Ò·Õ¨è Ð໚¹ä»ä´Œ 4. ÍѵÃÒ¡Òö‹Ò·ʹÊÑ­­Ò³ËÃ×Í¢ŒÍÁÙÅÊÙ§ÊØ´¨Ð¶Ù¡¨íÒ¡Ñ´änjµÒÁ»ÃÐàÀ·¢Í§ÍØ»¡Ã³ «Ö§è Áմnj  ¡Ñ¹ 3 Ẻ¤×ͤÇÒÁàÃçǵèÒí , ¤ÇÒÁàÃçÇàµçÁ·Õè áÅФÇÒÁàÃçÇÊÙ§ â´ÂâÎʵÊÒÁÒö¡íÒ˹´¤ÒºàÇÅÒ㹡Ò÷íÒ§Ò¹ µ‹Í·Ãҹ᫡ªÑ¹è ÊÙ§Êشᡡѹ仵ÒÁ»ÃÐàÀ·¢Í§ÍØ»¡Ã³ â´Â 4.1 ÊíÒËÃѺÍØ»¡Ã³¤ÇÒÁàÃçǵèÒí âÎʵ¨Ð¡íÒ˹´¤ÒºàÇÅÒ㹡Ò÷íÒ§Ò¹ 1 ·Ãҹ᫡ ªÑ¹è ÊÙ§ÊØ´äÁ‹à¡Ô¹ 10 ÁÔÅÅÔÇ¹Ô Ò·Õ ·íÒãËŒÍµÑ ÃÒ¡Òö‹Ò·ʹÊÑ­­Ò³à¡Ô´¢Ö¹é 䴌ʧ٠ÊØ´äÁ‹à¡Ô¹ 800 亵µÍ‹ ÇÔ¹Ò·Õ 4.2 ÊíÒËÃѺÍØ»¡Ã³¤ÇÒÁàÃçÇàµçÁ·Õè âÎʵ¨Ð¡íÒ˹´¤ÒºàÇÅÒ㹡Ò÷íÒ§Ò¹ 1 ·ÃÒ¹ á«¡ªÑ¹è ÊÙ§ÊØ´äÁ‹à¡Ô¹ 1 ÁÔÅÅÔÇ¹Ô Ò·Õ ·íÒãËŒÍµÑ ÃÒ¡Òö‹Ò·ʹÊÑ­­Ò³à¡Ô´¢Ö¹é 䴌ʧ٠ÊØ´äÁ‹à¡Ô¹ 8,000 亵µÍ‹ ÇÔ¹Ò·Õ 4.3 ÊíÒËÃѺÍØ»¡Ã³¤ÇÒÁàÃçÇÊÙ§ âÎʵ¨Ð¡íÒ˹´¤ÒºàÇÅÒ㹡Ò÷íÒ§Ò¹ 3 ·Ãҹ᫡ªÑ¹è ÊÙ§ÊØ´äÁ‹à¡Ô¹ 125 äÁâ¤ÃÇÔ¹Ò·Õ ·íÒãËŒÍµÑ ÃÒ¡Òö‹Ò·ʹÊÑ­­Ò³à¡Ô´¢Ö¹é 䴌ʧ٠ÊØ´äÁ‹à¡Ô¹ 24.576 àÁ¡Ð亵µÍ‹ ÇÔ¹Ò·Õ 5. ã¹Ãкº»¯ÔºÑµÔ¡ÒÃÇÔ¹â´Çʏ·ÕèµèíҡNjÒÇÔ¹â´Çʏ 98SE ¨ÐäÁ‹ÃͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³ ẺÍÔ¹àµÍÃÃ»Ñ µ ´Ñ§¹Ñ¹é ¡ÒõԴµ‹Í¨Ò¡âÎʵä»ÂѧÍØ»¡Ã³¨ÐµŒÍ§ãªŒ¡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁࢌÒÁÒª‹ÇÂá·¹

9.3 ËÅÑ¡¡ÒáíÒ˹´ãËŒÍ»Ø ¡Ã³ USB ໚¹¤ÅÒÊ HID ¡ÒèѴãËŒÍ»Ø ¡Ã³ USB ·ÕÍè ÂÙ㋠¹¤ÅÒÊ HID ¹Ñ¹é â´Â᷌¨ÃÔ§áŌÇäÁ‹ä´ŒÂ´Ö ËÅÑ¡ “Á¹ØɏÊÒÁÒöÊÑÁ¼ÑÊ áÅÐࢌҶ֧䴌â´ÂµÃ§” ໚¹ËÅÑ¡ÊíҤѭ ᵋ¨Ðãˌ¤ÇÒÁÊíÒ¤Ñ­ä»·Õ¢è ¹Ò´¢Í§¢ŒÍÁÙÅ·Õ¶è ҋ ·ʹÃÐËNjҧÍØ»¡Ã³ â´Â ¨Ðᵡµ‹Ò§¡Ñ¹ä»µÒÁ¤ÇÒÁàÃçǢͧÍØ»¡Ã³ USB «Ö§è ÊÒÁÒöÊÃػ䴌´§Ñ ¹Õé ã¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçǵèÒí ÁÕ¢¹Ò´¢Í§¢ŒÍÁÙÅã¹ 1 ·Ãҹ᫡ªÑ¹è ෋ҡѺ 8 亵 ã¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçÇàµçÁ·Õè ÁÕ¢¹Ò´¢Í§¢ŒÍÁÙÅã¹ 1 ·Ãҹ᫡ªÑ¹è ෋ҡѺ 64 亵 ã¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçÇÊÙ§ ÁÕ¢¹Ò´¢Í§¢ŒÍÁÙÅã¹ 1 ·Ãҹ᫡ªÑ¹è ෋ҡѺ 1,024 亵 ·Ò§´ŒÒ¹ÍѵÃÒàÃçÇ㹡ÒÃʋ§¼‹Ò¹¢ŒÍÁÙŢͧÍØ»¡Ã³ USB ã¹ HID ¤ÅÒÊ¡ç¨Ðᵡµ‹Ò§¡Ñ¹ä»µÒÁ¤ÇÒÁàÃçÇ ¢Í§ÍØ»¡Ã³ USB ´ŒÇÂઋ¹¡Ñ¹ â´Âã¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçǵèÒí ÁÕ굄 ÃÒ¡ÒÃʋ§¼‹Ò¹¢ŒÍÁÙÅ 800 亵µÍ‹ ÇÔ¹Ò·Õ ã¹¢³Ð·ÕÍè »Ø ¡Ã³ USB ¤ÇÒÁàÃçÇàµçÁ·Õ¨è ÐÁÕ굄 ÃÒàÃçÇÍÂÙ·‹ Õè 8,000 亵µÍ‹ ÇÔ¹Ò·Õ áÅÐÊÙ§¶Ö§ 24.576 àÁ¡Ð亵 µ‹ÍÇÔ¹Ò·Õã¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçÇÊÙ§ µÑÇÍ‹ҧ¢Í§ÍØ»¡Ã³ USB ·Õ¨è ´Ñ ÍÂÙ㋠¹ HID ¤ÅÒÊ ÁÕ´§Ñ ¹Õé ¤Õº ÍÏ´áÅÐÍØ»¡Ã³ªµÕé Òí á˹‹§ 䴌ᡋ àÁÒʏ, á·Ã硺ÍÅ, ¨ÍÂʵԡê ˹ŒÒ»˜´á¼§¤Çº¤ØÁ 䴌ᡋ ÅÙ¡ºÔ´ (knob), ÊÇÔµª , »ØÁ† ¡´ (button), µÑÇàÅ×Íè ¹ (slider) ʋǹ¤Çº¤ØÁã¹âʵ·ÑȹÍØ»¡Ã³ 䴌ᡋ ἧ¤Çº¤ØÁã¹â·ÃÈѾ·ÊÁÑÂãËÁ‹, ÃÕâÁµ¤Í¹â·ÃÅã¹ à¤Ã×Íè §àŋ¹-ºÑ¹·Ö¡ÊÑ­­Ò³ÀÒ¾ËÃ×Íà¤Ã×Íè §àŋ¹à¡Á ÃÇÁ·Ñ§é ÍØ»¡Ã³¨Òí Åͧ¡Ò÷íÒ§Ò¹¢Í§à¤Ã×Íè §Â¹µ¡Åä¡ÊíÒËÃѺ à¤Ã×Íè §àŋ¹à¡Á ÍÒ·Ô ¾Ç§ÁÒÅÑÂËÃ×ͨҹàºÃ¡ ໚¹µŒ¹ ÍØ»¡Ã³·äÕè Á‹µÍŒ §¡ÒáÒÃÊÑÁ¼ÑʡѺÁ¹Øɏâ´ÂµÃ§ ᵋÁÃÕ »Ù Ẻ¢ŒÍÁÙÅàËÁ×͹¡Ñºã¹ HID ¤ÅÒÊ ä´Œá¡‹ à¤Ã×Íè §á¶ºÃËÑÊ¢ŒÍÁÙÅ (barcode reader), à·ÍÏâÁÁÔàµÍÏ, âÇŵÁàÔ µÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %


´ÕäÇ«´ÔʤÃÔ»àµÍÏ

ʵÃÔ§´ÔʤÃÔ»àµÍÏ

¤Í¹¿¡ÔÇàêÑè¹ ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê ´ÔʤÃÔ»àµÍÏ

àÍ繾͵ ´ÔʤÃÔ»àµÍÏ

HID ´ÔʤÃÔ»àµÍÏ

ÃÕ¾Íϵ ´ÔʤÃÔ»àµÍÏ

¿Ê¡Ô ÅÑ ´ÔʤÃÔ»àµÍÏ

ÃÙ»·Õè 9-1 â¤Ã§ÊÌҧ´ÔʤÃÔ»àµÍϢͧÍØ»¡Ã³ USB ·ÕÍè ÂÙ㋠¹¤ÅÒÊ HID

9.4 â¤Ã§ÊÌҧ´ÔʤÃÔ»àµÍÏ äÁ‹Çҋ ¨Ð໚¹ÍØ»¡Ã³ USB 㹤ÅÒÊËÃ×ÍÃдѺ㴠ŌǹáŌÇᵋµÍŒ §ÁÕ´ÊÔ ¤ÃÔ»àµÍÏ㹡Ò÷íÒ§Ò¹·Ñ§é ÊÔ¹é ã¹ HID ¤ÅÒÊàͧ¡çઋ¹¡Ñ¹ ÁÕ´ÊÔ ¤ÃÔ»àµÍÏ໚¹¢Í§µÑÇàͧª×Íè HID ´ÔʤÃÔ»àµÍÏ «Ö§è ÀÒÂã¹´ÔʤÃÔ»àµÍϹ¨Õé Ðẋ§ÍÍ¡ ໚¹ 2 ʋǹ¤×Í ´ÔʤÃÔ»àµÍÏÃÒ§ҹ¼Å¡Ò÷íÒ§Ò¹ ËÃ×Í ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ (report descriptor) áÅСÅØÁ‹ ´ÔʤÃÔ»àµÍÏ·Ò§¡ÒÂÀÒ¾ËÃ×Í ¿Ê¡Ô ÅÑ ´ÔʤÃÔ»àµÍÏ (physical descriptor) ÃÙ»·Õè 9-1 áÊ´§â¤Ã§ÊÌҧ´ÔʤÃÔ »àµÍϢͧÍØ»¡Ã³ USB ã¹ÃдѺ HID ¨ÐàËç¹ä´ŒÇҋ HID ´ÔʤÃÔ»àµÍϨкÃèØÍÂÙ㋠¹ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ ËÇÁ¡ÑºàÍç¹´¾Íµ´ÔʤÃÔ»àµÍÃì «Ö§è ã¹ U-Board Íѹ໚¹á¼§Ç§¨ÃÊíÒËÃѺ·´Åͧ¡ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ·Õãè ªŒÍҌ §ÍÔ§ã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õé àÅ×͡㪌ÃдѺ¡ÒÃàª×Íè Áµ‹Íã¹ÅѡɳРHID ¹Õé

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %


9.5 HID ´ÔʤÃÔ»àµÍÏ ã¹ÃÙ»·Õè 9-2 áÊ´§â¤Ã§ÊÌҧ¢Í§ HID ´ÔʤÃÔ»àµÍÏ ¨ÐàËç¹ä´ŒÇҋ ÀÒÂã¹ HID ´ÔʤÃÔ»àµÍϹ¹Ñé ä´ŒÃºÑ ¡ÒèѴÊÃÃ໚¹ 7 ʋǹ »ÃСͺ´ŒÇ Length ÁÕ¢¹Ò´ 1 亵 㪌Ãкآ¹Ò´ÃÇÁ¢Í§´ÔʤÃÔ»àµÍÏã¹Ë¹‹ÇÂ亵 ã¹ HID ¤ÅÒÊ Áդҋ 09H DescriptorType ¢¹Ò´ 1 亵 㪌Ãкت¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ 㹡óÕ໚¹ HID Áդҋ ෋ҡѺ 21H HID version ÁÕ¢¹Ò´ 2 亵 ¡íÒ˹´ã¹ÅѡɳÐÃËÑÊ BCD 㪌ÃкØËÁÒÂàÅ¢¤Ø³ÊÁºÑµÔ¢Í§ HID ËÃ×ÍÍÒ¨¡Å‹ÒÇNjÒ໚¹¡ÒÃÃкØàÇÍϪ¹Ñè ¡ç䴌 â´Â¤‹Ò¹Õ¨é Ð㪌µÇÑ àÅ¢°Ò¹ÊÔº 4 µÑÇ2 µÑÇáá㪌¡Òí ˹´µÑÇàÅ¢àÇÍϪ¹Ñè ËÅÑ¡ ʋǹ 2 µÑÇËÅѧ㪌¡Òí ˹´µÑÇàÅ¢àÇÍϪ¹Ñè ‹Í ¤Ñ¹è ´ŒÇ¨ش·È¹ÔÂÁ ¡µÑÇÍ‹ҧ 0100 ËÁÒ¶֧ àÇÍϪ¹Ñè 1.0 ¶ŒÒ໚¹àÇÍϪ¹Ñè 1.1 ¢ŒÍÁÙŨÐ໚¹ 0110 ໚¹µŒ¹ CountryCode ÁÕ¢¹Ò´ 1 亵 㪌¡Òí Ë´àÅ¢ÃËÑʢͧ»ÃÐà·È·Õàè ¡ÕÂè Ç¢ŒÍ§¡ÑºÍØ»¡Ã³ USB µÑǹѹé æ ¢Öé¹ (ÊÒÁÒö´ÙÃÒÂÅÐÍÕ´㹴ҵŒÒªÕµÊÁºÙó¢Í§ HID Class specification «Ö觺ÃèØÍÂًã¹á¼‹¹«Õ´ÕÃÍÁ PC interface : USB port experiment) µÑÇÍ‹ҧ·Õàè Ëç¹ä´Œª´Ñ ¤×Í ¤Õº ÍÏ´ à¹×Íè §¨Ò¡ã¹áµ‹ÅлÃÐà·ÈÍÒ¨ÁÕ¡ÒÃ㪌 ¤Õº Íϴᵡµ‹Ò§¡Ñ¹ä» ઋ¹ ã¹»ÃÐà·Èä·Â, ¨Õ¹, Íѧ¡ÄÉ ËÃ×Í»ÃÐà·ÈᶺµÐÇѹÍÍ¡¡ÅÒ§ NumDescriptors ÁÕ ¢ ¹Ò´ 1 亵 㪌 Ã ÐºØ ¨í Ò ¹Ç¹´Ô Ê ¤ÃÔ » àµÍÏ ¢ ͧ¤ÅÒÊ‹ Í Â·Ñé § ËÁ´·Õè ·íҧҹËÇÁÍÂً´ŒÇ¡ѹ DescriptorType ÁÕ ¢ ¹Ò´ 1 亵 㪌 Ã ÐºØ ¤ ÅÒʢͧ´Ô Ê ¤ÃÔ » àµÍÏ Nj Ò à»š ¹ ÃÕ ¾ ÍÏ µ ËÃ× Í ¿Ê¡Ô ÅÑ ´ÔʤÃÔ»àµÍÏ ¶ŒÒ໚¹ÃÕ¾Íϵ´ÔʤÃÔ»àµÍϨÐÁդҋ ෋ҡѺ 22H DescriptorLength ÁÕ¢¹Ò´ 2 亵 㪌ᨌ§¢¹Ò´ËÃ×ͤÇÒÁÂÒǢͧÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ

9.6 ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ (Report descriptor) ໚¹Ê‹Ç¹»ÃСͺËÅÑ¡·ÕÍè Ò¨¡Å‹ÒÇ䴌Çҋ ÊíҤѭÁÒ¡·ÕÊè ´Ø à¹×Íè §¨Ò¡¢ŒÍÁÙÅ·Õàè ¡çºÍÂÙ㋠¹´ÔʤÃÔ»àµÍϵÇÑ ¹Õàé »š¹ ÊÔ§è ·ÕÍè ¸ÔºÒ¶֧ÃٻẺáÅÐÇÔ¸¡Õ ÒÃ㪌¢ÍŒ ÁÙÅà¾×Íè ãˌºÃèØÇµÑ ¶Ø»ÃÐʧ¤µÒÁ·ÕÍè »Ø ¡Ã³ USB µÑÇ¹Ñ¹é ¡íÒ˹´änj ¡µÑÇ Í‹ҧ ËÒ¡ÍØ»¡Ã³ USB ¹Õàé »š¹àÁÒʏ ¢ŒÍÁÙÅã¹ÃÕ¾Íϵ´ÔʤÃÔ»àµÍϨÐÃÒ§ҹãˌ·ÃÒº¶Ö§¡ÒÃà¤Å×Íè ¹·Õ¢è ͧàÁÒʏ à¾×Íè ÃкصÒí á˹‹§ áÅÐʶҹСÒá´»ØÁ† ¢Í§àÁÒʏ ໚¹µŒ¹ ÃÕ¾Íϵ´ÔʤÃÔ»àµÍϨÐÁÕ¤ÇÒÁÂÒÇ෋Òã´¡ç䴌 ᵋµÍŒ §á¨Œ§¤ÇÒÁÂÒǹѹé ŧ㹠DescriptorLength ÀÒÂã¹ HID ´ÔʤÃÔ»àµÍÏà¾×Íè ãˌâÎʵ·ÃÒº´ŒÇ ËÅÑ¡áÅÐ໇ÒËÁÒÂàº×Íé §µŒ¹¢Í§¡ÒÃ㪌§Ò¹ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏÁ´Õ §Ñ ¹Õé 1. 㪌à¡çºÃÒÂÅÐàÍÕ´¢ŒÍÁÙŢͧÍØ»¡Ã³ãˌ¤Ãº¶ŒÇ¹·ÕÊè ´Ø ÀÒÂ㵌¾¹×é ·Õ·è àÕè Åç¡·ÕÊè ´Ø à·‹Ò·Õàè »š¹ä»ä´Œ 2. ÂÍÁãˌ«Í¿µáÇÏ»ÃÐÂØ¡µ·Õèà¡ÕèÂÇ¢ŒÍ§ÊÒÁÒö¢ŒÒÁ¢ŒÍÁÙÅ·ÕèäÁ‹ªÑ´à¨¹ä»ä´Œ à¾×èÍãˌÂѧ¤§ ÊÒÁÒö´íÒà¹Ô¹¡Òõ‹Íä»ä´Œ 3. ÊÒÁÒö¢ÂÒÂ䴌 4. ÃͧÃѺ¡ÒèѴà¡çºáÅÐÃǺÃÇÁ¢ŒÍÁÙÅ 5. ÊÒÁÒö͸ԺÒÂÃÒÂÅÐàÍÕ´´ŒÇ¢ŒÍÁÙÅÀÒÂã¹´ÔʤÃÔ»àµÍÏàͧ à¾×Íè »ÃÐ⪹ã¹¡ÒþѲ¹Ò «Í¿µáÇÏ»ÃÐÂØ¡µÊíÒËÃѺ㪌§Ò¹Ã‹ÇÁ¡Ñ¹ä´Œ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %


HID ´ÔʤÃÔ»àµÍÏ

ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ

Length (¤ÇÒÁÂÒÇ) ෋ҡѺ 09H

ÃÕ¾Íϵ(0)

DescriptorType (ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ) ෋ҡѺ 21H (¤×Í HID ´ÔʤÃÔ»àµÍÏ)

ÃÕ¾Íϵ(1)

ÃÕ¾Íϵ(2) HID Version (ËÁÒÂàÅ¢¤Ø³ÊÁºÑµÔ¢Í§ HID)

CountryCode (ÃËÑÊ»ÃÐà·È)

ÃÕ¾Íϵ(M-1)

NumDescriptors (¨íҹǹ´ÔʤÃÔ»àµÍÏ㹤ÅÒÊ‹ÍÂ) DescriptorType (ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ) ෋ҡѺ 22H (¤×Í ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ)

DescriptorLength (¤ÇÒÁÂÒǢͧÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ)

ÃÙ»·Õè 9-2 â¤Ã§ÊÌҧ¢Í§ HID ´ÔʤÃÔ»àµÍÏ ¡ÒÃࢌҶ֧ÃÕ¾Íϵ´ÔʤÃÔ»àµÍϹÑé¹ âÎʵµŒÍ§à¢Õ¹¤íÒÊÑè§ Get_Descriptor à¾×èÍÌͧ¢Í¡ÒõԴµ‹Í¡ÑºÃÕ ¾Íϵ´ÔʤÃÔ»àµÍÏ â´Â㹤íÒÊÑ§è ¹Ñ¹é ¨ÐÁÕ¢¹Ò´ 2 亵 ã¹äºµÊ§Ù ¡íÒ˹´ãˌÁ¤Õ ҋ ෋ҡѺ 22H ʋǹã¹äºµµÒèí ¨Ð à»š¹¤‹Ò¢Í§ËÁÒÂàÅ¢ÃÕ¾Íϵ (Report ID) ·Õµè ͌ §¡Òà â´Â»¡µÔ¤Ò‹ ¹Õ¨é Ð෋ҡѺ 00H ¢ŒÍÁÙÅÀÒÂã¹ÃÕ¾Íϵ´ÔʤÃÔ»àµÍϾͨÐÊÒÁÒöẋ§Í͡໚¹Ê‹Ç¹ËÅÑ¡æ 3 ʋǹ¤×Í 1. ʋǹÃÒÂÅÐàÍÕ´¡ÒÃ㪌§Ò¹ ¨ÐÃкض§Ö ˹ŒÒ·ÕËè Ã×ͪ¹Ô´¢Í§ÍØ»¡Ã³ USB µÑǹѹé æ 2. ʋǹ¢ŒÍÁÙÅÍÔ¹¾Øµ ¨Ðà¡çºÃÒÂÅÐàÍÕ´¢Í§¢ŒÍÁÙÅ·ÕÍè »Ø ¡Ã³ USB µÑÇ¹Ñ¹é ¨ÐµŒÍ§ÃѺࢌÒÁÒ 3. ʋǹ¢ŒÍÁÙÅàÍÒµ¾µØ ¨Ð㪌à¡çº¼Å¡Ò÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ USB µÑÇ¹Ñ¹é µÒÁà§×Íè ¹ä¢·Õ¡è Òí ˹´ à¾×èÍᨌ§¡ÅѺä»ÂѧâÎʵãˌ¹íҼŷÕè䴌¨Ò¡ÃÕ¾Íϵ´ÔʤµÃÔ»àµÍϹÕéä»»ÃÐÁÇżŵ‹Íä»

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %!


9.7 ¤Ø³ÅѡɳÐ㹡Ò÷íÒ§Ò¹¢Í§ HID ÁÕÊNj ¹»ÃСͺ·ÕÊè Òí ¤Ñ­ 4 ʋǹ¤×Í 1. HID Class 2. HID subclass 3. ÃٻẺ¡ÒõԴµ‹ÍËÃ×Íâ»ÃⵤÍÅ 4. ¡ÒÃàª×Íè Áµ‹Í (Interface)

9.7.1 HID Class ¡ÒáíÒ˹´Ç‹ÒÍØ»¡Ã³ USB ÁÕ¡ÒÃàª×Íè Áµ‹ÍÍÂÙ㋠¹ÃдѺËÃ×ͤÅÒÊã´ ÊÒÁÒö¡íÒ˹´ä´Œ·¢Õè ͌ ÁÙÅã¹äºµ 5 ¢Í§ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ «Ö§è ¡ç¤Í× ¿Å´¢Í§ InterfaceClass (´ÙÃÒÂÅÐàÍÕ´à¾ÔÁè àµÔÁ㹺··Õè 8) â´Â¡íÒ˹´ ãˌ෋ҡѺ 3 àÁ×Íè µŒÍ§¡ÒÃàÅ×Í¡¡ÒõԴµ‹Íã¹ÃдѺ HID

9.7.2 HID subclass : ÃдѺ¡ÒõԴµ‹Í‹Í¢ͧ HID ¡ÒáíÒ˹´ÃдѺ‹ÍÂ㹡ÒõԴµ‹Í¢Í§ÍØ»¡Ã³ USB ÊÒÁÒö¡ÃзíÒ䴌·äÕè ºµ 6 ¢Í§ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ »àµÍÏ «Ö§è ¡ç¤Í× ¿Å´¢Í§ InterfaceSubclass (´ÙÃÒÂÅÐàÍÕ´à¾ÔÁè àµÔÁ㹺··Õè 8) â´Â¡íÒ˹´ãˌ෋ҡѺ 2 ËÃ×Í 1 àÁ×Íè µŒÍ§¡Ò÷íÒ§Ò¹¡Ñº HID ·Ñ§é ¹Õ¢é ¹Öé ¡ÑºÅѡɳСÒ÷íÒ§Ò¹¢Í§ÍØ»¡Ã³ 㹡óշÍÕè »Ø ¡Ã³ USB µŒÍ§à¡ÕÂè Ç¢ŒÍ§ ¡Ñº¡Òúٵ ઋ¹ ¤Õº ÍÏ´ËÃ×ÍàÁÒʏ µŒÍ§àÅ×Í¡¤‹Ò¢Í§ Interface SubClass ෋ҡѺ “1” à¾×Íè ¡íÒ˹´ãˌ໚¹ Boot interface subclass ÊíÒËÃѺ㹠U-Board Íѹ໚¹ºÍÏ´·Õãè ªŒã¹¡Ò÷´Åͧàª×Íè Áµ‹Í¡Ñº¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ ¹Í¡¼‹Ò¹¾Íϵ USB ¡çàÅ×͡㪌¤Ò‹ ¢Í§ Interface Subclass ෋ҡѺ “1” ઋ¹à´ÕÂǡѹ Í‹ҧäáçµÒÁ ¢ŒÍÁÙŢͧ Interface Subclass ÊÒÁÒöÁÕ䴌¶§Ö 255 ¤‹Ò·Õàè ËÅ×ͤ×Í 2-255 ¹Ñ¹é Âѧ໚¹¤‹Ò ÊíÒËÃѺÊíÒÃͧänj¡‹Í¹

9.7.3 â»ÃⵤÍÅ : ÃٻẺ¡ÒõԴµ‹Í ÊíÒËÃѺ¡ÒõԴµ‹Í¡ÑºÍØ»¡Ã³ USB ã¹áºº HID ¹Ñ¹é ÁÕâ»ÃⵤÍÅËÃ×ÍÃٻẺ¡ÒõԴµ‹ÍËÅÒÂẺ·Õè ÊÒÁÒö·íÒ§Ò¹´ŒÇÂ䴌 áÅСÒÃàÅ×͡㪌â»ÃⵤÍŹѹé ÊÒÁÒö¡ÃзíÒ䴌·äÕè ºµ 7 ËÃ×Í InterfaceProtocal ã¹ÍÔ¹àµÍÏ à¿Ê´ÔʤÃÔ»àµÍÏ â´ÂÊÑÁ¾Ñ¹¸¡ºÑ ¡ÒáíÒ˹´¤‹Òã¹ InterfaceSubClass ¶ŒÒËÒ¡¤‹Òã¹ InterfaceSubClass ෋ҡѺ “1” «Ö§è ໚¹¡ÒÃàÅ×Í¡ãªŒÍ»Ø ¡Ã³·ÃÕè ͧÃѺ Boot interface ¨ÐµŒÍ§ÁÕ¡ÒáíÒ˹´¢ŒÍÁÙÅã¹Å§ã¹ InterfaceProtocal ãˌÁ¤Õ ҋ µÑ§é ᵋ 1-255 ᵋ¶ÒŒ ËÒ¡äÁ‹Á¡Õ ÒÃàÅ×Í¡ËÃ×ͤ‹Òã¹ InterfaceSubClass ෋ҡѺ “0” ¢ŒÍÁÙÅã¹ InterfaceProtocal ¨ÐµŒÍ§Áդҋ ෋ҡѺ “0” ÊÑ­­Ò³¤Çº¤ØÁ ÍØ»¡Ã³ USB 㹤ÅÒÊ HID

ÊÑ­­Ò³ÍÔ¹àµÍÃÃ»Ñ µ

HID ä´ÃàÇÍÏ

ÃÙ»·Õè 9-3 ä´ÍÐá¡ÃÁ¡ÒÃàª×Íè Áµ‹ÍÍ‹ҧ§‹ÒÂÃÐËNjҧÍØ»¡Ã³ USB 㹤ÅÒÊ HID ¡Ñº HID ä´ÃàÇÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %"


¨¹¶Ö§»‚¤.È. 2002 ÁÕ¡ÒáíÒ˹´ÃٻẺ¢Í§â»ÃⵤÍÅŧã¹äºµ¢Í§ Interface Protocal ã¹ÍÔ¹àµÍÏ à¿Ê´ÔʤÃÔ»àµÍÏänj´Ñ§¹Õé ¢ŒÍÁÙÅÃËÑʢͧâ»ÃⵤÍÅ ÃÒÂÅÐàÍÕ´ 0 äÁ‹ÁÕ¡ÒÃ㪌§Ò¹ 1 àÅ×Í¡â»ÃⵤÍŢͧ¤ÕºÍÏ´ 2 àÅ×Í¡â»ÃⵤÍŢͧàÁÒʏ 3-255 ÊíÒÃͧänj ÊíÒËÃѺ㹠U-Board Íѹ໚¹ºÍÏ´·Õãè ªŒã¹¡Ò÷´Åͧàª×Íè Áµ‹Í¡Ñº¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹ ¾Íϵ USB «Ö§è 㪌ÍҌ §ÍÔ§ã¹Ë¹Ñ§Ê×ÍàŋÁ¹Õé àÅ×Í¡¢ŒÍÁÙÅÃËÑÊâ»ÃⵤÍÅ෋ҡѺ 0

9.7.4 ¡ÒÃàª×Íè Áµ‹Í (Interface) ÍØ»¡Ã³ USB 㹤ÅÒÊ HID µÔ´µ‹Í¡Ñº HID ä´ÃàÇÍÏ䴌 2 ÅѡɳФ×Í ãªŒÊ­ Ñ ­Ò³¤Çº¤ØÁ (control pipe) áÅÐÊÑ­­Ò³ÍÔ¹àµÍÃÃ»Ñ µ (interrupt pipe) ÃÙ»·Õè 9-3 áÊ´§¡ÒÃàª×Íè Áµ‹ÍÍØ»¡Ã³ HID ¡Ñº HID ä´ÃàÇÍÏ ¡ÒÃàª×Íè Áµ‹Íâ´Â㪌ʭ Ñ ­Ò³¤Çº¤ØÁ 㪌ÊÒí ËÃѺ : l ÃѺáÅеͺʹͧà¾×Í è Ìͧ¢ÍÊÑ­­Ò³¤Çº¤ØÁáÅТŒÍÁÙŢͧÃдѺ¡Ò÷íÒ§Ò¹ l ʋ§¢ŒÍÁÙÅä»Âѧ HID ä´ÃàÇÍÏ 㹡óշÁ Õè ¡Õ ÒÃǹÃÍâ´Â HID ä´ÃàÇÍÏ ´ŒÇ¡ÒÃ㪌¤Òí Êѧè Ìͧ ¢Í Get_Report l ÃѺ¢ŒÍÁÙŨҡâÎʵ â´Â»¡µÔáŌǡÒõԴµ‹Í¡ÑºÊÑ­­Ò³¤Çº¤ØÁ ÍØ»¡Ã³ USB ÁÑ¡àÅ×͡㪌àÍç¹´¾Íµ 0 ໚¹ËÅÑ¡ ¡ÒÃàª×Íè Áµ‹Íâ´Â㪌ʭ Ñ ­Ò³ÍÔ¹àµÍÃÃ»Ñ µ 㪌ÊÒí ËÃѺ : l ÃѺ¢ŒÍÁÙÅÍЫԧâ¤Ã¹ÑʨҡÍØ»¡Ã³ l ʋ§¢ŒÍÁÙÅä»ÂѧÍØ»¡Ã³ ÊÑ­­Ò³ÍÔ¹àµÍÃÃ»Ñ µÁÕ 2 ÅѡɳФ×Í ÊÑ­­Ò³ÍÔ¹àµÍÃÃ»Ñ µ¢Òà¢ŒÒ (Interrupt In) áÅÐ ÊÑ­­Ò³ÍÔ¹àµÍÏ ÃÑ»µ¢ÒÍÍ¡ (Interrupt Out) ÊÑ­­Ò³ËÅÑ¡¤×Í ÊÑ­­Ò³ÍÔ¹àµÍÃÃ»Ñ µ¢Òà¢ŒÒ Ê‹Ç¹ÊÑ­­Ò³¢ÒÍ͡໚¹Ê‹Ç¹àÊÃÔÁ ã¹µÒÃÒ§·Õè 9-1 áÊ´§ÃÒÂÅÐàÍÕ´¢Í§ÊÑ­­Ò³àª×Íè Áµ‹Í·Ñ§é ËÁ´·Õãè ªŒã¹¡ÒõԴµ‹Í¢Í§ÍØ»¡Ã³ USB ã¹ ¤ÅÒÊ HID ¡Ñº HID ä´ÃàÇÍÏ ÊÒÂÊÑ­­Ò³

ÃÒÂÅÐàÍÕ´

ÃдѺ¤ÇÒÁµŒÍ§¡ÒÃ

ÊÑ­­Ò³¤Çº¤ØÁ (àÍç¹´¾Íµ 0)

㪌㹡ÒäǺ¤ØÁ¢ŒÍÁÙÅ㹺Ñʢͧ¾Íϵ USB,

µŒÍ§¡ÒÃ

ÊÑ­­Ò³ÍÔ¹àµÍÏÃÑ»µ¢Òà¢ŒÒ (Interrupt In)

㪌¡íÒ˹´¨Ñ§ËÇТŒÍÁÙÅࢌҨҡÍØ»¡Ã³ USB

µŒÍ§¡ÒÃ

ÊÑ­­Ò³ÍÔ¹àµÍÏÃÑ»µ¢ÒÍÍ¡ (Interrupt Out)

㪌¡íÒ˹´¨Ñ§ËÇТŒÍÁÙÅÍÍ¡¨Ò¡ÍØ»¡Ã³ USB

äÁ‹¨íÒ໚¹µŒÍ§ÁÕ¡ç䴌

µÒÃÒ§·Õè 9-1 ÃÒÂÅÐàÍÕ´¢Í§ÊÑ­­Ò³·Õãè ªŒàª×Íè Áµ‹ÍÃÐËNjҧÍØ»¡Ã³ USB 㹤ÅÒÊ HID ¡Ñº HID ä´ÃàÇÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %#


ÃËÑʤíÒÊÑè§ (àÅ¢°Ò¹ÊԺˡ)

ª×èͤíÒÊÑè§ÃŒÍ§¢Í

áËŋ§¢ŒÍÁÙÅ

ÅѡɳТͧ¢ŒÍÁÙÅ

01H

Get_Report

ÍØ»¡Ã³ USB

ÃÕ¾Íϵ ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ÃÕ¾Íϵ ID

02H

Get_Idle

ÍØ»¡Ã³ USB

03H

Get_Protocol

ÍØ»¡Ã³ USB

09H

Set_Report

âÎʵ

0AH

Set_Idle

0BH

Set_Protocol

¤ÇÒÁÂÒǢͧ¢ŒÍÁÙÅ »ÃÐàÀ·¢Í§¢ŒÍÁÙÅ ÃдѺ¤ÇÒÁµŒÍ§¡Òâͧ¤íÒÊÑè§ (亵) ෋ҡѺ¤ÇÒÁÂÒǢͧ ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ

ÃÕ¾Íϵ

ÍØ»¡³ USB ã¹ HID ¤ÅÒÊ µŒÍ§µÍºÊ¹Í§¤íÒÊѧè

ÃÕ¾Íϵ ID

1

ʶҹÐäÍà´ÔÅ ª‹Ç§àÇÅÒ (dutration)

ÍÒ¨äÁ‹¨Òí ໚¹µŒÍ§ãªŒ

-

1

â»ÃⵤÍÅ

µŒÍ§ãªŒã¹ÍØ»¡³ USB ·ÕÁè Õ Boot interface

ÃÕ¾Íϵ ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ÃÕ¾Íϵ ID

෋ҡѺ¤ÇÒÁÂÒǢͧ ÃÕ¾Íϵ´ÔʤÃÔ»àµÍÏ

ÃÕ¾Íϵ

äÁ‹¨Òí ໚¹µŒÍ§ãªŒ ËÒ¡ãªŒÇ¹Ô â´Çʏ 98SE ¢Ö¹é ä»

âÎʵ

ʶҹÐäÍà´ÔÅ ª¹Ô´¢Í§´ÔʤÃÔ»àµÍÏ ÃÕ¾Íϵ ID

0

-

ÍÒ¨äÁ‹¨Òí ໚¹µŒÍ§ãªŒ

âÎʵ

â»ÃⵤÍÅ

0

-

µŒÍ§ãªŒã¹ÍØ»¡³ USB ·ÕÁè Õ Boot interface

µÒÃÒ§·Õè 9-2 ÃÒÂÅÐàÍÕ´àº×Íé §µŒ¹¢Í§¤íÒÊѧè Ìͧ¢Í·Õãè ªŒã¹ÍØ»¡Ã³ USB ¤ÅÒÊ HID

9.8 ¤íÒÊѧè Ìͧ¢Íà¾×Íè ¡ÒõԴµ‹Íã¹ÍØ»¡Ã³ USB ·Õãè ªŒ¡ÒÃàª×Íè Áµ‹ÍẺ HID ¤íÒÊѧè Ìͧ¢Íà¾×Íè µÔ´µ‹Í¡ÑºÍØ»¡Ã³ (HID- specific control request) Áմnj ¡ѹ 6 ¤íÒÊÑ§è ´Ñ§¹Õé 1. Get_Report 2. Get_Idle 3. Get_Protocal 4. Set_Report 5. Set_Idle 6. Set_Protocal ã¹µÒÃÒ§·Õè 9-2 ໚¹µÒÃÒ§ÊÃØ»ãˌàË繶֧ÀÒ¾ÃÇÁ¢Í§¤íÒÊѧè Ìͧ¢Íàº×Íé §µŒ¹·Ñ§é ËÁ´ ¤íÒÊÑ§è ·ÕÁè ¤Õ ÇÒÁÊíҤѭ áÅÐÍØ»¡Ã³ USB ã¹ HID ¤ÅÒÊ·Ø¡µÑǵŒÍ§ÃͧÃѺ¤×Í Get_Report ã¹¢³Ð·ÕÍè »Ø ¡Ã³ USB ·Õãè ªŒ Boot Interface µŒÍ§ÃͧÃѺ¤íÒÊѧè Ger_Protocal áÅÐ Set_Protocal à¾ÔÁè àµÔÁ ʋǹ¤íÒÊÑ§è ·Õàè ËÅ×͹ѹé ໚¹¤íÒÊѧè àÊÃÔÁ ÊíÒËÃѺã¹ÍØ»¡Ã³ USB ·Õµè ͌ §àª×Íè Áµ‹Í¡ÑºÃкº»¯ÔºµÑ ¡Ô Ò÷յè Òèí ¡Ç‹ÒÇÔ¹â´Çʏ 98SE ·Õäè Á‹ÃͧÃѺ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÏ ÃÑ»µ ¨ÐµŒÍ§ÃͧÃѺ¤íÒÊѧè Ìͧ¢Í Set_Report à¾ÔÁè àµÔÁà¾ÕÍè ãˌÊÒÁÒö·íҧҹ䴌

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %$


º··Õè 10

á¹Ç·Ò§àº×é Í §µŒ ¹ 㹡ÒÃ¾Ñ ² ¹Ò ÍØ»¡Ã³ÊÒí ËÃѺàª×Íè Áµ‹Í¡Ñº¾Íϵ USB ໚¹·Õ·è ÃÒºâ´Â·ÑÇè ¡Ñ¹ã¹Ç§¡ÒäÍÁ¾ÔÇàµÍÏÇҋ ¾Íϵ USB àÃÔÁè ࢌÒÁÒÁÕº·ºÒ·ã¹¡ÒÃ㪌§Ò¹à¾×Íè àª×Íè Á µ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡·´á·¹¾Íϵ¢¹Ò¹áÅоÍϵ͹ءÃÁ ·Ñ§é ¹Õàé ¹×Íè §¨Ò¡ÊÒÁÒöµ‹Í¾‹Ç§ÍØ»¡Ã³ 䴌ÁÒ¡¶Ö§ 127 µÑÇ ¤ÇÒÁàÃçÇ㹡ÒÃʋ§¼‹Ò¹¢ŒÍÁÙÅ·ÕÊè §Ù ¶Ö§ 480 àÁ¡ÐºÔµµ‹ÍÇÔ¹Ò·Õ (ã¹ USB 2.0) ¼¹Ç¡à¢ŒÒ¡Ñº ¤Ø³ÊÁºÑµÔ “µ‹ÍáŌǷíÒ§Ò¹” ËÃ×Í plug and play Íѹ໚¹»˜¨¨Ñª‹ÇÂàÊÃÔÁãˌ¼ãٌ ªŒ§Ò¹ÊÒÁÒö㪌§Ò¹ÍØ»¡Ã³·µÕè ͋ ¼‹Ò¹¾Íϵ USB 䴌Í‹ҧÊдǡʺÒÂÁÒ¡¢Ö¹é ¤ÇÒÁ໚¹¨ÃÔ§»ÃСÒÃ˹Ö觷Õ赌ͧÂÍÁÃѺ¤×Í ÊÔ觻ÃдÔÉ°Šã´¡çµÒÁ·ÕèÍíҹǤÇÒÁÊдǡᡋ¼ÙŒãªŒ§Ò¹ÁÒ¡ ෋Òã´ ¡Ãкǹ¡ÒÃ㹡ÒþѲ¹Ò¹Ñ¹é ‹ÍÁµŒÍ§«Ñº«ŒÍ¹áÅм‹Ò¹¡ÒþԨÒóÒÍ‹ҧ¤Ãº¶ŒÇ¹Ãͺ´ŒÒ¹ÁÒ¡µÒÁä»´ŒÇ ÍØ»¡Ã³ USB ¡çઋ¹à´ÕÂǡѹ ¢Ñ鹵͹㹡ÒþѲ¹Ò¤‹Í¹¢ŒÒ§ÁÒ¡ à¾ÃÒеŒÍ§ÁÕ¡ÒþѲ¹Ò·Ñ駴ŒÒ¹ÎÒÏ´áÇÏáÅÐ «Í¿µáÇÏ â´Â·Ò§ÎÒÏ´áÇϨÐÁÕ·§Ñé ¡ÒÃÍ͡Ẻǧ¨Ã Ἃ¹Ç§¨Ã¾ÔÁ¾ áÅÐà¢Õ¹â»Ãá¡ÃÁ¤Çº¤ØÁãˌᡋäÁâ¤Ã ¤Í¹â·ÃÅàÅÍÏ ʋǹ·Ò§«Í¿ŠáÇϨÐÁÕ·§Ñé ¡ÒÃà¢Õ¹â»Ãá¡ÃÁä´ÃàÇÍÏà¾×Íè ãˌÃкº»¯ÔºµÑ ¡Ô ÒÃÃÙ¨Œ ¡Ñ áÅÐâ»Ãá¡ÃÁ ÊíÒËÃѺµÔ´µ‹Í¡Ñº¼Ù㌠ªŒ§Ò¹ËÃ×Í user interface 㹺·¹Õ¨é йíÒàʹÍá¹Ç·Ò§àº×Íé §µŒ¹ÊíÒËÃѺ¡ÒþѲ¹ÒÍØ»¡Ã³à¾×Íè àª×Íè Áµ‹Í¡Ñº¾Íϵ USB â´Â¨Ðá¹Ð ¹íҶ֧ʋǹ»ÃСͺ·ÕÊè Òí ¤Ñ­ ÅíҴѺ¢Ñ¹é µÍ¹ã¹¡ÒþѲ¹Ò à¾×Íè ãˌ¼ãٌ ªŒ§Ò¹ÁͧàËç¹ÀÒ¾ÃÇÁ㹡ÒþѲ¹Ò

10.1 á¹Ç·Ò§¾Ñ²¹ÒÎÒÏ´áÇϢͧÍØ»¡Ã³ USB ã¹ÃÙ»·Õè 10-1 ໚¹ä´ÍÐá¡ÃÁ¡Ò÷íÒ§Ò¹àº×Íé §µŒ¹·Ò§ÎÒÏ´áÇϢͧÍØ»¡Ã³ USB «Ö§è ÁÕÊNj ¹»ÃСͺËÅÑ¡ 5 ʋǹ¤×Í 1. ʋǹÃѺʋ§¢ŒÍÁÙšѺ¾Íϵ USB (Transceiver) 2. ǧ¨Ãàª×Íè Áµ‹Í¢ŒÍÁÙÅ͹ءÃÁ (Serial Interface Engine : SIE) 3. ʋǹ¨Ñ´¡ÒÃàª×Íè Áµ‹Í¡Ñº SIE (SIE interface) 4. ʋǹ¤Çº¤ØÁÃٻẺ¡ÒÃàª×Íè Áµ‹Í (Protocal controller) 5. ʋǹàª×Íè Áµ‹ÍÍØ»¡Ã³Í¹Ô ¾ØµàÍÒµ¾µØ ËÃ×;Íϵ (Input/Output : I/O) ¨ÐàËç¹ä´ŒÇҋ ·Õ»è ÅÒ´ŒÒ¹¾ÍϵÍÔ¹¾ØµàÍÒµ¾µØ ¨Ðàª×Íè Áµ‹Í¡ÑºÃкºËÃ×ͧҹ·Õ¼è ãٌ ªŒ§Ò¹µŒÍ§¡ÒèÃÔ§ áÅŒÇ ¼‹Ò¹¡Ãкǹ¡ÒÃËÅÑ¡·Ñ§é 5 ʋǹà¾×Íè ¡ÅÒÂ໚¹¢ŒÍÁÙÅä»»ÃÒ¡¯º¹ºÑʢͧ¾Íϵ USB

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %%


ÊÑ­­Ò³¢ŒÍÁÙÅ D+

D-

ʋǹÃѺʋ§¢ŒÍÁÙÅ (Transceiver)

ǧ¨Ãàª×Íè Áµ‹Í ¢ŒÍÁÙÅ͹ءÃÁ (Serial Interface Engine : SIE)

ÊÑ­­Ò³¤Çº¤ØÁ

ʋǹ¨Ñ´¡Òà àª×Íè Áµ‹Í¡Ñº SIE (SIE interface)

ʋǹ¤Çº¤ØÁ ÃٻẺ ¡ÒÃàª×Íè Áµ‹Í (Protocal controller)

ʋǹàª×Íè Áµ‹Í ÍØ»¡Ã³ ÍÔ¹¾ØµàÍÒµ¾µØ ËÃ×;Íϵ

(Input/Output : I/O)

ÃÙ»·Õè 10-1 ä´ÍÐá¡ÃÁ¡Ò÷íÒ§Ò¹àº×Íé §µŒ¹¢Í§ÍØ»¡Ã³ USB ã¹»˜¨¨Øº¹Ñ ÁÕÍ»Ø ¡Ã³ÍàÔ Åç¡·Ã͹ԡʏ·ÃÕè ͧÃѺ¡ÒþѲ¹ÒÍØ»¡Ã³ USB ·Ñ§é ã¹áººá¡ʋǹáÅÐẺÃÇÁ ·Ñ§é ËÁ´ÍÂÙ㋠¹ÍØ»¡Ã³à¾Õ§µÑÇà´ÕÂÇ ÊíÒËÃѺã¹áººá¡ʋǹ ÁÑ¡¨ÐÃÇÁàÍÒʋǹÃѺʋ§¢ŒÍÁÙÅ, SIE áÅÐʋǹ¨Ñ´¡Òà àª×èÍÁµ‹Í SIE ࢌҴŒÇ¡ѹ໚¹ÍØ»¡Ã³ 1 µÑÇ ã¹¢³Ð·Õèʋǹ¤Çº¤ØÁÃٻẺ¡ÒÃàª×èÍÁµ‹ÍáÅоÍϵ¨Ð㪌äÁâ¤Ã ¤Í¹â·ÃÅàÅÍÏࢌÒÁÒ¨´íÒà¹Ô¹¡Òà ´ŒÇÂÇÔ¸Õ¹Õé·íÒãˌ¼ÙŒ¾Ñ²¹ÒÊÒÁÒö㪌äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ·ÕèäÁ‹ÁÕʋǹàª×èÍÁµ‹Í ¾Íϵ USB ÁÒ㪌§Ò¹ ʋ§¼ÅãˌÃҤҢͧäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ·ÕèàÅ×͡㪌äÁ‹ÊÙ§ÁÒ¡¹Ñ¡ áŌÇÍÒÈÑÂÍØ»¡Ã³ÀÒ¤ ˹ŒÒ·ÕÁè ÊÕ Ç‹ ¹àª×Íè Áµ‹Í¾Íϵ USB ໚¹µÑǨѴ¡ÒÃàÃ×Íè §ÃٻẺÊÑ­­Ò³ «Ö§è ÍØ»¡Ã³ÀҤ˹ŒÒ¹Õàé »š¹äÍ«Õ¿§˜ ¡ª¹Ñè ¾ÔàÈÉ à©¾ÒÐÁÕ¼¼ÙŒ ÅÔµËÅÒÂÃÒ ÍÒ·Ô PDIUSBD11 ¢Í§ Philips ÊÒÁÒöàª×Íè Áµ‹Í¡ÑºäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏÀÒ¹͡ ¼‹Ò¹ÃкººÑÊ I2C, USBN9603 ¢Í§ National Semi0conductor 㪌¡ÒÃàª×Íè Áµ‹Í¡ÑºäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ㹠ÃкººÑÊ 3 ÊÒ¤×Í ÊÒ¢ŒÍÁÙÅ͹ءÃÁࢌÒ, ÊÒ¢ŒÍÁÙÅ͹ءÃÁÍÍ¡ áÅÐÊÒÂÊÑ­­Ò³¹Ò́¡Ò ໚¹µŒ¹ ʋǹäÁâ¤Ã ¤Í¹â·ÃÅàÅÍϹ¹Ñé ÊÒÁÒöàÅ×͡㪌䴌᷺·Ø¡µÃСÙÅ äÁ‹Çҋ ¨Ð໚¹ MCS-51, PIC ËÃ×Í 68HCxx ÊíÒËÃѺã¹áººÃÇÁʋǹ»ÃСͺ·Ñé§ËÁ´ã¹ÍØ»¡Ã³à´ÕÂǡѹ¹Ñé¹ ¨ÐàÃÕ¡ÍØ»¡Ã³¹ÕéÇ‹Ò USB äÁâ¤Ã ¤Í¹â·ÃÅàÅÍÏ ¹Ñ¹è ¤×ÍÀÒÂã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍϨÐÃÇÁàÍÒÍØ»¡Ã³ÀҤ˹ŒÒ·Õãè ªŒàª×Íè Áµ‹Í¡Ñº¾Íϵ USB à¢ŒÒ änj´ÇŒ  ¾ÃŒÍÁ¡Ñº¨Ñ´ÊÃÃÃÕ¨ÊÔ àµÍÏ¿§˜ ¡ª¹Ñè ¾ÔàÈÉà¾×Íè ÃͧÃѺ¡Ò÷íÒ§Ò¹¡Ñº¾Íϵ USB à¾×Íè ª‹ÇÂãˌ¡ÒÃ㪌§Ò¹Êдǡ ¢Ö¹é µÑÇÍ‹ҧ¢Í§äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏẺ¹Õäé ´Œá¡‹ PIC16C745 ¢Í§ Microchip «Ö§è ÊÒÁÒöÃͧÃѺ USB1.0/ 1.1 ¤ÇÒÁàÃçǵèÒí , PIC18F2410 ËÃ×Í PIC18F4550 ¢Í§ Microchip ઋ¹¡Ñ¹ ᵋÃͧÃѺ USB1.0/1.1 ¤ÇÒÁ àÃçÇàµçÁ·Õè (ᵋ㹢³Ð·Õ¨è ´Ñ ·íÒ˹ѧÊ×ÍàŋÁ¹Õé ·Ñ§é ÊͧàºÍϹÂÕé §Ñ äÁ‹Á¨Õ Òí ˹‹ÒÂ), CY7C63001 áÅÐâÁ´ÙÅ EZ-USB ¢Í§ Cypress ໚¹µŒ¹

10.2 ÊÔ§è ·Õµè ͌ §´íÒà¹Ô¹¡ÒÃ㹡ÒþѲ¹ÒÍØ»¡Ã³ USB ËÑÇã¨ã¹Ê‹Ç¹¢Í§ÎÒÏ´áÇÏã¹ÍØ»¡Ã³ USB ¤×Í äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ â´ÂÍØ»¡Ã³ USB µÑÇ˹Öè§æ ¨ÐµÔ´µ‹Í¡ÑºâÎʵ«§Öè ¡ç¤Í× ¤ÍÁ¾ÔÇàµÍÏ â´Â㪌 USB â»ÃⵤÍÅÁҵðҹ ¨Ò¡¹Ñ¹é ¡Òö‹Ò·ʹ¢ŒÍÁÙŨÐàÃÔÁè µŒ¹ ¢Ö¹é ·Ñ§é ¹Õ¢é ¹Öé ÍÂØ¡Ž ºÑ «Í¿µáÇÏ·¾Õè ² Ñ ¹Ò¢Ö¹é ´ŒÇ ´Ñ§ã¹¡ÒþѲ¹ÒÍØ»¡Ã³ USB ¨Ö§äÁ‹ÍÒ¨ËÅÕ¡àÅÕÂè §¡ÒÃà¢Õ¹â»Ãá¡ÃÁ áÅеŒÍ§à¢Õ¹ÁÒ¡¡Ç‹Ò 1 â»Ãá¡ÃÁ´ŒÇÂàÊÁÍ ã¹ÃÙ»·Õè 10-2 áÊ´§§Ò¹·Ñ§é ËÁ´·Õµè ͌ §·íÒ㹡ÒþѲ¹ÒÍØ»¡Ã³ USB ÊÒÁÒöẋ§ä´Œà»š¹ 2 ʋǹ¤×Í 1. §Ò¹·Õµè ͌ §·íÒã¹ÍØ»¡Ã³ USB 2. §Ò¹·Õµè ͌ §·íÒã¹âÎʵËÃ×ͤÍÁ¾ÔÇàµÍÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %&


10.2.1 §Ò¹·Õµè ͌ §·íÒã¹ÍØ»¡Ã³ USB Áմnj ¡ѹ 3 Í‹ҧ¤×Í 1. Í͡ẺÎÒÏ´áÇϢͧÍØ»¡Ã³ 2. à¢Õ¹â»Ãá¡ÃÁ¡íÒ˹´ÃٻẺ¡ÒõԴµ‹Í¡Ñº¾Íϵ USB ŧã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ËÃ×Í USB protocal firmware 3. à¢Õ¹â»Ãá¡ÃÁ¤Çº¤ØÁáÅÐ㪌§Ò¹Å§ã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ËÃ×Í Application firmware §Ò¹Í͡ẺÎÒÏ´áÇÏÊÒÁÒö·íÒ䴌äÁ‹ÂÒ¡¢Ö¹é ÍÂÙ¡‹ ºÑ ¤ÇÒÁ«Ñº«ŒÍ¹¢Í§Ç§¨Ã â´Â੾ÒÐÍ‹ҧÂÔ§è ã¹¡Ã³Õ ·Õãè ªŒäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏẺÁÕÊNj ¹àª×Íè Áµ‹Í¾Íϵ USB ã¹µÑǨÐà¾ÔÁè ¤ÇÒÁÊдǡ㹡ÒÃÍ͡ẺÍ‹ҧÁÒ¡ â´Â§Ò¹Ë¹Ñ¡¨ÐÍÂً·Õè¡ÒÃà¢Õ¹â»Ãá¡ÃÁã¹¢ŒÍ 2 áÅÐ 3 â´Ââ»Ãá¡ÃÁ·Ñé§ËÁ´ÊÒÁÒöºÃèØŧã¹äÁâ¤Ã ¤Í¹â·ÃÅàÅÍϵÇÑ à´ÕÂǡѹ䴌¨Ð´Õ·ÊÕè ´Ø áÁŒ¨Ð´Ù໚¹§Ò¹Ë¹Ñ¡ ᵋ㹤ÇÒÁ໚¹¨ÃÔ§ ¼Ù¾Œ ² Ñ ¹ÒäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ Ẻ¹Õé ÁÑ¡¨ÐàµÃÕÂÁâ»Ãá¡ÃÁµÑÇÍ‹ҧ·Õãè ªŒ§Ò¹ä´Œ¨ÃÔ§ã¹Ê‹Ç¹¢Í§ USB protocal ÁÒãˌáÅŒÇ à¾×Íè Å´ÀÒÃÐ㹡Òà à¢Õ¹â»Ãá¡ÃÁ ᵋ¶ÒŒ Ëҡ㪌äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏẺ·Õäè Á‹ÁÊÕ Ç‹ ¹àª×Íè Áµ‹Í¾Íϵ USB ã¹µÑÇ ¡ÒÃà¢Õ¹â»Ãá¡ÃÁ ã¹Ê‹Ç¹ USB protocal ¨Ð໚¹ÀÒÃÐáÅÐÂا‹ ÂÒ¡¾Í¤Çà à¾ÃÒеŒÍ§à¢Õ¹â»Ãá¡ÃÁà¾×Íè ¡íÒ˹´ÃٻẺ¢ŒÍÁÙÅàͧ áÅзÕÊè Òí ¤Ñ­µŒÍ§ÊÑÁ¾Ñ¹¸áÅÐࢌҡѹ䴌¡ºÑ Áҵðҹ¢Í§¾Íϵ USB ´ŒÇÂ

10.2.2 §Ò¹·Õµè ͌ §·íÒã¹âÎʵËÃ×ͤÍÁ¾ÔÇàµÍÏ ÁÕ 3 Í‹ҧઋ¹¡Ñ¹¤×Í 1. Í͡ẺÎÒÏ´áÇÏÊÒí ËÃѺ¡ÒÃàª×Íè Áµ‹Í 2. à¢Õ¹â»Ãá¡ÃÁä´ÃàÇÍϢͧÍØ»¡Ã³ 3. à¢Õ¹â»Ãá¡ÃÁ»ÃÐÂØ¡µÊÒí ËÃѺ㪌§Ò¹ §Ò¹·Õ赌ͧ·íÒ·Ò§´ŒÒ¹¢Í§ ¤ÍÁ¾ÔÇàµÍÏ

§Ò¹·Õ赌ͧ·íÒ·Ò§´ŒÒ¹¢Í§ ÍØ»¡Ã³ USB

à¢Õ¹â»Ãá¡ÃÁ»ÃÐÂØ¡µãªŒ§Ò¹

à¢Õ¹â»Ãá¡ÃÁ¤Çº¤ØÁ ŧã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ

à¢Õ¹â»Ãá¡ÃÁä´ÃàÇÍÏ

à¢Õ¹â»Ãá¡ÃÁ¡íÒ˹´ÃٻẺ¡ÒõԴµ‹Í¡Ñº ¾Íϵ USB ŧã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ

Í͡ẺÎÒÏ´áÇÏÊíÒËÃѺàª×èÍÁµ‹Í

ÃÙ»·Õè 10-2 áÊ´§§Ò¹·Õµè ͌ §·íÒ㹡ÒþѲ¹ÒÍØ»¡Ã³ USB

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ %'


§Ò¹Í͡ẺÎÒÏ´áÇÏàª×Íè Áµ‹Í¹Ñ¹é 㹤ÍÁ¾ÔÇàµÍÏÊÁÑÂãËÁ‹ÁÎÕ ÒÏ´áÇÏÃͧÃѺÍÂÙá‹ ÅŒÇ ´Ñ§¹Ñ¹é §Ò¹ã¹Ê‹Ç¹ ¹Õ¨é §Ö äÁ‹µÍŒ §·íÒ Ê‹Ç¹â»Ãá¡ÃÁä´ÃàÇÍÏ ËÒ¡ÍØ»¡Ã³ USB ·Õ·è Òí ¡ÒþѲ¹ÒÍÂÙ㋠¹¤ÅÒÊ HID ¡çäÁ‹¨Òí ໚¹µŒÍ§à¢Õ¹ ¡ç䴌 à¾ÃÒÐã¹Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ 98SE ¢Ö¹é 仨ÐÁÕä´ÃàÇÍÏÁҵðҹÊíÒËÃѺ¨Ñ´¡ÒÃʋǹ¹ÕÍé ÂÙá‹ ÅŒÇ áµ‹¶ÒŒ ໚¹¤ÅÒÊÍ×¹è ઋ¹ Ê᡹à¹ÍÏ, à¤Ã×Íè §¾ÔÁ¾ ËÃ×Í´ÔÊ¡ä´Ã¿ ¼Ù¾Œ ² Ñ ¹ÒµŒÍ§à¢Õ¹â»Ãá¡ÃÁä´ÃàÇÍÏà¾ÔÁè àµÔÁà¾×Íè ãˌ¤ÍÁ¾ÔÇàµÍÏÃٌ¨Ñ¡ ÊØ´·ŒÒ¤×Í §Ò¹à¢Õ¹â»Ãá¡ÃÁ»ÃÐÂØ¡µ §Ò¹¹Õé¨Ðᵡµ‹Ò§ÂÒ¡§‹Ò¢Öé¹ÍÂً¡Ñº¤ÇÒÁµŒÍ§¡Òà ¢Í§¼Ù¾Œ ² Ñ ¹Ò ᵋ¨ÐµŒÍ§ ÍÊÑÁ¾Ñ¹¸¡ºÑ ÎÒÏ´áÇϢͧÍØ»¡Ã³ USB µÑǹѹé æ ´ŒÇ ã¹ÃÙ»·Õè 10-3 áÊ´§ªÑ¹é ¢Í§¡ÒÃÃͧÃѺ¡Ò÷íÒ§Ò¹·Ò§«Í¿µáÇϢͧ¾Íϵ USB ã¹Ãкº»¯ÔºµÑ ¡Ô Òà ÇÔ¹â´Çʏ à¾×Íè 㪌໚¹á¹Ç·Ò§ã¹¡ÒþѲ¹Ò«Í¿µáÇϢͧÍØ»¡Ã³ USB ¨ÐàËç¹ä´ŒÇҋ ẋ§Í͡໚¹ 2 ÃдѺ¤×Í à¤ÍÏà¹Å (kernel) áÅÐÃдѺ¼ÙŒãªŒ§Ò¹ (user) â´Âã¹ÃдѺà¤ÍÏà¹Å¹Ñé¹Ëҡ໚¹ÍØ»¡Ã³ HID ¡Ò÷íÒ§Ò¹·Ñé§ ËÁ´¨Ðä´ŒÃºÑ ¡ÒáíÒ˹´áÅШѴ¡ÒÃänjàÃÕºÌÍÂáÅŒÇ ¼Ù㌠ªŒ§Ò¹à¾Õ§àÃÕ¡㪌§Ò¹à·‹Ò¹Ñ¹é ´Ñ§¹Ñ¹é ÊíÒËÃѺ¡ÒÃàÃÔÁè µŒ¹ ¾Ñ²¹ÒÍØ»¡Ã³ USB ¨Ö§¤ÇÃàÃÔÁè ´ŒÇÂÍØ»¡Ã³ã¹ÃдѺ HID ¡‹Í¹ à¹×Íè §¨Ò¡ÁÕÍ»Ø ¡Ã³áÅÐà¤Ã×Íè §Á×Íʹѹʹع¤‹Í¹ ¢ŒÒ§ÁÒ¡ â»Ãá¡ÃÁ»ÃÐÂØ¡µãªŒ§Ò¹ ʋǹáÊ´§¼Å¢Í§ÍØ»¡Ã³ USB

ʋǹáÊ´§¼Å㹤ÅÒÊ HID

ÃдѺ¼Ù㌠ªŒ§Ò¹ ÃдѺà¤ÍÏà¹Å

HIDCLASS.SYS

HIDUSB.SYS

ʋǹ»ÃСͺ¢Í§ USB ä´ÃàÇÍÏ

USBHUB.SYS

USBD.SYS

UHCI.SYS

OHCI.SYS

PCI Enumerator

ÊÒÂ USB

ÃÙ»·Õè 10-3 áÊ´§â¤Ã§ÊÌҧ¡Ò÷íÒ§Ò¹·Ò§«Í¿µáÇϢͧ¾Íϵ USB ã¹Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &


+Vcc

+Vcc D+ DGND

8-bit LED OUTPUT

+Vcc

+Vcc

USB microcontroller 8-bit SWITCH INPUT

ÃÙ»·Õè 10-4 ǧ¨Ã¢Í§ÍØ»¡Ã³ USB Í‹ҧ§‹Ò·չè Òí ÁÒ໚¹µÑÇÍ‹ҧÊíÒËÃѺ¹íÒàʹÍá¹Ç·Ò§¡Òà ¾Ñ²¹Ò

10.3 µÑÇÍ‹ҧá¹Ç·Ò§ã¹¡ÒþѲ¹ÒÍØ»¡Ã³ USB µÑÇÍ‹ҧ·Õ¨è йíÒàʹ͵‹Í仹Õàé »š¹µÑÇÍ‹ҧàº×Íé §µŒ¹¢Í§¡ÒþѲ¹ÒÍØ»¡Ã³ USB Í‹ҧ§‹Ò à¾×Íè ÊÌҧ¤ÇÒÁ ࢌÒã¨ã¹ÀÒ¾ÃÇÁ໚¹ËÅÑ¡ â´ÂäÁ‹Å§ÅÖ¡ã¹ÃÒÂÅÐàÍÕ´¢Í§â»Ãá¡ÃÁ µÑÇÍ‹ҧÍØ»¡Ã³ USB ·Õ¨è оѲ¹Òµ‹Íä» ¹Õ¤é Í× Ãкº¤Çº¤ØÁÍ‹ҧ§‹Ò·Õãè ªŒÊÇÔµªà»š¹µÑÇʋ§¢ŒÍÁÙÅࢌҷҧÍÔ¹¾Øµ¢Í§Ç§¨Ã áÅÐÁÕËÅÍ´ä¿ËÃ×Í LED áÊ´§ ¼Å¡Ò÷íÒ§Ò¹·Ò§¢ÒàÍÒµ¾µØ ¢Ñ¹é µÍ¹â´ÂÊÃØ»ÁÕ´§Ñ ¹Õé

10.3.1 ¢Ñ¹é ·Õè 1 Í͡ẺÎÒÏ´áÇÏ ã¹ÃÙ»·Õè 10-4 áÊ´§Ç§¨Ãàº×Íé §µŒ¹¢Í§ÍØ»¡Ã³ USB ·Õµè ͌ §¡ÒþѲ¹Ò ËÑÇã¨ÊíҤѭ¢Í§Ç§¨Ã¹Õ¤é Í× äÁâ¤Ã ¤Í¹â·ÃÅàÅÍÏ·ÁÕè ÊÕ Ç‹ ¹àª×Íè Áµ‹Í¾Íϵ USB ã¹µÑÇ ÍØ»¡Ã³Í¹Ô ¾Øµ¢Í§Ç§¨Ã¹Õ¤é Í× ÊÇÔµªàÅ×Íè ¹ 8 µÑÇ Ê‹Ç¹ÍØ»¡Ã³ àÍÒµ¾µØ ¨Ð໚¹ LED 8 ´Ç§ â´ÂÍØ»¡Ã³Í¹Ô ¾ØµàÍÒµ¾µØ ·Ñ§é ËÁ´·íÒ§Ò¹·ÕÅè ͨԡµèÒí (active low)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &


´ÕäÇ«´ÊÔ ¤ÃÔ»àµÍÏ

¤Í¹¿¡ÇÔ àÃªÑ¹è ´ÔʤÃÔ»àµÍÏ

ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍÏ

HID ´ÔʤÃÔ»àµÍÏ

Length = 18

Length = 9

Length = 9

Length = 9

Type = 1

Type = 2

Type = 4

Type = 21

USB version = 110H

Total length

Class = 0

Interfaces = 1

ThisInterface = 1 Alternate = 0

HID version = 110H

Endpoints = 0

CountryCode = 0

SubClass = 0

This Config. = 1

Class = 3

HID Descriptors = 1

Protocal = 0

ConfigName = 4

SubClass = 0

Report = 22H

EPO size = 64

Attributes = 80H

Protocal = 0

Max. Power = 50

InterfaceName = 5

Vendor ID = 4242H

Total Report Length

Report(0)

Product ID = 1

Report(M-1)

VersionNumber = 1 Manufacturer = 1 ProductName = 2 Serial # = 3 Configurations = 1

ʵÃÔ§´ÔʤÃÔ»àµÍÏ Length = 4 Length = 2A+2 Length = 2B+2 Length = 2C+2 Length = 2D+2

Type = 3 Type = 3 Type = 3 Type = 3 Type = 3

Language Identifier UNICODE Char(0) UNICODE Char(0) UNICODE Char(0) UNICODE Char(0)

UNICODE Char(A-1) UNICODE Char(B-1) UNICODE Char(C-1) UNICODE Char(D-1)

ÃÙ»·Õè 10-5 µÑÇÍ‹ҧÃÒÂÅÐàÍÕ´¢Í§´ÔʤÃÔ»àµÍÏ·Ñé§ËÁ´·Õè㪌㹡ÒþѲ¹ÒÍØ»¡Ã³ USB µÒÁǧ¨Ãã¹ÃÙ»·Õè 10-4

10.3.2 ¢Ñ¹é ·Õè 2 ¨Ñ´¡ÒáѺ´ÔʤÃÔ»àµÍÏ ¢Ñ¹é µÍ¹¹Õàé »š¹¡ÒÃàµÃÕÂÁ¢ŒÍÁÙÅà¾×Íè ¡íÒ˹´ãˌᡋ´ÊÔ ¤ÃÔ»àµÍÏ·§Ñé ËÁ´·Õµè ͌ §ãªŒã¹ÍØ»¡Ã³ HID ã¹ÃÙ»·Õè 10-5 áÊ´§µÑÇÍ‹ҧ¢ŒÍÁÙÅ·Õ¡è Òí ˹´Å§ã¹´ÔʤÃÔ»àµÍÏ·§Ñé ËÁ´¢Í§ÍØ»¡Ã³ USB µÑÇÍ‹ҧ·Õ¹è Òí ÁÒ͸ԺÒÂ

10.3.3 ¢Ñ¹é ·Õè 3 à¢Õ¹â»Ãá¡ÃÁãˌᡋäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ àÁ×Íè ä´ŒÇµÑ ¶Ø´ºÔ ËÃ×Í¢ŒÍÁÙŷѧé ËÁ´ÁÒáÅŒÇ ¢Ñ¹é µÍ¹µ‹Í令×Í ¡ÒÃà¢Õ¹â»Ãá¡ÃÁŧã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ËÃ×Í·Õàè ÃÕÂ¡Ç‹Ò “࿁ÃÁ áÇϔ (firmware) â´ÂÊÒÁÒöá¡໚¹Ê‹Ç¹æ 䴌´§Ñ ¹Õé 1. âÁ´ÙÅ DECLARE 㪌ÊÒí ËÃѺ¡íÒ˹´µÑÇá»Ã·Ñ§é ËÁ´Å§ã¹â»Ãá¡ÃÁ 2. âÁ´ÙÅ DTABLE 㪌ÊÒí ËÃѺ¡íÒ˹´¢ŒÍÁÙŢͧ´ÔʤÃÔ»àµÍÏ·§Ñé ËÁ´ 3. âÁ´ÙÅ MAIN ໚¹Ê‹Ç¹¢Í§â»Ãá¡ÃÁ¤Çº¤ØÁËÅÑ¡ 4. âÁ´ÙÅ INTERRUPT ໚¹âÁ´ÙÅâ»Ãá¡ÃÁ‹ÍÂÊíÒËÃѺµÍºÊ¹Í§¡ÒÃÍÔ¹àµÍÃÃ»Ñ µ 5. âÁ´ÙÅ DECODE ໚¹âÁ´ÙÅâ»Ãá¡ÃÁ‹ÍÂÊíÒËÃѺ¨Ñ´¡ÒáѺ¤íÒÊÑ§è µÑ§é ¤‹Òµ‹Ò§æ ã¹â»Ãá¡ÃÁ ¤Çº¤ØÁ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &


ã¹ 2 âÁ´ÙÅáá¨Ð㪌»ÃÐ⪹ã¹¡ÒáíÒ˹´áÅлÃСÒȤ‹ÒµÑÇá»Ã·Õè㪌·Ñé§ËÁ´ã¹â»Ãá¡ÃÁ âÁ´ÙÅ MAIN ໚¹Ê‹Ç¹·Õºè ÃèØâ»Ãá¡ÃÁ¡Ò÷íÒ§Ò¹ËÅÑ¡¢Í§ÍØ»¡Ã³ ¨ÐàÃÔÁè ·íÒ§Ò¹àÁ×Íè ¨‹ÒÂä¿ãˌᡋäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ¹Í¡¨Ò¡¹Ñ¹é Âѧ㪌㹡ÒÃÍÔ¹àÔ ªÕÂÅÍØ»¡Ã³·§Ñé ËÁ´áÅÐÃѺʋ§¢ŒÍÁÙšѺâÎʵ´ÇŒ  ¨Ö§ÍÒ¨¡Å‹ÒÇ䴌Çҋ âÁ´ÙÅ MAIN ¡ç¤Í× â»Ãá¡ÃÁËÅÑ¡ (main program) ¢Í§¡Ò÷íÒ§Ò¹¹Ñ¹è àͧ ã¹¢³Ð·Õâè Á´ÙÅ INTERRUPT áÅÐ DECODE ¨Ð໚¹â»Ãá¡ÃÁ‹ÍÂà¾×Íè àÊÃÔÁ¡Ò÷íÒ§Ò¹ãˌÊÁºÙó ÁÒ¡¢Ö¹é ËÒ¡ÍØ»¡Ã³ USB µÑǹѹé æ äÁ‹ä´ŒãªŒ¡Òö‹Ò·ʹÊÑ­­Ò³áººÍÔ¹àµÍÃÃ»Ñ µ ËÃ×ÍäÁ‹Á¡Õ ÒÃÍÔ¹àµÍÃÃ»Ñ µà¡Ô´¢Ö¹é âÁ´ÙÅ INTERRUPT ¹Õ¡é äç Á‹¨Òí ໚¹µŒÍ§ãªŒ ᵋã¹ÍØ»¡Ã³ USB ·Õàè »š¹¤ÅÒÊ HID ʋǹãË­‹¨ÐÁÕ¡ÒÃ㪌 §Ò¹ÍÔ¹àµÍÃÃ»Ñ µ ʋǹâÁ´ÙÅ DECODE ¨Ð㪌㹡ÒÃá»Å§ËÃ×ͶʹÃËÑʤíÒÊѧè Ìͧ¢Í (USB command request) ·Õè㪌ã¹â»Ãá¡ÃÁ Í‹ҧäáçµÒÁ ª×Íè ¢Í§âÁ´ÙÅÍÒ¨à»ÅÕÂè ¹á»Å§ä´ŒµÒÁ¤ÇÒÁµŒÍ§¡Òâͧ¼Ù¾Œ ² Ñ ¹Ò ᵋà¹×Íé ËÒÊÒÃТͧâÁ´Ù ŤÇôíÒçÍÂً

10.3.4 ¢Ñ¹é ·Õè 4 µÔ´µ‹Í¡ÑºâÎʵ ã¹¢Ñ¹é µÍ¹¹Õ¨é Ð໚¹¡ÒáíÒ˹´ÃٻẺ¢ŒÍÁÙÅ·ÕÎè ÒÏ´áÇÏ (ã¹·Õ¹è ¤Õé Í× äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ) ¨ÐµÔ´µ‹Í ¡ÑºâÎʵ («Ö§è ¡ç¤Í× ¤ÍÁ¾ÔÇàµÍÏ) áÅзíÒ¡Ò÷´ÅÍ§Ç‹Ò ÍØ»¡Ã³ USB ÊÒÁÒöµÔ´µ‹Í¡ÑºâÎʵä´ŒËÃ×ÍäÁ‹ à¹×Íè § ¨Ò¡ÍØ»¡Ã³·¹Õè Òí ÁÒ໚¹µÑÇÍ‹ҧ¹ÕÍé ÂÙ㋠¹¤ÅÒÊ HID ´Ñ§¹Ñ¹é àÁ×Íè ¾Ñ²¹ÒÎÒÏ´áÇÏàÃÕºÌÍÂáŌǵ‹Í¡Ñº¤ÍÁ¾ÔÇàµÍÏ Ãкº»¯ÔºµÑ ¡Ô ÒÃ㹤ÍÁ¾ÔÇàµÍϨеŒÍ§ÃÙ¨Œ ¡Ñ ¡ÑºÍØ»¡Ã³¹·Õé ¹Ñ ·Õ à¹×Íè §¨Ò¡ã¹Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ¨ÐÁÕä´ÃàÇÍÏ ¢Í§ÍØ»¡Ã³ HID ÍÂÙá‹ ÅŒÇ áµ‹¨ÐÂѧäÁ‹ÊÒÁÒö㪌§Ò¹ËÃ×ͤǺ¤ØÁÍØ»¡Ã³ USB µÑǹÕäé ´Œ ¨¹¡Ç‹Ò¨ÐÁÕâ»Ãá¡ÃÁ ÊíÒËÃѺ㪌§Ò¹

10.3.5 ¢Ñ¹é ·Õè 5 à¢Õ¹â»Ãá¡ÃÁ㪌§Ò¹ àÁ×Íè ÎÒÏ´áÇϢͧÍØ»¡Ã³ USB µÔ´µ‹Í¡ÑºâÎʵËÃ×ͤÍÁ¾ÔÇàµÍÏ䴌áÅŒÇ ¢Ñ¹é µÍ¹µ‹Í令×Í ¡ÒþѲ¹Ò â»Ãá¡ÃÁ»ÃÐÂØ¡µãªŒ§Ò¹à¾×Íè µÔ´µ‹Í¡Ñº¼Ù㌠ªŒ§Ò¹â´ÂµÃ§ËÃ×Í·Õàè ÃÕÂ¡Ç‹Ò User interface ã¹ÃÙ»·Õè 10-6 áÊ´§µÑÇÍ‹ҧ ˹ŒÒµÒ¢Í§â»Ãá¡ÃÁ·ÕÊè Ìҧ¢Ö¹é ¨ÐàËç¹Ç‹Ò ÁÕÊNj ¹»ÃСͺËÅÑ¡ 3 ʋǹ¤×Í Ê‹Ç¹áÊ´§¼Å¡Ò÷íÒ§Ò¹ËÃ×ÍàÍÒµ¾Ø µà»š¹ÃÙ»ËÅÍ´ä¿ «Ö觨еç¡Ñº LED ·Õ赋ÍÍÂً¨ÃÔ§·Ò§ÎÒÏ´áÇÏ ʋǹ·ÕèÊͧ¤×Í Ê‹Ç¹ÍÔ¹¾Øµ ¨Ò¡Ë¹ŒÒµ‹Ò§¢Í§ â»Ãá¡ÃÁ¨ÐÁÕÊÇÔµªÍ¹Ô ¾Øµ 2 ªØ´ ÊÇÔµª A ໚¹ÊÇÔµª·ÊÕè Ìҧ¢Ö¹é ´ŒÇ¡Ãкǹ¡Ò÷ҧ«Í¿µáÇÏ ʋǹÊÇÔµª B ໚¹ÊÇÔµª·µÕè ͋ ÍÂÙ¨‹ ÃÔ§·Ò§ÎÒÏ´áÇϵÒÁ·Õáè Ê´§ã¹Ç§¨ÃÃÙ»·Õè 10-3 ʋǹ·ÕÊè ÒÁ¤×Í Ê‹Ç¹àÅ×Í¡ÍÔ¹¾Øµ â´Â¼Ù㌠ªŒ§Ò¹ ÊÒÁÒöàÅ×Í¡áËŋ§¡íÒà¹Ô´¢ŒÍÁÙÅÍÔ¹¾Øµ¨Ò¡ÊÇÔµª A ËÃ×Í B ¡ç䴌 ¨Ò¡µÑÇÍ‹ҧ·ÕÂè ¡ÁÒ¹íÒàʹͨÐàËç¹ä´ŒÇҋ ¡ÒÃÍ͡ẺáÅоѲ¹ÒÍØ»¡Ã³ USB ÁÕ¢¹Ñé µÍ¹·ÕÅè ÐàÍÕ´͋͹ áÅеŒÍ§¤íÒ¹Ö§¶Ö§µÑÇá»ÃáÅл˜¨¨Ñ¢ͧ¢ŒÍÁÙŨíҹǹäÁ‹¹ÍŒ  ÂÔ§è ¶ŒÒÍØ»¡Ã³ÁàÕ §×Íè ¹ä¢ã¹¡Ò÷íÒ§Ò¹ÊÙ§ ¤ÇÒÁ«Ñº«ŒÍ¹ ÁÔ䴌à¡Ô´à©¾ÒСѺÎÒÏ´áÇÏ෋ҹѹé ËÒ¡Âѧʋ§¼Åµ‹Í¡ÒþѲ¹Ò«Í¿µáÇϴnj  ᵋÍ‹ҧäáçµÒÁàÁ×Íè ࢌÒã¨ã¹á¹Ç ¤Ô´áÅŒÇ ÍØ»¡Ã³ USB ·Ø¡µÑÇ¡ç¨ÐÁÕ¢¹Ñé µÍ¹ã¹¡ÒþѲ¹Ò·Õ¤è ŌÒ¤ÅÖ§¡Ñ¹ ·Ñ§é ¹Õàé ¹×Íè §¨Ò¡ÍØ»¡Ã³àËÅ‹Ò¹Ñ¹é ¨ÐµŒÍ§ ÁÒµ‹ÍËÇÁÍÂÙº‹ ¹ºÑÊà´ÕÂǡѹ ÃٻẺ¡Òö‹Ò·ʹ¢ŒÍÁÙŵ‹Ò§æ ¨Ö§¡ÅÒÂ໚¹Áҵðҹ·ÕÈè ¡Ö ÉÒà¾Õ§¤Ãѧé à´ÕÂÇ¡ç¨Ð ÊÒÁÒö¹íÒä»»ÃÐÂØ¡µãªŒä´ŒÍ‹ҧäÁ‹Á¢Õ ´Õ ¨íÒ¡Ñ´ ËҡᵋµÍŒ §ãªŒ¤ÇÒÁÃÙ¤Œ ÇÒÁÊÒÁÒöâ´Â੾ÒÐÍ‹ҧÂÔ§è ¡Ñº¡ÒÃà¢Õ¹ â»Ãá¡ÃÁ à¹×Íè §¨Ò¡µŒÍ§à¢Õ¹â»Ãá¡ÃÁÁÒ¡¡Ç‹Ò 1 â»Ãá¡ÃÁÍ‹ҧṋ¹Í¹

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &!


ÃÙ»·Õè 10-6 ˹ŒÒµÒ¢Í§â»Ãá¡ÃÁ㪌§Ò¹·Õ¾ è ² Ñ ¹Ò¢Ö¹é à¾×Íè 㪌ÃNj Á¡ÑºÍØ»¡Ã³ USB µÑÇÍ‹ҧ·Õ¹è Òí àʹÍ㹺·¹Õé ÊÔ觷Õ赌ͧãˌ¤ÇÒÁÊíҤѭ¹Í¡à˹×Í仨ҡǧ¨ÃáÅЫͿµáÇϤ×Í ¾Åѧ§Ò¹ä¿¿‡Ò·ÕèÍØ»¡Ã³µŒÍ§¡Òà ¼Ù¾Œ ² Ñ ¹ÒµŒÍ§àÅ×Í¡ãˌ´ÇÕ Ò‹ µŒÍ§¡ÒÃãËŒÍ»Ø ¡Ã³ USB ·Õ·è Òí ¡ÒþѲ¹Ò¹Õãé ªŒ¾Åѧ§Ò¹ËÃ×͵ŒÍ§¡ÒáÃÐáÊä¿¿‡ÒÁÒ¡ ¹ŒÍÂà¾Õ§äà ¨Ð㪌áËŋ§¨‹ÒÂ俨ҡº¹ºÑʢͧ¾Íϵ USB ËÃ×ͨҡÀÒ¹͡ ËÃ×Í㪌¨Ò¡·Ñ§é ÊͧáËŋ§ Í‹ҧäà ¡çµÒÁÍØ»¡Ã³ USB ã¹ÊÁÑÂãËÁ‹¾ÂÒÂÒÁÍ‹ҧÂÔ§è ·Õ¨è ÐÍ͡Ẻãˌ㪌¾Åѧ§Ò¹¨Ò¡ºÑʢͧ¾Íϵ USB àͧ ·Ñ§é ¹Õé à¾×èÍÅ´ÀÒÃÐ㹡ÒèѴËÒáËŋ§¨‹ÒÂä¿ÀÒ¹͡ «Ö觹Ñè¹ËÁÒ¶֧¢¹Ò´¢Í§ºÃèطÕ赌ͧãË­‹¢Öé¹ ÁÕ¹éíÒ˹ѡÁÒ¡¢Öé¹ áÅÐṋ¹Í¹Â‹ÍÁµŒÍ§Ê‹§¼Åµ‹ÍµŒ¹·Ø¹¢Í§¼ÅÔµÀѳ±ã¹·ŒÒ·ÕèÊØ´ ÃÒÂÅÐàÍÕ´·Ñ§é ËÁ´·Õ¹è Òí ÁÒàʹͷѧé 10 º·à»š¹¡ÒÃá¹Ð¹íÒãˌ¼Íٌ ҋ ¹ä´Œ·ÃÒº¶Ö§¡Ò÷íÒ§Ò¹àº×Íé §µŒ¹¢Í§ ¾Íϵ USB «Ö§è ÁÕ¤ÇÒÁ«Ñº«ŒÍ¹ÁÒ¡¢Ö¹é àÁ×Íè à·Õº¡Ñº¾Íϵ¢¹Ò¹áÅоÍϵ͹ءÃÁ Í‹ҧäáçµÒÁ ¡Ò÷íÒ¤ÇÒÁ ࢌÒã¨ÂѧÍÂÙ㋠¹ÇÔÊÂÑ ·ÕÊè ÒÁÒö·íÒ䴌 ËÒ¡à¾Õ§µŒÍ§ãªŒàÇÅÒ áÅоԨÒóҢŒÍÁÙÅÍ‹ҧ¶ŒÇ¹¶Õè ¡Íû¡Ñº·´Åͧà¢Õ¹ â»Ãá¡ÃÁ·´ÅͧµÒÁ¡Ò÷´Åͧ·Õ¨è Ð䴌¹Òí àʹ͵‹Íä» àª×Íè NjҨзíÒãˌÊÒÁÒöࢌÒ㨡Ò÷íÒ§Ò¹áÅÐ㪌§Ò¹¾Íϵ USB à¾×Íè àª×Íè Áµ‹Í¡ÑºÍØ»¡Ã³ä´Œã¹·ÕÊè ´Ø

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ &"


º··Õè 11

á¹Ð¹íÒà¤Ã×èͧÁ×ÍÊíÒËÃѺ¡Ò÷´Åͧ àª×è Í Áµ‹ Í ¤ÍÁ¾Ô Ç àµÍÏ ¡Ñ º ÍØ » ¡Ã³ ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¡‹Í¹¨ÐࢌÒÊً¡Ò÷´Åͧ¨íÒ໚¹Í‹ҧÂÔ觷Õè¼ÙŒ·´ÅͧµŒÍ§àµÃÕÂÁà¤Ã×èͧÁ×Í·´Åͧãˌ¾ÃŒÍÁ ÊíÒËÃѺ¡Òà ·´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB µŒÍ§ãªŒà¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³·¨Õè Òí ໚¹´Ñ§¹Õé 1. ¤ÍÁ¾ÔÇàµÍÏ·µÕè ´Ô µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ 98/ME/2000/XP áÅÐÁÕ¾Íϵ USB 2. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB 3. EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ 4. EX-03 ºÍÏ´ÊÇÔµªÍ¹Ô ¾Øµ 16 ª‹Í§ 5. EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ 6. EX-09 ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ ¼‹Ò¹¡ÒÃÊ×Íè ÊÒâŒÍÁÙÅ͹ءÃÁẺ«Ô§â¤Ã¹ÑÊ 7. à¤Ã×Íè §¨‹ÒÂ俵ç +12V 500mA ÊíÒËÃѺ¨‹ÒÂä¿àÅÕÂé §ãˌᡋºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ 8. à¤Ã×Íè §¨‹ÒÂ俵ç +5V 100mA ÊíÒËÃѺ¨‹ÒÂáç´Ñ¹·´Åͧ¡ÒÃà»ÅÕÂè ¹ÊÑ­­Ò³ÍйÒÅÍ¡ ໚¹´Ô¨µÔ ÍŢͧ U-Board 9. ÁÑŵÔÁàÔ µÍÏẺà¢çÁËÃ×ÍẺµÑÇàÅ¢ 10. ÊÒ USB 1 àʌ¹ 11. ÊÒ IDC-10 ¨íҹǹ 2 àʌ¹ 12. Êàµç»à»ÍÏÁÍàµÍÏẺÂÙ¹âÔ ¾Å‹ÒÏ 12V ¨íҹǹ 1 µÑÇ 13. ÍÐá´»àµÍÏ 9-16V 500mA (ÍØ»¡Ã³àÊÃÔÁ) â´Âã¹ÃÒ¡Ò÷Õè 2-6, 10-13 ¨Ð¨Ñ´ÁÒãˌ¾ÃŒÍÁ¡Ñ¹ã¹ AX-2000 Plus ªØ´·´Åͧ¡ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ ¡ÑºÍØ»¡Ã³ÀÒ¹͡ «Ö§è ¼ÅÔµâ´ÂºÃÔÉ·Ñ ÍÔ¹â¹àǵտ àÍç¡à¾ÍÃÔàÁ¹µ ¨íÒ¡Ñ´

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 85


11.1 U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÊ´§Ç§¨ÃÊÁºÙó¢Í§ã¹ÃÙ»·Õè 11-1 ËÑÇ㨢ͧ¡Ò÷íÒ§Ò¹·Ñ§é ËÁ´ÍÂÙ·‹ Õè IC1 «Ö§è ໚¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ẺÁÕǧ¨Ãàª×Íè Áµ‹Í¾Íϵ USB ÍÂÙÀ‹ ÒÂã¹ â´Âã¹·Õ¹è ãÕé ªŒàºÍÏ PIC16C745 ¢Í§ Microchip Technology, USA. â´ÂÀÒÂã¹ IC1 䴌·íÒ¡ÒúÃèØâ»Ãá¡ÃÁ¤Çº¤ØÁ¡Ò÷íÒ§Ò¹·Õèà¡ÕèÂÇ¢ŒÍ§¡Ñº¡ÒõԴµ‹Í¡Ñº¾Íϵ USB änjàÃÕº ÌÍÂáÅŒÇ â´ÂÃÒÂÅÐàÍÕ´¢Í§â»Ãá¡ÃÁ·Ñ§é ËÁ´ÊÒÁÒö´Ù䴌¨Ò¡ä¿Å UBOARD.BAS «Ö§è ºÃèØÍÂÙ㋠¹«Õ´ÃÕ ÍÁ¡Ã³Õ ·ÕÁè ¡Õ ÒèѴ«×Íé U-Board ËÃ×Í AX-2000 plus ʋǹàª×Íè Áµ‹Í¡Ñº¾Íϵ USB ¢Í§ IC1 ¤×Í¢Ò 15 áÅÐ 16 ¨Ðµ‹ÍࢌҡѺ¤Í¹à¹ç¡àµÍÏ K1 «Ö§è ໚¹¤Í¹ à¹ç¡àµÍÏ USB Ẻ B â´ÂÁÕµÇÑ µŒÒ¹·Ò¹¨íÒ¡Ñ´¡ÃÐáÊ 2 µÑǤ×Í R6 áÅÐ R7 ¨ÑÁê à»ÍÏ JP1 POWER SUPPLY 㪌ÊÒí ËÃѺàÅ×Í¡áç´Ñ¹ä¿àÅÕÂé §¨Ò¡ÀÒ¹͡ËÃ×ͨҡ¾Íϵ USB «Ö§è ¡ÒÃàÅ×͡㪌áËŋ§¨‹ÒÂä¿¹Ñ¹é µŒÍ§¾Ô¨ÒóҨҡ ÍØ»¡Ã³·¹Õè Òí ÁÒµ‹Í¾‹Ç§¡Ñº U-Board ËÒ¡¹íÒ U-Board 仢ѺâËÅ´·Õ¡è ÃÐáÊÃÇÁäÁ‹ÁÒ¡¡Ç‹Ò 100mA ¡çÊÒÁÒö㪌 ä¿àÅÕÂé §¨Ò¡¾Íϵ USB 䴌àÅ ᵋ¶ÒŒ ÁÒ¡¡Ç‹Ò¹Ñ¹é ¤ÇÃ㪌áËŋ§¨‹ÒÂä¿àÅÕÂé §¨Ò¡ÀÒ¹͡ «Ö§è º¹ U-Board 䴌àµÃÕÂÁ áËŋ§¨‹ÒÂä¿ +5V änjãˌáÅŒÇ Ç§¨Ãàª×Íè Áµ‹Í¾Íϵ USB ¢Í§ PIC16C745 ä´ŒÃºÑ ¡ÒáíÒ˹´ãˌ·Òí §Ò¹ã¹Áҵðҹ USB 1.0/1.1 ´ŒÇ¤ÇÒÁàÃçǵèíÒ (low speed USB device) ´Ñ§¹Ñ鹡ÒþѲ¹Òâ»Ãá¡ÃÁ·Ñé§ËÁ´¨Ö§µŒÍ§ÍŒÒ§ÍÔ§º¹Áҵðҹ USB1.0/1.1 ¹Õàé ·‹Ò¹Ñ¹é Í‹ҧäáçµÒÁ º¹ U-Board 䴌àµÃÕÂÁǧ¨ÃÊíÒËÃѺàÅ×Í¡ãˌ໚¹ÍØ»¡Ã³ USB ¤ÇÒÁàÃçÇ Ê٧䴌ã¹Í¹Ò¤µ «Ö§è ËÑÇ㨢ͧ¡ÒÃà»ÅÕÂè ¹á»Å§¤×Í µÑÇäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ´ŒÒ¹¾ÍϵÍÔ¹¾ØµàÍÒµ¾µØ ÊíÒËÃѺàª×Íè Áµ‹Í¡ÑºÍØ»¡Ã³ÀÒ¹͡¢Í§ U-Board 䴌àµÃÕÂÁänj 4 ʋǹ´ŒÇ ¡Ñ¹¤×Í ¾ÍϵÍÔ¹¾Øµ (PORTIN), ¾ÍϵàÍÒµ¾µØ (PORTOUT), ¾Íϵ SHIFTOUT áÅоÍϵÍÔ¹¾ØµÇ§¨Ã á»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ (A/D input) â´Âã¹Ê‹Ç¹¢Í§¾Íϵ´Ô¨µÔ ÍÅ 2 ¾Íϵáá¹Ñ¹é ä´ŒÃºÑ ¡Òà ¨Ñ´ÊÃÃãˌ໚¹àÍç¹´¾Íµ 1 ʋǹǧ¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ໚¹àÍç¹´¾Íµ 2 ¡ÒÃ͋ҹáÅÐ à¢Õ¹¾Íϵ´Ô¨µÔ ÍÅ¹Ñ¹é ¨Ð¡ÃзíÒ¼‹Ò¹äÍ«Õ 74HC573 â´Â¨ÐÁÕ¢ÒÊÑ­­Ò³ÊíÒËÃѺáŵªËÃ×Í´íÒ礋ҾÍϵ¹Ñ¹é änj ¹Ñ¹è ¤×Í¢Ò LE áÅÐ RD àÁ×Íè µŒÍ§¡ÒÃʋ§¢ŒÍÁÙÅÍÍ¡ IC1 ¨Ðʋ§¢ŒÍÁÙÅÍÍ¡·Ò§¢Ò D0-D7 áŌǵÒÁ´ŒÇÂʋ§ÊÑ­­Ò³ LE ä»Âѧ IC2 àºÍÏ 74HC573 ¢ŒÍÁÙŨ֧¨Ðä»»ÃÒ¡¯·Õàè ÍÒµ¾µØ K2 PORTOUT 㹡óշÃÕè ºÑ ¢ŒÍÁÙÅ´Ô¨µÔ ÍŠࢌҨҡ¾Íϵ K3 PORTIN ¨Ðà¡Ô´¢Ö¹é àÁ×Íè IC1 ʋ§ÊÑ­­Ò³ RD ä»Âѧ IC3 àºÍÏ 74HC541 ¢ŒÍÁÙŨҡ¾Íϵ PORTIN ¡ç¨ÐࢌÒÁÒ»ÃÒ¡¯·Õ¢è Ò D0-D7 ¢Í§ IC1 ÀÒÂã¹ IC1 ÁÕǧ¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ¢¹Ò´ 10 ºÔµ ¨íҹǹ 5 ª‹Í§ ¨Ö§ä´Œ¹Òí ¤Ø³ÊÁºÑµÔ ¾ÔàÈɹѹé ÁÒÊÌҧ໚¹Ç§¨Ã·´Åͧ¡ÒÃá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ´ŒÇ â´Âµ‹ÍµÑǵŒÒ¹·Ò¹»ÃѺ¤‹Ò䴌à¾×Íè »‡Í¹áç´Ñ¹·´Åͧº¹ºÍϴ䴌·¹Ñ ·Õ 2 ª‹Í§ áÅÐÍÕ¡ 3 ª‹Í§·Õàè ËÅ×͵‹ÍࢌҡѺà·ÍÏÁ¹Ô ÍźÅçÍ¡à¾×Íè ÃѺÊÑ­­Ò³ ¨Ò¡ÀÒ¹͡ U-Board ໚¹ÍØ»¡Ã³àª×Íè Áµ‹Í¾Íϵ USB ·Õäè ´ŒÃºÑ ¡ÒÃÍ͡Ẻãˌ·Òí §Ò¹ã¹ÃдѺ HID Class ¤ÇÒÁ àÃçǵèÒí ·íÒãˌäÁ‹ÊÒÁÒöµ‹Í¾‹Ç§ U-Board 䴌ÁÒ¡¡Ç‹Ò 1 ºÍÏ´º¹ÃкººÑʢͧ¾Íϵ USB ä¿àÅÕÂé §¢Í§ U-Board àÅ×͡䴌¨Ò¡ÀÒ¹͡ËÃ×ͨҡ¾Íϵ USB 㹡óÕ㪌¨Ò¡ÀÒ¹͡ ÊÒÁÒöÃѺáç ´Ñ¹ä´Œµ§Ñé ᵋ 9-16V áç´Ñ¹·Õ»è ͇ ¹à¢ŒÒÁÒ¹Ñ¹é ¨Ð¶Ù¡Ê‹§à¢ŒÒÊÙä‹ Í«Õ 7805 à¾×Íè ¤Çº¤ØÁãˌ䴌áç´Ñ¹¤§·Õ·è Õè +5V ÊíÒËÃѺ àÅÕÂé §ÍØ»¡Ã³º¹ U-Board áÅкÍÏ´µ‹Í¾‹Ç§·Õ¹è Òí ÁÒµ‹ÍËÇÁ´ŒÇ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 86


+5V

USB SPEED

POWER SUPPLY

5V. DC.IN

DC.IN

20 R5 1k5

LOW

BUS POLYSWITCH RUSB075

R6-R7 27

+5V

CH.0 VR1 10k

15

V USB

RST

D0

D-

D1

D+

D2

2 3

4

CH.2

5

CH.3

7

CH.4

CERAMIC RESONATOR 6MHz

GND

10 9

CH.0 CH.1

CH.2

RPACK1 10k*8

C7 47/16V +5V

20 2

27

3

26

4

D0

D0

D1

18

D1

D2

D3

17

D2

D4

D5

16 Q3 15 Q4 14 Q5 13 Q6 12 Q7

D3 D4

D6

D7

Q0

D1

Q1

D2

Q2

+5V

17 16

CH.4

15

X2 RD SHF_LE

IC3 74HC541

K2 PORTOUT (EP1OUT)

D6 D7

+5V D0

D0

D1

3

D1

D2

D3

4

D2

D4

D5

5 D3 6 D4 7 D5 8 D6 9 D7

D3 D4

D6

D7

D0

Q1

D1

Q2

RPACK2 220k*8

2

Q0

D2

Q3 14 Q4 13 Q5 12 Q6 11 Q7

X1

D5

10

20 18

+5V

19

11 1

CH.3

LED1 READY

IC2 74HC573

D0

5 D3 6 D4 7 D5 8 D6 9 D7

VID : 0x04D8 PID: 0xFFFF VER: 0x0100

+5V

R8 1k

28

IC1 U-BOARD USB 1.0/1.1 INTERFACE FIRMWARE

LE +5V LED2 POWER

C1 0.1/50V

1

25 D3 24 D4 23 D5 22 D6 21 D7

C2 0.1/50V

CH.1 VR2 10k

5 CH. 8 BIT A/D (EP2IN/OUT)

R1 10k

VCC

+5V

16

K1 USB PORT

K5 A/D INPUT

14

(*FULL)

1 2 3 4

U-BOARD USB1.0/1.1 INTERFACE BOARD

* FULL SPEED RESERVED FOR FUTURE USB MICROCHIP PIC18F2x50 ONLY

+5V

D5

K3 PORTIN (EP1IN)

D6 D7

17 19 1

18

10

12 +5V

R2 1k

SHF_CLK 6

R3 10k

SHF_DO

11 13

LE

DO

RST

K4 SHIFTOUT (EP1OUT)

READY GND 19

CLK

8 TR1 BC547

R4 47k

D1-D4 1N4001x4

K6 EXTERNAL DC. INPUT

IC4 7805 C3 220/16V

C4 0.1/50V

5V. DC.IN C5 10/16

C6 0.1/50

ÃÙ»·Õè 11-1 ǧ¨ÃÊÁºÙó¢Í§ U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 87


11.2 «ÍÏÊâ»Ãá¡ÃÁ¢Í§ U-Board ÃÒÂÅÐàÍÕ´¢Í§â»Ãá¡ÃÁ¤Çº¤ØÁ¡Ò÷íÒ§Ò¹·Ñé§ËÁ´¢Í§ U-Board ·ÕèºÃèØã¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ PIC16C745 ÊÒÁÒö´ÙÃÒÂÅÐàÍÂմ䴌¨Ò¡ä¿Åâ»Ãá¡ÃÁËÅÑ¡¤×Í UBOARD.BAS Íѹ໚¹â»Ãá¡ÃÁÀÒÉÒàºÊÔ¡ ·Õ¨è еŒÍ§¤ÍÁä¾Å´ÇŒ  PIC BASIC PRO V2.41 ʋǹâ»Ãá¡ÃÁ»ÃСͺËÃ×Í Included file ¹Ñ¹é »ÃСͺ´ŒÇ USB_CH9.ASM â»Ãá¡ÃÁ¨Ò¡º··Õè 9 ¢Í§¤ÙÁ‹ Í× ¤Ø³ÊÁºÑµ·Ô ҧ෤¹Ô¤¢Í§¾Íϵ USB «Öè§ÃÒÂÅÐàÍÕ´·Ñé§ËÁ´ä´ŒÃѺ¡ÒúÃèØŧã¹á¼‹¹«Õ´ÕÃÍÁ·ÕèÁҾÌÍÁ¡ÑºË¹Ñ§Ê×ÍàŋÁ¹Õé HIDCLASS.ASM â»Ãá¡ÃÁ¡íÒ˹´¤ÅÒÊ HID ãËŒá¡‹Í»Ø ¡Ã³ «Ö§è ã¹·Õ¹è ¤Õé Í× U-Board USB_DEFS.INC ä¿ÅÃǺÃÇÁ¢ŒÍÁÙÅáÅйÔÂÒÁ¢Í§µÑÇá»Ã·Õãè ªŒ¢Í§¾Íϵ USB ÃÇÁ¶Ö§ ÃÒÂÅÐàÍÕ´¢Í§¡ÒáíÒ˹´àÍç¹´¾Íµ (USB Defined data and ENDPOINT implement) USBDECS.ASM ä¿ÅÊÒí ËÃѺ»ÃѺ´ÔʤÃÔ»àµÍϢͧ USB (Relocate descriptor file) UBOARD_D.ASM â»Ãá¡ÃÁ¡íÒ˹´´ÔʤÃÔ»àµÍÏᡋ U-Board à¢Õ¹໚¹ÀÒÉÒáÍÊà«ÁºÅÕ â´ÂÃÒÂÅÐàÍÕ´¢Í§«ÍÏÊâ»Ãá¡ÃÁ·Ñ§é ËÁ´ÊÒÁÒö´Ù䴌㹫մÃÕ ÍÁ¢Í§ U-Board áÅЪش·´Åͧ AX2000 plus

11.3 ºÍÏ´ÍØ»¡Ã³Í¹Ô ¾ØµàÍÒµ¾µØ ·Õãè ªŒÃNj Á㹡Ò÷´Åͧ 11.3.1 EX-01 : ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ ºÍÏ´ EX-01 áÊ´§Ç§¨Ã´Ñ§ã¹ÃÙ»·Õè 11-2 àª×Íè Áµ‹Í¡Ñº U-Board ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ DATA BUS â´Âµ‹ÍࢌҡѺ¤Í¹à¹ç¡àµÍÏ PORTOUT (EP1OUT) ¢Í§ U-Board º¹ºÍÏ´ÁÕ LED ÍÂÙ·‹ §Ñé ËÁ´ 16 ´Ç§ ẋ§ ໚¹ 2 ªØ´ ªØ´ÅÐ 8 ´Ç§ ¢Ñºãˌ·Òí §Ò¹¼‹Ò¹·Ò§äÍ«Õº¿Ñ à¿ÍÏàºÍÏ 74HC541 â´Âä´ŒÃºÑ ä¿àÅÕÂé §ÁÒ¨Ò¡ÃкººÑÊ ÊíÒËÃѺ»ÃÐ⪹¢Í§ºÍÏ´ EX-01 ¤×Í㪌áÊ´§¼ÅàÍÒµ¾µØ µ‹Ò§æ ¢Í§ P-Board àÁ×Íè ä´ŒÃºÑ ¡ÒÃÊÑ§è §Ò¹¨Ò¡ ¤ÍÁ¾ÔÇàµÍÏ â´Â¡ÒÃàª×Íè Áµ‹ÍÃÐËNjҧºÍÏ´ EX-01 ¡Ñº U-Board ¨Ð㪌ÊÒÂàª×Íè Áµ‹ÍẺ IDC-10

11.3.2 EX-03 : ºÍÏ´ÊÇÔµªÍ¹Ô ¾Øµ ºÍÏ´ EX-03 ÁÕǧ¨ÃáÊ´§´Ñ§ÃÙ»·Õè 11-3 º¹ºÍÏ´ EX-03 ÁÕÊÇÔµª¡´µÔ´»Å‹Í´ѺáÅдԻÊÇÔµªÍ‹ҧ ÅÐ 8 ¨Ø´ ã¹ÊÀÒÇл¡µÔ·äÕè Á‹ä´Œ¡´ÊÇÔµªËÃ×ÍàÅ×Íè ¹´Ô»ÊÇÔµªãˌ ON Åͨԡ·Õàè ÍÒµ¾µØ ¢Í§ÊÇÔµª¨Ð໚¹Åͨԡ “1” à¹×Íè §¨Ò¡µ‹ÍµÑǵŒÒ¹·Ò¹¤‹Ò 10kW ¾ÙÅÍÑ»àÍÒänj àÁ×Íè ÁÕ¡Òá´ÊÇÔµª¨Ð໚¹¡Òõ‹Í¢Ò¢Í§ÊÇÔµªÅ§¡ÃÒÇ´ ·íÒãˌÁ ÊÕ ¶Ò¹ÐÅͨԡàÁ×Íè ¡´ÊÇÔµªà·‹Ò¡Ñº “0” ºÍÏ´ EX-03 Í͡ẺÁÒãˌ㪌ÊíÒËÃѺÊÌҧÊÑ­­Ò³´Ô¨ÔµÍÅÍÔ¹¾Øµà¾×èÍʋ§à¢ŒÒä»Âѧ¾Íϵ¢Í§ ¤ÍÁ¾ÔÇàµÍÏ â´ÂÅѡɳТͧÊÑ­­Ò³ÍÔ¹¾ØµÁÕ 2 ÅѡɳФ×Í à»š¹ÊÑ­­Ò³¢ŒÍÁÙŤ§·ÕèáÅÐ໚¹ÊÑ­­Ò³¾ÑÅʏ â´Â´Ô»ÊÇÔµªº¹ºÍÏ´ EX-03 ¨Ð·íÒ˹ŒÒ·ÕÊè Ìҧ¢ŒÍÁÙÅ¢¹Ò´ 8 ºÔµ·Õ¤è §·Õè ¨¹¡Ç‹Ò¨ÐÁÕ¡ÒÃà»ÅÕÂè ¹á»Å§ ã¹¢³Ð·Õè ÊÇÔµª¡´µÔ´»Å‹Í´Ѻ¨Ðãˌʭ Ñ ­Ò³ÍÔ¹¾Øµà»š¹áºº¾ÑÅʏ ¡Å‹ÒǤ×Í àÁ×Íè ¡´áÅлŋÍÂÊÇÔµª ¨Ðà¡Ô´¾ÑÅʏ 1 ÅÙ¡ ʋ§ÍÍ¡ä»ÂѧàÍÒµ¾Øµ¢Í§ºÍÏ´µ‹Íä» ºÍÏ´ EX-03 Áդ͹à¹ç¡àµÍÏÊÒí ËÃѺʋ§ÊÑ­­Ò³ÍÍ¡ 2 ªØ´ ¨Ñ´¢ÒãˌࢌҡѺ¤Í¹à¹ç¡àµÍÏ DATA BUS ¢Í§ P-Board, UART IN ¢Í§ S-Board áÅÐ PORTIN (EP1IN) ¢Í§ U-Board àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 88


K102

K103

DATA BUS #1

DATA BUS #2

(UIC-10)

EX-01 LED display board

(UIC-10)

+5V D0 D2 D4 D6

+5V

D1 D3 D5 D7

D0 D2 D4 D6

D1 D3 D5 D7

K101

P-BUS (IDC-20)

+5V

+5V

1

,%

19

3%

3$ 3# 3" 3! 3

R108

10

3 3

3%

18 17 16 15 14 13 12 11

R101

2 3 4 5 6 7 8 9 ,$ ,# ," ,! ,

C102 0.1/50V

19

C0 C1 C2 C3

20

, ,

,%

3$ 3# 3" 3! 3

10

3 3

C101 0.1/50V

,$ ,# ," ,! ,

D1 D3 D5 D7 C1 C3

IC101 74HC541 1

2 3 4 5 6 7 8 9

20

, ,

D0 D2 D4 D6 C0 C2

+5V

18 17 16 15 14 13 12 11

R116

R109

R101-R108 220 x8 LED101

LED108

R109-R116 220 x8 LED109

D0 D1 D2 D3 D4 D5 D6 D7

IC102 74HC541

LED116

D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3

EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§

LED áÊ´§¼Åẋ§à»š¹ 2 ʋǹ ʋǹÅÐ 8 ª‹Í§ l ÁÕǧ¨ÃºÑ¿à¿ÍÏÊÒí ËÃѺ¢Ñº LED l ¤Í¹à¹ç¡àµÍÏ DATA BUS ÊíÒËÃѺàª×Í è Áµ‹Í¡Ñº U-Board l

ÃÙ»·Õè 11-2 ǧ¨ÃÊÁºÙó¢Í§ EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ S301 D0

R301 10k*8

+5V K301 DATA BUS

S309 DIP SW.-8

(UIC-10)

S302 D1 S303 D2

+5V R302 10k*8

K302 DATA BUS (UIC-10)

+5V D0 D2 D4 D6

S304 D3 S305 D4 S306 D5 S307 D6

D1 D3 D5 D7

+5V D0 D2 D4 D6

D1 D3 D5 D7

S308 D7 EX-03 Switch input board

EX-03 ºÍÏ´ÊÇÔµª 16 ª‹Í§

´Ô»ÊÇÔµª 8 ª‹Í§ ¾ÃŒÍÁµÑǵŒÒ¹·Ò¹¾ÙÅÍÑ» l ÊÇÔµª¡´µÔ´»Å‹Í´Ѻ 8 ª‹Í§¾ÃŒÍÁµÑǵŒÒ¹·Ò¹¾ÙÅÍÑ» l ¤Í¹à¹ç¡àµÍÏ DATA BUS ÊíÒËÃѺàª×Í è Áµ‹Í¡Ñº U-Board l

ÃÙ»·Õè 11-3 ǧ¨Ã¢Í§ EX-03 ºÍÏ´ÊÇÔµªÍ¹Ô ¾Øµ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 89


11.3.3 EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ ¡Ò÷´Åͧ㹺·¹Õ¨é Ð㪌 EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏẺÂÙ¹âÔ ¾Å‹ÒÏ»ÃСͺ㹡Ò÷´Åͧà¾×Íè ¢ÑºÊàµç»à»ÍÏÁÍàµÍϼҋ ¹·Ò§¾Íϵ¢¹Ò¹¢Í§¤ÍÁ¾ÔÇàµÍÏ â´ÂºÍÏ´ EX-05 ÁÕ¡ÒÃá¡¡ÃÒÇ´·Ò§ä¿¿‡Ò¢Í§ ʋǹÍÔ¹¾Øµ·Õàè ª×Íè Áµ‹Í¡Ñº¾Íϵ¢¹Ò¹¢Í§¤ÍÁ¾ÔÇàµÍÏáÅÐàÍÒµ¾µØ ·Õàè ª×Íè Áµ‹Í¡ÑºÊàµç»à»ÍÏÁÍàµÍÏÍÍ¡¨Ò¡¡Ñ¹ áŌÇ㪌¡ÒÃàª×Íè Áµ‹Í·Ò§áʧâ´ÂÍØ»¡Ã³·àÕè ÃÕÂ¡Ç‹Ò Íͻⵌ¤»Ñ à»ÅÍÏ 㹡Òö‹Ò·ʹÊÑ­­Ò³¤Çº¤ØÁ ǧ¨Ã¢Í§ ºÍÏ´ EX-05 áÊ´§ã¹ÃÙ»·Õè 11-4 ÊÑ­­Ò³ÍÔ¹¾ØµÁÒ¨Ò¡¤Í¹à¹ç¡àµÍÏ DATA BUS «Ö§è µ‹ÍࢌҡѺ¤Í¹à¹ç¡àµÍÏ PORTOUT (EP1OUT) ¢Í§ U-Board áŌÇʋ§ä»¢Ñº LED ÍÔ¹¿ÃÒàô«Ö§è ÍÂÙÀ‹ ÒÂã¹Íͻⵌ¤»Ñ à»ÅÍÏ IC501IC504 â´Â¼‹Ò¹µÑǵŒÒ¹·Ò¹ R501-R504 à¾×Íè ¨íÒ¡Ñ´¡ÃÐáÊãˌ¡ºÑ LED ã¹¢³Ð·Õàè ÍÒµ¾µØ ¢Í§Íͻⵌ¤»Ñ à»ÅÍÏ ¨Ðµ‹ÍࢌҡѺ·ÃÒ¹«ÔÊàµÍÏ Q501-Q504 àºÍÏ BD139 à¾×Íè ¢ÑºÁÍàµÍϵ͋ ä» àÁ×Íè »‡Í¹Åͨԡ “1” ãˌ¡ºÑ Íͻⵌ¤»Ñ à»ÅÍÏ ¨Ð·íÒãˌ LED ÀÒÂã¹Íͻⵌ¤»Ñ à»ÅÍÏ·Òí §Ò¹ ¡ÃеعŒ ãˌ â¿âµŒ·ÃÒ¹«ÔÊàµÍÏÀÒÂã¹Íͻⵌ¤»Ñ à»ÅÍÏ·Òí §Ò¹ à¡Ô´áç´Ñ¹¼‹Ò¹µÑǵŒÒ¹·Ò¹»‡Í¹à¢ŒÒ·Õ¢è ÒàºÊ¢Í§·ÃÒ¹«ÔÊàµÍÏ ·íÒãˌ·ÃÒ¹«ÔÊàµÍÏ BD139 ¹íÒ¡ÃÐáÊ àÊÁ×͹NjҢ´ÅÇ´´ŒÒ¹Ë¹Ö§è ¶Ù¡µ‹Íŧ¡ÃÒÇ´ ¨Ö§à¡Ô´¡ÃÐáÊäËż‹Ò¹¢´ÅÇ´ ·íÒãˌà¡Ô´¡ÒÃËÁع¢Öé¹ ¡ÒÃËÁع¢Í§Êàµç»à»ÍÏÁÍàµÍϨÐ໚¹Í‹ҧäà ¢Öé¹ÍÂً¡Ñº¢ŒÍÁÙÅ·Õ軇͹ãˌᡋǧ¨Ã¢Ñºº¹ ºÍÏ´ EX-05 ¹Õé ÊíÒËÃѺä¿àÅÕÂé §¢Í§Êàµç»à»ÍÏÁÍàµÍϨÐá¡ÍÍ¡¨Ò¡Ç§¨ÃÍÔ¹¾Øµ·Õàè ª×Íè Áµ‹Í¡Ñº U-Board â´ÂµŒÍ§»‡Í¹ áç´Ñ¹µÒÁ¾Ô¡´Ñ ¢Í§ÁÍàµÍÏ ᵋµÍŒ §äÁ‹à¡Ô¹ 30V ¡ÃÐáÊä¿¿‡Ò»ÃÐÁÒ³ 1A

11.3.4 EX-06 plus ºÍÏ´¢ÑºÃÕàŏ 8 ª‹Í§ º¹ºÍÏ´¨ÐÁÕÃàÕ Åãˌ㪌§Ò¹ÁÒ¡¶Ö§ 8 µÑÇ ãªŒäÍ«Õ ULN2803 㹡ÒâѺ â´Âǧ¨Ã¢Í§ºÍÏ´ EX-06 plus áÊ´§ã¹ÃÙ»·Õè 11-5 ·íÒ˹ŒÒ·Õàè »š¹Ç§¨Ã¢Ñº â´Â¶ŒÒ¼Ù㌠ªŒ§Ò¹µŒÍ§¡ÒÃ㪌§Ò¹ÃÕàŏµÇÑ ã´¡çãˌ㪌¨ÁÑê à»Íϵ͋ ã¹µíÒ á˹‹§¹Ñ¹é ¡ÒäǺ¤ØÁÃÕàŏãˌ·Òí §Ò¹ÊÒÁÒö㪌ʭ Ñ ­Ò³¨Ò¡¤Í¹à¹ç¡àµÍÏ PORTOUT º¹ U-Board ËÑÇ㨢ͧºÍÏ´¹Õ¤é Í× ULN2803 «Ö§è ໚¹äÍ«ÕÍ¹Ô àÇÍÏàµÍÏä´ÃàÇÍÏ 8 µÑÇ ¢ÒÍÔ¹¾Øµ·Ñ§é ËÁ´µ‹Í¡Ñº¨ÑÁê à»ÍÏ JP601-JP608 à¾×è Í ãªŒ ã ¹¡ÒÃàÅ× Í ¡Ç‹ Ò µŒ Í §¡ÒäǺ¤Ø Á ÃÕ à ŏ µÑ Ç ã´ â´Â JP601 㪌 àÅ×Í¡µÔ´µ‹Í¡ÑºÃÕàŏ RY601 ËÃ×ÍÃÕàŏµÇÑ ·Õè 1 àÃÕ§ÅíҴѺ仨¹¶Ö§ JP608 㣌àÅ×Í¡¡ÒõԴµ‹Í¡Ñº RY608 ËÃ×Í ÃÕàŏµÇÑ ·Õè 8 ÍÕ¡´ŒÒ¹Ë¹Ö§è ¢Í§¨ÑÁê à»ÍϨе‹ÍࢌҡѺ¤Í¹à¹ç¡àµÍÏ DATA BUS à¾×Íè àª×Íè Áµ‹Í¡Ñº U-Board à¾×Íè ·íÒ¡ÒäǺ¤ØÁµ‹Íä»

11.3.5 EX-09 ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ â´Â㪌¡ÒÃÊ×Íè ÊÒÃ͹ءÃÁẺ«Ô§â¤Ã¹ÑÊ ÁÕǧ¨ÃÊÁºÙóáÅФسÊÁºÑµáÔ Ê´§ã¹ÃÙ»·Õè 11-6 ºÍÏ´¹ÕÊé ÒÁÒö¢ÂÒ¾ÍϵàÍÒµ¾µØ 䴌ÁÒ¡¶Ö§ 16 ª‹Í§ (ËÃ×ͺԵ) µ‹ÍË¹Ö§è ºÍÏ´áÅÐÊÒÁÒöµ‹Í¾‹Ç§ä´ŒÍ‹ҧäÁ‹¨Òí ¡Ñ´ÀÒÂ㵌à§×Íè ¹ä¢´Ñ§·Õäè ´Œ¡Å‹ÒÇÁÒáŌÇã¹ËÑÇ¢ŒÍ·Õ¼è ҋ ¹ ÁÒ ËÑÇã¨ÊíҤѭ¤×Í äÍ«Õª¿Ô µÃ¨Õ ÊÔ àµÍÏàºÍÏ 74HC595 «Ö§è ໚¹ªÔ¿µÃ¨Õ ÊÔ àµÍÏẺÍ๡¡»ÃÐʧ¤ÊÒÁÒöÃѺ ¢ŒÍÁÙÅࢌÒẺ͹ءÃÁ áÅÐʋ§¢ŒÍÁÙÅÍ͡䴌·Ñé§áºº¢¹Ò¹áÅÐ͹ءÃÁ ·Ñé§ÂѧÊÒÁÒöµ‹Í¾‹Ç§ä´ŒäÁ‹Ãٌ¨ºÍÕ¡´ŒÇ ÀÒÂã¹ 74HC595 ÁÕÃ¨Õ ÊÔ àµÍÏ¢¹Ò´ 8 ºÔµºÃèØÍÂً 1 µÑÇ ¨Ö§·íÒãˌÊÒÁÒö㪌§Ò¹¡Ñº¢ŒÍÁÙÅ¢¹Ò´ 8 ºÔµä´ŒÍ‹ҧ àËÁÒÐÊÁ áÅÐàÁ×Íè ¹íÒÁÒ¾‹Ç§¡Ñ¹´Ñ§·Õãè ªŒã¹ºÍÏ´ EX-09 ¡ç¨ÐÊÒÁÒöÃͧÃѺ¢ŒÍÁÙÅ䴌ÁÒ¡¶Ö§ 16 ºÔµ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 90


+V

R501 510 1

5

D501 1N4001

IC501 4N25 2

R506 1k

4

K501 DATA BUS (UIC-10)

D0 D2

Q501 BD139

R505 1k

+5V D1 D3

+V

R502 510 1

5

2

4

D502 1N4001

IC502 4N25

+V

R508 1k

Q502 BD139

P1 P2

R507 1k

P3 P4 K502

+V

R503 510 1

5

D503 1N4001

IC503 4N25 2

STEPPER MOTOR

R510 1k

4

Q503 BD139

R509 1k

+V

R504 510 1

5

2

4

D504 1N4001

IC504 4N25

R512 1k

Q504 BD139

R511 1k

EX-05 Stepper motor driver board

EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ l ¢ÑºÊàµç»à»ÍÏÁÍàµÍÏẺÂÙ¹âÔ ¾Å‹Òϵ§Ñé ᵋ

5-24V

¡ÃÐáÊÊÙ§ÊØ´ 1.5A l 㪌áËŋ§¨‹ÒÂä¿ÁÍàµÍÏᡵ‹Ò§ËÒ¡ â´ÂÁÕ¡ÒÃá¡ ¡ÃÒÇ´¢Í§ÊÑ­­Ò³¤Çº¤ØÁ¡Ñºä¿àÅÕÂé §ÁÍàµÍÏÍÍ¡¨Ò¡¡Ñ¹ ´ŒÇÂÍͻⵌ¤»Ñ à»ÅÍÏ l ¤Í¹à¹ç¡àµÍÏ DATA BUS ÊíÒËÃѺàª×Í è Áµ‹Í¡Ñº U-Board

ÃÙ»·Õè 11-4 ǧ¨ÃÊÁºÙó¢Í§ EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏẺÂÙ¹âÔ ¾Å‹ÒÏ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 91


RY1 RELAY 12V +12V

K1

+12V

,)6)*75 +5V D0 D2 D4 D6

JP1

D1 D3 D5 D7

JP8

R1 1.8k

10 1 2 3 4 5

D0

Q0

D1

Q1

D2

Q2

D3 D4 6 D5 7 D6 8 D7

IC1 ULN2803

NO C NC

LED1

(UIC-10)

18 17 16 15 14

+12V

Q3 Q4 13 Q5 12 Q6 11 Q7

RY2 RELAY 12V

LED2

RY3 RELAY 12V

R3 1.8k

K2-2

RY4 RELAY 12V +12V

R4 1.8k

K2-4

RY5 RELAY 12V +12V

K2-5

R5 1.8k RY6 RELAY 12V +12V

K2-7

R6 1.8k RY7 RELAY 12V +12V

R7 1.8k RY8 RELAY 12V LED8 R8 1.8k

K3-7 RELAY OUT #7

NO C NC

LED7

+12V

K3-6 RELAY OUT #6

NO C NC

LED6

K2-8

K3-5 RELAY OUT #5

NO C NC

LED5

K2-6

K3-4 RELAY OUT #4

NO C NC

LED4

K2-3

K3-3 RELAY OUT #3

NO C NC

LED3

K2-1

K3-2 RELAY OUT #2

NO C NC

R2 1.8k

9

K3-1 RELAY OUT #1

K3-8 RELAY OUT #8

NO C NC

¢ÑºÃÕàŏ¢¹Ò´ 12V ¾Ô¡´Ñ ˹ŒÒÊÑÁ¼ÑÊ 220Vac 5A l 㪌áËŋ§¨‹ÒÂä¿ +12V 1A ÊíÒËÃѺÃÕàŏᡵ‹Ò§ËÒ¡ l àÅ×Í¡¢ÑºÃÕàŏ䴌 8 µÑÇ´ŒÇ¡ÒÃ㪌¨Á Ñê à»ÍÏ l ¤Í¹à¹ç¡àµÍÏ DATA BUS ÊíÒËÃѺàª×Í è Áµ‹Í¡Ñº U-Board l

ÃÙ»·Õè 11-5 ǧ¨ÃÊÁºÙó¢Í§ EX-06 plus ºÍÏ´ÃÕàŏ 8 ª‹Í§ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 92


+5V

R901-R904 470k

+5V

C901 0.1/50V

+5V

16 14

+5V

11

LE RST

CLK DI

12 10

9 K901 SHIFTIN

D0

15 Q0 1 SCK Q1 2 LE Q2 3 RST Q3 4 Q4 5 Q5 6 SO Q6 7 Q7 OE SI

13

8

D1 D2 D3 D4 D5

D0 D2

D1 D3

D4 D6

D5 D7 K902 OUTL

D6 D7

IC901 74HC595A

+5V

C902 0.1/50V

+5V

16 14

+5V CLK DO

11

LE RST

12 10

9 K904 SHIFTOUT

D8

15

Q0 1 SCK Q1 2 LE Q2 3 RST Q3 4 Q4 5 Q5 6 SO Q6 7 Q7 OE SI

8

13

D9 D11 D13 D15

D8 D10 D12 D14

D9 D10 D11 D12 D13

K903 OUTH

D14 D15 IC902 74HC595A

EX-09 ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ

ÊÒÁÒö¢ÂÒ¾ÍϵàÍÒµ¾µØ 8 ºÔµ 2 ªØ´ ÃÇÁ໚¹ 16 ºÔµ l 㪌äÍ«Õª¿ Ô µÃ¨Õ ÊÔ àµÍÏ㹡Ò÷íÒ§Ò¹ l µ‹Í¾‹Ç§à¾×Í è ¢ÂÒÂ䴌äÁ‹¨Òí ¡Ñ´ (á¹Ð¹íÒäÁ‹¤ÇÃà¡Ô¹ 4 ºÍÏ´) l àª×Í è Áµ‹Í¡Ñº U-Board ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ SHIFTOUT l

ÃÙ»·Õè 11-6 ǧ¨ÃÊÁºÙó¢Í§ EX-09 ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ U-Board

SHIFT OUT

OUTH

EX-09

SHIFT IN

OUTL

¾ÍϵàÍÒµ¾µØ ·Õ¢è ÂÒÂà¾ÔÁè àµÔÁ ¨íҹǹ 16 ºÔµµ‹ÍºÍÏ´

SHIFT OUT

EX-09

OUTH

SHIFT IN

SHIFT OUT

µ‹Íä»Âѧ¾Íϵ USB ¢Í§¤ÍÁ¾ÔÇàµÍÏ

OUTL

¾ÍϵàÍÒµ¾µØ ·Õ¢è ÂÒÂà¾ÔÁè àµÔÁ ¨íҹǹ 16 ºÔµµ‹ÍºÍÏ´

ÃÙ»·Õè 11-7 áÊ´§¡Òõ‹Í¾‹Ç§ºÍÏ´ EX-09 à¾×Íè à¾ÔÁè ¨íҹǹ¾ÍϵàÍÒµ¾µØ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 93


ÊÑ­­Ò³¢ŒÍÁÙÅ͹ءÃÁáÅФǺ¤ØÁ¨Ðʋ§¼‹Ò¹ÁÒ¨Ò¡¤Í¹à¹ç¡àµÍÏ SHIFT IN «Ö§è ÁÕ¡ÒèѴ¢ÒµÒÁÁҵà °Ò¹ UIC-10 ¨Ö§·íÒãˌÊÒÁÒöµ‹ÍࢌҡѺ¤Í¹à¹ç¡àµÍÏ SHIFTOUT ¢Í§ U-Board 䴌·¹Ñ ·Õ ÊÑ­­Ò³¨Ò¡¤Í¹ à¹ç¡àµÍÏ SHIFT IN ¨Ðʋ§à¢ŒÒä»Âѧ IC901 à¾×Íè ·íÒ¡ÒâÂÒ¾ÍϵàÍÒµ¾µØ 8 ºÔµÊ‹§ÍÍ¡ä»Âѧ¤Í¹à¹ç¡àµÍÏ OUTL ¾ÃŒÍÁ¡Ñ¹¹Ñ¹é Âѧʋ§¢ŒÍÁÙÅ͹ءÃÁÍÍ¡ÁÒ·Ò§¢Ò SO ä»Âѧ¢Ò SI ¢Í§ IC902 à¾×Íè ¢ÂÒ¾Íϵà¾ÔÁè ÍÕ¡ 8 ºÔµ â´Â¢ŒÍÁÙÅ 8 ºÔµµ‹ÍÁÒ¨Ðʋ§ÍÍ¡·Ò§¤Í¹à¹ç¡àµÍÏ OUTH ·íÒãˌºÍÏ´ EX-09 ¹ÕÊé ÒÁÒö¢ÂÒ¾ÍϵàÍÒµ¾Ø µà¾ÔÁè ໚¹ 16 ºÔµ¨Ò¡ÊÒÂÊÑ­­Ò³à¾Õ§ 2 àʌ¹¢Í§¾Íϵ USB áÅÐÂѧÊÒÁÒöà¾ÔÁè µ‹Íä»ä´ŒÍ¡Õ â´Â¢ÒÊÑ­­Ò³ LE, CLK áÅÐ RST ¨Ò¡¤Í¹à¹ç¡àµÍÏ SHIFT IN ¶Ù¡µ‹ÍÁÒÂѧ¤Í¹à¹ç¡àµÍÏ SHIFT OUT ¾ÃŒÍÁ¡Ñº¢Ò SO ¢Í§ IC902 ¨Ö§·íÒãˌÊÒÁÒöµ‹Í¾‹Ç§ºÍÏ´ EX-09 ä´ŒÍ¡Õ Í‹ҧ§‹ÒÂæ à¾Õ§µ‹ÍÊÒ¨ҡ¤Í¹à¹ç¡àµÍÏ SHIFT OUT ¢Í§ EX-09 ºÍÏ´·Õè 1 ࢌҡѺ¤Í¹à¹ç¡àµÍÏ SHIFT IN ¢Í§ EX-09 ºÍÏ´¶Ñ´ä» ËÒ¡µ‹Í¾‹Ç§¡Ñ¹ 2 ºÍÏ´¡ç¨ÐÊÒ ÁÒö¢ÂÒ¾ÍϵàÍÒµ¾µØ à¾ÔÁè ໚¹ 32 ª‹Í§ (ËÃ×ͺԵ) â´Â㪌¢ÒÊÑ­­Ò³à·‹Òà´ÔÁ¤×Í 4 àʌ¹ ã¹ÃÙ»·Õè 11-7 áÊ´§ ¡Òõ‹Í¾‹Ç§ºÍÏ´ EX-09 à¾×Íè à¾ÔÁè ¨íҹǹ¾ÍϵàÍÒµ¾µØ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 94


¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¡ÒÃàµÃÕÂÁ¡ÒÃàº×Íé §µŒ¹ÊíÒËÃѺ¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ÁÕ´§Ñ ¹Õé

¢Ñ¹é µÍ¹â´ÂÊÃØ»¢Í§¡Ò÷´Åͧàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ã¹¢Ñ¹é ¾×¹é °Ò¹

(1) µÔ´µÑ§é ä´ÃàÇÍϢͧ U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB à¾×Íè ãËŒÇ¹Ô â´Çʏµ´Ô µ‹Í¡Ñº U-Board Íѹ໚¹µÑÇá·¹¢Í§à¤Ã×Íè §Á×ÍËÅÑ¡·Õãè ªŒã¹¡Ò÷´Åͧ䴌 (2) µÔ´µÑ§é ¤Í¹â·ÃŪ‹ÇµԴµ‹Í¡ÑºÍØ»¡Ã³ USB ª¹Ô´ Human Interface Device (HID) (3) à¢Õ¹â»Ãá¡ÃÁ´ŒÇ Visual BASIC ËÃ×Íâ»Ãá¡ÃÁÀÒÉÒÍ×¹è æ à¾×Íè ÊÌҧâ»Ãá¡ÃÁ»ÃÐÂØ¡µËÃ×Í áÍ»¾ÅÔपѹè ÊíÒËÃѺ¤Çº¤ØÁ U-Board ¼‹Ò¹¤Í¹â·ÃŪ‹ÇµԴµ‹Í ËÑÇã¨ËÅÑ¡ÊíҤѭ¢Í§¡Ò÷´Åͧ·Õ¨è ÐàÃÔÁè µŒ¹µ‹Í令×Í

µŒÍ§·íÒãˌÃкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏèٌ ¡Ñ ¡Ñº U-Board ·Õµè ͋ ÍÂÙ¡‹ ºÑ ¾Íϵ USB àÊÕ¡‹Í¹ ËÒ¡äÁ‹Á¢Õ ¹Ñé µÍ¹¹Õé ¡ç¨ÐäÁ‹ÊÒÁÒö·íÒ¡Ò÷´Åͧã´æ 䴌 µÑÇàª×Íè Á⧷ÕÊè Òí ¤Ñ­¤×Í ä´ÃàÇÍϢͧ U-Board áÅФ͹â·ÃŪ‹ÇµԴµ‹Í¡ÑºÍØ»¡Ã³ USB

´Ñ§¹Ñé¹¢Ñ鹵͹·Õè¡Å‹ÒǶ֧µ‹Í仹Õé¢Íãˌ¼ÙŒ·´Åͧ´íÒà¹Ô¹¡ÒõÒÁÍ‹ҧ à¤Ã‹§¤ÃÑ´ à¾×Íè ãˌÊÒÁÒö·íÒ¡Ò÷´Åͧµ‹Íä»ä´ŒÍ‹ҧäÁ‹Á¢Õ ͌ ¢Ñ´¢ŒÍ§ ¡ÒõԴµÑ§é ä´ÃàÇÍÏ U-Board ¡ÒõԴµÑ§é ä´ÃàÇÍÏ U-Board ¹ÕÁé ¨Õ ´Ø »ÃÐʧ¤à¾×Íè ãˌÃкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´ÇʏÊÒÁÒöµÔ´µ‹Í¡Ñº U-Board ¼‹Ò¹¾Íϵ USB â´Â U-Board ÁÕ¤³ Ø ÊÁºÑµàÔ »š¹ÍØ»¡Ã³ª¹Ô´ HID ËÃ×Í Human Interface Device ¨Ö§ÊÒÁÒö㪌 ä´ÃàÇÍÏ HID ·ÕÁè ÍÕ ÂÙ㋠¹ÇÔ¹â´ÇʏÍÂÙዠŌÇ䴌 ¢Ñ¹é µÍ¹¡ÒõԴµÑ§é ÁÕ´§Ñ ¹Õé (1) àÅ×Í¡¡ÒÃ㪌ä¿àÅÕÂé §¢Í§ U-Board ä»ÂѧµíÒá˹‹§ BUS à¾×Íè àÅ×͡㪌ä¿àÅÕÂé §¨Ò¡¾Íϵ USB (2) µ‹ÍÊÒ USB ÃÐËNjҧ¾Íϵ USB ¡Ñº U-Board

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 95


(3) àÁ×Íè µ‹Í U-Board ࢌҡѺ¾Íϵ USB ¤Ãѧé áá ÇÔ¹â´Çʏ¨ÐµÃǨ¾ºà»š¹ÍØ»¡Ã³ USB ª¹Ô´ Human Interface Device ¡´»ØÁ† Next ´Ñ§ÃÙ»

(4) àÅ×Í¡ãˌáÊ´§ä´ÃàÇÍÏ·ÁÕè ÍÕ Âً ¡´»ØÁ† Next ´Ñ§ÃÙ»

(5) àÅ×Í¡âÁà´Å USB Human Interface Device ¡´»ØÁ† Next ´Ñ§ÃÙ»

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 96


(6) ¡´»ØÁ† Next à¾×Íè µÔ´µÑ§é ä´ÃàÇÍÏ ´Ñ§ÃÙ»

(7) ¡´»ØÁ† Finish à¾×Íè ¨º¡Ãкǹ¡ÒõԴµÑ§é ä´ÃàÇÍÏ ´Ñ§ÃÙ»

ã¹¡Ã³Õ ·Õè ¤ ÍÁ¾Ô Ç àµÍÏ µÔ ´ µÑé § Ãкº»¯Ô ºÑ µÔ ¡ ÒÃÇÔ ¹ â´Çʏ ME ¢Öé ¹ ä» àÁ×è Í µ‹ Í U-Board ¤Ãѧé áá ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§á¨Œ§¡ÒõԴµ‹Í¡ÑºÍØ»¡Ã³ USB 㹤ÅÒÊ HID ´Ñ§ÃÙ»

¨Ò¡¹Ñ¹é Ãкº¨Ð·íÒ¡ÒõԴµÑ§é ä´ÃàÇÍÏâ´ÂÍѵâ¹ÁÑµÔ äÁ‹ÁËÕ ¹ŒÒµ‹Ò§á¨Œ§ãˌµ´Ô µÑ§é ´Ñ§ÃÙ»ã¹¢Ñ¹é µÍ¹·Õè (1)

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 97


àÁ×Íè ¡ÒõԴµÑ§é ä´ÃàÇÍϢͧ U-Board àÊÃç¨ÊÔ¹é ¢Ñ¹é µ‹Í令×Í ¡ÒÃÊÌҧâ»Ãá¡ÃÁÊíÒËÃѺµÔ´µ‹Í¡Ñº U-Board ¡ÒÃà¢Õ¹â»Ãá¡ÃÁµÔ´µ‹Í¡Ñº U-Board ¹Ñé¹ ãªŒ¿˜§¡ªÑè¹ API «Öè§à»š¹¿˜§¡ªÑè¹ÀÒÂ㹨ҡä´ÃàÇÍϢͧ HID ¢Í§ÇÔ¹â´Çʏ 㹡ÒÃà¢Õ¹â»Ãá¡ÃÁâ´Â㪌¿§˜ ¡ª¹Ñè API ¹Ñ¹é ¨ÐµŒÍ§à¡ÕÂè Ç¢ŒÍ§¡Ñº¡Ò÷íÒ§Ò¹¢Í§Ãкº¢Í§ÇÔ¹â´Çʏ «Ö§è ¨ÐÁÕÃÒÂÅÐàÍÕ´¢Ñ¹é µÍ¹¤‹Í¹¢ŒÒ§Âا‹ ÂÒ¡ ·Ò§ Microchip «Ö§è ໚¹¼Ù¼Œ ÅÔµäÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ PIC16C745 «Ö§è ¹íÒÁÒ㪌໚¹ÍØ»¡Ã³¤Çº¤ØÁËÅÑ¡º¹ U-Board 䴌ÊÌҧ¤Í¹â·ÃÅà¾×Íè ª‹ÇÂ㹡ÒÃà¢Õ¹â»Ãá¡ÃÁµÔ´µ‹Í¡Ñºä´ÃàÇÍÏ HID änjãˌàÃÕºÌÍÂáÅŒÇ à¾×Íè ª‹ÇÂãˌ¡ÒþѲ¹Òâ»Ãá¡ÃÁÊÒÁÒö¡ÃзíÒ䴌§Ò‹ Â¢Ö¹é ¤Í¹â·ÃŴѧ¡Å‹ÒǹÕÁé ªÕ Í×è Ç‹Ò HIDComm â´ÂàÁ×Íè 㪌¤Í¹â·ÃÅ HIDCOMM ÊÒÁÒöŴ¢Ñ¹é µÍ¹µ‹Ò§ æ ŧ 䴌ÁÒ¡ ·íÒãˌ§Ò‹ µ‹Í¡ÒÃà¢Õ¹â»Ãá¡ÃÁ¢Ö¹é

¡ÒõԴµÑ§é ¤Í¹â·ÃÅ HIDComm (1) àÃÕ¡ä¿Å Microchip HIDComm ActiveX setupex.exe à¾×Íè µÔ´µÑ§é ¤Í¹â·ÃÅ HIDComm «Ö§è ºÃÃ¨Ø ÍÂًã¹á¼‹¹«Õ´ÕÃÍÁ·Õè¨Ñ´ÁҾÌÍÁ¡Ñº U-Board ËÃ×ͪش·´Åͧ AX-2000 plus ¨Ð»ÃÒ¡®Ë¹ŒÒµ‹Ò§ÊíÒËÃѺµÔ´µÑé§ â»Ãá¡ÃÁ´Ñ§ÃÙ»

(2) ·íÒµÒÁ¢Ñ¹é µÍ¹¡ÒõԴµÑ§é 仨¹àÊÃç¨ÊÔ¹é ¡ÒõԴµÑ§é àÁ×Íè µÔ´µÑ§é ¤Í¹â·ÃÅ HIDCOMM áÅŒÇ à»š¹ÊÑ­­Ò³Ç‹Ò U-Board áÅмٷŒ ´Åͧ¾ÃŒÍÁ·Õ¨è ÐࢌÒÊÙ¡‹ Ò÷´Åͧ àª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹áŌÇ

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 98


¡Ò÷´Åͧ·Õè 1 àªÍ×è Áµ‹Í U-Board ¡Ñº¾Íϵ USB ´ŒÇ HIDComm ËÅѧ¨Ò¡µÔ´µÑ§é «Í¿µáÇÏà¾×Íè ãˌ¾Íϵ USB µÔ´µ‹Í¡Ñº U-Board 䴌áÅŒÇ µ‹Í仹ըé ÐàÃÔÁè µŒ¹¡Ò÷´Åͧ ᵋ ¡‹Í¹Í×¹è ¤Ç÷íÒ¤ÇÒÁࢌÒã¨à¡ÕÂè ǡѺÃٻẺáÅÐ¢Ñ¹é µÍ¹¡ÒÃÃѺʋ§¢ŒÍÁÙÅÃÐËNjҧ U-Board ¡Ñº¾Íϵ USB ¢Í§à¤Ã×Íè § ¤ÍÁ¾ÔÇàµÍÏ à¾×Íè »ÃÐ⪹ã¹¡ÒÃà¢Õ¹â»Ãá¡ÃÁ

ÃٻẺáÅÐ¢Ñ¹é µÍ¹¡ÒÃÃѺʋ§¢ŒÍÁÙšѺ U-Board ã¹ÃÙ»·Õè P1-1 áÊ´§ä´ÍÐá¡ÃÁ¢Í§¡Ò÷íÒ§Ò¹·Ò§«Í¿µáÇÏâ´ÂÃÇÁ¢Í§ U-Board â´Â U-Board ä´ŒÃºÑ ¡Òà Í͡Ẻãˌ໚¹ÍØ»¡Ã³ USB 㹤ÅÒÊ HID ´Ñ§¹Ñ¹é ã¹ÍÔ¹àµÍÏà¿Ê´ÔʤÃÔ»àµÍϨ§Ö 㪌 HID ´ÔʤÃÔ»àµÍÏ·Òí §Ò¹Ã‹ÇÁ ¡ÑºàÍ繾͵´ÊÔ ¤ÃÔ»àµÍÏ ÊíÒËÃѺÃٻẺ¡Ò÷íÒ§Ò¹ÁÕ´§Ñ ¹Õé

Device Descriptor

U-BOARD USB 1.0/1.1 Interface Board Revision 2 Operational Model

Config Descriptor

Interface Descriptor

Endpoint Descriptor

EP0 IN / OUT (Control Pipe 00) 8 byte EP1OUT (Pipe 01) 2 byte

0

SHIFTBUS Latch & Report ID.1

1

Report ID.1

2

Report ID.2

0 1

PORTOUT

2

A/D Ch.

3 (Rev.2) EP1IN (Pipe 81) 2 byte EP2OUT (Pipe 02)

1

PORTIN

2

A/D Value

2

A/D Ch.

2

A/D Value

HID Descriptor

Report Descriptor

SHIFTBUS Latch & Report ID.1

2 byte

0 1

Report ID.1

2

Report ID.2

2 byte EP2IN (Pipe 82)

Send Report

0

SHIFTBUS Latch & Report ID.1

1

Report ID.1

2

Report ID.2

0 1

PORTOUT

2

A/D Ch.

3 (Rev.2) 0

Receive Report 2 byte

1

Report ID.1

2

Report ID.2

1

PORTIN

2

A/D Value

2 byte

ÃÙ»·Õè P1-1 áÊ´§ä´ÍÐá¡ÃÁ¢Í§¡Ò÷íÒ§Ò¹·Ò§«Í¿µáÇÏâ´ÂÃÇÁ¢Í§ U-Board àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 99

SHIFTBUS Latch & Report ID.1


ÃѺʋ§¢ŒÍÁÙŤÃѧé ÅÐ 2 亵µÍ‹ 1 á¾ç¡à¡çµ 亵áá໚¹ Report ID ʋǹ亵·Õè 2 ໚¹¢ŒÍÁÙÅ l àÁ×Í è ÃѺ¢ŒÍÁÙŨҡ¤ÍÁ¾ÔÇàµÍÏ U-Board ¨Ðà¡çº Report ID ¢Í§¢ŒÍÁÙÅ·Õäè ´ŒÃºÑ änj à¾×Íè àµÃÕÂÁ¡ÒÃʋ§¢ŒÍÁÙÅ ¢Í§ Report ID à´ÕÂǡѹ¡ÅѺä»Âѧ¤ÍÁ¾ÔÇàµÍÏàÁ×Íè ä´ŒÃºÑ ¡ÒÃÌͧ¢Í¢ŒÍÁÙÅ l ¡ÒÃʋ§¢ŒÍÁÙÅä»Âѧ¤ÍÁ¾ÔÇàµÍϨÐäÁ‹ÊÒÁÒöàÅ×Í¡ Report ID 䴌à¹×Í è §¨Ò¡¤Ø³ÊÁºÑµ¢Ô ͧ USB àÇÍϪ¹Ñè 1.0 äÁ‹ÊÒÁÒöàÅ×Í¡ Report ID ·Õ¨è Ðʋ§ÍÍ¡ä»ä´Œ l ¡ÒÃÃѺʋ§¢ŒÍÁÙšѺ¾Íϵµ‹Ò§æ ¨Ð¶Ù¡¡íÒ˹´´ŒÇ Report ID ´Ñ§¹Õé Report ID 0 ¢ŒÍÁÙÅ·Õäè ´ŒÃºÑ ¨Ð¡íÒ˹´ Report ID ÊíÒËÃѺ¡ÒÃʋ§¢ŒÍÁÙÅä»Âѧ¤ÍÁ¾ÔÇàµÍÏ ÁÕ 3 ¤‹Ò¤×Í ¤‹Ò 0 ¡íÒ˹´ Report ID ÊíÒËÃѺ¡ÒÃʋ§¢ŒÍÁÙÅ໚¹ 1 áÅÐáŵ«¢ÍŒ ÁÙÅ·Õ¾è Íϵ SHIFT OUT º¹ U-Board ¤‹Ò 1 ¡íÒ˹´ Report ID ÊíÒËÃѺ¡ÒÃʋ§¢ŒÍÁÙÅ໚¹ 1 ¤‹Ò 2 ¡íÒ˹´ Report ID ÊíÒËÃѺ¡ÒÃʋ§¢ŒÍÁÙÅ໚¹ 2 Report ID 1 ÃѺ¢ŒÍÁÙŨҡ¤ÍÁ¾ÔÇàµÍÏáŌÇʋ§ä»Âѧ PortOut áÅÐ͋ҹ Port In áŌÇʋ§ä»·Õè ¤ÍÁ¾ÔÇàµÍÏ Report ID 2 ÃѺ¢ŒÍÁÙÅà¾×èÍ¡íÒ˹´ª‹Í§¢Í§Ç§¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨ÔµÍÅ (A/D converter) ·Õµè ͌ §¡Òà áÅÐʋ§¤‹Ò·Õáè »Å§¤‹ÒáÅŒÇ l ËÅѧ¨Ò¡ÃѺ¢ŒÍÁÙÅ 1 á¾ç¡à¡çµ ¨ÐµŒÍ§Ë¹‹Ç§àÇÅÒÍ‹ҧ¹ŒÍ 71 ÁÔÅÅÔǹ Ô Ò·Õ à¾×Íè ãˌ U-Board ·íÒ¡ÒÃàµÃÕÂÁ ¢ŒÍÁÙÅ·Õ¨è Ðʋ§¡ÅѺä»Âѧ¤ÍÁ¾ÔÇàµÍÏ ᵋ¶ÒŒ ໚¹¡ÒÃá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍŨÐ㪌àÇÅÒ 300 ÁÔÅÅÔÇ¹Ô Ò·Õ l

¡ÒÃ㪌¤Í¹â·ÃÅ HIDComm µÔ´µ‹Í¡Ñº U-Board ¡Òà Connect ¡Ñº U-Board ¡‹Í¹¨ÐÃѺʋ§¢ŒÍÁÙšѺ U-Board ¹Ñ¹é µŒÍ§·íÒ¡Òà Connect ¡ÑººÍÏ´¡‹Í¹ ¨Ö§·íÒ¡ÒÃÃѺʋ§¢ŒÍÁÙÅ䴌 â´Â ÊÒÁÒö㪌¡Òà Browse àÅ×Í¡ÍØ»¡Ã³·¨Õè еԴµ‹Í¼‹Ò¹¾Íϵ USB 䴌´§Ñ ¹Õé Private Sub cmdSelectDevice_Click() HIDComm.Browse HIDComm.Connect End Sub

ËÃ×Í㪌¡ÒáíÒ˹´¤‹Ò¤Ø³ÊÁºÑµ¢Ô ͧ HIDComm ã¹â»Ãá¡ÃÁ ãˌµÃ§¡Ñº¤‹Òµ‹Ò§æ ¢Í§ÍØ»¡Ã³ USB ¹Ñ¹é à¾×Íè à¨ÒШ§ÍØ»¡Ã³·ãÕè ªŒ¡ºÑ â»Ãá¡ÃÁ ¤Ø³ÊÁºÑµ·Ô ãÕè ªŒÊÒí ËÃѺ¡Òà Connect ¡ÑºÍØ»¡Ã³ USB ÁÕ 6 ¤Ø³ÊÁºÑµ´Ô §Ñ ¹Õé HIDComm.MatchManufacturer = “Innovative Experiment” HIDComm.MatchProduct = “U-Board USB1.0/1.1 Interface” HIDComm.MatchSerial = 0 HIDComm.MatchPID = 4095 HIDComm.MatchVID = 1240 HIDComm.MatchVersion = 256 HIDComm.Connect

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 100


à˵ءÒóµÒ‹ §æ ¢Í§ HIDComm à˵ءÒó¢Í§ HIDComm ·Ñ§é ËÁ´¨ÐºÍ¡Ê¶Ò¹Ð¢Í§¡ÒõԴµ‹Í¡ÑºÍØ»¡Ã³ «Ö§è ÁÕ 2 ¡ÅØÁ‹ ¤×Í

(1) ¡ÅØÁ‹ ºÍ¡Ê¶Ò¹Ð¡Òà Connect ConnectFailure ConnectSuccess Disconnected

(2) ¡ÅØÁ‹ ºÍ¡Ê¶Ò¹Ð¡ÒÃÃѺʋ§¢ŒÍÁÙÅ ReadFailure ReadSuccess WriteFailure WriteSuccess

¡Ò÷´Åͧ : ¡Òà Connect ¡Ñº U-Board ´ŒÇ HIDComm à¤Ã×èͧÁ×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0

¢Ñ鹵͹¡Ò÷´Åͧ P1.1 àª×Íè Áµ‹Í U-Board ࢌҡѺ¾Íϵ USB ¢Í§¤ÍÁ¾ÔÇàµÍÏ P1.2 ÇÒ§¤Í¹â·ÃŴѧÃÙ»·Õè P1-2 P1.3 à¢Õ¹â»Ãáá¡ÃÁãˌ¡ºÑ à˵ءÒóµÒ‹ §æ ´Ñ§¹Õé Private Sub cmdConnect_Click() HIDComm.MatchManufacturer = “Innovative Experiment” HIDComm.MatchProduct = “U-Board USB1.0/1.1 Interface” HIDComm.MatchSerial = 0 HIDComm.MatchPID = 4095 HIDComm.MatchVID = 1240 HIDComm.MatchVersion = 256 HIDComm.Connect End Sub

ÃÙ»·Õè P1-2 ˹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧ¡ÒÃàª×Íè Áµ‹Í U-Board ¡Ñº¾Íϵ USB ´ŒÇ HIDComm àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 101


Private Sub Form_Load() HIDComm.Browse HIDComm.Connect End Sub Private Sub cmdDisconnect_Click() HIDComm.Disconnect End Sub Private Sub HIDComm_ConnectFailure(ByVal Status As Long) MsgBox “HIDComm_ConnectFailure” End Sub Private Sub HIDComm_ConnectSuccess(ByVal Status As Long) MsgBox “HIDComm_ConnectSuccess” End Sub Private Sub HIDComm_Disconnected(ByVal Status As Long) MsgBox “HIDComm_Disconnected” End Sub

P1.4 ·íÒ¡ÒÃÃѹâ»Ãá¡ÃÁ·Õàè ¢Õ¹¢Ö¹é ¨Ò¡¢Ñ¹é µÍ¹·Õè P1.3 àÁ×Íè Ãѹâ»Ãá¡ÃÁ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁàËÁ×͹¡ÑºÃÙ»·Õè P1-2 àÁ×Íè 㪌àÁÒʏ¤ÅÔ¡é ·Õ»è Á؆ Connect ¨Ð»ÃÒ¡¯¡Ãͺ¢ŒÍ¤ÇÒÁᨌ§¡ÒõԴµ‹ÍÊÁºÙóÃÐËNjҧ U-Board ¡Ñº¤Í¹â·ÃÅ HICComm ´Ñ§ã¹ÃÙ»·Õè P1-3 áÅÐ ¨Ò¡¹Õäé »ã¹·Ø¡¡Ò÷´Åͧ¨ÐµŒÍ§ºÃèØâ»Ãá¡ÃÁµÔ´µ‹Í U-Board ¡Ñº HIDComm änj´ÇŒ  ¼Ù㌠ªŒ§Ò¹ÊÒÁÒöµÃǨ Êͺ䴌â´Â¡Òá´»ØÁ† Connect «Ö§è ¡ç¨Ð»ÃÒ¡¯¡Ãͺ¢ŒÍ¤ÇÒÁ´Ñ§ã¹ÃÙ»·Õè P1-3 ·Ø¡¤ÃÑ§é ´ŒÇÂઋ¹¡Ñ¹ ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab01.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab01 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

ÃÙ»·Õè P1-3 ¡Ãͺ¢ŒÍ¤ÇÒÁᨌ§¼Å¡Ò÷íÒ§Ò¹¢Í§â»Ãá¡ÃÁÇ‹Ò U-Board ÊÒÁÒöµÔ´µ‹Í¡Ñº ¤Í¹â·ÃÅ HIDComm 䴌Í‹ҧÊÁºÙó

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 102


¡Ò÷´Åͧ·Õè 2 ʋ§ÊÑ­­Ò³ÍÍ¡¨Ò¡¾Íϵ USB ¼‹Ò¹·Ò§ PORTOUT ¢Í§ U-Board ËÅÑ¡¡Òà ʋǹʋ§ÊÑ­­Ò³ÍÍ¡ËÃ×Í PORTOUT ¢Í§ U-Board ¨Ð㪌¡ÒõԴµ‹Í´ŒÇ ReportID ·Õè 1 «Ö§è ÊÒÁÒöʋ§ ¢ŒÍÁÙÅ䴌¤Ãѧé ÅÐ 2 亵 â´Â亵áá໚¹ Report ID «Ö§è ¤Í¹â·ÃÅ HIDComm ¨Ðʋ§ãˌàͧÍѵâ¹ÁÑµÔ Ê‹Ç¹äºµ·Õè 2 ໚¹¢ŒÍÁÙÅ·ÕÊè Òí ËÃѺʋ§ÍÍ¡ä»Âѧ PORTOUT

à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ EX-01

¡Ò÷´Åͧ P2.1 àª×Íè Áµ‹ÍºÍÏ´ EX-01 ࢌҡѺ¤Í¹à¹ç¡àµÍÏ PORTOUT ¢Í§ U-Board P2.2 ¨Ò¡â»Ãá¡ÃÁ㹡Ò÷´Åͧ·Õè 1 ãˌà¾ÔÁè TextBox áÅÐ CommandButton ÊíÒËÃѺʋ§¤‹Òä»Âѧ U-Board ´Ñ§ã¹ ÃÙ»·Õè P2-1

ÃÙ»·Õè P2-1 ˹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧʋ§¢ŒÍÁÙÅÍÍ¡¨Ò¡¾Íϵ USB ¼‹Ò¹·Ò§ PORTOUT ¢Í§ U-Board

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 103


P2.3 à¢Õ¹â»Ãá¡ÃÁà¾ÔÁè ãˌ¡ºÑ à˵ءÒó cmdWrite_Click ´Ñ§¹Õé Private Sub cmdWrite_Click() Dim Buffer(0) As Byte Buffer(0) = CByte(“&H” & txtOut.Text) HIDComm.ReportID = 1

HIDComm.WriteTo Buffer, 1

¡íÒ˹´ Report ID ʋ§¢ŒÍÁÙÅãˌ¡ºÑ U-Board

End Sub

¡ÒÃʋ§¢ŒÍÁÙż‹Ò¹¤Í¹â·ÃÅ HIDComm ¹Ñ¹é 㪌¤Òí Êѧè WriteTo â´Â¾ÒÃÒÁÔàµÍÏ·ãÕè ªŒÊ§‹ ¢ŒÍÁÙŨеŒÍ§ ໚¹µÑÇá»ÃÍÒÏàÏ áŌǵÒÁ´ŒÇ¤ÇÒÁÂÒǢͧ¢ŒÍÁÙÅ໚¹äºµ ¨Ò¡â»Ãá¡ÃÁ¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃʋ§ÁÕ¢¹Ò´ 1 亵 ¨Ö§¡íÒ˹´¢¹Ò´µÑÇá»ÃÍÒÏàÏ໚¹ 1 ª‹Í§ â´ÂàÃÔÁè ª‹Í§·Õè 0 ¨Ò¡¹Ñ¹é ÃѺ¤‹Ò¨Ò¡ txtOut á»Å§à»š¹µÑÇàÅ¢ ʋ§ä» à¡çº·Õµè ÇÑ á»ÃÍÒÏàÏ ¡íÒ˹´¤‹Ò Report ID áŌǨ֧ʋ§¢ŒÍÁÙÅÍÍ¡ä» P2.4 ·íÒ¡ÒÃÃѹâ»Ãá¡ÃÁ·Õàè ¢Õ¹¢Ö¹é ¨Ò¡¢Ñ¹é µÍ¹·Õè P2.3 àÁ×Íè Ãѹâ»Ãá¡ÃÁ ¨Ðà¡Ô´¡Ãкǹ¡ÒõԴµ‹Í U-Board ¡Ñº HIDComm ¢Ö¹é ¡‹Í¹ Êѧࡵ䴌¨Ò¡¡ÒûÃÒ¡¯ ¢Ö¹é ¢Í§¡Ãͺ¢ŒÍ¤ÇÒÁᨌ§¡ÒõԴµ‹ÍÊÁºÙó (´Ù㹡Ò÷´Åͧ·Õè 1) ¼Ù㌠ªŒ§Ò¹µŒÍ§¤ÅÔ¡»ØÁ† µÍºÃѺ ËÅѧ¨Ò¡¹Ñ¹é ¨Ð »ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧ¢Ö¹é ÁÒ ¶ŒÒ¼Ù㌠ªŒ§Ò¹µŒÍ§¡ÒÃʋ§¢ŒÍÁÙÅÍÍ¡ä»·Ò§ PORTOUT ¢Í§ U-Board ÊÒÁÒö¡íÒ˹´¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃ䴌㹪‹Í§ Port Out áŌǡ´»ØÁ† Write ¢ŒÍÁÙŨж١ʋ§ÍÍ¡ä»ÂѧºÍÏ´ EX-01 «Ö§è LED ·Õºè ÍÏ´ EX-01 ¡ç¨ÐáÊ´§µÃ§¡Ñº¢ŒÍÁÙÅ㹪‹Í§ PortOut ¢Í§â»Ãá¡ÃÁ·´Åͧ ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab02.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab02 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 104


¡Ò÷´Åͧ·Õè 3 ÃÑ º ÊÑ ­ ­Ò³à¢Œ Ò Êً ¾ ÍÏ µ USB ¼‹ Ò ¹·Ò§ PORTIN ¢Í§ U-Board ËÅÑ¡¡Òà ËÅѧ¨Ò¡ U-Board ä´ŒÃºÑ ¢ŒÍÁÙŨҡ¤ÍÁ¾ÔÇàµÍÏáÅŒÇ U-Board ¨Ðà¡çº¤‹Ò Report ID àÍÒänj áŌÇàµÃÕÂÁ ¢ŒÍÁÙÅÊíÒËÃѺʋ§ãˌ¤ÍÁ¾ÔÇàµÍÏ àÁ×Íè ¤ÍÁ¾ÔÇàµÍÏÃ͌ §¢Í¢ŒÍÁÙÅ U-Board ¨Ðʋ§¤‹Ò·Õäè ´ŒàµÃÕÂÁänjáŌÇãˌ ©Ð¹Ñ¹é ¡Òà ÃѺ¤‹Ò¨Ò¡¾Íϵµ‹Ò§æ µŒÍ§·íÒ¡ÒÃʋ§¢ŒÍÁÙÅãˌ U-Board à¾×Íè ¡íÒ˹´ Report ID ¢Í§¾Íϵ·Õµè ͌ §¡ÒÃ͋ҹ¢ŒÍÁÙÅ ¨Ò¡¹Ñ¹é ¨Ö§·íÒ¡ÒÃ͋ҹ¢ŒÍÁÙŨҡ U-Board ´Ñ§¹Ñ¹é ¡ÒÃ͋ҹ¤‹Ò¨Ò¡ Port In ¹Ñ¹é µŒÍ§¡ÃзíÒËÅѧ¨Ò¡¡ÒÃʋ§àÍÒµ¾µØ ä»Âѧ Port Out

à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10 4. EX-03 ºÍÏ´ÊÇÔµ«Í¹Ô ¾Øµ 16 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10

¢Ñ¹é µÍ¹¡Ò÷´Åͧ P3.1 ¨Ò¡¡Ò÷´Åͧ·Õè 2 àª×Íè Áµ‹ÍºÍÏ´ EX-03 à¾ÔÁè ࢌҡѺ¤Í¹à¹ç¡àµÍÏ PORTIN ¢Í§ U-Board P3.2 ¨Ò¡â»Ãá¡ÃÁ㹡Ò÷´Åͧ·Õè 2 ãˌà¾ÔÁè ¤Í¹â·ÃŴѧÃÙ»·Õè P3-1

ÃÙ»·Õè P3-1 ˹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´ÅͧÃѺáÅÐʋ§¢ŒÍÁÙšѺ¾Íϵ USB ¼‹Ò¹·Ò§ PORTOUT áÅÐ PORTIN ¢Í§ U-Board àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 105


P3.3 à¢Õ¹â»Ãá¡ÃÁà¾ÔÁè ãˌ¡ºÑ à˵ءÒó cmdRead_Click ´Ñ§¹Õé Private Sub cmdRead_Click() Dim Buffer() As Byte Buffer = HIDComm.ReadFrom(1)

ÃѺ¢ŒÍÁÙŨҡ

U-Board

txtIn.Text = Hex(Buffer(0)) End Sub

¡ÒÃÃѺ¤‹Ò¨Ò¡ U-Board ¹Ñ¹é Êѧࡵ䴌Çҋ äÁ‹Á¡Õ ÒáíÒ˹´ Report ID à¾ÃÒÐ U-Board ¨ÐäÁ‹Ê¹ã¨ Report ID àÁ×Íè ʋ§¢ŒÍÁÙÅÍÍ¡ä»Âѧ¤ÍÁ¾ÔÇàµÍÏ ᵋ¨ÐÂÖ´ Report ID ¢Í§á¾ç¤à¡¨¢ŒÍÁÙÅ·Õäè ´ŒÃºÑ ÁÒŋÒÊØ´ ¡ÒÃ㪌¤Òí Êѧè ReadFrom µŒÍ§¡íÒ˹´¢¹Ò´¢Í§¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃ͋ҹ «Ö§è U-Board ÊÒÁÒöʋ§ä´Œ 1 亵 ʋǹ¡ÒÃÃѺ¤‹Ò¨Ò¡¤íÒÊÑ§è ¹Ñ¹é µŒÍ§ãªŒµÇÑ á»ÃÍÒÏàÏ·äÕè Á‹ä´Œ¡Òí ˹´¢¹Ò´àÍÒänjµÍ¹»ÃСÒȵÑÇá»Ã àÁ×Íè ·íÒ¡ÒÃÃѺ ¤‹Òâ»Ãá¡ÃÁ¨Ðà¡çº¤‹ÒãËŒÍµÑ â¹ÁÑµÔ â´Â¤‹Ò·Õàè ¡çº¨ÐÍÂÙ·‹ µÕè ÇÑ á»ÃÍÒÏàϪ͋ §·Õè 0 ¨Ò¡¹Ñ¹é ¨Ö§¹íÒ¤‹Ò·Õäè ´Œä»ãªŒ§Ò¹ P3.4 ·íÒ¡ÒÃÃѹâ»Ãá¡ÃÁ·Õàè ¢Õ¹¢Ö¹é ¨Ò¡¢Ñ¹é µÍ¹·Õè P3.3 àÁ×Íè Ãѹâ»Ãá¡ÃÁ ¨Ðà¡Ô´¡Ãкǹ¡ÒõԴµ‹Í U-Board ¡Ñº HIDComm ¢Ö¹é ¡‹Í¹àª‹¹à´ÕÂǡѺ¡Ò÷´Åͧ·Õè 2 Êѧࡵ䴌¨Ò¡ ¨Ð»ÃÒ¡¯¡Ãͺ¢ŒÍ¤ÇÒÁᨌ§¡ÒõԴµ‹ÍÊÁºÙó (´Ù㹡Ò÷´Åͧ·Õè 1) ¼Ù㌠ªŒ§Ò¹µŒÍ§¤ÅÔ¡»ØÁ† µÍºÃѺ ËÅѧ¨Ò¡¹Ñ¹é ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧ¢Ö¹é ÁÒ ¶ŒÒ¼Ù㌠ªŒ§Ò¹µŒÍ§¡ÒÃʋ§¢ŒÍÁÙÅÍÍ¡ä»·Ò§ PORTOUT ¢Í§ U-Board ÊÒÁÒö¡íÒ˹´¢ŒÍÁÙÅ·Õµè ͌ §¡ÒÃ䴌㹪‹Í§ Port Out áŌǡ´»ØÁ† Write ¢ŒÍÁÙŨж١ʋ§ÍÍ¡ä»ÂѧºÍÏ´ EX-01 «Ö§è LED ·Õºè ÍÏ´ EX-01 ¡ç¨ÐáÊ´§µÃ§¡Ñº¢ŒÍÁÙÅ㹪‹Í§ PortOut ¢Í§â»Ãá¡ÃÁ·´Åͧ ·Õàè ¾ÔÁè àµÔÁ¢Ö¹é ÁÒ¤×Í ª‹Í§ Port In Íѹ໚¹ª‹Í§áÊ´§¢ŒÍÁÙÅ·ÕÃè ºÑ à¢ŒÒÁÒ¨Ò¡¾Íϵ USB ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ PORTIN ¢Í§ U-Board ãˌ·´Åͧà»ÅÕÂè ¹¤‹Ò¢Í§ÊÇÔµªº¹ºÍÏ´ EX-03 áŌǡ´»ØÁ† Read ¨Ð»ÃÒ¡¯¢ŒÍÁÙŢͧ ÊÇÔµªã¹ª‹Í§ Port In ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab03.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab03 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 106


¡Ò÷´Åͧ·Õè 4

ÃѺÊÑ­­Ò³à¢ŒÒÊÙ¾‹ Íϵ USB ¼‹Ò¹·Ò§ PORTIN ¢Í§ U-Board â´Â㪌 Report ID 0 à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10 4. EX-03 ºÍÏ´ÊÇÔµ«Í¹Ô ¾Øµ 16 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10

¡Ò÷´Åͧ ¡ÒÃ͋ҹ¤‹Ò¨Ò¡ Port In ÊÒÁÒö㪌 Report ID 0 ʋ§¢ŒÍÁÙÅá·¹ Report ID 1 䴌 â´Â¢ŒÍÁÙÅ·ÕÊè §‹ 令×Í 1 à¾×Íè ãˌ U-Board àµÃÕÂÁ¡ÒÃʋ§¢ŒÍÁÙŨҡ Port In ¢Í§ Report ID 1 P4.1 ¨Ò¡¡Ò÷´Åͧ·Õè 3 à¾ÔÁè ¤Í¹â·ÃÅ HpCounter â´ÂàÅ×Í¡àÁ¹Ù Project à Componentsà Tab Controls ¨ÐÁÕ Ë¹ŒÒ¨Íãˌà¾ÔÁè àµÔÁ¤Í¹â·ÃÅ ´Ñ§ÃÙ»·Õè P4-1

ÃÙ»·Õè P4-1 áÊ´§Ë¹ŒÒµ‹Ò§à¾ÔÁè ¤Í¹â·ÃŢͧ Visual BASIC 㹡Ò÷´Åͧ¹Õµé ͌ §¡ÒÃà¾ÔÁè ¤Í¹â·ÃÅ HighPerformanceCounter àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 107


P4.2 àÅ×Í¡¤Í¹â·ÃÅ HighPerformanceCounter ´Ñ§ÃÙ»·Õè P4-1 ¶ŒÒäÁ‹¾ºª×Íè ¤Í¹â·ÃŹÕé ¡´»ØÁ† Browse áŌÇàÅ×Í¡ ä¿Å HPCOUNT.OCX ã¹ä´àáµÍÃÕè Windows\System ËÃ×Íä´àáµÍÃÕè·Õè䴌¤Ñ´ÅÍ¡ä¿Åänj ËÃ×ͤѴÅÍ¡ä¿Å HPCOUNT.OCX ¨Ò¡á¼‹¹«Õ´ÃÕ ÍÁ PC Interface : USB port experiment ã¹ä´àÃ硵ÍÃÕè Software\OCX ŧã¹ä´ àÃ硵ÍÃÕàè ´ÕÂǡѺ·Õºè ÃèØä¿Å·¡Õè Òí Åѧ·´Åͧ¹Õé P4.3. ÊÌҧ»ØÁ† ÊíÒËÃѺ͋ҹ¢ŒÍÁÙŨҡª‹Í§ port In áŌǹíÒ¢ŒÍÁÙŹѹé ä»ÍÍ¡·Õè Port Out (»ØÁ† Read and Write) ´Ñ§ÃÙ»·Õè P4-2 áŌÇà¢Õ¹â»Ãá¡ÃÁ´Ñ§¹Õé Private Sub cmdReadWrite_Click() Dim Buffer() As Byte ReDim Buffer(0) Buffer(0) = 1 HIDComm.ReportID = 0 HIDComm.WriteTo Buffer, 1 hp.Delay_ms 71 Buffer = HIDComm.ReadFrom(1) txtIn.Text = Hex(Buffer(0)) HIDComm.ReportID = 1 HIDComm.WriteTo Buffer, 1 End Sub

P4.4 ·íÒ¡ÒÃÃѹâ»Ãá¡ÃÁ·Õàè ¢Õ¹¢Ö¹é ¨Ò¡¢Ñ¹é µÍ¹·Õè P4.3 àÁ×Íè Ãѹâ»Ãá¡ÃÁ ¨Ðà¡Ô´¡Ãкǹ¡ÒõԴµ‹Í U-Board ¡Ñº HIDComm ¢Ö¹é ¡‹Í¹àª‹¹à´ÕÂǡѺ¡Ò÷´Åͧ·Õè 3 Êѧࡵ䴌¨Ò¡ ¨Ð»ÃÒ¡¯¡Ãͺ¢ŒÍ¤ÇÒÁᨌ§¡ÒõԴµ‹ÍÊÁºÙó (´Ù㹡Ò÷´Åͧ·Õè 1) ¼Ù㌠ªŒ§Ò¹µŒÍ§¤ÅÔ¡é »ØÁ† µÍºÃѺ ËÅѧ¨Ò¡¹Ñ¹é ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧ¢Ö¹é ÁÒ ¶ŒÒ¼Ù㌠ªŒ§Ò¹Í‹Ò¹¢ŒÍÁÙÅࢌÒÁÒ¨Ò¡ºÍÏ´ EX-03 ¼‹Ò¹·Ò§ PORTIN áŌǵŒÍ§¡ÒÃʋ§¢ŒÍÁÙÅÍÍ¡ä»·Ò§ PORTOUT ¢Í§ U-Board ·Ñ¹·Õ ãˌ¡´»ØÁ† Read and Write ¢ŒÍÁÙÅ ¨Ò¡ÊÇÔµª¢Í§ EX-03 ¨Ðä»»ÃÒ¡¯·Õè LED Á͹ÔàµÍϺ¹ºÍÏ´ EX-01 ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab04.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab04 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

ÃÙ»·Õè P4-2 ˹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´ÅͧÃѺáÅÐʋ§¢ŒÍÁÙšѺ¾Íϵ USB ¼‹Ò¹·Ò§ PORTOUT áÅÐ PORTIN ¢Í§ U-Board â´Â㪌 Report ID 0

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 108


¡Ò÷´Åͧ·Õè 5 ¢ÑºÊàµç»à»ÍÏÁÍàµÍϼҋ ¹¾Íϵ USB ËÅÑ¡¡ÒÃÊÌҧÊÑ­­Ò³à¾×Íè ¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ ·íÒ䴌â´Â¡Òè‹Ò¾Åѧ§Ò¹ä¿¿‡Òä»Âѧ¢´ÅǴᵋÅТ´º¹á¡¹áÁ‹àËÅ硤§·Õè «Ö§è µŒÍ§»‡Í¹à»š¹ÅíҴѺµÒÁÃÙ» Ẻ·Õ¶è ¡Ù µŒÍ§ â´ÂÊÒÁÒöẋ§ä´Œ 3 ÃٻẺ¤×Í ¿ÙÅÊàµç» 1 à¿Ê (full-step 1 phase), ¿ÙÅÊàµç» 2 à¿Ê (full-step 2 phase) áÅÐÎÒŏ¿Êàµç» (half step) Ẻ¿ÙÅÊàµç» 1 à¿Ê ໚¹¡ÒáÃеعŒ ·Õ§è ҋ ·ÕÊè ´Ø â´Â¡ÃеعŒ ¢´ÅÇ´·ÕÅТ´äŋàÃÕ§¡Ñ¹ä» ઋ¹ àÃÔÁè µŒ¹·Õè ¢´·Õè 1, 2, 3, 4 áŌÇǹ¡ÅѺÁÒ¢´·Õè 1 ËÃ×ÍàÃÔÁè ·Õ¢è ´·Õè 1 áŌÇŒ͹ä»Âѧ¢´·Õè 4, 3, 2 áŌǡÅѺÁÒÂѧ¢´·Õè 1 ÍÕ¡¤ÃÑ§é ·íÒãˌ·ÈÔ ·Ò§¡ÒÃËÁعÊǹ¡Ñ¹ 㹡ÒáÃеعŒ Ẻ¹Õ¨é §Ö ÁÕ¢´ÅÇ´à¾Õ§¢´à´ÕÂÇã¹àÇÅÒË¹Ö§è ·Õ¶è ¡Ù ¡ÃеعŒ à·‹Ò¹Ñ¹é ¡Òá ÃеعŒ Ẻ¹ÕÁé ÃÕ Ò¤Ò¶Ù¡áÅЧ‹Ò ÊÃØ»¢Ñ¹é µÍ¹¡Ò÷íÒ§Ò¹áÊ´§´Ñ§ã¹µÒÃÒ§·Õè P5-1 Ẻ¿ÙÅÊàµç» 2 à¿Ê ¨Ð¡ÃеعŒ â´Â¨‹ÒÂáç´Ñ¹ä»·Õ¢è ´ÅÇ´ 2 ¢´·ÕÍè ÂÙ㋠¡ÅŒ¡¹Ñ ã¹àÇÅÒà´ÕÂǡѹáÅÐàÃÕ§ ¶Ñ´¡Ñ¹ä» ¢´ÅÇ´ªØ´áá·Õ¶è ¡Ù ¡ÃеعŒ ¨Ð໚¹¢´·Õè 1 áÅÐ 2 µÒÁ´ŒÇ¡ÒáÃеعŒ ¢´·Õè 2 áÅÐ 3 µ‹Íä»à»š¹¢´·Õè 3 áÅÐ 4 ¶Ñ´ä»à»š¹¢´·Õè 4 áÅÐ 1 áŌǡÅѺÁÒ·Õ¢è ´·Õè 1 áÅÐ 2 ǹ仵ÒÁÅíҴѺઋ¹¹Õé ËÃ×ÍàÃÔÁè ·Õ¢è ´ 1 áÅÐ 4 µÒÁ´ŒÇ P1

P1

+V P2

P2

+V

+V P3

P4

P3

Ẻ 5 ÊÒ 4 à¿Ê

P4

Ẻ 6 ÊÒ 4 à¿Ê

ÃÙ»·Õè P5-1 â¤Ã§ÊÌҧ¾×¹é °Ò¹¢Í§Êàµç»à»ÍÏÁÍàµÍϪ¹Ô´ÂÙ¹âÔ ¾Å‹ÒÏ·§Ñé Ẻ 5 áÅÐ 6 ÊÒ «Ö§è 㹡Ò÷´Åͧ¹Õ¨é Ð㪌Ẻ 5 ÊÒ Êàµç»·Õè 1 2 3 4

à¿Ê·Õè 1 ·íÒ§Ò¹ -

à¿Ê·Õè 2 ·íÒ§Ò¹ -

à¿Ê·Õè 3 ·íÒ§Ò¹ -

à¿Ê·Õè 4 ·íÒ§Ò¹

µÒÃÒ§·Õè P5-1 ÃٻẺ¡ÒâѺÊàµç»à»ÍÏÁÍàµÍÏẺ¿ÙÅÊàµç» 1 à¿Ê àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 109


Êàµç»·Õè 1 2 3 4

à¿Ê·Õè 1 ·íÒ§Ò¹ ·íÒ§Ò¹

à¿Ê·Õè 2 ·íÒ§Ò¹ ·íÒ§Ò¹ -

à¿Ê·Õè 3 ·íÒ§Ò¹ ·íÒ§Ò¹ -

à¿Ê·Õè 4 ·íÒ§Ò¹ ·íÒ§Ò¹

µÒÃÒ§·Õè P5-2 áÊ´§ÃٻẺ¡ÒâѺÊàµç»à»ÍÏÁÍàµÍÏẺ¿ÙÅÊàµç» 2 à¿Ê ¢´·Õè 4 áÅÐ 3 ¶Ñ´ä»à»š¹¢´·Õè 3 áÅÐ 2 µ‹Íä»à»š¹¢´·Õè 2 áÅÐ 1 áŌÇǹ¡ÅѺÁÒ·Õ¢è ´·Õè 1 áÅÐ 4 ·ÔÈ·Ò§¡ÒÃËÁع¨Ð Êǹ¡Ñ¹ ´Ñ§áÊ´§¢Ñ¹é µÍ¹¡ÒáÃеعŒ ã¹µÒÃÒ§·Õè P5-2 ¡ÒáÃеعŒ Ẻ¹ÕÊé ÒÁÒöà¾ÔÁè áçºÔ´ä´ŒÁÒ¡¡Ç‹ÒẺ 1 à¿Ê ᡹áÁ‹àËÅç¡à¤Å×Íè ¹·ÕÀè ÒÂã¹ÁÍàµÍϨÐà¤Å×Íè ¹·Õ´è nj Âáç´Ö§Í‹ҧàµçÁáç¨Ò¡ 2 ¢´ÅÇ´·Õ¶è ¡Ù ¡ÃеعŒ ¾ÃŒÍÁ¡Ñ¹ áÅÐ ËÁعµ‹Íä»´ŒÇÂáç´Ö§¨Ò¡ÍÕ¡ 2 ¢´ÅÇ´¶Ñ´ä» ÊíÒËÃѺ¢ŒÍàÊÕ¤×Í µŒÍ§ãªŒ¡Òí Åѧ俿‡ÒÁÒ¡¢Ö¹é ẺÎÒŏ¿Êàµç» ໚¹ÃٻẺ·Õ¼è ÊÁ¼ÊÒ¹ÃÐËNjҧ¡ÒáÃеعŒ Ẻ 1 áÅÐ 2 à¿Ê à¾×Íè à¾ÔÁè ¨íҹǹ¢Í§ Êàµç»µ‹ÍÃͺÍա෋ҵÑÇ˹֧è ã¹Ãкº¹Õ¨é СÃеعŒ ¢´ÅÇ´àÃÕ§¡Ñ¹ä»à»š¹ÅíҴѺ´Ñ§¹Õé àÃÔÁè ¨Ò¡¢´ÅÇ´·Õè 1, 1 áÅÐ 2, 2, 2 áÅÐ 3, 3, 3 áÅÐ 4, 4, 4 áÅÐ 1 áŌÇǹ¡ÅѺÁÒÂѧ¢´ÅÇ´·Õè 1 ´Ñ§áÊ´§ã¹µÒÃÒ§·Õè 5-3 áçºÔ´·Õäè ´Œ¨Ò¡¡Òà ¡ÃеعŒ Ẻ¹Õ¨é Ðà¾ÔÁè ÁÒ¡¢Ö¹é à¹×Íè §¨Ò¡ª‹Ç§¢Í§¡ÒÃà¤Å×Íè ¹·Õãè ¹áµ‹ÅÐÊàµç»ÁÕÃÐÂÐÊѹé ŧ ᵋÅÐÊàµç»à¡Ô´áç´Ö§¨Ò¡ ¢´ÅÇ´ 2 ¢´·Õ¶è ¡Ù ¡ÃеعŒ ¾ÃŒÍÁ¡Ñ¹ ¤ÇÒÁ¶Ù¡µŒÍ§¢Í§µíÒá˹‹§ÁÕà¾ÔÁè ÁÒ¡¢Ö¹é ᵋµÍŒ §¾Ö§ÃÐÇÑ§Ç‹Ò àÁ×Íè ¡ÃеعŒ ãˌ·Òí §Ò¹ã¹ÃٻẺ¹Õ¨é еŒÍ§ËÁع¶Ö§ 2 Êàµç» ¨Ö§¨Ð䴌෋ҡѺÃÐÂÐ෋ҡѺ¡ÒáÃеعŒ Ẻ¿ÙÅÊàµç» 1 Êàµç» ÊíÒËÃѺáËŋ§ ¨‹Ò¡íÒÅѧ俿‡ÒµŒÍ§ãªŒ¢¹Ò´à·‹Ò¡Ñºáºº 2 à¿Ê໚¹Í‹ҧ¹ŒÍ ¨Ö§¨Ðà¾Õ§¾Í Êàµç»·Õè 1 2 3 4 5 6 7 8

à¿Ê·Õè 1 ·íÒ§Ò¹ ·íÒ§Ò¹ ·íÒ§Ò¹

à¿Ê·Õè 2 ·íÒ§Ò¹ ·íÒ§Ò¹ ·íÒ§Ò¹ -

à¿Ê·Õè 3 ·íÒ§Ò¹ ·íÒ§Ò¹ ·íÒ§Ò¹ -

à¿Ê·Õè 4 ·íÒ§Ò¹ ·íÒ§Ò¹ ·íÒ§Ò¹

µÒÃÒ§·Õè P5-3 áÊ´§ÃٻẺ¡ÒâѺÊàµç»à»ÍÏÁÍàµÍÏẺÎÒŏ¿Êàµç»

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 110


à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. EX-05 ºÍÏ´¢ÑºÊàµç»à»ÍÏÁÍàµÍÏ ¾ÃŒÍÁÊÒ IDC-10 4. Êàµç»à»ÍÏÁÍàµÍÏẺÂÙ¹âÔ ¾Å‹ÒÏ 12V 1 µÑÇ (ÁÕÁҾÌÍÁ¡ÑººÍÏ´ EX-05) 5. áËŋ§¨‹ÒÂä¿ÊíÒËÃѺÊàµç»à»ÍÏÁÍàµÍÏ 1 ªØ´

¡Ò÷´Åͧ P5.1 àª×Íè Áµ‹Í U-Board ࢌҡѺ¾Íϵ USB àÅ×͡㪌ä¿àÅÕÂé §¨Ò¡ºÑÊ P5.2 µ‹ÍºÍÏ´ EX-05 ࢌҡѺ U-Board ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ PORTOUT P5.3 µ‹ÍÊàµç»à»ÍÏÁÍàµÍÏࢌҡѺºÍÏ´ EX-05 áŌÇàµÃÕÂÁáËŋ§¨‹ÒÂä¿ÊíÒËÃѺÊàµç»à»ÍÏÁÍàµÍÏänjãˌ¾ÃŒÍÁ P5.4 ÇÒ§¤Í¹â·ÃŴѧÃÙ»·Õè P5-2 P5.5 ÊÌҧµÑÇá»Ã flgRun ãˌ໚¹µÑÇá»ÃºÙÅÅÕ¹·ÕÊè Nj ¹¢Í§ General Declaration ´Ñ§¹Õé Dim flgRun As Boolean

5.6 à¢Õ¹â»Ãá¡ÃÁãˌ¡ºÑ à˵ءÒó cmdRun_Click ´Ñ§¹Õé Private Sub cmdRun_Click() Dim Buffer(0) As Byte Dim i As Byte If cmdRun.Caption = “Run” Then cmdRun.Caption = “Stop” flgRun = True Else cmdRun.Caption = “Run” flgRun = False Exit Sub End If HIDComm.ReportID = 1 Do While flgRun Buffer(0) = 2 ^ i HIDComm.WriteTo Buffer, 1 hp.Delay_ms 100 If optLeft.Value Then If i < 3 Then i = i + 1 Else i = 0 End If Else If i > 0 Then i = i - 1 Else i = 3 End If End If Loop End Sub

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 111


ÃÙ»·Õè P5-2 ˹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ¢ÑºáÅФǺ¤ØÁ¡ÒÃËÁع¢Í§Êàµç»à»ÍÏÁÍàµÍϼҋ ¹¾Íϵ USB 5.7 µŒÍ§äÁ‹ÅÁ× ¼¹Ç¡ä¿Å¢Í§ HighPerformanceCounter (hpcount.ocx) ࢌÒä»ã¹â»Ãá¡ÃÁ·´Åͧઋ¹à´ÕÂǡѺ ¡Ò÷´Åͧ·Õè 4 5.8 Ãѹâ»Ãá¡ÃÁ áŌǨ‹ÒÂä¿ãˌᡋÊàµç»à»ÍÏÁÍàµÍÏáÅкÍÏ´ EX-05 àÁ×Íè Ãѹâ»Ãá¡ÃÁáÅŒÇ ãˌàÅ×Í¡·ÔÈ·Ò§¡ÒÃËÁع«Ö§è Áմnj ¡ѹ 2 ·ÔÊ·Ò§¤×Í ËÁع«ŒÒ (Left) áÅÐËÁع¢ÇÒ (Right) ¨Ò¡¹Ñ¹é ¡´»ØÁ† Run ¨ÐàËç¹ÁÍàµÍÏËÁعµÒÁ·ÔÈ·Ò§·Õ¡è Òí ˹´ ã¹¢³Ð¹ÕÂé §Ñ ÊÒÁÒöà»ÅÕÂè ¹·ÔÈ·Ò§¡ÒÃËÁع 䴌µÅÍ´àÇÅÒ Êàµç»à»ÍÏÁ͵ÍϨÐËÂØ´àÁ×Íè ÁÕ¡Òá´»ØÁ† Stop «Ö§è ¡ç¤Í× ¡ÒáÅѺʶҹТͧ»ØÁ† Run ¹Ñ¹è àͧ ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab05.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab05 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 112


¡Ò÷´Åͧ·Õè 6 ¢ÑºÃÕàŏ¼Ò‹ ¹¾Íϵ USB à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. EX-06 ºÍÏ´¢ÑºÃÕàŏ 7 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10 4. áËŋ§¨‹ÒÂä¿ÊíÒËÃѺÊàµç»à»ÍÏÁÍàµÍÏ 1 ªØ´

¡Ò÷´Åͧ P6.1 àª×Íè Áµ‹Í U-Board ࢌҡѺ¾Íϵ USB àÅ×͡㪌ä¿àÅÕÂé §¨Ò¡ºÑÊ P6.2 µ‹ÍºÍÏ´ EX-06 ࢌҡѺ U-Board ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ PORTOUT áŌÇàµÃÕÂÁáËŋ§¨‹ÒÂä¿ÊíÒËÃѺºÍÏ´ ¢ÑºÃÕàŏänjãˌ¾ÃŒÍÁ P6.3 ÇÒ§¤Í¹â·ÃŴѧÃÙ»·Õè P6-1

ÃÙ»·Õè P6-1 ¡ÒÃÇÒ§¤Í¹â·ÃÅáÅлØÁ† µ‹Ò§æ ¢Í§â»Ãá¡ÃÁ·´Åͧ¢ÑºÃÕàŏ¼Ò‹ ¹¾Íϵ USB àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 113


P6.4 à¢Õ¹â»Ãá¡ÃÁãˌ¡ºÑ à˵ءÒó cmdD_Click ´Ñ§¹Õé Private Sub cmdD_Click(Index As Integer) Dim Buffer(0) As Byte HIDComm.ReportID = 1 Buffer(0) = 2 ^ Index HIDComm.WriteTo Buffer, 1 End Sub

P6.5 µŒÍ§äÁ‹ÅÁ× ¼¹Ç¡ä¿Å¢Í§ HighPerformanceCounter (hpcount.ocx) ࢌÒä»ã¹â»Ãá¡ÃÁ·´Åͧઋ¹à´ÕÂÇ ¡Ñº¡Ò÷´Åͧ·Õè 4 P6.6 Ãѹâ»Ãá¡ÃÁ áŌǨ‹ÒÂä¿ãˌᡋºÍÏ´ EX-06 àÁ×Íè Ãѹâ»Ãá¡ÃÁáÅŒÇ ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ´Ñ§ã¹ÃÙ»·Õè P6-2 àÁ×Íè ¤ÅÔ¡é ·Õ»è Á؆ ã´»ØÁ† ˹֧è ÃÕàŏ·µÕè ͋ ÍÂÙµ‹ ç¡ÑºµíÒá˹‹§¢Í§»ØÁ† ¹Ñ¹é ¡ç¨Ð·íÒ§Ò¹ áÅÐàÁ×Íè ¡´«éÒí ¨Ð໚¹¡Òû´¡Ò÷íÒ§Ò¹¢Í§ÃÕàŏ ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab06.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab06 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

ÃÙ»·Õè P6-2 áÊ´§Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ·´Åͧ lab06.vbp

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 114


¡Ò÷´Åͧ·Õè 7 ͋ҹÊÑ­­Ò³ÍйÒÅÍ¡¼‹Ò¹¾Íϵ USB ËÅÑ¡¡Òà à¹×Íè §¨Ò¡äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏËÅÑ¡·Õ¤è Ǻ¤ØÁ¡Ò÷íÒ§Ò¹·Ñ§é ËÁ´¢Í§ U-Board ໚¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍÏ ·ÕÁè ÇÕ §¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ¢¹Ò´ 8 ºÔµ¨íҹǹ 5 ª‹Í§ ºÃèØÍÂÙÀ‹ ÒÂ㹠ʋ§¼ÅãˌÊÒÁÒö㪌§Ò¹ U-Board 㹡ÒÃÃѺÊÑ­­Ò³ÍйÒÅÍ¡à¾×Íè á»Å§à»š¹¢ŒÍÁÙÅ·Ò§´Ô¨µÔ ÍÅà¾×Íè ·íÒ¡ÒûÃÐÁÇżŵ‹Íä»ä´Œ â´Âã¹Ê‹Ç¹¢Í§Ç§¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍŨÐä´ŒÃºÑ ¡ÒáíÒ˹´ãˌ໚¹àÍç¹´¾Íµ 2 㹡Òà ͋ҹ¢ŒÍÁÙÅ´Ô¨µÔ ÍÅ·Õáè »Å§ä´Œ µŒÍ§·íÒ¡ÒáíÒ˹´ª‹Í§ÊÑ­­Ò³·Õµè ͌ §¡ÒÃ͋ҹ¡‹Í¹ «Ö§è ¨ÐãªŒÇ¸Ô àÕ ´ÕÂǡѺ¡ÒÃÃѺʋ§¤‹Ò·Õè PORTIN áÅÐ PORTOUT

à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. áËŋ§¨‹ÒÂ俵ç»ÃѺ¤‹Ò䴌 0-5V 100mA ¢Ö¹é ä» 1 ªØ´ 4. 䢤ǧàÅç¡áºº»ÅÒÂá©¡ 1 Íѹ

¡Ò÷´Åͧ P7.1 ແ´â»Ãá¡ÃÁ Visual BASIC à¾×Íè ÇÒ§¤Í¹â·ÃÅáÅлØÁ† ¡´µ‹Ò§æ ÊíÒËÃѺÊÌҧâ»Ãá¡ÃÁ´Ñ§ã¹ÃÙ»·Õè P7-1 P7.2 à¢Õ¹â»Ãá¡ÃÁãˌ¡ºÑ à˵ءÒó cmdCh_Click ´Ñ§¹Õé Private Sub cmdCh_Click(Index As Integer) Dim Buffer() As Byte ReDim Buffer(0) HIDComm.ReportID = 2

Buffer(0) = Index

HIDComm.WriteTo Buffer, 1

hp.Delay_ms 71

Buffer = HIDComm.ReadFrom(1)

¡íÒ˹´ Report ID à¾×Íè µÔ´µ‹Í¡Ñº¾Íϵ A/D ¡íÒ˹´ª‹Í§ÊÑ­­Ò³¢Í§ A/D ʋ§¢ŒÍÁÙÅä» U-Board ˹‹Ç§àÇÅÒãˌ U-Board àµÃÕÂÁ¢ŒÍÁÙÅ ÃѺ¢ŒÍÁÙŨҡ U-Board

txtValue(Index).Text = Buffer(0) End Sub

¨Ò¡â»Ãá¡ÃÁ ¨Ðʋ§¢ŒÍÁÙÅä»·Õè Report ID 2 à¾×Íè ¡íÒ˹´ª‹Í§ÊÑ­­Ò³·Õµè ͌ §¡ÒÃá»Å§¤‹Ò ˹‹Ç§àÇÅÒ 71 ÁÔÅÅÔÇ¹Ô Ò·Õ áŌǨ֧͋ҹ¢ŒÍÁÙÅ àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 115


ÃÙ»·Õè P7-1 áÊ´§¡ÒÃÇÒ§¤Í¹â·ÃÅáÅлØÁ† ÃÙ»·Õè P7-2 ˹ŒÒµÒ¢Í§â»Ãá¡ÃÁ·´Åͧ µ‹Ò§æ ¢Í§â»Ãá¡ÃÁ·´ÅͧÃѺáÅÐáÊ´§¤‹Ò lab07.vbp ·Õãè ªŒã¹¡Ò÷´Åͧ͋ҹ¤‹ÒÊÑ­­Ò³ ÍйÒÅÍ¡¼‹Ò¹¾Íϵ USB ÊÑ­­Ò³ÍйÒÅÍ¡¼‹Ò¹¾Íϵ USB P7.3 ¼¹Ç¡ä¿Å¢Í§ HighPerformanceCounter (hpcount.ocx) ࢌÒä»ã¹â»Ãá¡ÃÁઋ¹à´ÕÂǡѺ¡Ò÷´Åͧ·Õè 4 P7.4 Ãѹâ»Ãá¡ÃÁ áŌǵ‹ÍáËŋ§¨‹ÒÂä¿ 0-5V ࢌҷÕÍè ¹Ô ¾ØµÍйÒÅÍ¡ CH2-CH4 àÁ×Íè Ãѹâ»Ãá¡ÃÁáÅŒÇ ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ´Ñ§ã¹ÃÙ»·Õè P7-2 àÁ×Íè µŒÍ§¡ÒÃ͋ҹ¤‹ÒÊÑ­­Ò³ÍйÒÅÍ¡ 㹪‹Í§ã´ ãˌ¡´»ØÁ† »ÃШíÒª‹Í§¹Ñ¹é ¡µÑÇÍ‹ҧ¡´»ØÁ† CH0 ¨Ð໚¹¡ÒÃ͋ҹ¤‹Òáç´Ñ¹ÍйÒÅÍ¡·ÕÍè ¹Ô ¾ØµÍйÒÅÍ¡ª‹Í§ 0 ãˌ·´Åͧ㪌䢤ǧàÅç¡»ÃѺ¤‹Ò¢Í§µÑǵŒÒ¹·Ò¹»ÃѺ¤‹Ò䴌·µÕè Òí á˹‹§ CH0 º¹ U-Board ¨ÐàËç¹¢ŒÍÁÙÅ´Ô¨µÔ ÍŢͧ áç´Ñ¹ÍйÒÅ͡㹪‹Í§¹Ñ¹é »ÃÒ¡¯¢Ö¹é à»ÅÕÂè ¹á»Å§µÒÁ¡ÒûÃѺ¤‹Ò¢Í§µÑǵŒÒ¹·Ò¹ ¡ÒûÃѺ¤‹Ò¢Í§µÑǵŒÒ¹·Ò¹¹Ñ¹é ໚¹¡ÒûÃѺáç´Ñ¹·Õ»è ͇ ¹ãˌᡋǧ¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹´Ô¨µÔ ÍÅ ·ÕÁè ÍÕ ÂÙ㋠¹µÑÇ PIC16C745 Íѹ໚¹äÁâ¤Ã¤Í¹â·ÃÅàÅÍϤǺ¤ØÁ¡Ò÷íÒ§Ò¹¢Í§ U-Board â´Âº¹ U-Board ÁÕµÇÑ µŒÒ¹·Ò¹»ÃѺ¤‹Ò䴌ÊÒí ËÃѺÊÌҧáç´Ñ¹ÍйÒÅÍ¡ÍÔ¹¾Øµà¾×Íè »‡Í¹ÊíÒËÃѺ·´Åͧǧ¨Ãá»Å§ÊÑ­­Ò³ÍйÒÅ͡໚¹ ´Ô¨µÔ ÍÅ 2 ªØ´¤×Í ã¹ CH0 áÅÐ CH1 㹡óշµÕè ͌ §¡Ò÷´Åͧ㪌áç´Ñ¹¨Ò¡ÀÒ¹͡ ·íÒ䴌â´Âµ‹Íáç´Ñ¹à¢ŒÒ·ÕÍè ¹Ô ¾Øµ CH2-CH4 â´ÂÁÕà§×Íè ¹ä¢Ç‹Ò áç´Ñ¹·Õ»è ͇ ¹à¢ŒÒÁÒ¹Ñ¹é µŒÍ§ÍÂÙ㋠¹ª‹Ç§ 0-5V ෋ҹѹé ÊíÒËÃѺ¡ÒÃ͋ҹ¤‹ÒãËŒãªŒÇ¸Ô ¡Õ ÒÃà´ÕÂǡѺ CH0 áÅÐ CH1 ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab07.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab07 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 116


¡Ò÷´Åͧ·Õè 8 ¢ÂÒ¾ÍϵàÍÒµ¾Øµáºº«Ô§â¤Ã¹ÑÊÊíÒËÃѺ ¡ÒäǺ¤ØÁãˌᡋ¾Íϵ USB ËÅÑ¡¡Òà ¾Íϵ USB ÁÕÅ¡Ñ É³Ð໚¹ºÑÊ 2 àʌ¹ ´Ñ§¹Ñ¹é ¡ÒÃʋ§ÊÑ­­Ò³Í͡令Ǻ¤ØÁÍØ»¡Ã³ÀÒ¹͡¨Ö§µŒÍ§¡ÃзíÒ ¼‹Ò¹ÊÒÂÊÑ­­Ò³·Ñé§ 2 àʌ¹¹Ñé¹ «Öè§ã¹·Ò§»¯ÔºÑµÔ¨ÐµŒÍ§¾Ö觾Òἧǧ¨Ã੾ÒÐÊíÒËÃѺ¨Ñ´¡ÒÃÊÑ­­Ò³´Ñ§¡Å‹ÒÇ «Ö§è 㹡Ò÷´Åͧ·Õ¼è ҋ ¹ÁÒ¨Ð㪌 U-Board ໚¹µÑÇ´íÒà¹Ô¹¡Òà Í‹ҧäáçµÒÁ U-Board àͧ¡çÁ¾Õ ÍϵàÍÒµ¾µØ ÊíÒËÃѺʋ§ÊÑ­­Ò³ä»¤Çº¤ØÁÍØ»¡Ã³â´ÂµÃ§à¾Õ§ 8 ºÔµ ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ PORTOUT «Ö§è ÍÒ¨äÁ‹à¾Õ§¾Í ᵋÍ‹ҧäáçµÒÁº¹ U-Board 䴌àµÃÕÂÁ¾ÍϵÊíÒËÃѺÊ×Íè ÊÒà ¢ŒÍÁÙÅẺ«Ô§â¤Ã¹ÑÊänj 1 ¾Íϵ¹Ñ¹é ¤×Í SHIFTOUT â´Â¾Íϵ¹Õ¨é ÐÁÕ¡ÒÃʋ§¢ŒÍÁÙÅÍ͡Ẻ͹ءÃÁÊÒÁÒöµ‹Í¡Ñº ÍØ»¡Ã³·ãÕè ªŒ¡ÒÃÊ×Íè ÊÒâŒÍÁÙÅ͹ءÃÁẺ«Ô§â¤Ã¹ÑÊ䴌 «Ö§è 㹪ش·´Åͧ NX-2000 Plus 䴌àµÃÕÂÁºÍÏ´ EX09 Íѹ໚¹á¼§Ç§¨Ã¢ÂÒ¾ÍϵàÍÒµ¾µØ ¼‹Ò¹¡ÒÃÊ×Íè ÊÒâŒÍÁØÅẺ«Ô§â¤Ã¹ÑÊänjà¾×Íè ¡ÒùÕâé ´Â੾ÒÐ EX-09 ÊÒÁÒö¢ÂÒ¾Íϵ䴌 16 ª‹Í§¨Ò¡ÊÒÂÊÑ­­Ò³ 4 àʌ¹¢Í§¾Íϵ SHIFTOUT ¢Í§ U-Board áÅÐÊÒÁÒöµ‹Í¾‹Ç§ä´ŒÍ‹ҧäÁ‹¨Òí ¡Ñ´ ᵋÍ‹ҧäáçµÒÁ ã¹·Ò§»¯ÔºµÑ ¨Ô ÃÔ§ ËÒ¡àÅ×͡㪌ä¿àÅÕÂé §¢Í§ U-Board ¨Ò¡ºÑÊ ¤Çõ‹Í EX-09 äÁ‹à¡Ô¹ 2 ºÍÏ´ ᵋ¶ÒŒ Ëҡ㪌ä¿àÅÕÂé §¨Ò¡ÀÒ¹͡ÊÒÁÒö¨Ðµ‹Íà¾ÔÁè 䴌 4 ºÍÏ´ ´ŒÒ¹¡Ãкǹ¡Ò÷ҧ«Í¿µáÇÏ äÁâ¤Ã¤Í¹â·ÃÅàÅÍϺ¹ U-Board ¨Ð¡íÒ˹´ãˌ¾Íϵ SHIFTOUT ÃѺ ¢ŒÍÁÙŨҡ¤ÍÁ¾ÔÇàµÍϼҋ ¹ Report ID 1 ઋ¹à´ÕÂǡѺ¾Íϵ PORTOUT ᵋ¨Ð·íÒ¡ÒÃàÅ×Íè ¹¢ŒÍÁÙÅ令ÃÒÇÅÐ 8 ºÔµ ᵋ¨ÐÂѧäÁ‹ãˌʭ Ñ ­Ò³áŵ«¨¹¡Ç‹Ò¨Ðä´ŒÃºÑ ¢ŒÍÁÙÅ 0 ¨Ò¡ Report ID 0

à¤Ã×Íè §Á×ÍáÅÐÍØ»¡Ã³ 1. U-Board ºÍÏ´àª×Íè Áµ‹Í¾Íϵ USB áÅÐÊÒÂàª×Íè Áµ‹Í USB 2. ¤ÍÁ¾ÔÇàµÍÏ·ÁÕè ¾Õ Íϵ USB µÔ´µÑ§é Ãкº»¯ÔºµÑ ¡Ô ÒÃÇÔ¹â´Çʏ áÅÐ Visual BASIC àÇÍϪ¹Ñ 6.0 3. EX-01 ºÍÏ´ LED Á͹ÔàµÍÏ 16 ª‹Í§ ¾ÃŒÍÁÊÒ IDC-10 ¨íҹǹ 1 ªØ´ 4 . EX-09 ºÍÏ´¢ÂÒ¾ÍϵàÍÒµ¾µØ Ẻ«Ô§â¤Ã¹ÑÊ ¾ÃŒÍÁÊÒ IDC-10 ¨íҹǹ 1 ªØ´

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 117


ÃÙ»·Õè P8-1 áÊ´§¡ÒÃÇÒ§¤Í¹â·ÃÅáÅлØÁ† µ‹Ò§æ ¢Í§â»Ãá¡ÃÁ·´Åͧ¢ÂÒ¾ÍϵàÍÒµ¾µØ ãˌᡋ¾Íϵ USB

¡Ò÷´Åͧ P8.1 ແ´â»Ãá¡ÃÁ Visual BASIC à¾×Íè ÇÒ§¤Í¹â·ÃÅáÅлØÁ† µ‹Ò§æ ÊíÒËÃѺÊÌҧâ»Ãá¡ÃÁ·´Åͧ´Ñ§ÃÙ»·Õè P8-1 P8.2 à¢Õ¹â»Ãá¡ÃÁãˌ¡ºÑ à˵ءÒó cmdOut_Click Private Sub cmdOut_Click() Dim Buffer(0) As Byte HIDComm.ReportID = 1 Buffer(0) = CByte(“&H” & txtOutH.Text) HIDComm.WriteTo Buffer, 1 Buffer(0) = CByte(“&H” & txtOutL.Text) HIDComm.WriteTo Buffer, 1 HIDComm.ReportID = 0 Buffer(0) = 0 HIDComm.WriteTo Buffer, 1 End Sub

¨Ò¡â»Ãá¡ÃÁ¨Ð·íÒ¡ÒÃʋ§¢ŒÍÁÙÅ 1 亵 2 ¤ÃÑé§ â´Âʋ§äºµÊÙ§¡‹Í¹ ¨Ò¡¹Ñ鹨֧ʋ§äºµµèíÒ àÁ×èÍʋ§¤Ãº áŌǨ֧ʋ§äºµáŵ« â´Âʋ§¢ŒÍÁÙÅ 0 仡Ѻ Report ID 0 ¶ŒÒµŒÍ§¡ÒÃÁÒ¡¡Ç‹Ò 2 亵ÊÒÁÒöµ‹ÍºÍÏ´à¾ÔÁè àµÔÁ áŌÇʋ§¨íҹǹ¢ŒÍÁÙÅãˌ¤ÃºµÒÁ¨íҹǹª‹Í§·Õ赌ͧ¡ÒâÂÒÂ䴌 P8.3 àª×Íè Áµ‹ÍºÍÏ´ EX-09 ¡Ñº U-Board ¼‹Ò¹·Ò§¤Í¹à¹ç¡àµÍÏ SHIFTOUT ´ŒÇÂÊÒ IDC-10 P8.4 µ‹ÍÊÒ IDC-10 ¨Ò¡¤Í¹à¹ç¡àµÍÏ DATA BUS#1 º¹ºÍÏ´ EX-01 ¡Ñº EX-09 ࢌҷդè ͹à¹ç¡àµÍÏ OUTL ´ŒÇÂÊÒ IDC-10 P8.5 µ‹ÍÊÒ IDC-10 ¨Ò¡¤Í¹à¹ç¡àµÍÏ DATA BUS#2 º¹ºÍÏ´ EX-01 ¡Ñº EX-09 ࢌҷդè ͹à¹ç¡àµÍÏ OUTH ´ŒÇÂÊÒ IDC-10 àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 118


ÃÙ»·Õè P8-2 ˹ŒÒµÒ¢Í§â»Ãá¡ÃÁ lab08.vbp ·Õãè ªŒ·´Åͧ¢ÂÒ¾ÍϵàÍÒµ¾µØ ãˌᡋ¾Íϵ USB P8.5 àÅ×͡㪌ä¿àÅÕÂé §¨Ò¡ºÑʢͧ¾Íϵ USB â´ÂàÅ×Í¡¨ÑÁê à»ÍÏ SUPPLY SELECT º¹ U-Board ÁÒ·Õµè Òí á˹‹§ BUS áŌǵ‹ÍÊÒ USB ࢌҡѺ U-Board P8.6 Ãѹâ»Ãá¡ÃÁ áŌǻ‡Í¹¢ŒÍÁÙÅàÍÒµ¾µØ ·Õµè ͌ §¡ÒÃŧ㹪‹Í§ OUTL áÅÐ OUTH áŌǡ´»ØÁ† Shfit Out Êѧࡵ ¡Ò÷íÒ§Ò¹¢Í§ LED º¹ºÍÏ´ EX-01 àÁ×Íè Ãѹâ»Ãá¡ÃÁáÅŒÇ ¨Ð»ÃÒ¡¯Ë¹ŒÒµ‹Ò§¢Í§â»Ãá¡ÃÁ´Ñ§ã¹ÃÙ»·Õè P8-2 ËÅѧ¨Ò¡·Õ¡è Òí ˹´¤‹Ò¢Í§àÍÒµ¾µØ áÅÐ ¡´»ØÁ† Shift Out áÅŒÇ ¢ŒÍÁÙÅ¹Ñ¹é ¨Ðä»»ÃÒ¡¯·Õºè ÍÏ´ EX-01 ¹Ñ¹è ËÁÒ¤ÇÒÁÇ‹Ò ¢³Ð¹Õé ÊÒÁÒö¢ÂÒ¨íҹǹ ¾ÍϵàÍÒµ¾Øµ·ÕèÊÒÁÒö¤Çº¤ØÁ¼‹Ò¹¾Íϵ USB 䴌à¾ÔèÁàµÔÁ໚¹ 16 ª‹Í§ ¨Ò¡»¡µÔ·ÕèÁÕà¾Õ§ 8 ª‹Í§¼‹Ò¹·Ò§ PORTOUT ¢Í§ U-Board áÅжŒÒËÒ¡àª×Íè Áµ‹ÍºÍÏ´ EX-09 ¾‹Ç§à¢ŒÒÁÒÍÕ¡¡ç¨ÐÊÒÁÒö¢ÂÒÂà¾ÔÁè ä´ŒÍ¡Õ ºÍÏ´ÅÐ 16 ª‹Í§ â´Â·ÕÂè §Ñ ¤§ãªŒ¨Òí ¹Ç¹ÊÒÂÊÑ­­Ò³¨Ò¡ SHIFTOUT ¢Í§ U-Board ෋Òà´ÔÁ ÊÒÁÒö·´Åͧâ»Ãá¡ÃÁ䴌¨Ò¡ä¿Å lab08.vbp ã¹â¿Åà´ÍÏ usb_port/labUboardV2/lab08 ·Õºè ÃèØÍÂÙ㋠¹á¼‹¹«Õ´ÃÕ ÍÁ PC Interface

àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 119


àÃÕ¹ÃÙጠÅл¯ÔºµÑ ¡Ô ÒÃàª×Íè Áµ‹Í¤ÍÁ¾ÔÇàµÍÏ¡ºÑ ÍØ»¡Ã³ÀÒ¹͡¼‹Ò¹¾Íϵ USB ¢Ñ¹é ¾×¹é °Ò¹ 120

usb2006  

(C) Innovative Experiment Co.,Ltd. Simple PC-USB port Interface Experiment text-lab manual ISBN 974-90349-0-2