45 91 9 6 五、發明與都』〆』 本月係i於一種滑鼠介面轉換方法及裝置’特別是 關於一種能自動辨識滑鼠所接的介面為PS/2‘USB介面的 一種方法及其裝置。 按’ USB (通用串列匯流排^:11丨代!^3| Serial Bus)介 面是一種個人電腦界新竄起的標準介面,它可讓所有的電 腦週邊皆串接於該介面上,達到快速且簡單的訊號傳輸功 能,但必須每一項電驅週邊都符合USB介面的規格。目前 战USB介面儼然已成為每一家電腦週邊廠商必須配合研發 的標準介面。 經濟部中央標準局員工消費合作社印11 雖然新一代電腦上皆配有USB介面,但仍有許多的舊 型電腦並未有USB介面,而PS/2與USB介面間尚無可轉換 的方法,且兩者間無法相容’電腦週邊業者必須針對不同 介面開發不同的週邊產品。為能有效運用現有資源,使新 一代L·SB介面的滑鼠產品能使用在PS/2介面的電腦上,乃 疋滑鼠薇冏極待研究開發的目標之一。但我們都知道PS/2 介面與USB介面之間的差異極大,就外觀而言,ps/2為一 圓形接頭’ USB為一長扁形接逋’就電路接腳而言,其數 量不同、信號不同、每支接腳的功能亦不同,如何才能將 USB介面的滑鼠接到ps/2的介面上.乃是本發明欲待解決 的重要課題。 有鑑於斯,本發明即為解決上述習知缺點而加以克服 ’經過不斷研究改良,終於開發出一種滑鼠介面轉換方法 及裝置,能夠自動辨識滑鼠所接的介面是PS/2或USB的介 面,達到有效運用即有資源的目的。 一 3 - 8J. 3.10,000 -----------裝------1T (請先閱讀背面之注意事項再填寫本頁) 本纸張尺度適用中國國家樣率(CNS ) A4規格(210X297公釐) 45 91 9 6 A7 B7 五 、發明與Λ 本嗌月之圭要目的係在於提供一種滑鼠介面轉換方法 及裝置,其係將USB介面的滑鼠自動辨識轉換成ps/2介面 之裝置,可使新一代USB介面的滑鼠使用於舊型電腦上。 為使貴審查委員進一步瞭解本發明之技術特徵,茲 附以圖式詳細說明如后: (一) 圖式說明 圖一 A係為本發明與USB介面相接之方塊圖; 圖一B係為本發明與PS/2介面相接之方塊圖; 圖二A係為USB介面之等效電路圖; 圖二B係為PS/2介面之等效電路圖;及 圖三係為本發明滑鼠介面轉換方法之偵測步驟流程圖。 (二) 元件說明 1............. USB插頭 3..............轉接頭 USB接座 .啟動 ---------裝-- (請先閲讀背面之注$項再填寫本頁) 訂j· 經濟部中央搮準局貝工消費合作社印製 5145 91 9 6 V. Invention and Capital "〆" This month is about a method and device for converting mouse interface, especially a method and a method that can automatically recognize that the interface connected to mouse is PS / 2 'USB interface and Its device. Press' USB (Universal Serial Bus ^: 11 丨 Generation! ^ 3 | Serial Bus) interface is a new standard interface in the personal computer industry, which allows all computer peripherals to be serially connected to this interface to achieve Fast and simple signal transmission function, but each drive must meet the USB interface specifications. At present, the USB interface has become a standard interface that every computer peripheral manufacturer must cooperate with. Although the new generation of computers are equipped with a USB interface, there are still many older computers that do not have a USB interface, and there is no way to convert between PS / 2 and USB interfaces. And the two are not compatible. 'Computer peripherals must develop different peripheral products for different interfaces. In order to make effective use of existing resources and enable the new generation of L · SB interface mouse products to be used on PS / 2 interface computers, it is one of the goals of the mouse and mouse to be researched and developed. But we all know that the difference between the PS / 2 interface and the USB interface is huge. As far as appearance is concerned, ps / 2 is a circular connector, and USB is a long flat connector. As far as the circuit pins are concerned, the number is different. Different signals and different pins have different functions. How to connect a USB interface mouse to a PS / 2 interface is an important issue to be solved by the present invention. In view of this, the present invention overcomes the above-mentioned conventional disadvantages and overcomes them. Through continuous research and improvement, a mouse interface conversion method and device have finally been developed, which can automatically identify whether the interface connected to the mouse is PS / 2 or USB. Interface to achieve the purpose of effective use of resources. 1 3-8J. 3.10,000 ----------- Package ------ 1T (Please read the precautions on the back before filling out this page) The paper size is applicable to the Chinese national sample rate ( CNS) A4 specification (210X297 mm) 45 91 9 6 A7 B7 V. Invention and Λ The purpose of this month is to provide a mouse interface conversion method and device, which automatically identify and convert the USB interface mouse The device with ps / 2 interface enables the new generation USB mouse to be used on old computers. In order to make your reviewing committee better understand the technical features of the present invention, detailed drawings are attached as follows: (1) Schematic description Figure 1A is a block diagram of the connection between the present invention and a USB interface; Figure 1B is The block diagram of the present invention connected to the PS / 2 interface; Figure 2A is the equivalent circuit diagram of the USB interface; Figure 2B is the equivalent circuit diagram of the PS / 2 interface; and Figure 3 is the mouse interface conversion of the invention Flow chart of method detection steps. (Two) component description 1 ............. USB plug 3 .............. USB connector of the adapter. Start ------- --- install-- (please read the note on the back before filling in this page).
將USB插頭接上即完成滑鼠的安裝,而滑鼠上之USB插頭 包含Vcc、Gnd、PI、P2及P3等接腳,作為將滑鼠與電腦 間訊號傳輸之連接點。由圖一A中所示,其滑鼠上usb插 頭1的PI、P2接腳(11,12)與電腦上USB接座2的D+、D- 接腳(21,22相連接,其訊號亦從D+、D-兩接腳(21 22)傳 -4.- 本紙張尺度逍用中國國家標準(CNS ) A4規格(210X297公釐) 83. 3.10,000 45 91 9 6 A7 B7 經濟部中央標準局員Η消費合作杜印裝 iL、入響。明() 請參閱圖一B所示,係為本發明滑鼠介面轉換方法及 裝置與PS/2介面相接之方塊圖,由於USB介面與PS/2介面 的不同,故本發明係利用一轉接頭3將甘SB的長爲型插頭 轉換成PS/2的圓型插頭’但又由於其電路接腳皆不相同, 該轉接頭係將滑鼠USB插座端的D+(21)及D-(22)接腳與PS /2插頭端的Clock(41)及Data(42)兩支接腳相連接,其它如 電源(Vcc)及接地(Gnd)等接腳則相對應連接。但因USB介 面的訊號與PS/2介面的訊號不同,為使滑鼠能正確的將 USB或PS/2的訊號傳輸至電腦,故滑鼠内部需針對USB及 PS/2兩種不同的介面_去_氣4^—凰11程式,才能正確的驅動 USB及PS/2介面。但滑鼠本身如何自動偵測是使用在USB 或PS/2的介面上乃是本發明之特點。 請參閱圖二A及圖二B所示,其係為USB介面及與 PS/2介面之等效電路圖,由圖二A中得知USB介面的等效 電路為D+(21)及D-(22)各接一 15K電阻(23,23,)接地,而由 圖二B中得知PS/2介面的等效電路為C iock(41)及D ata(42) 各接12K電阻(43,43’)接Vcc ’故本發明即可利用此一不同 電壓特性的原理來偵測滑鼠本身所接的介面為USB或PS/2 介面。一般滑鼠内部電路包含一控制器,能將滑鼠所擷取 到位移變化轉換成電訊號送給電腦,本發明即將此偵測步 驟寫入控制器中,藉以判斷滑鼠所接的介面。 請參閲圖三所示’其係為本發明滑鼠介面轉換方法之 偵測步驟流程圖,首先當滑鼠啟動時(51)本發明先將滑鼠 —5 一 訂— I I I I 線 (請先閲讀背面之注意事項再填窝本頁) 本紙張尺度逍用中國固家揉率(CNS ) Α4規格(210X297公釐) 83.3.10,000 45 91 9 6 經濟部中夬標準局員工消費合作杜印製 A 7 ____B7 五初^化(Initial)(52),即先檢查控制器内之記憶 體’並設定參數,接著再利用圖二中USB及PS/2介面等效 電路不同電壓的特性原理,將PI、P2接腳(π, 12)浮接一 段時間(53) ’此段時間則偵測pi、P2接腳Π1,12)是否同時 為低電位(Low)(54),若是則滑鼠所接介面有可能是uSB 介面’若此段時間P卜P2接腳(丨1,丨2)不同時為低電位(L〇w) 時,則一定為PS/2介面。 其電路原理:先就USB介面來說,請參照圖二a所示 ’因?1、?2接腳(11,12)浮接’而〇+、0-接腳(21,22)皆以 15K(23,23’)接地,所以D+及D-兩接腳(21,22)此時皆為低 電位(Low)。而就PS/2介面而言,請參照圖二β所示,則 因PI、P2接腳浮接,而Clock及Data接腳(41,42)皆 以12K(4M3’)接Vcc ’故Clock及Data(41,42)皆應為高電位 (Hi) ’由此可知若pi、P2接腳(11,12)浮接時,偵測到Pi及 P2兩接腳(〗1,12)不同時為低電位(_Low),則滑鼠所接介面 必為PS/2介面,即可執行PS/2程式(55)以送出PS/2的控制 訊號°但若PI、P2接腳(11,12)同時為低電位(Low)時則尚 需做另外判斷,才不致誤判。 本發明為避免誤判,故另以一P3接腳(13)接一 1.5K電 阻(14)接至P2接腳(12),當PI、P2接腳(11,12)浮接時?3接 腳(13)亦應浮接(53) ’此時若偵測到PI、P2接腳(11,12)同 時為低電位(Low)時,則將P3接腳(13)的電壓提昇至3.3V (56),再來偵測P2接腳(12)是否為高電位(Hi)(57)。此時若 偵測到P1接腳(Π)為低電位(Low),而P2接腳(12)為高電位-6 - 本紙張尺度逍用中國國家標準(CNS ) A4規格(2丨0X297公釐) 83 3 11 «m —^ϋ · ftn 1^1 ^^^1 ^^^1 -^-1 、ve (请先閲讀背面之注意事項再填寫本頁) 4 5 91 9 6 A7 ____B7_ 五、(if時説,明則W 所接介面必為USB介面,即可執行USB程 式(58)以送出USB控制訊號’否則滑鼠即接pS/2介面,而 去執行PS/2程式(55)。 其電路原理為:先就USB介面來說,當P3接腳(13)電 壓提昇至3.3V時,則在USB介面的D-接腳(22)則有大約3V 的電壓,以USB的規格而言3V電壓即為高電位(Hi),但D+ 接腳(21)必定為低電位而就ps/2介面言,當P3接腳(13) 電歷提升至3.3V時’在PS/2介面的Data接腳(42)則有大約 有3.5V的電壓,但不論Data捿腳(42)電位為高或低電位(出 或Low),其Clock接腳(41)必定為高電位(Hi),故由此即可 明確的判斷出滑鼠所接之介面為USB或PS/2介面。 由上述電路原理可知:當滑鼠所.接介面為ps/2介面時 .經過PI,P2接腳(JU2)浮接一段時間後,P1、P2接腳 (11,12)必定不會同時為低電位(l〇w),而可直接執行ps/2 程式’此為第一次的偵測。當滑鼠所接介面為USB介面時 ’經過PI、P2接腳(11,12)浮接一段時間後,P1、P2接腳 (11,12)應同時為低電位(Low),此時在將P3接腳(13)電愿 長;昇至3.3V後,P2接腳(12)應為高電位(Hi) *而p 1接腳(11) 仍為低電位(Low) ’此時即可確定為USB介面,直接執行 USB程式,此為第二次偵測。但若因雜訊或其它因素造成 滑鼠介面在第一次偵測時誤判,再經過第二次偵測時,其 P1接腳(11)為高電位(Hi)的即為PS/2介面,P1接腳(1丨)為 低電位(Low)的即為USB介面,如此可避免誤判。 本發明將上述步驟寫至滑鼠内部的控制器内,在滑鼠 一了一 本紙張尺度埴用肀國國家標準(CNS ) A4规格(210X297公着) t------ΐτ (請先閲讀背面之注意事項再填寫本頁) 經濟部中央榡準局員工消費合作社印製 83.3.10,000Connect the USB plug to complete the installation of the mouse. The USB plug on the mouse includes Vcc, Gnd, PI, P2, and P3 pins, etc., as a connection point for transmitting signals between the mouse and the computer. As shown in Figure 1A, the PI and P2 pins (11, 12) of the USB plug 1 on the mouse are connected to the D + and D- pins (21, 22) of the USB connector 2 on the computer, and their signals are also From the D + and D-pins (21 22) -4.- This paper size is free from the Chinese National Standard (CNS) A4 (210X297 mm) 83. 3.10,000 45 91 9 6 A7 B7 Central Standard of the Ministry of Economic Affairs The bureau and the consumer cooperated to print the iL and enter the ring. Ming () Please refer to Figure 1B, which is a block diagram of the mouse interface conversion method and device of the present invention connected to the PS / 2 interface. Because the USB interface and PS The / 2 interface is different, so the present invention uses a connector 3 to convert the long plug of Gan SB into a round plug of PS / 2. However, because its circuit pins are all different, the adapter is Connect the D + (21) and D- (22) pins on the USB socket of the mouse to the Clock (41) and Data (42) pins on the PS / 2 plug. Others such as power (Vcc) and ground (Gnd ) And other pins are correspondingly connected. However, because the signal of the USB interface is different from the signal of the PS / 2 interface, in order for the mouse to correctly transfer the USB or PS / 2 signal to the computer, the internal of the mouse must be And PS / 2 The same interface _go_qi 4 ^ —Phoenix 11 program can drive the USB and PS / 2 interfaces correctly. However, how the mouse automatically detects whether it is used on the USB or PS / 2 interface is a feature of the present invention. Please refer to Figure 2A and Figure 2B, which are equivalent circuit diagrams of the USB interface and PS / 2 interface. From Figure 2A, it is known that the equivalent circuits of the USB interface are D + (21) and D- (22) Connect a 15K resistor (23, 23,) to ground, and as shown in Figure 2B, the equivalent circuit of the PS / 2 interface is C iock (41) and D ata (42) each connected to a 12K resistor (43 43 ') Connected to Vcc', so the present invention can use this principle of different voltage characteristics to detect that the interface connected to the mouse itself is USB or PS / 2 interface. Generally, the internal circuit of the mouse includes a controller, which can The displacement change captured by the mouse is converted into an electrical signal and sent to the computer. The present invention writes this detection step into the controller to determine the interface that the mouse is connected to. Please refer to Figure 3, which is based on Invented the flow chart of the detection steps of the mouse interface conversion method. First, when the mouse is activated (51), the present invention will first order the mouse-5-order-IIII line (please read the back first Note: Please fill in this page again.) This paper size is in accordance with China's Gujiao Kneading Ratio (CNS) Α4 size (210X297 mm) 83.3.10,000 45 91 9 6 Employees' cooperation cooperation of China Standards Bureau of the Ministry of Economic Affairs, printed A 7 ____B7 Initial (52), that is, first check the memory in the controller and set the parameters, and then use the characteristic principle of different voltages of the equivalent circuit of the USB and PS / 2 interface in Figure 2 to convert PI and P2 Pin (π, 12) floats for a period of time (53) 'During this period, detect whether pi, P2 pins Π1, 12) are at the same time Low (54), if it is, then the interface that the mouse is connected to has It may be the uSB interface. 'If the P2 and P2 pins (丨 1, 丨 2) are not at the low potential (L0w) at the same time, it must be the PS / 2 interface. The circuit principle: As far as the USB interface is concerned, please refer to Figure 2a. 1,? The 2 pins (11, 12) are floating, and the 0+ and 0- pins (21, 22) are grounded at 15K (23, 23 '), so the D + and D- pins (21, 22) are now All are low. As for the PS / 2 interface, please refer to Figure 2 β, because the PI and P2 pins are floating, and the Clock and Data pins (41,42) are connected to Vcc 'by 12K (4M3'), so Clock And Data (41,42) should both be at high potential (Hi). It can be seen that if the pi and P2 pins (11,12) are floating, it is detected that the two pins of Pi and P2 (〖1,12) are different Is low potential (_Low), the interface that the mouse is connected to must be a PS / 2 interface, and the PS / 2 program (55) can be executed to send out the PS / 2 control signal. However, if the PI and P2 pins (11, 12) At the same time, it is necessary to make another judgment when it is low, so as not to cause misjudgment. To avoid misjudgment in the present invention, a P3 pin (13) is connected to a 1.5K resistor (14) to a P2 pin (12). When the PI and P2 pins (11, 12) are floating? Pin 3 (13) should also be floated (53) 'At this time, if the PI and P2 pins (11, 12) are detected to be low at the same time, the voltage of pin 3 (13) will be increased To 3.3V (56), and then detect whether P2 pin (12) is high (Hi) (57). At this time, if the P1 pin (Π) is detected as a low potential (Low) and the P2 pin (12) is detected as a high potential -6-This paper is scaled to the Chinese National Standard (CNS) A4 specification (2 丨 0X297 male) (83%) 83 3 11 «m — ^ · ftn 1 ^ 1 ^^^ 1 ^^^ 1-^-1, ve (Please read the notes on the back before filling out this page) 4 5 91 9 6 A7 ____B7_ Five (If said, the interface connected to W must be a USB interface, and the USB program (58) can be executed to send a USB control signal. Otherwise, the mouse will connect to the pS / 2 interface and execute the PS / 2 program (55) The circuit principle is as follows: As far as the USB interface is concerned, when the voltage of the P3 pin (13) is increased to 3.3V, the D-pin (22) of the USB interface has a voltage of about 3V, according to the USB specification. In terms of 3V voltage, it is high potential (Hi), but D + pin (21) must be low potential. As for ps / 2 interface, when P3 pin (13) elevates to 3.3V, it is at PS / 2 The data pin (42) of the interface has a voltage of about 3.5V, but regardless of whether the potential of the data pin (42) is high or low (out or low), its Clock pin (41) must be high (Hi ), So you can clearly determine the interface that the mouse is connected to USB or PS / 2 interface. According to the above circuit principle, when the mouse interface is ps / 2 interface, after PI, P2 pin (JU2) floats for a period of time, P1, P2 pin (11, 12) It must not be at low potential (l0w) at the same time, but can directly execute the ps / 2 program 'This is the first detection. When the mouse is connected to the USB interface' via the PI, P2 pins (11, 12) After floating for a period of time, the P1 and P2 pins (11, 12) should be at the same time low level. At this time, the P3 pin (13) should be electrically long; after rising to 3.3V, P2 pin (12) should be high potential (Hi) * and p 1 pin (11) is still low potential (Low) 'At this time, it can be determined as the USB interface, and the USB program is directly executed, this is the second detection However, if the mouse interface misjudges during the first detection due to noise or other factors, and after the second detection, its P1 pin (11) is high potential (Hi) is PS / 2 interface, the P1 pin (1 丨) is the low potential (Low) is the USB interface, so as to avoid misjudgment. The present invention writes the above steps to the controller inside the mouse, and the mouse has a piece of paper Standards used in national standards (C NS) A4 specification (210X297) t ------ ΐτ (Please read the precautions on the back before filling out this page) Printed by the Employees' Cooperatives of the Central Procurement Bureau of the Ministry of Economic Affairs 83.3.10,000
經濟部中央標準局員工消費合作社印製 45 91 9 6 五、,明説明( ____ 行=式先=:所接介面為何,再針對所接介面執 此即可達到節省成本訊號傳輪之,如 综上所τ本身附加價值的目的。 .’,、所述,本發明主要係為一種滑- >而赫她七+ 裝置,包括··-滑_二; 特性的原明利用USB介面與PS/2介面間不同電壓 面, 價測出滑鼠本身所接的介面為USB或PS/2介 動初期判斷滑鼠所接的Lr 稭以在滑鼠啟 ^所接的介面,而執行相對的USB或PS/2程 ^,故本發明可有效制即有資源,且為具備高度技術思 -之發明’已符合發明專利之要件,妥依法提起申請。 上述實施例之内容僅係用以說明本發明之基本原理· 而非限制本發明之内容,本發明之範轉當如後列之申請專 利範圍所列。Printed by the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs 45 91 9 6 V. Explain clearly (____ line = type first =: what interface is connected, and then implement this for the interface to achieve cost saving signal transmission, such as To sum up, the purpose of τ itself added value. ',, As mentioned, the present invention is mainly a slip- > and Heta 7+ device, including ·· -slip_II; the characteristics of the original use of the USB interface and Different voltage planes between PS / 2 interfaces. It is estimated that the interface connected to the mouse itself is USB or PS / 2. Initially, the Lr connected to the mouse is judged to start the interface connected to the mouse and execute the relative operation. USB or PS / 2 program ^, so the present invention can be effectively produced with resources, and an invention with a high degree of technical thinking-has met the requirements of the invention patent, and properly filed an application in accordance with the law. The content of the above embodiments is only used to Explain the basic principles of the present invention. Rather than limiting the content of the present invention, the scope of the present invention should be listed in the scope of patent applications listed below.
本紙張尺度適用中國國家標準(CNS ) Α4規洛(2丨ΟΧ297公釐) 83.3,10,000This paper size applies Chinese National Standard (CNS) Α4 gauge (2 丨 〇 × 297 mm) 83.3,10,000