1270804 九、發明說明: 【發明所屬之技術領域】 本發明係^一種鍵盤控制裝置與方法,尤指一種筆記型 · 電腦中關於鍵盤控制所使用的ps/2傳輸介面,係以一種 、 ready-ack的傳輸協定以取代原本使用的PS/2傳輪介面。 【先前技術】 按,筆記型電腦的鍵盤操作方式,除了可以使用内建 的鍵盤裝置之外,也允許使用者自行外接一鍵盤操作。也 因如此筆記型電腦的鍵盤控制係與桌上型電腦有所不同。 而對於週邊輸入裝置而言(如鍵盤或滑鼠),目前仍大多是 透過PS/2傳輸介面與電腦連接。 而關於PS/2傳輸介面的控制,習用技術有如美國專利 No· 5, 964, 853所示,其係揭露一種PS/2介面的控制器, 上述控制器請麥閱弟一圖所示’控制電路1 〇 〇係可從主機 介面107接收主機端的命令(command),並回應資料(data 給主機,控制電路100與主機端之間的通訊係由微處理^ 控制完成。微處理器101執行的程式碼係儲存於記情 體 102 中。 、口 Μ 而控制電路100透過PS/2傳輸介面與週邊裝置進行竭 吼,係由控制電路100内部的硬體電路1〇5達成,此硬體 電路105可減輕記憶體102中所儲存程式碼的負擔。硬體 電路105中的狀態機(STATEMACHINE) 1〇6係控制移位暫 存器(SHIFT REGISTER) 104與從週邊裝置輸入的序列資 料之間的通訊傳輸。如此當微處理器1〇1與主機之間通訊1270804 IX. Description of the Invention: [Technical Field] The present invention relates to a keyboard control device and method, and more particularly to a ps/2 transmission interface for keyboard control in a notebook type computer, which is a ready, ready- The ack's transport protocol replaces the PS/2 pass-through interface that was originally used. [Prior Art] Press, the keyboard operation mode of the notebook computer, in addition to the built-in keyboard device, allows the user to externally connect a keyboard operation. Also, the keyboard control system of the notebook computer is different from the desktop computer. For peripheral input devices (such as keyboards or mice), most of them are still connected to the computer through the PS/2 transmission interface. Regarding the control of the PS/2 transmission interface, a conventional technique is disclosed in U.S. Patent No. 5,964,853, which discloses a controller of a PS/2 interface, and the controller is controlled by a picture shown by Mai Yuedi. The circuit 1 can receive a command from the host interface 107 from the host interface 107, and respond to the data (data is given to the host, and the communication between the control circuit 100 and the host is controlled by the microprocessor 2. The microprocessor 101 executes The code is stored in the ticker 102. The control circuit 100 is exhausted by the PS/2 transmission interface and the peripheral device, and is implemented by the hardware circuit 1〇5 inside the control circuit 100. 105 can reduce the burden of the code stored in the memory 102. The state machine (STATEMACHINE) in the hardware circuit 105 controls the shift register (SHIFT REGISTER) 104 and the sequence data input from the peripheral device. Communication transmission. So when the microprocessor 1〇1 communicates with the host
5 1270804 時並不須中斷PS/2傳輸介面所傳輸通訊的序列資料。 然而美國專利No. 5, 964’ 853所示的技術,係透過硬體 電路105達成與PS/2傳輸介面之間的通訊控制,而對於筆 記型電腦的鍵盤控制而言,内建鍵盤與外接鍵盤若是在考 慮傳輸介面一致性的情況下,亦即均採用pS/2傳輸介面, 將會增加鍵餘制的賴浦度’而絲財發明所述的 傳輸介面取代PS/2傳輸介面’將會降低硬體電路的複雜 度’且也此降低PS/2傳輸介面的複雜協定對於鍵盤控 體所造成的負擔。 【發明内容】 本考X明之主要目的,在於提供一種鍵盤控制裝置盥方 法’係以-種新的傳輸介面取代鍵盤控制裝置内部使用的 PS/2傳輸介面,以簡化鍵盤控制裝置的設計。 為了達成上述目的,本發明係提供一種鍵盤控制聿 置:係提供-主機與一鍵盤掃描矩陣之間的訊號傳輸,‘ 、.-鍵餘制單元’係接收主機下達之鍵盤控制命令, =應訊號給主機;-難編碼單元,俩鍵盤掃描矩陣 ^描結果編碼;—PS/2介面控制單元,係電連接於鍵般 =早το ’ PS/2介面㈣單元係執行與鍵盤編碼單元之^ ^祕輸;及-第—傳輸介面,係電連接於助介面押 用鍵t扁碼單元之間,第一傳輸介面係包括;-i 二'、以θ供從鍵盤編碼單元往PS/2介面控制單元的 ㈣訊號傳輸;—命令埠,係用以提供從PS/2介面控制^ 70在鍵盤編碼單元的命令訊號傳輸。 為了達成上述目的,本發明係提供—種鍵盤控制方 Ϊ270804 矩陣之間的訊以提供-主機與-鍵盤掃描 鍵盤=鍵_碼單元,該方法包括:= 控制斜=2彳料,並輸出鍵盤 出_八人生 工早70,PS/2介面控制單元先送 制單LH t ㈣網單元之後,才將ps/2介面控 ^到的鍵盤控制命令傳送給鍵盤編碼 盤掃 值2 ^ 制單元之後,才將鍵盤掃描 w r 2介面控制器傳送給鍵盤控制單元;及鍵盤控制 早几回應鍵盤掃描值給主機。 士了使Λ審查委貞能更進—步瞭解本發明特徵及技 術内谷,請參閱以下有關本發明之詳細說明與附圖,然而 所附圖式錄供參考與朗用,並非絲對本發明加以限 【實施方式】 一立明參閱第―® ’其係為本發明之—較佳實施例的方塊 示意圖。本發明係、-種鍵盤控制裝£20應用於筆記型電腦 中,係提供主機10與鍵盤掃描矩陣32之間的訊號傳輸平 台’主要絲控制㈣的操控,而在本實施例巾鍵盤掃描 矩陣32係用來掃描筆記型電腦内建鍵盤的按鍵按壓。 鍵盤控制裝置20係包括有鍵盤控制單元21、ps/2介 面控制單元22及鍵盤編碼單元23,鍵盤控制裝置2〇的各 1270804 單70係可整合成一控制晶片内。其中鍵 主機10下達的鍵盤控制命令,並將鍵工盤 =掃描值)回應給主機1()端作處理‘制。ϋ ,出端電連接於PS/2介面控制單元22,^ 早7L 22係提供第一及第二傳輸介 二:= 元23及PS/2裝置31執行 。 =内傳輸(對筆記型電腦而言)的虛:弟=^ 號傳輸 =23=來供筆記型_ 傳輸介面係為對外傳輸(對筆記型電 ,而5) WPS/2傳輸介面,PS/2傳輸 裝置,此PS/U置31為鍵盤或滑鼠。#了外接脱2 鍵盤編碼單元23係傳達鍵盤控制命令(如鍵般人 ::給鍵盤掃描矩陣32,使鍵盤掃描矩陣32可:收二 中令進行鍵盤掃描的動作,以偵測鍵盤按鍵的實際按 形。而鍵錄描_ 32的掃赌果懸盤 ^ 23執行編碼動作而得到鍵盤掃描值,並由鍵盤 輸出給PS/2介面控制單元22,此ps/2介面控制單元22 並將鍵盤掃描健由鍵赌鮮元21回傳給主機端。 入所提供的虛擬PS/2傳輸介面係電連接於PS/2 =控制早το 22與鍵盤編碼單元23之間,此虛擬㈣ 傳輸介面亚不用依照真實的PS/2協定作訊號傳輸,而是以 ready-ack的協定作傳輸,並可讓ps/2介面控制單元22 與鍵盤編碼單元23之間的訊號傳輸正常運作。 μ爹閱第二®’其係為本發明之—較佳實施例的虛擬 PS/2傳輸介面的示意圖。虛擬ps/2傳輸介面係包括有一 資料請求線(data re轉st ! ine )S1、一資料傳輸排線(敝 8 1270804 bus) S2、一命令請求線(c〇mmand reques1: Hne) S3 及 一命令傳輸排線(command bus) S4。其中資料請求線si 及貧料傳輸排線S2係通稱為資料埠,而命令請求線S3及 命令傳輸排線S4係通稱為命令槔。另ps/2傳輸介面係為5 1270804 does not need to interrupt the sequence data of the communication transmitted by the PS/2 transmission interface. However, the technology shown in U.S. Patent No. 5,964' 853 achieves communication control with the PS/2 transmission interface through the hardware circuit 105, and the built-in keyboard and external connection for the keyboard control of the notebook computer. If the keyboard considers the consistency of the transmission interface, that is, the pS/2 transmission interface is used, the keyboard balance will be increased, and the transmission interface described in the silk invention will replace the PS/2 transmission interface. This will reduce the complexity of the hardware circuit' and also reduce the burden placed on the keyboard control by the complex protocol of the PS/2 transmission interface. SUMMARY OF THE INVENTION The main purpose of this test is to provide a keyboard control device that replaces the PS/2 transmission interface used inside the keyboard control device with a new transmission interface to simplify the design of the keyboard control device. In order to achieve the above object, the present invention provides a keyboard control device: a signal transmission between a host and a keyboard scanning matrix is provided, and a ', .-key remaining unit' receives a keyboard control command issued by the host, = should Signal to the host; - difficult coding unit, two keyboard scanning matrix ^ description result encoding; - PS / 2 interface control unit, is electrically connected to the key = early το ' PS / 2 interface (four) unit system and keyboard coding unit ^ ^密输; and - the first transmission interface, is electrically connected to the help interface between the keys t flat code unit, the first transmission interface includes; -i two ', with θ for the keyboard coding unit to PS/2 (4) Signal transmission of the interface control unit; - Command 埠 is used to provide command signal transmission from the PS/2 interface control unit 70 in the keyboard coding unit. In order to achieve the above object, the present invention provides a keyboard control method 270804 between the matrix to provide - host and - keyboard scan keyboard = key _ code unit, the method includes: = control oblique = 2 data, and output keyboard After the _ eight life workers early 70, the PS/2 interface control unit first sends a single LH t (four) network unit, then the ps/2 interface control keyboard control command is transmitted to the keyboard code disk scan value 2 ^ unit The keyboard scan wr 2 interface controller is transmitted to the keyboard control unit; and the keyboard control responds to the keyboard scan value to the host. Please refer to the following for a detailed description of the present invention and the accompanying drawings, but the drawings are for reference and use, but not for the present invention. Limitation [Embodiment] A schematic diagram of a preferred embodiment of the present invention is referred to as "-". The invention is a keyboard control device installed in a notebook computer, which provides a signal transmission platform between the host 10 and the keyboard scanning matrix 32, which is controlled by the main wire control (4), and in this embodiment, the keyboard scanning matrix is scanned. The 32 series is used to scan the keystrokes of the built-in keyboard of the notebook. The keyboard control unit 20 includes a keyboard control unit 21, a ps/2 interface control unit 22, and a keyboard encoding unit 23. Each of the 1270804 single 70 series of the keyboard control unit 2 can be integrated into a control wafer. The keyboard control command issued by the key host 10 and the key panel = scan value are sent back to the host 1 () for processing. ϋ, the output is electrically connected to the PS/2 interface control unit 22, and the early 7L 22 system provides the first and second transmission media 2: = element 23 and PS/2 device 31 are executed. = internal transmission (for notebook computers) virtual: brother = ^ number transmission = 23 = for notebook type _ transmission interface for external transmission (for notebook type, and 5) WPS/2 transmission interface, PS / 2 transmission device, this PS / U is set to 31 for the keyboard or mouse. #外接脱2 Keyboard Encoding Unit 23 communicates keyboard control commands (such as the key:: to the keyboard scan matrix 32, so that the keyboard scan matrix 32 can: receive the second keyboard to perform the keyboard scan action to detect the keyboard keys Actually presses the shape, and the key scan _ 32 sweeps the gambling disk ^ 23 to perform the encoding action to obtain the keyboard scan value, and is output by the keyboard to the PS/2 interface control unit 22, the ps/2 interface control unit 22 The keyboard scan key is transmitted back to the host by the key gambling element 21. The virtual PS/2 transmission interface provided by the input is electrically connected to the PS/2 = control early το 22 and the keyboard coding unit 23, the virtual (four) transmission interface It is not required to transmit signals according to the real PS/2 protocol, but is transmitted under the agreement of ready-ack, and the signal transmission between the ps/2 interface control unit 22 and the keyboard encoding unit 23 can be normally operated. 2®' is a schematic diagram of a virtual PS/2 transmission interface of the preferred embodiment of the present invention. The virtual ps/2 transmission interface includes a data request line (data re-rotation st! ine) S1, a data transmission line Line (敝8 1270804 bus) S2, a command request (c〇mmand reques1: Hne) S3 and a command transmission bus S4, wherein the data request line si and the lean material transmission line S2 are generally referred to as data 埠, and the command request line S3 and the command transmission line S4 The system is called command 槔. The other ps/2 transmission interface is
PS2DAT 及 PS2CLK,PS/2 裝置 31 即透過 PS2DAT 及 PS2CLK 與PS/2介面控制單元22進行通訊傳輸,此部份傳輸即依 妝PS/2協疋進行,在此並不予詳述。而鍵盤編碼單元23 及鍵盤掃描矩陣32的組合係可看成是筆記型電腦中内建 的鍵盤33。 本實施例的資料埠係用以提供從鍵盤編碼單元23往 PS/2介面控制單元22的資料訊號傳輸,資料請求線S1係 為鍵盤編碼單元23要求對PS/2介面控制單元22作資料傳 輸;而資料傳輸排線S2用以傳送鍵盤編碼單元23的資料 訊號給PS/2介面控制單元22。 本實施例的命令埠係用以提供從PS/2介面控制單元 22往鍵盤編碼單元23的命令訊號傳輸,命令請求線S3係 為PS/2介面控制單元22要求對鍵盤編碼單元23作命令傳 輸;命令傳輸排線S4用以傳送PS/2介面控制單元22之命 令訊號給鍵盤編碼單元23。 请麥閱第四圖,其係為本發明之一較佳實施例的鍵盤 控制流耘圖。包括步驟如下:鍵盤控制單元接收主機下達 的鍵盤控㈣命令(S401),並由鍵盤控制單元輸出鍵盤控制 二令給PS/2介面控制單元;ps/2介面控制單元先送出一 π令告知訊號給鍵盤編碼單元(S4〇3),之後ps/2介面控 制單兀將收到的鍵盤控制命令傳送給鍵盤編碼單元,而前 述的命令告知訊號係透過命令請求線傳輸,鍵 盤控制命令 1270804 係透過命令傳輪排線傳輸。 鍵盤編碼單元接收到鍵盤控制命令(S405),並將鍵盤 控制々々輪出給鍵盤掃描矩陣,鍵盤掃描矩陣即依據鍵盤 =制〒7執行鍵盤掃描動作;之後鍵盤編碼單元對於鍵盤 矩陣的按鍵掃描結果進行編碼(8術)並得到一鍵盤 田值,鍵盤編碼單元送出資料告知訊號給ps/2介面控制 =元jS409) ’之後再將鍵盤掃描值經由該π/?介面控制 迻$鍵盤控制單元,而前述資料告知訊號係透過資料 =線傳輸’鍵盤掃描㈣透過㈣傳輸聽傳輸;最後 、’i控制單元回應鍵盤掃描值給主機(S411)。 11 ^本發明之虛擬PS/2傳輸介面細ready—ack的協 ^ 0雨§虛擬PS/2傳輸介面要傳輸資料時,係由鍵盤 j早^23先透過資料請求線幻送出—資料告知訊號(如 2位)、給PS/2介面控制單元22,PS/2介面控制單元22 9,JQ此貧料告知訊號即準備接收資料傳輸,而鍵盤編碼單 =3即可將資料透過資料傳輸排㈣輸出給ps/2介面控 f =22。而當虛擬PS/2傳輸介面要傳輸命令時,係由 ^/2 ;ι面控制單元22先透過命令請求線幻送出一命令止 =號(如高準位)給鍵盤編碼單元23,鍵盤編碼單元& 4|1]此〒令告知訊號即準備接收命令傳輸,而PS/2介面控 22即可將命令透過命令傳輸排線S4輸出給鍵 瑪早兀23。 而上述中虛擬PS/2傳輸介㈣傳輸㈣料係為鍵盤 =值,而虛擬PS/2傳輸介面所傳輪的命令係為鍵盤控制 是以,透過本發明之鍵盤控魏置與枝,具有下列 1270804 之優點:可簡化PS/2介面控制單元22與鍵盤編碼單元23 之間訊號傳遞的設計,且原本鍵盤控制單元21使用之韋刃體 並不須因此作更改,並可相容於原本鍵盤控制裝置使用, 且虛擬PS/2傳輸介面可完全取代真實ps/2傳輸介面的操 作,提供PS/2介面控制單元22與鍵盤編碼單元23之間的 資料與命令的傳輸。 惟,以上所述,僅為本發明最佳之一的具體實施例之 詳細說明與圖式,凡合於本發明申請專利範圍之精神與其 類似變化之實施例,皆應包含於本發明之範疇中,任何熟 悉该項技藝者在本發明之領域内,可輕易思及之變化或修 飾皆可涵蓋在以下本案之專利範圍。PS2DAT and PS2CLK, PS/2 device 31 communicates with PS/2 interface control unit 22 through PS2DAT and PS2CLK. This part of the transmission is performed according to PS/2 protocol, which will not be described in detail here. The combination of the keyboard encoding unit 23 and the keyboard scanning matrix 32 can be regarded as a keyboard 33 built in the notebook computer. The data of the embodiment is used for providing data signal transmission from the keyboard encoding unit 23 to the PS/2 interface control unit 22. The data request line S1 is required for the keyboard encoding unit 23 to transmit data to the PS/2 interface control unit 22. The data transmission cable S2 is used to transmit the data signal of the keyboard encoding unit 23 to the PS/2 interface control unit 22. The command of the embodiment is used to provide command signal transmission from the PS/2 interface control unit 22 to the keyboard encoding unit 23. The command request line S3 is required by the PS/2 interface control unit 22 to transmit commands to the keyboard encoding unit 23. The command transmission cable S4 is used to transmit the command signal of the PS/2 interface control unit 22 to the keyboard encoding unit 23. Please refer to the fourth figure, which is a keyboard control flow diagram of a preferred embodiment of the present invention. The steps include the following steps: the keyboard control unit receives the keyboard control (four) command issued by the host (S401), and the keyboard control unit outputs a keyboard control command to the PS/2 interface control unit; the ps/2 interface control unit first sends a π command notification signal. To the keyboard coding unit (S4〇3), after which the ps/2 interface control unit transmits the received keyboard control command to the keyboard coding unit, and the aforementioned command informs the signal transmission through the command request line, and the keyboard control command 1270804 is transmitted through The command passes the cable transmission. The keyboard encoding unit receives the keyboard control command (S405), and outputs the keyboard control to the keyboard scanning matrix. The keyboard scanning matrix performs the keyboard scanning operation according to the keyboard=system 7; then the keyboard coding unit scans the key of the keyboard matrix. The result is coded (8 operations) and a keyboard field value is obtained. The keyboard coding unit sends a data notification signal to the ps/2 interface control = element jS409). Then the keyboard scan value is transferred to the keyboard control unit via the π/? interface control. The above information informs the signal transmission through the data = line transmission 'keyboard scan (four) through (4) transmission; finally, the 'i control unit responds to the keyboard scan value to the host (S411). 11 ^ The virtual PS / 2 transmission interface of the present invention is fine ready- ack of cooperation _ 0 rain § virtual PS / 2 transmission interface to transmit data, is sent by the keyboard j early ^ 23 first through the data request line - data notification signal (such as 2 digits), to PS/2 interface control unit 22, PS/2 interface control unit 22 9, JQ, the poor material informs that the signal is ready to receive data transmission, and the keyboard code list = 3 can transmit data through the data transmission row (4) Output to ps/2 interface control f = 22. When the virtual PS/2 transmission interface is to transmit a command, the control unit 22 first sends a command stop number (such as a high level) to the keyboard encoding unit 23 through the command request line, and the keyboard code is used. Unit & 4|1] This command tells the signal that it is ready to receive the command transmission, and the PS/2 interface control 22 can output the command to the key transmission line S4 through the command transmission cable S4. The above-mentioned virtual PS/2 transmission medium (4) transmission (four) material system is a keyboard=value, and the command of the virtual PS/2 transmission interface is a keyboard control, which is controlled by the keyboard of the present invention. The following advantages of 1270804: the design of the signal transmission between the PS/2 interface control unit 22 and the keyboard encoding unit 23 can be simplified, and the original blade control unit 21 does not need to be modified, and is compatible with the original The keyboard control device is used, and the virtual PS/2 transmission interface can completely replace the operation of the real ps/2 transmission interface, providing data and command transmission between the PS/2 interface control unit 22 and the keyboard encoding unit 23. The above description of the specific embodiments of the present invention is only one of the preferred embodiments of the present invention, and the embodiments of the present invention are intended to be included in the scope of the present invention. Any change or modification that can be easily conceived by those skilled in the art in the field of the present invention can be covered by the following patents.
11 1270804 【圖式簡單說明】 第一圖係為習知PS/2傳輸介面的控制器方塊圖; 第二圖係為本發明之一較佳實施例之方塊示意圖; 第三圖係為本發明之一較佳實施例的虛擬PS/2傳輸介面 的示意圖;及 第四圖係為本發明之一較佳實施例的鍵盤控制流程圖。 【主要元件符號說明】 「本發明」 10主機 20鍵盤控制裝置 21鍵盤控制單元 22 PS/2介面控制單元 23鍵盤編碼單元 31 PS/2裝置 32鍵盤掃描矩陣 33鍵盤 S1資料請求線 S2資料傳輸排線 S3命令請求線 S4命令傳輸排線 「習知」 100控制電路 12 1270804 101微處理器 102記憶體 104移位暫存器 105硬體電路 106狀態機 10 7主機介面11 1270804 [Simplified description of the drawings] The first figure is a block diagram of a controller of a conventional PS/2 transmission interface; the second figure is a block diagram of a preferred embodiment of the present invention; A schematic diagram of a virtual PS/2 transmission interface of a preferred embodiment; and a fourth diagram is a flowchart of a keyboard control in accordance with a preferred embodiment of the present invention. [Main component symbol description] "Invention" 10 host 20 keyboard control device 21 keyboard control unit 22 PS/2 interface control unit 23 keyboard encoding unit 31 PS/2 device 32 keyboard scanning matrix 33 keyboard S1 data request line S2 data transmission row Line S3 Command Request Line S4 Command Transmission Cable "General" 100 Control Circuit 12 1270804 101 Microprocessor 102 Memory 104 Shift Register 105 Hardware Circuit 106 State Machine 10 7 Host Interface