200937253 九、發明說明: 【發明所屬之技術領域】 本發明係一種雙輸入單輸出訊號轉換器,主要指—種可提供鍵 盤、外界機具之絲輸人至磁轉換n ’並由訊號魏轉切換選取 再輸出至電腦之PS/2或USB介面,使得可增進作業效率,並可防止亂 碼產生以具較佳穩定性。 【先前技術】 ❹ 目前㈣秤或其他機具常配合賴作處理,_電_載入相關 應用OFFICE或自行開發之軟體,並就目前電腦而言—般為採用鍵盤為 主要輸入周邊機件之-,並—般具一 ps/2標準接頭或咖接頭提供連 接具PS/2或聰接頭之鍵盤’並可將鍵盤輸出資料經由電腦之μ 埠或USB埠輸入電腦内,並由電腦作處理。 ❹ 而習知可與電腦傳輸之飾或其他機具一般設置队说接頭,並 可將雜或外界機具之訊號經由RS_232接頭傳輸至電腦 勞幕顯示’ _飾細_細爾_傳輸之訊息, =將雜之秤重數值傳輪至制並於_示,但概值不能由 或USB或其他模式直接载入電腦之相關軟體,因而習知方式必須 =操作人員觀㈣騎幕之傳輸數鎌再另外由趣觸數值重新 鍵入電腦侧軟體之攔_,造成作業緩慢及效率不佳缺失。 【發明内容】 200937253 本發明之訊號轉換器包含一電源電路、一雙輸入電路、一轉 換電路、-切換電路、一輸出電路,其中電源電路連接外界電源, 並提供系統需求電源’又雙輸入電路具RS_232輸入電路、鍵盤輸 入電路’並該RS-232輸入電路具RS_232接頭連接RS_232傳輸線 與外界機具連接’並該RS_232接頭輸出連接轉換電路之編碼器, 又鍵盤輸入電路具PS/2或接頭連接鍵盤之ps/2或USB傳輸 線,並該PS/2或USB接頭連接切換電路之輸入端;又該轉換電路 © 具編碼器、微處理電路’並連接RS-232輸入電路,而該編碼器輸 出連接微處理電路,並該微處理電路具微處理器,並將由編碼器 輸入訊息解碼形成模擬鍵盤之ps/2或USB訊號;又該微處理電路 將邊PS/2或USB訊號輸出至切換電路;又切換電路之輸入端連接 微處理電路、鍵錄人電路,並輸出端連接輸出電路,而該切換 電路具開關功能,並可確保同一時間僅能輸出由微處理電路或鍵 錄人電路輸人之訊息’並將該訊息輸出至輸出電路,並可確保 輸&電路*會同時具有二種减而產生亂碼;X輸itj電路具PS/2 或USB接頭,並該PS/2或USB接頭連接切換電路之輸出端,並可 提供連接PS/2或USB傳輸線與電腦之ps/2或USB接頭連接;藉 此可々外界機具之RS-232傳輸線連接訊號轉換器rs-232輸入電 H232接頭’並令鍵盤之PS/2或USB傳輸線連接訊號轉& 器之鍵盤輸入電路之PS/2或接頭,又令訊號轉換器輸出電路 之PS/2或USB接頭連接傳輸線與電腦之PS/2或USB接頭連接, 又當外界機具之訊息由RS-232傳輸線傳輸至訊號轉換器rs_232 6 200937253 輸入電路時可由編碼器編碼,並再由微處理電路解碼成ps/2或usb 模擬鍵盤訊號再輸入切換電路,並由切換電路輸出至輸出電路, 並由輸出電路之PS/2或USB接頭、PS/2或USB傳輸線傳輸至電腦, 並可代替鍵盤作業’使得該模擬鍵盤訊息可直接載入電腦之軟體 上,不須再費時重新由鍵盤鍵入該對應訊息,可具操作便利性, 又此時若令鍵盤鍵入訊息並由鍵盤輸入電路輸入至切換電路時, 該切換電路不會將鍵盤鍵入之訊息傳輸至輸出電路,使得可防止 ❹ 鍵盤、外界機具之訊息同時傳輸至輸出電路及電腦,並可防止亂 碼以確保作業穩定性。 本發明若訊號轉換器之微處理電路將輸入訊息解碼形成ps/2 訊息時,該訊號轉換器連接之PS/2傳輸線或輸出電路之ps/2接 頭可外加組設PS/2轉USB轉接器,並該PS/2轉USB轉接器一端 之USB接頭可與電腦之USB接頭連接,且其另一端pS/2接頭與ps/2 傳輸線或輸出電路之PS/2接頭連接,並可由USB模式傳輸訊息至 © 電腦,並使本發明可外加PS/2轉USB轉換器即可由不同介面與電 腦連接傳輸以具更佳適用性。 【實施方式】 請參閱第一圖,本發明之第一實施例主要具訊號轉換器1〇, 並該訊號轉換器10輸入外界電源9V,並其輸入侧連接外界機具 2、鍵盤3 ’並輸出側連接至電腦4,而該訊號轉換器1〇具轉換電 路’並可將RS-232輸入訊息轉換成PS/2或USB訊息模式,並可 將外界機具2之輸入訊息轉換成模擬鍵盤pS/2或USB訊號,並輸 200937253 出至電腦4,又鍵盤3之鍵入訊號可由訊號轉換器ι〇輸入至電腦 4 ;而該訊號轉換器10又具切換電路(如第二圖所示),並可令外 界機具2之訊息傳輸至電腦4時令鍵盤3之鍵入訊息不能傳輸至 電腦4,可防止鍵盤3與外界機具2之訊息同時傳輸至電腦4以防 止亂碼產生及訊息資料錯誤,並可使得外界機具2之訊息可由ps/2 或USB模式輸入電腦4内,並使電腦4之軟體設定攔位上可直接 載入外界機具之訊息(例如磅秤之秤重數值),使本發明可避免再 ❹ 由鍵盤3作載入動作,可提升作業效率。 請參閱第一、二圖,本發明第一實施例之訊號轉換器1〇包含 一電源電路11、一雙輸入電路、一轉換電路、一切換電路14、一 輸出電路16,並該雙輸入電路具RS-232輸入電路12、鍵盤輸入 電路15,又轉換電路具編碼器13卜微處理電路132,其中電源電 路11連接外界電源,並提供系統需求電源,又雙輸入電路具RS_232 輸入電路12、鍵盤輸入電路15,而該RS-232輸入電路12連接 ® 232傳輸線與外界機具2連接’並輸出連接轉換電路,又鍵盤 輸入電路15連接鍵盤3之PS/2或USB傳輸線,並輸出連接切換 電路14之輸入端。 、 轉換電路具編碼器131、微處理電路132,並該編碼器131 輸出連接微處理電路132,又該微處理電路132具微處理器,並設 定程式將由編碼器131輸入訊息解碼形成PS/2或USB訊號;又該 啦支處理電路132將該PS/2或USB訊號輸出至切換電路η。 刀換電路14之輸入端連接微處理電路132、鍵盤輸入電路 200937253 15,並輸出端連接輸出電路16,而該切換電路14具開關功能,並 可確保同-時間僅能輸出由微處理電路132或鍵錢人電路15輸 入之訊息’並將該訊息輸出至輸出電路16,並可確保輸出電路Μ 不會同時具有二種訊息而產生亂碼;又前述輸出電路16連接 或USB傳輸線與電腦4連接。 本發明當外界機具2之訊息* RS-.232傳輸線傳輸至訊號轉 換器H)之RS-232輸入電路12時可由編碼器131編瑪,並再由微 〇 處理電路132解碼⑽/2或USB訊號再輸入至切換電路14,並由 切換電路14輸出至輸出電路16,再由輸出電路16傳輸至電腦*, 並可代替鍵盤作業’使得該模擬鍵盤輸入ps/2或咖模式訊息可 直接載入電腦4之軟體上,不須再費時重新由鍵盤3鍵入該對應 訊息,可具操作便利性。 又此時斜_ 3鍵錢息触鍵人電路15輸入至切 換電路14時’該切換電路14不會將鍵盤3鍵入之訊息傳輸至輸 ❹th電路16,使得可防止鍵盤3、外界機具2之訊息同時傳輸至輸 出電路16及_ 4,並可防止碼以確保作業穩定性。 又本發明於另-情況當鍵盤3载入資料時亦可藉由切換電路 14防止外界機具2之訊息傳輸至電腦4,可防德碼以具作業穩 定性。 本發明之第-實施例電路架構可輸出ps/2或_模式訊 H以PS/2蝴㈣_二、三目,她更具體之電 路架構’其中㈣2輸入電㈣勝232接頭121連接RS_232 9 200937253 傳輸線與外界機具2連接,並該rs-232接頭121連接轉換電路, 又鍵盤輸入電路15具PS/2接頭151連接鍵盤3之PS/2傳輪線, 並該PS/2接頭151連接切換電路14之輸入端,又編碼器 131CICL232)輸出連接微處理器132,又該微處理器132具微處理 器(PIC16F873A) ’並設定程式將編碼器13 j輸入訊息解石馬形成p奶 訊號,又切換電路14(MC14052B)具開關功能,並可確保輪出電路 不會同時具有二種訊息而產生亂碼,又輸出電路16具吩2接頭 ❹ 161連接切換電路14之輸出端’並可連接ps/2傳輸線與電腦*連 接,使得祕電路可提供外界機具之訊息* ps/2模式或傳輸至電 腦4 ’具不會與鍵盤3訊號衝突而產生亂碼。 請參閱第四圖,本發明第二實施例與第一實施例類同,而若200937253 IX. Description of the invention: [Technical field of the invention] The present invention is a dual-input single-output signal converter, which mainly refers to a type of keyboard, external machine tool, input to magnetic conversion n ' and is switched by signal Wei Selecting and outputting to the PS/2 or USB interface of the computer can improve work efficiency and prevent garbled generation for better stability. [Prior Art] ❹ At present, (4) scales or other equipment often cooperate with the processing, _ electricity _ load related applications OFFICE or self-developed software, and in the current computer - generally use the keyboard as the main input peripherals - And a ps/2 standard connector or coffee connector provides a keyboard with a PS/2 or smart connector' and can input the keyboard output data into the computer via the computer's μ 埠 or USB , and process it by the computer.习 However, it is customary to set up a connector with a computer-transferred accessory or other implement, and can transmit the signal of the miscellaneous or external machine to the computer screen display via the RS_232 connector. _ 细细_细尔_Transfer message, = The value of the weighs is transferred to the system and displayed in _, but the value cannot be directly loaded into the relevant software of the computer by USB or other modes. Therefore, the conventional method must be = the operator's view (4) the number of transmissions on the screen In addition, by re-typing the computer side software block by the interesting value, the operation is slow and the efficiency is not good. SUMMARY OF THE INVENTION 200937253 The signal converter of the present invention comprises a power supply circuit, a dual input circuit, a conversion circuit, a switching circuit, an output circuit, wherein the power supply circuit is connected to an external power supply, and provides a system demand power supply and a dual input circuit. It has RS_232 input circuit, keyboard input circuit 'and the RS-232 input circuit has RS_232 connector to connect RS_232 transmission line to external machine' and the RS_232 connector output is connected to the converter circuit encoder, and the keyboard input circuit has PS/2 or connector connection. a ps/2 or USB transmission line of the keyboard, and the PS/2 or USB connector is connected to the input end of the switching circuit; and the conversion circuit © has an encoder, a microprocessor circuit' and is connected to the RS-232 input circuit, and the encoder output Connecting a microprocessor circuit, and the microprocessor circuit has a microprocessor, and decodes the encoder input message to form a ps/2 or USB signal of the analog keyboard; and the microprocessor circuit outputs the side PS/2 or USB signal to the switching circuit And the input end of the switching circuit is connected to the micro processing circuit, the key recording circuit, and the output terminal is connected to the output circuit, and the switching circuit The switching function ensures that only the message input by the microprocessor circuit or the key recording circuit can be output at the same time' and the message is output to the output circuit, and the output & circuit* can be generated simultaneously with two kinds of subtraction Garbled; X input itj circuit with PS/2 or USB connector, and the PS/2 or USB connector is connected to the output of the switching circuit, and can provide a PS/2 or USB transmission line to connect with the computer's ps/2 or USB connector; In this way, the RS-232 transmission line of the external machine can be connected to the signal converter rs-232 to input the electric H232 connector' and the PS/2 or USB transmission line of the keyboard can be connected to the PS/2 or the connector of the keyboard input circuit of the signal switch. The PS/2 or USB connector connection transmission line of the signal converter output circuit is connected to the PS/2 or USB connector of the computer, and when the external device information is transmitted from the RS-232 transmission line to the signal converter rs_232 6 200937253 input circuit, Encoder encoding, and then decoded by the micro-processing circuit into ps/2 or usb analog keyboard signal and then input to the switching circuit, and outputted by the switching circuit to the output circuit, and by the PS/2 or USB connector of the output circuit, PS/2 or USB transmission line transmission To the computer, and can replace the keyboard operation', the analog keyboard message can be directly loaded into the software of the computer, no need to re-type the corresponding message by the keyboard, it is convenient to operate, and at this time, if the keyboard is typed and When the keyboard input circuit is input to the switching circuit, the switching circuit does not transmit the keyboard typed message to the output circuit, so that the message of the keyboard and the external machine can be prevented from being simultaneously transmitted to the output circuit and the computer, and the garbled code can be prevented to ensure the operation. stability. In the present invention, if the signal processing circuit of the signal converter decodes the input message to form a ps/2 message, the PS/2 transmission line of the signal converter or the ps/2 connector of the output circuit can be combined with the PS/2 to USB switch. And the USB connector on the PS/2 to USB adapter can be connected to the USB connector of the computer, and the other end of the pS/2 connector is connected to the PS/2 connector of the ps/2 transmission line or output circuit, and can be connected by USB. The mode transmits the message to the computer, and the invention can be connected to the computer by different interfaces by adding a PS/2 to USB converter for better applicability. [Embodiment] Please refer to the first figure. The first embodiment of the present invention mainly has a signal converter 1〇, and the signal converter 10 inputs an external power source 9V, and its input side is connected to the external machine 2, the keyboard 3' and outputs The side is connected to the computer 4, and the signal converter 1 is equipped with a conversion circuit' and can convert the RS-232 input message into a PS/2 or USB message mode, and can convert the input message of the external machine 2 into an analog keyboard pS/ 2 or USB signal, and input 200937253 to the computer 4, and the input signal of the keyboard 3 can be input to the computer 4 by the signal converter ι〇; and the signal converter 10 has a switching circuit (as shown in the second figure), and The message of the external machine 2 can be transmitted to the computer 4, and the key-in message of the keyboard 3 cannot be transmitted to the computer 4, and the message of the keyboard 3 and the external machine 2 can be prevented from being simultaneously transmitted to the computer 4 to prevent garbled generation and message data errors, and The message of the external machine 2 can be input into the computer 4 by the ps/2 or USB mode, and the software of the computer 4 can be directly loaded with the information of the external machine (for example, the weighing value of the scale), so that the invention can be avoided. Again The loading action is performed by the keyboard 3 to improve work efficiency. Referring to the first and second figures, the signal converter 1A of the first embodiment of the present invention comprises a power supply circuit 11, a dual input circuit, a conversion circuit, a switching circuit 14, an output circuit 16, and the dual input circuit. The utility model has an RS-232 input circuit 12, a keyboard input circuit 15, and a conversion circuit device encoder 13 and a micro processing circuit 132, wherein the power supply circuit 11 is connected to an external power supply, and provides a system demand power supply, and the dual input circuit has an RS_232 input circuit 12, The keyboard input circuit 15 and the RS-232 input circuit 12 are connected to the 232 transmission line and connected to the external implement 2' and output the connection conversion circuit, and the keyboard input circuit 15 is connected to the PS/2 or USB transmission line of the keyboard 3, and the output connection switching circuit 14 input. The conversion circuit has an encoder 131 and a micro-processing circuit 132, and the encoder 131 outputs a connection micro-processing circuit 132. The micro-processing circuit 132 has a microprocessor, and the setting program decodes the input signal from the encoder 131 to form a PS/2. Or a USB signal; the branch processing circuit 132 outputs the PS/2 or USB signal to the switching circuit η. The input end of the knife changing circuit 14 is connected to the micro processing circuit 132, the keyboard input circuit 200937253 15, and the output terminal is connected to the output circuit 16, and the switching circuit 14 has a switching function, and can ensure that only the micro processing circuit 132 can be output at the same time. Or the message input by the key person circuit 15 'outputs the message to the output circuit 16, and ensures that the output circuit 不会 does not have two kinds of messages at the same time to generate garbled characters; and the output circuit 16 is connected or the USB transmission line is connected to the computer 4 . The present invention can be programmed by the encoder 131 when the message* RS-.232 transmission line of the external device 2 is transmitted to the RS-232 input circuit 12 of the signal converter H), and then decoded by the micro-processing circuit 132 (10)/2 or USB. The signal is input to the switching circuit 14 and outputted to the output circuit 16 by the switching circuit 14, and then transmitted to the computer* by the output circuit 16, and can replace the keyboard operation 'so that the analog keyboard input ps/2 or coffee mode message can be directly loaded. By entering the software of the computer 4, it is not necessary to time-consuming to re-type the corresponding message by the keyboard 3, which is convenient for operation. At this time, when the oblique _ 3 key money touch key circuit 15 is input to the switching circuit 14, the switching circuit 14 does not transmit the message typed by the keyboard 3 to the output th circuit 16, so that the keyboard 3 and the external machine 2 can be prevented. The message is simultaneously transmitted to the output circuits 16 and _ 4, and the code is prevented to ensure job stability. In addition, the present invention can also prevent the message of the external implement 2 from being transmitted to the computer 4 by the switching circuit 14 when the data is loaded by the keyboard 3, so that the anti-code can be stabilized. The circuit architecture of the first embodiment of the present invention can output ps/2 or _mode signal H to PS/2 butterfly (four) _ two, three mesh, her more specific circuit architecture 'where (four) 2 input power (four) win 232 connector 121 connect RS_232 9 200937253 The transmission line is connected to the external machine 2, and the rs-232 connector 121 is connected to the conversion circuit, and the keyboard input circuit 15 has a PS/2 connector 151 connected to the PS/2 transmission line of the keyboard 3, and the PS/2 connector 151 is connected and switched. The input end of the circuit 14 and the encoder 131CICL232) output are connected to the microprocessor 132, and the microprocessor 132 has a microprocessor (PIC16F873A)' and the setting program converts the encoder 13j into a message to form a p-milk signal. The switching circuit 14 (MC14052B) has a switching function, and ensures that the wheeling circuit does not have two kinds of messages at the same time to generate garbled characters, and the output circuit 16 has a 1-2 connector 161 connected to the output terminal of the switching circuit 14 and can be connected to the ps The /2 transmission line is connected to the computer*, so that the secret circuit can provide the message of the external machine* ps/2 mode or transfer to the computer 4' without garbled with the conflict of the keyboard 3 signal. Referring to the fourth figure, the second embodiment of the present invention is similar to the first embodiment, and
&』由犋式得輸訊息至電腦4,並使本發 1〇輸出為PS/2模式時亦可接合PS/2轉USB轉接 器5以由USB介面與電腦4傳輸以具更佳適用性。 w疋牧rvvr得u汕轉接器b —端 ^轉接器5之USB接頭可與電腦4 並可由USB模式傳輸至電腦4,並 〇月參閱第五圖’本發明第三實施例與第二實施例類同,其差 異在訊號轉換$ 1〇之輸出電路16連接Μ轉·轉接器5 PS/2轉USB轉接器5 之USB接頭(圖中未標示)連接, 可具本發明訴求功效。 200937253 是以由以上所述,本發明確可具較佳作業效率及作業穩定性 功效,而前述實施例僅為本發明例示,並非本發明限制,凡依據 本發明精神所為之等效改變亦應屬於本發明申請專利範圍之範# 内。 【圖式簡單說明】 第-圖係本發明之第-實施織號轉換器連接外界機具、鍵 盤、電腦示意圖。& 』 输 得 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 输 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本applicability. w疋牧rvvr has u汕 adapter b-terminal ^ adapter 5 USB connector can be transferred to the computer 4 with the computer 4 and can be transferred from the USB mode to the computer 4, and the fifth figure of the third embodiment of the present invention The second embodiment is similar, and the difference is that the output circuit 16 of the signal conversion $1 is connected to the USB connector (not shown) of the /2 · adapter 5 PS/2 to USB adapter 5, which can have the present invention. Appeal effect. 200937253 is based on the above, the present invention is indeed capable of better operational efficiency and operational stability, and the foregoing embodiments are merely illustrative of the invention and are not intended to be limiting of the invention, and equivalent changes should be made in accordance with the spirit of the invention. It belongs to the scope of the patent application scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS The first figure is a schematic diagram of the first embodiment of the present invention for connecting a peripheral machine tool, a keyboard, and a computer.
第二圖係本發明之第—實細訊號轉換器電路方塊示意圖。 第三圖係本發明之第一實施例訊號轉換器輸出ps/2模式電 路示意圖。 第四圖係本發明之第二實施例訊號轉換器連接外界機具、鍵 盤、PS/2轉USB轉接器、電腦示意圖。 第五圖係本㈣之第三實_訊雜難連接外界機具、鍵 盤、PS/2轉USB轉接器、電腦示意圖。 【主要元件符號說明】 121 RS-232 接頭 12 RS-232輸入電路 132微處理電路 10訊號轉換器 11電源電路 131編碼器 14切換電路 15鍵盤輸入電路i51 PS/2接頭 16輸出電路 3鍵盤 161 PS/2接頭 2外界機具 4電月甾 5 PS/2轉USB轉接器 11The second figure is a block diagram of the first-solid signal converter circuit of the present invention. Fig. 3 is a schematic diagram showing the output of the ps/2 mode circuit of the signal converter of the first embodiment of the present invention. The fourth figure is a schematic diagram of a second embodiment of the present invention in which a signal converter is connected to an external machine, a keyboard, a PS/2-to-USB adapter, and a computer. The fifth picture shows the third (the third) of this (four) _ difficult to connect external equipment, keyboard, PS/2 to USB adapter, computer schematic. [Main component symbol description] 121 RS-232 connector 12 RS-232 input circuit 132 microprocessor circuit 10 signal converter 11 power circuit 131 encoder 14 switching circuit 15 keyboard input circuit i51 PS/2 connector 16 output circuit 3 keyboard 161 PS /2 connector 2 external machine 4 electric moon 甾 5 PS/2 to USB adapter 11