1. Field of the Invention
The present invention relates to methods of detecting computer keyboard and, more particularly, to a method of detecting short-circuits of a keyboard device for a computer.
2. Background of the Invention
In today""s information era, computer keyboards are important external data input devices for users to communicate with computers. The performance of keys of keyboards is critical to the messages sent into computers, since users use them to enter information, data, and programs into computers. The input messages are then stored in the memory devices of computers. Therefore, detecting the functionality of keys of keyboards is a necessary routine for computer users.
In general, a keyboard is arranged in a form of matrix that comprises columns and rows of data lines. Each of the keys of the keyboard matrix has its own key symbol correspondingly. The short-circuit resulted in the keyboard matrix could be attributed to the following causes: short-circuit between a column of data line and another column of data line; short-circuit between a row of data line and another row of data line; short-circuit between a column of data line and a row of data line. An automatically detecting procedure built in computer BIOS is conventionally used to detect the short-circuit occurred between a column of data line and a row of data line when a computer is powered on and starts booting. Therefore, users only need to do with the short-circuit occurred between a row of data line and another row of data line and that occurred between a column of data line and a column of data line.
Certain learning-technique-based detection methods applied to computers, such as the softwares of QAFact and Amidiag in which the detection of the keys of keyboard is carried out in the procedure of diagnosing computer hardware, intercept the scanned code of each key by using the interrupt procedures of DOS (Disk Operating System) and BIOS (Basic Input Output System). Testers must observe the display of terminal screen directly when using diagnosing software for computer hardware, such as Qafactry 6.7, 7.0, AMI Diag and Compaq Diag, to detect short-circuits of computer keyboard matrix. They have to carefully look into the displayed diagram for the keyboard matrix on terminal screen when a key is pressed. Testers have to observe not only whether or not the site in the diagram corresponding to the pressed key shows appropriate reaction but also whether there are other cites indicating false signals responsive to keys which are pressed. To use the detecting method mentioned in the above, a tester has to press keys 102 times if the computer keyboard to be tested has 102 keys, and he or she has to carefully observe the flashing status of keyboard diagram on terminal screen each time a key is pressed. No message of text on terminal screen can inform a user of the short-circuit status of a keyboard matrix during a detection of keyboard when the learning techniques as mentioned in the above are used. Therefore, to examine the condition of a keyboard, a tester has to keep on observing terminal screen carefully until all keys have been pressed for a complete test, making the testing process time-consuming and laborious. In addition, the user can not get the result of detection of short-circuit only by testing a part of the keys.
The primary object of present invention is to provide a method of detecting short-circuits of a keyboard, which can be built into a computer system installed with a keyboard, allowing a tester to detect and determine short-circuit of the keyboard faster than the prior art.
Another object of the present invention is to provide a method of detecting short-circuits of a keyboard, which can be built into a computer system installed with a keyboard, allowing the scanned codes produced by a keyboard controller to be stored in a computer device""s buffer so that the mainframe of the computer system can directly handle the scanned codes instead of ASCII codes.
A further object of the present invention is to provide a method of detecting short-circuits of a keyboard, which can be built into a computer system installed with a keyboard, allowing the keyboard controller of the keyboard to receive a signal and then produce a corresponding scanned code responsive to a key which is pressed to thereby trigger a hardware interrupt of IRQ1.
According to the above and other objects, the present invention provides a novel method of detecting short-circuits of a keyboard, which can be applied to a computer system consisting of a keyboard, a keyboard controller, a computer mainframe installed with a buffer, device of central processor, memory device, and a display unit.
To begin with the method of the present invention, a keyboard matrix, which corresponds to the keys of a keyboard is established. The keyboard matrix consists of columns of data lines and rows of data lines in the matrix form. Then, a database for storing scanned codes of the keyboard corresponding to the addresses of keyboard matrix is established in the memory device of the mainframe of a computer. When a tester presses a key, a column of data line and a row of data line connect with each other. A keyboard controller then receives a signal variation resulted from the key pressing and produces a scanned code responsive to the key which is pressed. The scanned code is thereafter sent into the computer mainframe and an interrupt IRQ1 of computer hardware is accordingly triggered. Subsequently, a predefined interrupt service procedure for replacing the traditional interrupt procedure of INT9H, transmits the scanned code into computer buffer directly.
By executing a comparison program in the memory device of the computer mainframe, the computer mainframe will compare the scanned code transmitted into the buffer with the codes in the database pre stored in the memory device. According to the result of the comparison, the address of keyboard matrix corresponding to the scanned code can be located. As a result, the key which is pressed can be determined among the keys of keyboard. Twenty-five keys which are predefined are provided for a tester to press one after one following an instruction given in the method of detecting short-circuits of a keyboard. When the key which is pressed is short-circuited, a message appeared on the display screen would indicate the short-circuited key by showing the row number of short-circuited data line or the column number of short-circuited data line. As only 25 keys, instead of all the keys of the keyboard, are required to determine short-circuited keys of the keyboard, the method of the invention can be conducted in a speed faster than the prior art.