This application claims the benefit of Taiwan Patent Application Serial No. 104132835, filed Oct. 6, 2015, the subject matter of which is incorporated herein by reference.
1. Field of the Invention
The invention relates to a scan method for keyboards, and more particularly to the scan method for keyboards that, in the case of different voltage settings to keyboard scan input/output contacts, can detect voltages of a keyboard scan input contact and a keyboard scan input/output contact so as further to determine whether or not a low voltage signal is a valid button signal.
2. Description of the Prior Art
Generally speaking, in the art of keyboard scan, the confirmation of the depressed button by the firmware in the conventional scan method is delayed by a switch bounce time, no matter what the detected signal is a keyboard signal or a noise.
Refer now to
As described, since the voltage at the keyboard scan input port PAKSI would change while the button PA1 is depressed to bridge electrically the keyboard scan input port PAKSI and the keyboard scan output port PAKSO, and at this time the instant voltage response would experience oscillations for an oscillation time duration BT, the firmware is usually preset to scan and determine whether or not the detected voltage signal at the keyboard scan input port PAKSI is a valid button-depressed signal or a noise, after the oscillations in the oscillation time duration are over. Accordingly, the response time for button depressing is thus substantially delayed. Such a delay would definitely bother the user whom expects a swift or real-time response from his/her button action.
In the art, when the firmware detects a low voltage signal is generated at the keyboard scan input port, a wait for the oscillation time duration is needed before a determination upon whether the low voltage signal is a valid button-depressed signal or a noise can be processed. Therefore, the response speed to the button depression is usually not satisfied.
Accordingly, it is the primary object of the present invention to provide a scan method for keyboards that can utilize the firmware to configure a voltage at the keyboard scan input/output contact and determine if a detected low voltage signal at the keyboard scan input contact is a valid button signal or a noise signal by judging the voltage variation.
In the present invention, the scan method for keyboards is applied to a keyboard module, which the keyboard module includes a keyboard scan input contact, a keyboard scan input/output contact, a button and a firmware. The button is electrically connected with the keyboard scan input contact and the keyboard scan input/output contact, and the firmware is electrically connected with the keyboard scan input contact and the keyboard scan input/output contact. The scan method comprises the steps of: (a) setting a voltage at the keyboard scan input/output contact to be an output voltage while the firmware detects a low voltage signal being generated by the keyboard scan input contact; (b) detecting if a voltage at the keyboard scan input contact is a low voltage or not; setting the voltage at the keyboard scan input/output contact to be an input voltage while the voltage at the keyboard scan input contact is the low voltage; and (c) detecting if the voltage at the keyboard scan input/output contact is a high voltage or not; determining the low voltage signal to be a button signal and performing a signal masking process within an oscillation time duration of the low voltage signal while the voltage at the keyboard scan input/output contact is the high voltage
In one embodiment of the present invention, in Step (c), the low voltage signal is judged to be a noise signal if the voltage at the keyboard scan input contact is the low voltage.
In another aspect of the present invention, the scan method for keyboards is applied to a keyboard module, which the keyboard module includes a keyboard scan input contact, a keyboard scan input/output contact, a button and a firmware. The keyboard scan input/output contact is connected electrically with a grounding resistor, the button is electrically connected with the keyboard scan input contact and the keyboard scan input/output contact, and the firmware is electrically connected with the keyboard scan input contact and the keyboard scan input/output contact. The scan method comprises the steps of: (a) setting a voltage at the keyboard scan input contact to be an input voltage while the firmware detects a low voltage signal being generated by the keyboard scan input contact; (b) detecting if a voltage at the keyboard scan input/output contact is a high voltage or not; setting the voltage at the keyboard scan input/output contact to be an output voltage while the voltage at the keyboard scan input/output contact is the high voltage; and (c) determining the low voltage signal to be a button signal and performing a signal masking process within an oscillation time duration of the low voltage signal while the voltage at the keyboard scan input contact is the low voltage.
In one embodiment of the present invention, the low voltage signal is judged to be a noise signal if the voltage at the keyboard scan input/output contact is the low voltage.
By compared to the conventional technique, since the scan method for keyboards provided by the present invention utilizes the firmware to perform setting and scanning at a circumstance of even adopting the used hardware, the response speed of the keyboard is significantly enhanced, and the noise interference to the keyboard can be effectively inhibited.
All these objects are achieved by the scan method for keyboards described below.
The present invention will now be specified with reference to its preferred embodiment illustrated in the drawings, in which:
The invention disclosed herein is directed to a scan method for keyboards. In the following description, numerous details are set forth in order to provide a thorough understanding of the present invention. It will be appreciated by one skilled in the art that variations of these specific details are possible while still achieving the results of the present invention. In other instance, well-known components are not described in detail in order not to unnecessarily obscure the present invention.
Refer now to
Refer now to
Then, in Step S121, the voltage at the keyboard scan input contact 1 is detected to be a low voltage or not. In the case that the keyboard scan input contact 1 is at the low voltage, it implies, highly possible, that a depression upon the button K is applied so as to connect electrically the keyboard scan input contact 1 and the keyboard scan input/output contact 2, and so as to equal the voltages at the keyboard scan input contact 1 and the keyboard scan input/output contact 2 to be the same low voltage. Then, Step S122 is performed for confirmation. In Step 122, the voltage at the keyboard scan input/output contact 2 is set as the input voltage. In Step S131, the voltage at the keyboard scan input/output contact 2 is detected to be a high voltage or not. In the case that that the keyboard scan input/output contact 2 is at a state of high voltage, then perform Step S132. In Step S132, if the low voltage signal is judged to be a button signal is confirmed, and also a signal masking process is performed within the oscillation time duration of the low voltage signal so as to mask signals within a second oscillation time zone S2 of the oscillation time duration. In addition, in the case that the voltage at the keyboard scan input/output contact 2 is detected to be the low voltage in Step S131, then the low voltage signal is judged to be a noise signal.
Refer now to
Referring now to
Then, in Step S221, while the voltage at the keyboard scan input/output contact 2 is detected to be a high voltage, then Step S222 is performed to set the voltage at the keyboard scan input/output contact 2 as the output voltage, and to check if the voltage at the keyboard scan input contact 1 is a low voltage or not. However, while, in Step S221, a low voltage is detected at the keyboard scan input/output contact, the firmware FW would directly determine that the low voltage signal generated at the keyboard scan input contact 1 is simply a noise signal.
As stated above, in the case that the firmware FW detects that the voltage at the keyboard scan input contact 1 is a low voltage in Step S222, then, in Step S23, the detected low voltage signal is judged to be a button signal generated at the keyboard scan input contact 1, and a signal masking process is performed within the oscillation time duration of the low voltage signal.
In summary, by compared to the conventional technique that the determination of the signal is definitely delayed by the oscillation time duration of the low voltage signal, the scan method for keyboards provided by the present invention can perform detecting, setting and determining early within the first oscillation time zone of the oscillation time duration, and masks the remaining signals in the second oscillation time zone after the low voltage signal is determined. Upon such an arrangement, the response time of the keyboard can be effectively reduced. Namely, even that the used hardware is still adopted, the scan method provided to the firmware in accordance with the present invention can still enhance the response speed of the keyboard and prohibit effectively the noise interference to the keyboard, without increasing the cost in hardware investment.
While the present invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be without departing from the spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
104132835 | Oct 2015 | TW | national |