This application claims priority of Chinese application no. 201210085990.4, filed on Mar. 28, 2012, 2011.
1. Field of the Invention
The present invention relates to a method for keyboard scanning and a keyboard applying the same.
2. Description of the Related Art
In order to reduce the circuit impedance, the membrane keyboards in the consumer market use silver material of printing layer. However, the price of silver is rising, and therefore the industry is replacing silver with carbon, which is 20%-30% cheaper than silver, to manufacture membrane keyboards that use carbon printing to form membrane circuits.
Referring to
There is a linear resistor R3 located between every pair of the key switches 13 on each of the column lines P0.0-P0.7, but the resistances of the resistors R3 are not necessarily the same. Similarly, there is a linear resistor R4 located between every pair of the key switches 13 on each of the row lines P1.0-P1.7, but the resistances of the resistors R4 are not necessarily the same. Since the column lines P0.0-P0.7 and row lines P1.0-P1.7 are made of carbon rather than silver, the resistances of the first and second resistors R1, R2 are higher, given that the resistance of carbon is higher than that of silver.
When scanning each of the column lines P0.0-P0.7, a scanning module 14 within the controller 11 will enable the switch SW corresponding to the column line being scanned in sequence. For instance, when scanning the column line P0.0, the column line P0.0 will be pulled to a low state while the other column lines P0.1-P0.7 remain in a high state, and then row lines P1.0-P1.7 will be sequentially read. During scanning, if a key switch 13 is actuated, such as key switch K11, then the column line P0.0 and the row line P1.0 will be elect ally connected to form an equivalent circuit as illustrated in
Due to the stray capacitance C or capacitance inside controller 51, the linear resistor R4 electrically connected to the row line P1.0 and the second resistor R2 electrically connected to the row line P1.0 will affect the charge/discharge time (RC time) of the capacitor C. Therefore, the second resistor R2 electrically connected to the row line P1.0 will cause the RC time to increase, and the increase of RC time will cause a delay for the row line P1.0 to transition from a high to a low state, as illustrated by a falling time TD in
When only one key switch 13 is actuated, such as key switch K13 at the intersection of column line P0.2 and row line P1.0, as illustrated in
The object of the present invention is to provide a scanning method for a keyboard that can increase scanning efficiency and avoid occurrence of errors.
According to one aspect of the present invention, there is provided a scanning method for a keyboard. The keyboard includes a controller, a plurality of column lines and row lines arranged in a matrix and intersecting each other, and a plurality of key switches respectively disposed at intersections of the column lines and the row lines. Each of the key switches interconnects a corresponding one of the column lines and a corresponding one of the row lines when actuated. Each of the column lines is connected with a first reference signal source through a respective first resistor. Each of the row lines is connected with the first reference signal source through a respective second resistor. The controller is configured to control connection between each of the column lines and the respective first resistor and between each of the row lines with the respective second resistor.
The scanning method comprises the steps of:
(A) configuring the controller to disconnect each of the column lines from the respective first resistor and to disconnect each of the row lines from the respective second resistor, followed by configuring the controller to send a scan signal to a column line to be scanned;
(B) configuring the controller to connect one of the row lines with the respective second resistor, to read a signal on said one of the row lines, and then to disconnect said one of the row lines from the respective second resistor;
(C) configuring the controller to repeat step (B) with another one of the row lines until the signals on all of the row lines have been read; and
(D) configuring the controller to repeat steps (A), (B), and (C) with another one of the column lines until all of the column lines have been scanned.
Another object of the present invention is to provide a keyboard that applies the scanning method of this invention.
According to another aspect of the present invention, a keyboard comprises:
a plurality of column lines and a plurality of row lines arranged in a matrix and intersecting each other;
a plurality of key switches respectively disposed at intersections of the plurality of column lines and the plurality of row lines, each of the key switches interconnecting a corresponding one of the column lines and a corresponding one of the row lines when actuated;
a plurality of first resistors corresponding respectively to the column lines, each of the first resistors having a terminal for connection to a first reference signal source;
a plurality of second resistors corresponding respectively to the row lines, each of the second resistors having a terminal for connection to the first reference signal source;
a plurality of first switches, each connected between a respective one of the column lines and one of the first resistors corresponding to the respective one of the column lines;
a plurality of second switches, each connected between a respective one of the column lines and a second reference signal source;
a plurality of third switches, each connected between a respective one of the row lines and one of the second resistors corresponding to the respective one of the row lines; and
a controller configured to disable the first and third switches prior to scanning one of the column lines, subsequently enable the second switch corresponding to one of the column lines to be scanned, enable the third switch corresponding to one of the row lines to be read, and disable the third switch after reading the one of the row lines.
Other features and advantages of the present invention will become apparent in the following detailed description of the preferred embodiment with reference to the accompanying drawings, of which:
The controller 51 includes a plurality of first resistors R1 corresponding respectively to the column lines P0.0-P0.7, a plurality of first switches SW1, a plurality of second switches SW2, as well as a plurality of second resistors R2 corresponding respectively to the row lines P1.0-P1.7 and a plurality of third switches SW3. Each of the first resistors R1 has a terminal electrically connected to a first reference signal source, such as a high reference signal voltage source Vcc, and another terminal electrically conducting with a corresponding one of the column lines P0.0-P0.7 through a corresponding one of the first switches SW1, as illustrated in
A linear resistor R3 is electrically connected between any pair of the key switches 53 that are electrically connected to the same column line, and the resistances of the resistors R3 are not necessarily the same. Similarly, a linear resistor R4 is electrically connected between any pair of the key switches 53 that are electrically connected to the same row line, and the resistances of the resistors R4 are not necessarily the same.
The controller 51 controls the enabling and disabling of the first switches SW1, the second switches SW2 and the third switches SW3. Specifically, the controller 51 includes a scanning module 54 for detecting whether the key switches 53 are actuated. The scanning module 54 controls the enabling and disabling of the first switches SW1, the second switches SW2 and the third switches SW3 to carry out the scanning procedure of the key switches 53. That is, while sequentially scanning one of the column lines P0.0-P0.7, the scanning module will sequentially read for the signals on the respective row lines P1.0-P1.7 corresponding to the column line, in order to determine which of the key switches 53 has been actuated.
In the preferred embodiment of the scanning method for a keyboard, as illustrated in step 61 in
Subsequently, in step 62, the scanning module 54 sequentially read the signal on each of the row lines P1.0-P1.7. For example, before reading the row line P1.0, the third switch SW3 corresponding to the row line P1.0 is enabled to enable the row line P1.0 with the respective second resistor R2 for reading the voltage signal V2 on row line P1.0 derived from voltage division. According to the voltage signal V2, it can be determined whether the key switch K11 has been actuated. After reading the voltage signal on row line P1.0, the third switch SW3 corresponding to the row line P.0 is disabled, disabling the row line P1.0 from the respective second resistor R2. Repeatedly, the next row line is read in the above manner until all the row lines P1.0-P1.7 are read.
When multiple key switches 53 are actuated at the same time, such as the simultaneous actuation of three key switches K11, K12 and K13 at the intersections of row line P1.0 and column lines P0.0, P0.1 and P0.2, and when the column line P0.2 is being scanned, both the linear resistors R3 and the first resistors R1 corresponding to the column lines P0.1 and P0.2 are left floating electrically since the first switches SW1 corresponding to the column lines P0.1 and P0.2 are disabled. As illustrated in
In step 63, the scanning module 54 determines whether all column lines P0.0-P0.7 have been scanned. If any of the column lines P0.0-P0.7 has not been scanned, repeat steps 61 and 62 are repeated until all column lines P0.0-P0.7 have been scanned. When all column lines P0.0-P0.7 have been scanned, the flow goes to step 64, in which all of the first switches SW1 and third switches SW3 are enabled so that all of the column lines P0.0-P0.7 and row lines P1.0-P1.7 are restored to a high state. This prevents some column lines or row lines from residing in a low state that may result in false readings when a scan is being performed.
Furthermore, to ensure accuracy of the scanning results, the scanning module 54 can repeat the scanning procedures in
In summary, before scanning the column lines P0.0-P0.7, the scanning module 59 of the controller 51 disables all the first resistors R1 from the column lines P0.0-P0.7 corresponding to the first resistors R1, and disables all the second resistors R2 from the row lines P1.0-P1.7 corresponding to the second resistors R2, and then sequentially scans each of the column lines P0.0-P0.7. When a key switch 53is being pressed, the falling time (TD) that it takes for any row line that is connected to the column line being scanned to change state from high to low is reduced, i.e., the scanning duration may be reduced, and therefore the scanning efficiency may be increased. This prevents the problem of not detecting all the keystrokes during high-speed typing due to the long scanning duration, as encountered in the prior art. Further, the scanning module 54, by sequentially reading the row lines when scanning each column line and only electrically enabling the row line that is to be read with the corresponding second resistor R2, is able to correctly detect multiple key switches 53 that are actuated simultaneously.
While the present invention has been described in connection with what is considered the most practical and preferred embodiment, it is understood that this invention is not limited to the disclosed embodiment but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.
Number | Date | Country | Kind |
---|---|---|---|
201210085990.4 | Mar 2012 | CN | national |