1. Technology Field
The disclosure relates to a signal processing technique for a keyboard and, in particular, to a signal processing device for a keyboard and a signal processing method thereof.
2. Related Art
Some of the keyboards for notebook computers available in the market integrate pointer rods to simulate the function of a mouse. However, the signals of the keys on a keyboard and the signals of the pointer rod are processed by two processing modules respectively. Moreover, the signals of the pointer rod are often required to be processed by an ASIC (application-specific integrated circuit) to convert analog signals into PS/2 signal according to a protocol to control the cursor to move on a screen. This increases the overall complexity of the keyboard signal processing. For a computer manufacturer, manufacturing costs are increased due to the requirement of using the ASIC mentioned above.
In view of the above, an objective of the discolsure is to provide a signal processing device for a keyboard and the signal processing method thereof to prevent the use of a specific chip for the pointer rod signals and reduce the number of components and the manufacturing costs.
The signal processing device for a keyboard includes a key scanning unit, a pointer rod scanning unit, an analog-to-digital conversion unit and a processing unit. The key scanning unit is connected with the keys for generating a first digital input signal according to the status of the keys. The pointer rod scanning unit is connected with the pointer rod for generating an analog input signal according to the status of the pointer rod. The analog-to-digital conversion unit is connected with the pointer rod scanning unit and receives the analog input signal, wherein the analog-to-digital conversion unit converts the analog input signal into a corresponding second digital input signal. The processing unit is connected with the key scanning unit and the analog-to-digital conversion unit for receiving the first digital input signal and the second digital input signal. The processing unit processes the first digital input signal and the second digital input signal by time sharing.
The signal processing method for a keyboard is used to a keyboard having a plurality of keys and a pointer rod. The signal processing method for the keyboard includes the steps of generating a first digital input signal according to the status of the keys; generating an analog input signal according to the status of the pointer rod; converting the analog input signal into a corresponding second digital input signal; and processing the first digital input signal and the second digital input signal by time sharing.
The disclosure uses the same processing unit to process the first digital input signal corresponding to the keys and the second digital input signal corresponding to the pointer rod by time sharing. The use of a specific chip is prevented, whereby the processing complexity is reduced, the number of components is reduced, and the manufacturing costs are also reduced.
The present invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements.
In the present embodiment, the key scanning unit 210 generates a first digital input signal according to the status of the key. Here, the keyboard may be an 8×16 matrix keyboard, and therefore the key scanning unit 210 may be a scanning unit for an 8×16 keyboard matrix. However, the invention is not limited therein. The keyboard may also be an 8×8 matrix keyboard, and the key scanning unit 210 may be correspondingly a scanning unit for an 8×8 keyboard matrix.
In the present embodiment, the pointer rod scanning unit 220 generates an analog input signal according to the status of the pointer rod. The analog-to-digital conversion unit 232 receives the analog input signal, and converts the analog input signal into a corresponding second digital input signal.
In the present embodiment, the processing unit 234 receives the first digital input signal and the second digital input signal. The processing unit 234 may process the first digital input signal and the second digital input signal by time sharing. The processing unit 234 may generate a corresponding key input according to the first digital input signal, and controls the cursor to move on the screen according to the second digital input signal.
Please refer to
In the present embodiment, when the processing unit 234 processes the pointer rod signal 305 (that is, the second digital input signal) in the second time slot (for example, a preset time of 3 milliseconds) of the scanning period, the processing unit 234 performs samplings to the second digital input signal generated by the conversion of the analog-to-digital conversion unit 232 with a certain frequency to obtain a plurality of second digital input signals. For example, if the user does not operate the pointer rod within a period of time, the signals sampled by the processing unit 234 may be 00000000. If the user pushes the pointer rod, the signals sampled by the processing unit 234 may be varied correspondingly based on the direction and distance the user pushes the pointer rod, such as 01001000 for example. The invention is not limited therein. Subsequently, the processing unit 234 may average a plurality of the second digital input signals to obtain a first average value, and then correspondingly output a pointer rod signal variation amount in the last slot of a scanning period to control the cursor to move toward a corresponding direction on the screen. For example, the processing unit 234 may perform sampling 10 times within the preset time of 3 milliseconds, and use the average of these 10 samples as the output of the pointer rod signal variation amount. Moreover, to improve accuracy, after sampling 10 times, the processing unit 234 may calculate the average after removing the samples with the largest and smallest values to output the pointer rod signal variation amount. However, the invention is not limited therein.
In other embodiments, to further improve control accuracy, the processing unit 234 may sample multiple sets of second digital input signals in the second time slot, calculate the average of each set of second digital input signals, remove the largest and smallest averages, and finally calculate the average of the averages of the remaining sets to output it as the pointer rod signal variation amount. For example, the processing unit 234 may sample 10 sets of data within the preset time of 3 milliseconds, with each set containing 8 samples. The average of the 8 sample is calculated and used as the second digital input signal of that set, and the calculation is repeated to obtain 10 averages of the 10 sets. Afterwards, the largest and smallest averages are removed, and the average of the remaining 8 averages of the 8 sets is output as the pointer rod signal variation amount.
Moreover, in the present embodiment, after calculated the first average value, the processing unit 234 may refer to a reference value to obtain a pointer rod signal variation amount. That is, the processing unit 234 does not output the absolute value of the calculated first average value as the pointer rod signal variation amount, but output the difference between the first average value and the reference value as the pointer rod signal variation amount. If the absolute value of the difference between the first average value and the reference value is smaller than or equal to a first value, for example the difference between the first average value and the reference value is within the range of ±2 bits, it is determined that no operation is performed on the pointer rod and the cursor does not need to move. However, the invention does not limit the magnitude of the first value, which can be set in view of different practical applications.
It is noteworthy that the second digital input signal substantially includes input signals on the X axis and the Y axis. The procedure of the processing unit 234 mentioned above is applicable to both the second digital input signals on the X axis and the Y axis.
Furthermore, in the present embodiment, since the second digital input signals on the X axis and the Y axis may drift over time, to prevent the move of the cursor on the screen due to the drift of the X axis and the Y axis signals, the processing unit 234 performs a calibration to the reference values of the X axis and the Y axis every fixed time interval (such as 6 seconds), and the reference values after calibrated are the second average values of the multiple second digital input signals on corresponding directions within the fixed time interval. Please refer to
Furthermore, it should be mentioned that the sample values V1 to V16 in
Please refer to
Step 410: correspondingly generating a first digital input signal according to the status of a plurality of keys;
Step 420: correspondingly generating an analog input signal according to the status of a pointer rod;
Step 430: converting the analog input signal into a corresponding second digital input signal; and
Step 440: processing the first digital input signal and the second digital input signal by time sharing.
The invention does not limit the sequence of the first digital input signal and the second digital input signal.
Please refer to
Step 510: begin;
Step 520: obtaining the second digital input signals of an X axis and a Y axis respectively;
Step 530: calibrating a reference value;
Step 540: processing the second digital input signals of the X axis and the Y axis respectively; and
Step 550: end.
Through the processing method mentioned above, the preferred embodiment of the invention realizes the usage of the same processing unit to perform time-sharing processing to the signals of the keyboard and the signals of the pointer rod. It is not necessary to use a specific chip to process the signals of the pointer rod. Therefore, the invention reduces the overall complexity of the signal processing of the keyboard integrated with a pointer rod. For computer manufacturers, manufacturing costs are reduced since it is not necessary to process the signals of the pointer rod using a specific chip.
Although the invention has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiments, as well as alternative embodiments, will be apparent to persons skilled in the art. It is, therefore, contemplated that the appended claims will cover all modifications that fall within the true scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
201210321145.2 | Sep 2012 | CN | national |