US20170168588A1 - Electronic apparatus and method for detecting status of keys thereof - Google Patents
Electronic apparatus and method for detecting status of keys thereof Download PDFInfo
- Publication number
- US20170168588A1 US20170168588A1 US15/139,350 US201615139350A US2017168588A1 US 20170168588 A1 US20170168588 A1 US 20170168588A1 US 201615139350 A US201615139350 A US 201615139350A US 2017168588 A1 US2017168588 A1 US 2017168588A1
- Authority
- US
- United States
- Prior art keywords
- keys
- line
- result
- key
- control circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M11/00—Coding in connection with keyboards or like devices, i.e. coding of the position of operated keys
- H03M11/20—Dynamic coding, i.e. by key scanning
Definitions
- the invention generally relates to an electronic apparatus, and more particularly, to an electronic apparatus having anti-ghosting (N-key rollover) capability and a detection method of status of keys thereof.
- N-key rollover anti-ghosting
- FIG. 1 illustrates a conventional keyboard apparatus 100 .
- the keyboard apparatus 100 may include keys SW 1 -SW 4 and comparators 10 , 20 .
- the key SW 1 is coupled between a driving line DL 1 and a sensing line SL 1 .
- the key SW 2 is coupled between the driving line DL 1 and a sensing line SL 2 .
- the key SW 3 is coupled between a driving line DL 2 and the sensing line SL 1 .
- the key SW 4 is coupled between the driving line DL 2 and the sensing line SL 2 .
- the comparator 10 is coupled to the sensing line SL 1 to receive a voltage signal SV 1 and compares the voltage signal SV 1 with a reference voltage Vref.
- the comparator 20 is coupled to the sensing line SL 2 to receive a voltage signal SV 2 and compares the voltage signal SV 2 with the reference voltage Vref.
- the driving line DL 1 is driven to a voltage potential and the driving line DL 2 is driven to another voltage potential.
- the keys SW 1 and SW 2 may respectively transmit the corresponding voltage signals SV 1 , SV 2 to the comparators 10 , 20 through the sensing lines SL 1 , SL 2 according to the press status of the keys SW 1 , SW 2 .
- the voltage signals SV 1 , SV 2 are respectively compared to the reference voltage Vref by the comparators 10 , 20 to determine the press status of the keys SW 1 , SW 2 .
- the driving line DL 2 is driven to a voltage potential and the driving line DL 1 is driven to another voltage potential.
- the keys SW 3 and SW 4 may respectively transmit the voltage signals SV 1 , SV 2 to the comparators 10 , 20 through the sensing lines SL 1 , SL 2 according the press status of the keys SW 3 and SW 4 .
- the voltage signals SV 1 , SV 2 are respectively compared to the reference voltage Vref by the comparators 10 , 20 to determine the press status of the keys SW 3 and SW 4 .
- the disclosure provides an electronic apparatus and a method for detecting the key status of the electronic apparatus.
- a conversion circuit having calibration mechanism of the electronic apparatus which is responsible for other system functions (such as temperature control function or power monitor function, etc.), may be utilized to assist scan operation of the key status of the electronic apparatus.
- the circuit resource of the electronic apparatus is maximized.
- the electronic apparatus of the disclosure includes a key module, a key control circuit, a conversion circuit having calibration mechanism, and a processor.
- the key module includes a plurality of keys, at least one first line and at least one second line, wherein the at least one first line and the at least one second line are coupled to the keys to drive the keys or sense the keys.
- the key control circuit may be coupled to the at least one first line and the at least one second line.
- the key control circuit detects whether any one of the keys is pressed, if a detection result is affirmative, the key control circuit scans a press status of each of the keys, and accordingly, obtains a coarse scan result.
- the conversion circuit having calibration mechanism includes a switch circuit. The switch circuit may be coupled to a first circuit to receive a first sensing signal.
- the switch circuit may also be coupled to the key control circuit to receive at least one second sensing signal on the at least one second line through the key control circuit, and controlled by a switch signal to pre-select the first sensing signal as an analog signal.
- the conversion circuit having the calibration mechanism performs a conversion on the analog signal to generate a first result.
- the processor may be coupled to the key control circuit and the conversion circuit having calibration mechanism. The processor executes a system function corresponding to the first sensing signal according to the first result.
- the processor determines that at least one of the keys is not pressed according to the coarse scan result, the processor generates the switch signal to cause the switch circuit to select one of the at least one second sensing signal as the analog signal, so that the conversion circuit having the calibration mechanism performs the conversion on the analog signal to generate a second result, and the processor re-determines the press status of the at least one of the keys according to the second result.
- the key control circuit sequentially selects one of the at least one first line, and parallelly scans the press status of each of the keys on the selected first line through the at least one second line, so as to generate the coarse scan result.
- the key control circuit parallelly drives the at least one first line to an identical potential, and parallelly detects whether any one of the keys is pressed as a detection result through the at least one second line.
- the key control circuit determines whether any one of the keys is pressed according to the detection result in the detection stage, if a determination result is affirmative, the key control circuit enters into the first scan stage.
- the key control circuit includes at least one comparator circuit and a main control circuit.
- the at least one comparator circuit may be coupled to the at least one second line and the processor.
- the main control circuit may be coupled to the at least one first line and the processor.
- the main control circuit parallelly drives the at least one first line to a first potential in the detection stage.
- the at least one comparator circuit compares a voltage of the at least one second line with a comparison voltage to generate the detection result.
- the main control circuit sequentially selects one of the at least one first line in the first scan stage.
- the main control circuit drives the selected one of the at least one first line to the first potential and drives other of the at least one first line to a second potential.
- the at least one comparator circuit compares a voltage of the at least one second line with the comparison voltage to generate the coarse scan result.
- the processor in the first scan stage, when the processor determines that the at least one of the keys is not pressed according to the coarse scan result, the processor enters into a second scan stage and drives the first line corresponding to the key not pressed to a first potential and other of the at least one first line to a second potential through the key control circuit.
- the processor generates the switch signal to cause the switch circuit to select the second sensing signal of the second line corresponding to the key not pressed as the analog signal, so that the conversion circuit having the calibration mechanism performs the conversion to the analog signal to generate the second result.
- the processor compares the second result and a threshold value to re-determine the press status of the key not pressed.
- the conversion circuit having the calibration mechanism further includes an analog-to-digital converter.
- the analog-to-digital converter may be coupled to the switch circuit to receive the analog signal and perform an analog-to-digital conversion to the analog signal to generate the first result or the second result, wherein the analog-to-digital converter has calibration mechanism.
- the first circuit comprises a temperature sensor or a power measurement circuit
- the processor executes a temperature control function or a power monitor function of the system function according to the first result.
- the method for detecting the key status may be adapted to a key module of an electronic apparatus.
- the method for detecting the key status includes the following steps. In a detection stage, whether any one of a plurality of keys in the key module is pressed may be detected by a key control circuit of the electronic apparatus. If a detection result is affirmative, the process enters into a first scan stage. In the first scan stage, a press status of each of the keys may be detected by the key control circuit, and accordingly, a coarse scan result is obtained. In the first scan stage, whether at least one of the keys is not pressed is determined according to the coarse scan result by a processor of the electronic apparatus.
- the process enters into a second scan stage.
- a switch signal is generated by the processor, which causes a switch circuit in a conversion circuit having calibration mechanism to be switched to select one of at least one second sensing signal from the key module as an analog signal for performing a conversion to the analog signal by the conversion circuit having calibration mechanism, so as to generate a second result.
- the press status of the at least one of the keys is re-determined according to the second result.
- the switch signal is generated by the processor, so as to cause the switch circuit to be switched back to select a first sensing signal from a first circuit as the analog signal for performing the conversion to the analog signal to generate a first result by the conversion circuit having calibration mechanism.
- a system function corresponding to the first sensing signal may be executed according to the first result by the processor.
- the conversion circuit having calibration mechanism which is utilized for other system functions (such as temperature control function or power monitor function), may be dynamically switched to assist in a scan function of the key module. Since a first sensing signal which the conversion circuit having calibration mechanism is to convert originally would not have instantaneous enormous changes, the conversion circuit having calibration mechanism may be dynamically and temporarily switched to assist the scan function of the key module without affect the original system function. As a result, the key control circuit would not need calibration mechanism which reduces the cost of the circuit.
- the conversion circuit having calibration mechanism is only utilized to assist the re-scan of the key that is determined to be not pressed, time and the number of times of the re-scan may be reduced. Therefore, in addition to the accurate determination of the press status of the keys, the electronic apparatus of the disclosure also maximizes the usage of the circuit resources.
- FIG. 1 illustrates a conventional keyboard apparatus 100 .
- FIG. 2 is a schematic diagram illustrating an electronic apparatus 200 according to an exemplary embodiment of the disclosure.
- FIG. 3 is a schematic diagram illustrating the keyboard module 220 and the key control circuit 240 illustrated in FIG. 2 .
- FIG. 4 is a circuit block diagram of the electronic apparatus 200 illustrated in FIG. 2 .
- FIG. 5 is a diagram illustrating a circuit structure of a comparator circuit illustrated in FIG. 4 .
- FIGS. 6A-6C are circuit diagrams illustrating a voltage dividing circuit formed by keys of second lines and the comparator circuits according to one of the exemplary embodiments of the disclosure.
- FIG. 7 is a flow diagram illustrating the detection method of detecting the status of the keys of the electronic apparatus according to one of the exemplary embodiment of the disclosure.
- FIG. 2 is a schematic diagram illustrating an electronic apparatus 200 according to an exemplary embodiment of the disclosure.
- the electronic apparatus 200 may include a keyboard module 220 , a key control circuit 240 , a conversion circuit having a calibration mechanism 260 and a processor 280 .
- the disclosure is not limited to the above parts.
- FIG. 3 is a schematic diagram illustrating the keyboard module 220 and the key control circuit 240 illustrated in FIG. 2 .
- the keyboard module 220 may include M ⁇ N keys, N first lines, and M second lines, wherein M is a positive integer greater than or equal to 1, and N is a positive integer greater than and equal to 1.
- M and N are hypothetically presumed as 5, for example.
- M and N may be any other values, and exemplary embodiments having other values for M and N may be deduced from the description set forth below. Therefore, the keyboard module 220 illustrated in FIG.
- Each of the keys 601 - 625 includes a resistor r and a switch sw, where the resistor r and the switch sw are serially connected to each other, and the switch sw of the key (e.g., key 601 ) may closed (conduct) in response the key (key 601 ) being pressed, and the switch sw may be opened (not conduct) in response to the key (key 625 ) not being pressed.
- the first lines L 11 -L 15 and the second lines L 21 -L 25 may be coupled to the keys 601 - 625 to drive the keys 601 - 625 or to sense the keys 601 - 625 .
- the first line L 11 is coupled to the keys 601 , 606 , 611 , 616 , 621 to drive or sense the keys 601 , 606 , 611 , 616 , 621 .
- the rest of the first lines L 12 -L 15 may be deduced according to the content illustrated in FIG. 3 .
- the second line L 21 is coupled to the keys 601 - 605 to drive or sense the keys 601 - 605 .
- the rest of the second lines L 22 -L 25 may be deduced according to the content illustrated in FIG. 3 .
- the first lines L 11 -L 15 may be utilized as driving lines as well as sensing lines, which may be configured based on the stage of the operation or process of the key control circuit 240 .
- the second lines L 21 -L 25 may be configured as driving lines as well as sensing lines, which may be configured based on the stage of the operation or process of the key control circuit 240 . Detail of which would be described later.
- the key control circuit 240 is coupled to the first lines L 11 -L 15 and the second lines L 21 - 25 .
- the key control circuit 240 may detect whether any key among the keys 601 - 625 is pressed. If a detection result is affirmative, the key control circuit 240 may further scan a press status for each of the keys 601 - 625 to obtain a coarse scan result R 01 -R 25 (as illustrated in FIG. 2 .)
- the conversion circuit having calibration mechanism 260 may be coupled to a first circuit 50 to receive a first sensing signal SC 1 .
- the conversion circuit having the calibration mechanism 260 may be further coupled to the key control circuit 240 to receive a plurality of second sensing signals SC 21 -SC 25 from the second lines L 21 -L 25 through the key control circuit 240 .
- the conversion circuit having calibration mechanism 260 may be controlled by a switch signal SS to pre-select the first sensing signal SC 1 to perform a conversion, so as to generate a first result DRS 1 .
- the processor 280 may be coupled to the key control circuit 240 and the conversion circuit having calibration mechanism 260 .
- the processor 280 may execute a system function corresponding to the first sensing signal SC 1 according to the first result DRS 1 .
- the first circuit 50 may include a temperature sensor (e.g., thermistor) or a power measurement circuit (e.g., coulomb meter.)
- the first circuit 50 may be utilized to measure the temperature or the battery capacity of the electronic apparatus 200 to generate a first sensing signal SC 1 , however, the disclosure is not limited thereto.
- the conversion circuit having calibration mechanism 260 may pre-select the first sensing signal SC 1 to perform the conversion, so as to generate the first result DRS 1 .
- the processor 280 may execute a temperature control function or a power monitor function among the system function of the electronic apparatus 200 according to the first result DRS 1 .
- the first circuit 50 may be external to the electronic apparatus 200 , or internal to the electronic apparatus 200 , which may be designed based on the practical application.
- the key control circuit 240 since the key control circuit 240 does not have calibration mechanism, the coarse scan result R 01 -R 25 obtained by scanning the press status of each of the keys 601 - 625 may not be completely accurate. In detail, as the number of the pressed keys among the keys 601 - 625 increases, the key control circuit 240 may misjudge some keys among the keys 601 - 625 that are indeed being pressed as keys that are not being pressed.
- the processor 280 may generate a switch signal SS to switch the conversion circuit having the calibration mechanism 260 , so that corresponding one of the second sensing signal among the second sensing signals SC 21 -SC 25 is selected for the conversion, and accordingly generate a second result DRS 2 .
- the processor 280 may re-determine the press status of the at least one key among the keys 601 - 625 according to the second result DRS 2 .
- the processor 280 may generate the switch signal SS, so that the conversion circuit having calibration mechanism 260 may be switched back to select the first sensing signal SC 1 to perform its original system function, such as the temperature control function, the power monitor function, etc. which are system functions that does not have instantaneous enormous changes. Since the temperature or the power of the electronic apparatus 200 would not be have enormous changes instantly, the conversion circuit having the calibration mechanism 260 may be dynamically and temporarily switched to assist the scan function of the press status of the keys 601 - 625 without affecting the original system function. As such, the key control circuit 240 does not have to perform calibration.
- the conversion circuit having calibration mechanism 260 is utilized to assist the re-scan (i.e., fine scan) to the keys being determined as not pressed, time and the number of times of the re-scans may be reduced. Therefore, in addition to accurately determine the press status of the keys 601 - 625 , the circuit resources of the electronic apparatus 200 are also maximized.
- the key control circuit 240 may be operated in a detection stage, a first scan stage, or a second scan stage, however, the disclosure is not limited thereto.
- the detection stage the key control circuit 240 may detect whether any key among the keys 601 - 625 of the keyboard module 220 is pressed. If the key control circuit 240 determines that none of the keys 601 - 625 is pressed, the key control circuit 240 may continue to operate in the detection stage, so as to perform detection. On the contrary, if the key control circuit 240 detects any key among the keys 601 - 625 is pressed, regardless one or more keys among keys 601 - 625 are pressed, the key control circuit 240 then enters into the first scan stage.
- the key control circuit 240 may scan each key among the keys 601 - 625 and compare voltages on each of the sensing lines (e.g., the second lines L 221 -L 25 ) to a comparison voltage, so as to determine the press status of each key among the keys 601 - 625 .
- FIG. 4 is a circuit block diagram of the electronic apparatus 200 illustrated in FIG. 2 .
- the keyboard module 220 of FIG. 4 is similar to the keyboard module 220 illustrated in FIG. 3 .
- the key control circuit 240 may include comparator circuits CMP 1 -CMP 5 and a main control circuit 243 , however, the disclosure is not limited thereto.
- the comparator circuits CMP 1 -CMP 5 may be respectively coupled to the second lines L 21 -L 25 and the processor 280 , wherein the comparator circuits CMP 1 -CMP 5 may not have calibration mechanism.
- the main control circuit 243 may be coupled to the first lines L 11 -L 15 and the processor 280 . In the exemplary embodiment illustrated in FIG. 4 , the first lines L 11 -L 15 may be utilized as driving lines, and the second lines L 21 -L 25 may be utilized as sensing lines.
- the conversion circuit having calibration mechanism 260 may include a switching circuit 2601 and an analog-to-digital converter (ADC) 2603 .
- the switching circuit 2601 may be utilized to receive a first sensing signal SC 1 and a plurality of second signals SC 21 -SC 25 corresponding to the second lines L 21 -L 25 .
- the switch circuit 2601 may be controlled by the switch signal SS to select one of the first sensing signal SC 1 and the second sensing signals SC 21 -SC 25 as an analog signal SA.
- the analog-to-digital converter 2603 may be coupled to the switching circuit 2601 to receive the analog signal SA.
- the analog-to-digital converter 2603 may perform an analog-to-digital conversion to the analog signal SA to generate the first result DRS 1 or the second result DRS 2 , wherein the analog-to-digital converter 2603 has the calibration mechanism and a calibration value of the analog-to-digital converter 2603 may be provided by the processor 280 .
- the analog-to-digital converter 2603 may be implemented by a successive approximation register ADC (SAR ADC), counting ADC, parallel-comparator ADC, or Dual-slope or Radiometric ADC.
- SAR ADC successive approximation register ADC
- counting ADC counting ADC
- parallel-comparator ADC parallel-comparator ADC
- Dual-slope or Radiometric ADC Dual-slope or Radiometric ADC.
- the type of the analog-to-digital convertor 2603 may be selected based on the practical application or design requirements.
- the processor 280 may be implemented as hardware, firmware, or executable program code stored in a memory which may be loaded and executed by a micro processor or a digital signal processor (DSP).
- the processor 280 may be a plurality of circuits or an integrated circuit.
- the plurality of circuits or the integrated circuit may be implemented by Application-Specific Integrated Circuit (ASIC) or Field Programmable Gate Array (FPGA).
- the memory may be compact disc, random access memory (RAM), read only memory (ROM), flash memory, floppy disc, hard drive, or Magneto-optical disc, etc.
- FIG. 5 illustrates a comparator circuit 500 , where the comparator circuit 500 includes a comparator 504 and a resistor R.
- a non-inverting input of the comparator 504 is coupled to an input terminal of the comparator circuit 500
- an inverting input of the comparator 504 may receive a comparison voltage Vcmp
- an output of the comparator 504 is coupled to the output terminal of the comparator circuit 500 .
- the resistor R is coupled between the non-inverting input of the comparator 504 and a power terminal PWR.
- the power terminal PWR is, for example, an operation power terminal of the key control circuit 240 , and the voltage potential of the power terminal PWR is, for example, a second potential VCC, however, the disclosure is not limited thereto.
- the voltage value of the comparison voltage Vcmp may be between 0V and the second potential VCC.
- the key control circuit 240 may parallelly drive the first lines L 11 -L 15 to an identical potential, and parallelly detect whether the keys are pressed as the detection results through the second lines L 21 -L 25 .
- a main control circuit 243 may parallelly drive the first line L 11 -L 15 to the first potential (e.g., 0 volt, but not limited thereto).
- the comparator circuits CMP 1 -CMP 5 may respectively compare voltages SV 21 -SV 25 on the second lines L 21 -L 25 with the comparison voltage Vcmp, so as to generate the detection results.
- a resistance of the resistor R of the comparator circuit 500 is greater than a resistance of the resistors r in the keys 601 - 625 .
- the comparison operation of the comparator circuit CMP 1 may obtain, for example, logic 0 as the detection result.
- the comparison operation of the comparator circuit CMP 2 may obtain for example, logic 1 as the detection result.
- the logic 0 and logic 1 described above are for illustration, and it is intended to limit the disclosure.
- the detection result of other second lines L 23 -L 25 may be deduced from the exampled above, and thus is not being repeated.
- the key control circuit 240 may detect whether any one of the keys 601 - 625 is pressed according to the detection result in the detection stage. If the detection result is affirmative, the key control circuit 240 would then enter the first scan stage.
- the key control circuit 240 may sequentially select one of the five first lines L 11 -L 15 (e.g., the first line L 11 ), and then parallelly scans the press status of five keys (e.g., keys 601 , 606 , 611 , 616 , 621 ) corresponding to the selected first line (e.g., first line L 11 ) through the five second lines L 21 -L 25 , so as to generate a coarse scan result (e.g., coarse scan result R 01 , R 06 , R 11 , R 16 , R 21 ) corresponding to the first line (e.g., L 11 ).
- a coarse scan result e.g., coarse scan result R 01 , R 06 , R 11 , R 16 , R 21
- the key control circuit 240 may first select, but not limited to, the first line L 11 and scan the press status of the five keys 601 , 606 , 611 , 616 , 621 of the first line L 11 through the five second lines L 21 -L 25 , so as to generate the coarse scan results R 01 , R 06 , R 11 , R 16 , R 21 corresponding to the first line L 11 .
- the controller 240 may select the first line L 12 and scan the press status of five keys 602 , 607 , 612 , 617 , 622 of the first line L 12 through the five second lines L 21 -L 25 , so as to obtain the coarse scan results R 02 , R 07 , R 12 , R 17 , R 22 corresponding to the first line L 12 .
- the rest of the first lines (e.g., L 13 -L 15 ) may be deduced from the above example, thus it is not being repeated here.
- the main control circuit 243 may select the first line L 11 among the five first lines L 11 -L 15 .
- the main control circuit 243 may drive the first line L 11 to the first potential (e.g., 0V) and other first lines L 12 -L 15 to the second potential VCC.
- the comparator circuits CMP 1 -CMP 5 may respectively compares the voltages SV 21 -SV 25 of the second lines L 21 -L 25 with the comparison voltage Vcmp, so as to generate the coarse scan results R 01 , R 06 , R 11 , R 16 , R 21 corresponding to the first line L 11 .
- the processor 280 may obtain the press status corresponding to each of the keys 601 , 606 , 611 , 616 , 621 on the first line L 11 .
- other first lines L 12 -L 15 may be deduced from the above example.
- the coarse scan result R 01 -R 25 obtained in the first scan stage may be misjudgment.
- the potential of the voltage SV 21 on the second line L 21 would be closer to the second potential VCC, which may cause the keys 601 - 605 on the second line L 21 to be misjudged as not being pressed.
- other second lines L 22 -L 25 may have similar scenario.
- FIG. 6A is a schematic diagram illustrating a voltage dividing circuit formed by the keys 621 - 625 of the second line L 25 and the comparator circuit CMP 5 .
- the first potential is 0V
- the resistance of the resistor r of each of the keys 621 - 625 in FIG. 6A is much smaller as compared to the resistance of the resistor R of the comparator circuit CMP 5 .
- the first line (driving line) L 11 is selected, where the first line (driving line) L 11 is driven to 0V (i.e., the first potential), and other first lines (driving lines) L 12 -L 15 are driven to the second potential VCC. Since no keys on the second line L 25 are being pressed, the potential of the voltage SV 25 on the second line (sensing line) L 25 equals to the second potential VCC.
- FIG. 6B is a schematic diagram illustrating another voltage dividing circuit formed by the keys 621 - 625 on the second line L 25 and the comparator circuit CMP 5 .
- the potential of the voltage SV 25 on the second line (sensing line) L 25 which corresponds to the key 621 , is (VCC ⁇ (r ⁇ (r+R)). Since the resistance of the resistor r is much smaller than the resistance of the resistor R, the potential of the voltage SV 25 would be close to 0V (i.e., first potential). Therefore, the comparator circuit CMP 5 may easily determine that the key 621 is pressed.
- FIG. 6C is a schematic diagram illustrating yet another voltage dividing circuit formed by the keys 621 - 625 on the second line L 25 and the comparator circuit CMP 5 .
- i keys e.g., 3 keys, including key 621
- the potential of the voltage SV 25 would be closer to the second potential VCC, which may cause the key 621 to be misjudged as not being pressed by the key control circuit 240 having no calibration mechanism.
- the misjudgment of the key control circuit 240 having no calibration mechanism would only occur when keys on the second line (sensing line) L 25 are misjudged as not being pressed while a plurality of keys are being pressed.
- the keys indicated as not being pressed by the coarse scan result R 01 -R 25 (as illustrated in FIG. 2 ) must be re-determined through the conversion circuit having the calibration mechanism 260 (as illustrated in FIG. 2 ).
- the processor 280 may enter the second scan stage, drive the first line L 11 corresponding to the key 601 to the first potential (e.g., 0V) through the key control circuit 240 , and drive other first lines L 12 -L 15 to the second potential VCC.
- first potential e.g., 0V
- the processor 280 generates the switch signal SS to cause the conversion circuit having the calibration mechanism 260 to select a second sensing signal SC 1 of the second line L 21 corresponding to the key 601 for conversion, so as to generate the second result DRS 2 .
- the processor 280 may compare the second result DRS 2 to a threshold value, so as to re-determine the press status of the key 601 .
- a re-determination of the press status of the keys 603 - 605 , 614 - 615 , 618 - 620 may be deduced based on the above illustration.
- the second result DRS 2 generated by the analog-to-digital converter 2603 would be a result after the calibration, and the accuracy of the second result DRS 2 would not be affected by the drift of the manufacturing fabrication.
- FIG. 7 is a flow diagram illustrating the detection method of detecting the status of the keys of the electronic apparatus according to one of the exemplary embodiment of the disclosure.
- the detection method of the status of the key of the exemplary electronic apparatus includes the following steps. First of all, in the detection stage illustrated in step S 900 , whether any of the keys among keys 601 - 625 of the key module 220 is pressed may be detected by the key control circuit 240 . If the detection result is affirmative, the process would enter into a first scan stage illustrated in S 910 , otherwise, the process would continue to perform the detection operation of the detection stage of step S 900 .
- step S 910 the press status of each of the keys 601 - 625 is being detected through the key control circuit 240 , and accordingly, the coarse scan result R 01 -R 25 is obtained.
- step S 920 whether at least one key of the keys 601 - 625 is not pressed may be determined by the processor 280 according to the coarse scan result R 01 -R 25 . If the determination result shows that the keys 601 - 625 are all being pressed, the scan of the keys 601 - 625 is complete, and the process is return back to the detection stage illustrated in step S 900 for the next detection operation.
- a switch signal SS may be generated by the processor 280 , so as to switch the switch circuit 2601 to select one of the second sensing signals SC 21 -SC 25 from the key module 220 (or the key control circuit 240 ) as an analog signal SA, and perform conversion to the analog signal SA by the conversion circuit having the calibration mechanism 260 , so as to generate the second result DRS 2 .
- step S 940 the press status of the at least one key among the keys 601 - 625 may be re-determined by the processor 280 according to the second result DRS 2 .
- step S 950 after the press status the at least one key among the keys 601 - 625 is re-determined, the switch signal SS may be generated by the processor 280 , so that the switch circuit 2601 is switched back to select the first sensing signal SC 1 from the first circuit 50 as the analog signal SA.
- the conversion may be performed to the analog signal SA by the conversion circuit having the calibration mechanism 260 , so as to generate the first result DRS 1 .
- the system function corresponding to the first sensing signal SC 1 may be executed by the processor 280 according to the first result DRS 1 . At this time, the scanning of the keys 601 - 625 is completed, and the process is returned back to the step S 900 for next key detection operation.
- conversion circuit having calibration mechanism which is utilized to execute other system function (e.g., temperature control function or power monitor function, etc.), may be dynamically switched to assist the scanning function of the key module (i.e., the scanning function of the second scan stage). Since the first sensing signal which the conversion circuit having calibration mechanism is to convert originally would not have enormous instantaneous changes, the conversion circuit having calibration mechanism may be dynamically and temporarily switched to assist the scanning function of the key module without greatly effect the original system function. As a result, the key control circuit does not require calibration mechanism which reduces the cost of the circuit.
- the exemplary electronic apparatus of the disclosure may accurately determine the press status of the keys, it may also enhance the usage of the circuit resources.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
Description
- This application claims the priority benefit of Taiwan application serial no. 104141977, filed on Dec. 14, 2015. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
- Field of the Invention
- The invention generally relates to an electronic apparatus, and more particularly, to an electronic apparatus having anti-ghosting (N-key rollover) capability and a detection method of status of keys thereof.
- Description of Related Art
- With reference to
FIG. 1 ,FIG. 1 illustrates aconventional keyboard apparatus 100. Thekeyboard apparatus 100 may include keys SW1-SW4 andcomparators comparator 10 is coupled to the sensing line SL1 to receive a voltage signal SV1 and compares the voltage signal SV1 with a reference voltage Vref. Similarly, thecomparator 20 is coupled to the sensing line SL2 to receive a voltage signal SV2 and compares the voltage signal SV2 with the reference voltage Vref. - During a process of detecting a press status of the keys SW1-SW4, the driving line DL1 is driven to a voltage potential and the driving line DL2 is driven to another voltage potential. When the driving line DL1 is driven to the voltage potential, the keys SW1 and SW2 may respectively transmit the corresponding voltage signals SV1, SV2 to the
comparators comparators comparators comparators - It should be noted that as the number of the keys in the keyboard apparatus increases, the number of the sensing lines would increases, which causes the number of the comparators coupled to the sensing lines for comparing the voltages to increase as well. However, the comparators may have different tolerances due to the drift occurred during the manufacturing fabrication, which may cause misjudgment on the press status of the keys. Therefore, calibrations are performed on each of the comparators to obtain an offset corresponding to each of the comparators, so as to accurately detect the press status of the corresponding keys. Since the process of detecting the status of the keys must store the offset of each of the comparators, such would consume more circuitry resources.
- Accordingly, the disclosure provides an electronic apparatus and a method for detecting the key status of the electronic apparatus. In the disclosure, a conversion circuit having calibration mechanism of the electronic apparatus, which is responsible for other system functions (such as temperature control function or power monitor function, etc.), may be utilized to assist scan operation of the key status of the electronic apparatus. As a result, in addition to the benefit of accurately determine the press status of the keys, the circuit resource of the electronic apparatus is maximized.
- The electronic apparatus of the disclosure includes a key module, a key control circuit, a conversion circuit having calibration mechanism, and a processor. The key module includes a plurality of keys, at least one first line and at least one second line, wherein the at least one first line and the at least one second line are coupled to the keys to drive the keys or sense the keys. The key control circuit may be coupled to the at least one first line and the at least one second line. The key control circuit detects whether any one of the keys is pressed, if a detection result is affirmative, the key control circuit scans a press status of each of the keys, and accordingly, obtains a coarse scan result. The conversion circuit having calibration mechanism includes a switch circuit. The switch circuit may be coupled to a first circuit to receive a first sensing signal. The switch circuit may also be coupled to the key control circuit to receive at least one second sensing signal on the at least one second line through the key control circuit, and controlled by a switch signal to pre-select the first sensing signal as an analog signal. The conversion circuit having the calibration mechanism performs a conversion on the analog signal to generate a first result. The processor may be coupled to the key control circuit and the conversion circuit having calibration mechanism. The processor executes a system function corresponding to the first sensing signal according to the first result. When the processor determines that at least one of the keys is not pressed according to the coarse scan result, the processor generates the switch signal to cause the switch circuit to select one of the at least one second sensing signal as the analog signal, so that the conversion circuit having the calibration mechanism performs the conversion on the analog signal to generate a second result, and the processor re-determines the press status of the at least one of the keys according to the second result.
- According to one of the exemplary embodiment of the disclosure, in a first scan stage, the key control circuit sequentially selects one of the at least one first line, and parallelly scans the press status of each of the keys on the selected first line through the at least one second line, so as to generate the coarse scan result.
- According to one of the exemplary embodiment of the disclosure, in a detection stage, the key control circuit parallelly drives the at least one first line to an identical potential, and parallelly detects whether any one of the keys is pressed as a detection result through the at least one second line. The key control circuit determines whether any one of the keys is pressed according to the detection result in the detection stage, if a determination result is affirmative, the key control circuit enters into the first scan stage.
- According to one of the exemplary embodiment of the disclosure, the key control circuit includes at least one comparator circuit and a main control circuit. The at least one comparator circuit may be coupled to the at least one second line and the processor. The main control circuit may be coupled to the at least one first line and the processor. The main control circuit parallelly drives the at least one first line to a first potential in the detection stage. The at least one comparator circuit compares a voltage of the at least one second line with a comparison voltage to generate the detection result. The main control circuit sequentially selects one of the at least one first line in the first scan stage. The main control circuit drives the selected one of the at least one first line to the first potential and drives other of the at least one first line to a second potential. The at least one comparator circuit compares a voltage of the at least one second line with the comparison voltage to generate the coarse scan result.
- According to one of the exemplary embodiment of the disclosure, in the first scan stage, when the processor determines that the at least one of the keys is not pressed according to the coarse scan result, the processor enters into a second scan stage and drives the first line corresponding to the key not pressed to a first potential and other of the at least one first line to a second potential through the key control circuit. The processor generates the switch signal to cause the switch circuit to select the second sensing signal of the second line corresponding to the key not pressed as the analog signal, so that the conversion circuit having the calibration mechanism performs the conversion to the analog signal to generate the second result. The processor compares the second result and a threshold value to re-determine the press status of the key not pressed.
- According to one of the exemplary embodiment of the disclosure, the conversion circuit having the calibration mechanism further includes an analog-to-digital converter. The analog-to-digital converter may be coupled to the switch circuit to receive the analog signal and perform an analog-to-digital conversion to the analog signal to generate the first result or the second result, wherein the analog-to-digital converter has calibration mechanism.
- According to one of the exemplary embodiment of the disclosure, the first circuit comprises a temperature sensor or a power measurement circuit, and the processor executes a temperature control function or a power monitor function of the system function according to the first result.
- In the disclosure, the method for detecting the key status may be adapted to a key module of an electronic apparatus. The method for detecting the key status includes the following steps. In a detection stage, whether any one of a plurality of keys in the key module is pressed may be detected by a key control circuit of the electronic apparatus. If a detection result is affirmative, the process enters into a first scan stage. In the first scan stage, a press status of each of the keys may be detected by the key control circuit, and accordingly, a coarse scan result is obtained. In the first scan stage, whether at least one of the keys is not pressed is determined according to the coarse scan result by a processor of the electronic apparatus. If a determination result indicates that at least one of the keys is not pressed, the process enters into a second scan stage. In the second scan stage, a switch signal is generated by the processor, which causes a switch circuit in a conversion circuit having calibration mechanism to be switched to select one of at least one second sensing signal from the key module as an analog signal for performing a conversion to the analog signal by the conversion circuit having calibration mechanism, so as to generate a second result. In the second scan stage, the press status of the at least one of the keys is re-determined according to the second result. After the re-determination of the press status of the at least one of the keys is completed, the switch signal is generated by the processor, so as to cause the switch circuit to be switched back to select a first sensing signal from a first circuit as the analog signal for performing the conversion to the analog signal to generate a first result by the conversion circuit having calibration mechanism. A system function corresponding to the first sensing signal may be executed according to the first result by the processor.
- Based on the above, in the electronic apparatus and the method for detecting the key status of the electronic apparatus, the conversion circuit having calibration mechanism, which is utilized for other system functions (such as temperature control function or power monitor function), may be dynamically switched to assist in a scan function of the key module. Since a first sensing signal which the conversion circuit having calibration mechanism is to convert originally would not have instantaneous enormous changes, the conversion circuit having calibration mechanism may be dynamically and temporarily switched to assist the scan function of the key module without affect the original system function. As a result, the key control circuit would not need calibration mechanism which reduces the cost of the circuit. In addition, since the conversion circuit having calibration mechanism is only utilized to assist the re-scan of the key that is determined to be not pressed, time and the number of times of the re-scan may be reduced. Therefore, in addition to the accurate determination of the press status of the keys, the electronic apparatus of the disclosure also maximizes the usage of the circuit resources.
- To make the above features and advantages of the disclosure more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
- The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
-
FIG. 1 illustrates aconventional keyboard apparatus 100. -
FIG. 2 is a schematic diagram illustrating anelectronic apparatus 200 according to an exemplary embodiment of the disclosure. -
FIG. 3 is a schematic diagram illustrating thekeyboard module 220 and thekey control circuit 240 illustrated inFIG. 2 . -
FIG. 4 is a circuit block diagram of theelectronic apparatus 200 illustrated inFIG. 2 . -
FIG. 5 is a diagram illustrating a circuit structure of a comparator circuit illustrated inFIG. 4 . -
FIGS. 6A-6C are circuit diagrams illustrating a voltage dividing circuit formed by keys of second lines and the comparator circuits according to one of the exemplary embodiments of the disclosure. -
FIG. 7 is a flow diagram illustrating the detection method of detecting the status of the keys of the electronic apparatus according to one of the exemplary embodiment of the disclosure. - Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
- With reference to
FIG. 2 ,FIG. 2 is a schematic diagram illustrating anelectronic apparatus 200 according to an exemplary embodiment of the disclosure. Theelectronic apparatus 200 may include akeyboard module 220, akey control circuit 240, a conversion circuit having acalibration mechanism 260 and aprocessor 280. However, the disclosure is not limited to the above parts. - With reference to
FIGS. 2 and 3 ,FIG. 3 is a schematic diagram illustrating thekeyboard module 220 and thekey control circuit 240 illustrated inFIG. 2 . Thekeyboard module 220 may include M×N keys, N first lines, and M second lines, wherein M is a positive integer greater than or equal to 1, and N is a positive integer greater than and equal to 1. In order to make the disclosure comprehensive, M and N are hypothetically presumed as 5, for example. However, the disclosure is not limited thereto, M and N may be any other values, and exemplary embodiments having other values for M and N may be deduced from the description set forth below. Therefore, thekeyboard module 220 illustrated inFIG. 3 may includes twenty-five keys 601-625, five first lines L11-L15, and five second lines L21-L25, wherekeys 601, 603-605, 611, 613 and 616 are being pressed. Each of the keys 601-625 includes a resistor r and a switch sw, where the resistor r and the switch sw are serially connected to each other, and the switch sw of the key (e.g., key 601) may closed (conduct) in response the key (key 601) being pressed, and the switch sw may be opened (not conduct) in response to the key (key 625) not being pressed. - The first lines L11-L15 and the second lines L21-L25 may be coupled to the keys 601-625 to drive the keys 601-625 or to sense the keys 601-625. In detail, the first line L11 is coupled to the
keys keys FIG. 3 . The second line L21 is coupled to the keys 601-605 to drive or sense the keys 601-605. The rest of the second lines L22-L25 may be deduced according to the content illustrated inFIG. 3 . In other words, the first lines L11-L15 may be utilized as driving lines as well as sensing lines, which may be configured based on the stage of the operation or process of thekey control circuit 240. Similarly, the second lines L21-L25 may be configured as driving lines as well as sensing lines, which may be configured based on the stage of the operation or process of thekey control circuit 240. Detail of which would be described later. Thekey control circuit 240 is coupled to the first lines L11-L15 and the second lines L21-25. Thekey control circuit 240 may detect whether any key among the keys 601-625 is pressed. If a detection result is affirmative, thekey control circuit 240 may further scan a press status for each of the keys 601-625 to obtain a coarse scan result R01-R25 (as illustrated inFIG. 2 .) - The conversion circuit having calibration mechanism 260 (as illustrated in
FIG. 2 ) may be coupled to afirst circuit 50 to receive a first sensing signal SC1. The conversion circuit having thecalibration mechanism 260 may be further coupled to thekey control circuit 240 to receive a plurality of second sensing signals SC21-SC25 from the second lines L21-L25 through thekey control circuit 240. Furthermore, the conversion circuit havingcalibration mechanism 260 may be controlled by a switch signal SS to pre-select the first sensing signal SC1 to perform a conversion, so as to generate a first result DRS1. - The
processor 280 may be coupled to thekey control circuit 240 and the conversion circuit havingcalibration mechanism 260. Theprocessor 280 may execute a system function corresponding to the first sensing signal SC1 according to the first result DRS1. For example, in one of the exemplary embodiments of the disclosure, thefirst circuit 50 may include a temperature sensor (e.g., thermistor) or a power measurement circuit (e.g., coulomb meter.) Thefirst circuit 50 may be utilized to measure the temperature or the battery capacity of theelectronic apparatus 200 to generate a first sensing signal SC1, however, the disclosure is not limited thereto. The conversion circuit havingcalibration mechanism 260 may pre-select the first sensing signal SC1 to perform the conversion, so as to generate the first result DRS1. Theprocessor 280 may execute a temperature control function or a power monitor function among the system function of theelectronic apparatus 200 according to the first result DRS1. In addition, thefirst circuit 50 may be external to theelectronic apparatus 200, or internal to theelectronic apparatus 200, which may be designed based on the practical application. - On the other hands, since the
key control circuit 240 does not have calibration mechanism, the coarse scan result R01-R25 obtained by scanning the press status of each of the keys 601-625 may not be completely accurate. In detail, as the number of the pressed keys among the keys 601-625 increases, thekey control circuit 240 may misjudge some keys among the keys 601-625 that are indeed being pressed as keys that are not being pressed. Therefore, in one of the exemplary embodiment, when theprocessor 280 determines that at least one key among the keys 601-625 are not being pressed according the coarse scan result R01-R25, theprocessor 280 may generate a switch signal SS to switch the conversion circuit having thecalibration mechanism 260, so that corresponding one of the second sensing signal among the second sensing signals SC21-SC25 is selected for the conversion, and accordingly generate a second result DRS2. Theprocessor 280 may re-determine the press status of the at least one key among the keys 601-625 according to the second result DRS2. - After the
processor 280 re-determined the press status of the at least one key among the keys 601-625, theprocessor 280 may generate the switch signal SS, so that the conversion circuit havingcalibration mechanism 260 may be switched back to select the first sensing signal SC1 to perform its original system function, such as the temperature control function, the power monitor function, etc. which are system functions that does not have instantaneous enormous changes. Since the temperature or the power of theelectronic apparatus 200 would not be have enormous changes instantly, the conversion circuit having thecalibration mechanism 260 may be dynamically and temporarily switched to assist the scan function of the press status of the keys 601-625 without affecting the original system function. As such, thekey control circuit 240 does not have to perform calibration. In addition, since the conversion circuit havingcalibration mechanism 260 is utilized to assist the re-scan (i.e., fine scan) to the keys being determined as not pressed, time and the number of times of the re-scans may be reduced. Therefore, in addition to accurately determine the press status of the keys 601-625, the circuit resources of theelectronic apparatus 200 are also maximized. - In one of the exemplary embodiment of the disclosure, the
key control circuit 240 may be operated in a detection stage, a first scan stage, or a second scan stage, however, the disclosure is not limited thereto. In the detection stage, thekey control circuit 240 may detect whether any key among the keys 601-625 of thekeyboard module 220 is pressed. If thekey control circuit 240 determines that none of the keys 601-625 is pressed, thekey control circuit 240 may continue to operate in the detection stage, so as to perform detection. On the contrary, if thekey control circuit 240 detects any key among the keys 601-625 is pressed, regardless one or more keys among keys 601-625 are pressed, thekey control circuit 240 then enters into the first scan stage. In the first scan stage, thekey control circuit 240 may scan each key among the keys 601-625 and compare voltages on each of the sensing lines (e.g., the second lines L221-L25) to a comparison voltage, so as to determine the press status of each key among the keys 601-625. - With reference to
FIGS. 2-4 ,FIG. 4 is a circuit block diagram of theelectronic apparatus 200 illustrated inFIG. 2 . Thekeyboard module 220 ofFIG. 4 is similar to thekeyboard module 220 illustrated inFIG. 3 . As illustrated inFIG. 4 , thekey control circuit 240 may include comparator circuits CMP1-CMP5 and amain control circuit 243, however, the disclosure is not limited thereto. The comparator circuits CMP1-CMP5 may be respectively coupled to the second lines L21-L25 and theprocessor 280, wherein the comparator circuits CMP1-CMP5 may not have calibration mechanism. Themain control circuit 243 may be coupled to the first lines L11-L15 and theprocessor 280. In the exemplary embodiment illustrated inFIG. 4 , the first lines L11-L15 may be utilized as driving lines, and the second lines L21-L25 may be utilized as sensing lines. - The conversion circuit having
calibration mechanism 260 may include aswitching circuit 2601 and an analog-to-digital converter (ADC) 2603. Theswitching circuit 2601 may be utilized to receive a first sensing signal SC1 and a plurality of second signals SC21-SC25 corresponding to the second lines L21-L25. Theswitch circuit 2601 may be controlled by the switch signal SS to select one of the first sensing signal SC1 and the second sensing signals SC21-SC25 as an analog signal SA. The analog-to-digital converter 2603 may be coupled to theswitching circuit 2601 to receive the analog signal SA. The analog-to-digital converter 2603 may perform an analog-to-digital conversion to the analog signal SA to generate the first result DRS1 or the second result DRS2, wherein the analog-to-digital converter 2603 has the calibration mechanism and a calibration value of the analog-to-digital converter 2603 may be provided by theprocessor 280. In one of the exemplary embodiment of the disclosure, the analog-to-digital converter 2603 may be implemented by a successive approximation register ADC (SAR ADC), counting ADC, parallel-comparator ADC, or Dual-slope or Radiometric ADC. However, the disclosure is not limited thereto, the type of the analog-to-digital convertor 2603 may be selected based on the practical application or design requirements. - In one of the exemplary embodiments of the disclosure, the
processor 280 may be implemented as hardware, firmware, or executable program code stored in a memory which may be loaded and executed by a micro processor or a digital signal processor (DSP). In the implementation of hardware, theprocessor 280 may be a plurality of circuits or an integrated circuit. However, the disclosure is not limited thereto. The plurality of circuits or the integrated circuit may be implemented by Application-Specific Integrated Circuit (ASIC) or Field Programmable Gate Array (FPGA). The memory may be compact disc, random access memory (RAM), read only memory (ROM), flash memory, floppy disc, hard drive, or Magneto-optical disc, etc. - Specifically, the circuit structure of each of the comparator circuits CMP1-CMP5 may be the circuit structure illustrated in
FIG. 5 , however, the invention is not limited thereto.FIG. 5 illustrates acomparator circuit 500, where thecomparator circuit 500 includes acomparator 504 and a resistor R. A non-inverting input of thecomparator 504 is coupled to an input terminal of thecomparator circuit 500, an inverting input of thecomparator 504 may receive a comparison voltage Vcmp, and an output of thecomparator 504 is coupled to the output terminal of thecomparator circuit 500. The resistor R is coupled between the non-inverting input of thecomparator 504 and a power terminal PWR. The power terminal PWR is, for example, an operation power terminal of thekey control circuit 240, and the voltage potential of the power terminal PWR is, for example, a second potential VCC, however, the disclosure is not limited thereto. The voltage value of the comparison voltage Vcmp may be between 0V and the second potential VCC. - With reference to
FIGS. 2-5 , in the detection stage, thekey control circuit 240 may parallelly drive the first lines L11-L15 to an identical potential, and parallelly detect whether the keys are pressed as the detection results through the second lines L21-L25. In detail, amain control circuit 243 may parallelly drive the first line L11-L15 to the first potential (e.g., 0 volt, but not limited thereto). The comparator circuits CMP1-CMP5 may respectively compare voltages SV21-SV25 on the second lines L21-L25 with the comparison voltage Vcmp, so as to generate the detection results. - For example, assuming that a resistance of the resistor R of the
comparator circuit 500 is greater than a resistance of the resistors r in the keys 601-625. If any of the keys (e.g.,keys 601, 603-605) is pressed, which causes the voltage SV21 on the second line L21 to be the first potential (e.g., 0 Volt), the comparison operation of the comparator circuit CMP1 may obtain, for example, logic 0 as the detection result. On the contrary, if no keys among the keys 606-610 is pressed, which causes the voltage SV22 on the second line L22 to be the second potential VCC, the comparison operation of the comparator circuit CMP2 may obtain for example,logic 1 as the detection result. The logic 0 andlogic 1 described above are for illustration, and it is intended to limit the disclosure. The detection result of other second lines L23-L25 may be deduced from the exampled above, and thus is not being repeated. - In one of the exemplary embodiments of the disclosure, the
key control circuit 240 may detect whether any one of the keys 601-625 is pressed according to the detection result in the detection stage. If the detection result is affirmative, thekey control circuit 240 would then enter the first scan stage. In the first scan stage, thekey control circuit 240 may sequentially select one of the five first lines L11-L15 (e.g., the first line L11), and then parallelly scans the press status of five keys (e.g.,keys - For example, in the first scan stage, the
key control circuit 240 may first select, but not limited to, the first line L11 and scan the press status of the fivekeys controller 240 may select the first line L12 and scan the press status of fivekeys - In detail, in the first scan stage, the
main control circuit 243 may select the first line L11 among the five first lines L11-L15. Themain control circuit 243 may drive the first line L11 to the first potential (e.g., 0V) and other first lines L12-L15 to the second potential VCC. The comparator circuits CMP1-CMP5 may respectively compares the voltages SV21-SV25 of the second lines L21-L25 with the comparison voltage Vcmp, so as to generate the coarse scan results R01, R06, R11, R16, R21 corresponding to the first line L11. As a result, theprocessor 280 may obtain the press status corresponding to each of thekeys - It should be noted that the coarse scan result R01-R25 obtained in the first scan stage may be misjudgment. In detail, in the first scan stage, as the number of the keys being pressed among the keys 601-605 on the second line (e.g., sensing line) L21 increases, the potential of the voltage SV21 on the second line L21 would be closer to the second potential VCC, which may cause the keys 601-605 on the second line L21 to be misjudged as not being pressed. With similar rationale, other second lines L22-L25 may have similar scenario.
- For example, with reference to
FIG. 6A ,FIG. 6A is a schematic diagram illustrating a voltage dividing circuit formed by the keys 621-625 of the second line L25 and the comparator circuit CMP5. Herein, it is assumed that the first potential is 0V, the resistance of the resistor r of each of the keys 621-625 inFIG. 6A is much smaller as compared to the resistance of the resistor R of the comparator circuit CMP5. In the first scan stage, it is assumed that the first line (driving line) L11 is selected, where the first line (driving line) L11 is driven to 0V (i.e., the first potential), and other first lines (driving lines) L12-L15 are driven to the second potential VCC. Since no keys on the second line L25 are being pressed, the potential of the voltage SV25 on the second line (sensing line) L25 equals to the second potential VCC. - With reference to
FIG. 6B ,FIG. 6B is a schematic diagram illustrating another voltage dividing circuit formed by the keys 621-625 on the second line L25 and the comparator circuit CMP5. As illustrated inFIG. 6B , since the key 621 on the selected first line (driving line) L11 is being pressed, and the keys 622-625 are not being pressed, the potential of the voltage SV25 on the second line (sensing line) L25, which corresponds to the key 621, is (VCC×(r÷(r+R)). Since the resistance of the resistor r is much smaller than the resistance of the resistor R, the potential of the voltage SV25 would be close to 0V (i.e., first potential). Therefore, the comparator circuit CMP5 may easily determine that the key 621 is pressed. - With reference to
FIG. 6C ,FIG. 6C is a schematic diagram illustrating yet another voltage dividing circuit formed by the keys 621-625 on the second line L25 and the comparator circuit CMP5. When i keys (e.g., 3 keys, including key 621) on the selected first line (driving line) L11 are pressed, the potential of the voltage SV25 on the second line (sensing line) L25 is VCC×r/{[R∥(r/(i−1)]+r}=VCC×{1−1/[i+(r/R)]}, wherein i is a positive number greater than 1 but smaller than and equal to 5. As the variable i increases, the potential of the voltage SV25 would be closer to the second potential VCC, which may cause the key 621 to be misjudged as not being pressed by thekey control circuit 240 having no calibration mechanism. As a result, it is difficult to determine (or unable to identify) whether the key 621 corresponding to the first line (driving line) L11 and the second line (sensing line) L25 is being pressed or not. It should be noted that the misjudgment of thekey control circuit 240 having no calibration mechanism would only occur when keys on the second line (sensing line) L25 are misjudged as not being pressed while a plurality of keys are being pressed. In other words, the keys indicated as not being pressed by the coarse scan result R01-R25 (as illustrated inFIG. 2 ) must be re-determined through the conversion circuit having the calibration mechanism 260 (as illustrated inFIG. 2 ). - With reference to
FIGS. 2-4 , for example, in the first scan stage, if theprocessor 280 determines thatkeys 601, 603-605, 614-615, 618-620 are not being pressed according to the coarse scan result R01-R25, the press status of thekeys 601, 603-605, 614-615, 618-620 must be re-determine by the conversion circuit having thecalibration mechanism 260. Therefore, theprocessor 280 may enter the second scan stage, drive the first line L11 corresponding to the key 601 to the first potential (e.g., 0V) through thekey control circuit 240, and drive other first lines L12-L15 to the second potential VCC. Theprocessor 280 generates the switch signal SS to cause the conversion circuit having thecalibration mechanism 260 to select a second sensing signal SC1 of the second line L21 corresponding to the key 601 for conversion, so as to generate the second result DRS2. Theprocessor 280 may compare the second result DRS2 to a threshold value, so as to re-determine the press status of the key 601. Similarly, a re-determination of the press status of the keys 603-605, 614-615, 618-620 may be deduced based on the above illustration. - Since the analog-to-
digital converter 2603 has calibration mechanism, the second result DRS2 generated by the analog-to-digital converter 2603 would be a result after the calibration, and the accuracy of the second result DRS2 would not be affected by the drift of the manufacturing fabrication. -
FIG. 7 is a flow diagram illustrating the detection method of detecting the status of the keys of the electronic apparatus according to one of the exemplary embodiment of the disclosure. With reference toFIGS. 2-4 and 7 , the detection method of the status of the key of the exemplary electronic apparatus includes the following steps. First of all, in the detection stage illustrated in step S900, whether any of the keys among keys 601-625 of thekey module 220 is pressed may be detected by thekey control circuit 240. If the detection result is affirmative, the process would enter into a first scan stage illustrated in S910, otherwise, the process would continue to perform the detection operation of the detection stage of step S900. Next, in the first scan stage illustrated in step S910, the press status of each of the keys 601-625 is being detected through thekey control circuit 240, and accordingly, the coarse scan result R01-R25 is obtained. Afterward, in the first scan stage illustrated in step S920, whether at least one key of the keys 601-625 is not pressed may be determined by theprocessor 280 according to the coarse scan result R01-R25. If the determination result shows that the keys 601-625 are all being pressed, the scan of the keys 601-625 is complete, and the process is return back to the detection stage illustrated in step S900 for the next detection operation. If the determination result shows that at least one key among the keys 601-625 are not pressed, the process goes into a second scan stage illustrated in step S930 to perform a fine scan. In the second scan stage illustrated in step S930, a switch signal SS may be generated by theprocessor 280, so as to switch theswitch circuit 2601 to select one of the second sensing signals SC21-SC25 from the key module 220 (or the key control circuit 240) as an analog signal SA, and perform conversion to the analog signal SA by the conversion circuit having thecalibration mechanism 260, so as to generate the second result DRS2. Next, in the second scan stage illustrated in step S940, the press status of the at least one key among the keys 601-625 may be re-determined by theprocessor 280 according to the second result DRS2. Lastly, in step S950, after the press status the at least one key among the keys 601-625 is re-determined, the switch signal SS may be generated by theprocessor 280, so that theswitch circuit 2601 is switched back to select the first sensing signal SC1 from thefirst circuit 50 as the analog signal SA. The conversion may be performed to the analog signal SA by the conversion circuit having thecalibration mechanism 260, so as to generate the first result DRS1. The system function corresponding to the first sensing signal SC1 may be executed by theprocessor 280 according to the first result DRS1. At this time, the scanning of the keys 601-625 is completed, and the process is returned back to the step S900 for next key detection operation. - In summary, in the exemplary electronic apparatus and the method for detecting key status presented above, conversion circuit having calibration mechanism, which is utilized to execute other system function (e.g., temperature control function or power monitor function, etc.), may be dynamically switched to assist the scanning function of the key module (i.e., the scanning function of the second scan stage). Since the first sensing signal which the conversion circuit having calibration mechanism is to convert originally would not have enormous instantaneous changes, the conversion circuit having calibration mechanism may be dynamically and temporarily switched to assist the scanning function of the key module without greatly effect the original system function. As a result, the key control circuit does not require calibration mechanism which reduces the cost of the circuit. In addition, since the conversion circuit having calibration mechanism is only utilized to assist the re-scan of the keys that are being determined as not pressed, the number of times and the time taken to re-scan are reduced. Therefore, the exemplary electronic apparatus of the disclosure may accurately determine the press status of the keys, it may also enhance the usage of the circuit resources.
- It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Claims (14)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104141977 | 2015-12-14 | ||
TW104141977A | 2015-12-14 | ||
TW104141977A TWI581569B (en) | 2015-12-14 | 2015-12-14 | Electronic apparatus and detection method for status of keys thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
US20170168588A1 true US20170168588A1 (en) | 2017-06-15 |
US9684383B1 US9684383B1 (en) | 2017-06-20 |
Family
ID=59019255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/139,350 Active US9684383B1 (en) | 2015-12-14 | 2016-04-27 | Electronic apparatus and method for detecting status of keys thereof |
Country Status (3)
Country | Link |
---|---|
US (1) | US9684383B1 (en) |
CN (1) | CN106872817B (en) |
TW (1) | TWI581569B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110266319A (en) * | 2019-06-06 | 2019-09-20 | 苏州达方电子有限公司 | Key scanning method, scanning method for key scanning circuit and input device |
TWI806519B (en) * | 2022-03-24 | 2023-06-21 | 群光電子股份有限公司 | Electronic device and key scan method thereof |
CN117749180A (en) * | 2023-12-22 | 2024-03-22 | 大明电子股份有限公司 | Safety identification method and system for key signals |
US12124638B2 (en) | 2019-06-06 | 2024-10-22 | Darfon Electronics Corp. | Key scanning method and input device implemented therewith |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112206003B (en) * | 2019-07-11 | 2024-06-28 | 深圳市理邦精密仪器股份有限公司 | Multi-probe ultrasonic instrument and cascade structure of socket thereof |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020175835A1 (en) * | 2001-05-07 | 2002-11-28 | Ohad Falik | A/D converter with comparators and low-power detection mode for resistive matrix keyboards |
US20060049965A1 (en) * | 2004-09-09 | 2006-03-09 | Laliberte Edward R | Method and apparatus for keyboard control with programmable debounce and jog |
US20070290889A1 (en) * | 2006-06-20 | 2007-12-20 | Qualcomm Incorporated | Two-Wire Connection to a Key Matrix in a Mobile Device |
US20080316066A1 (en) * | 2007-06-19 | 2008-12-25 | Fujitsu Limited | Key Control Circuit, Electronic Apparatus, Portable Device, and Key Control Method |
US20100253554A1 (en) * | 2009-04-03 | 2010-10-07 | Chiung-Chih Huang | Ghost key detecting circuit and related method |
US20140316735A1 (en) * | 2013-04-22 | 2014-10-23 | Richtek Technology Corporation | Protection Device and Calibration Method Thereof |
CN203984397U (en) * | 2014-07-04 | 2014-12-03 | 深圳市普兰电子技术有限公司 | A kind of calibration circuit of new A DC key scanning circuit |
US20150206672A1 (en) * | 2014-01-17 | 2015-07-23 | Darfon Electronics Corp. | Keyboard, adjusted keyboard according to user operation and conducting strength adjustment method according to user operation |
US20160013806A1 (en) * | 2013-02-28 | 2016-01-14 | Christoph HELDEIS | Method for determining active input elements of an input arrangement and input arrangement |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3429309A1 (en) | 1984-08-09 | 1986-02-20 | Philips Patentverwaltung Gmbh, 2000 Hamburg | ELECTRONIC DATA INPUT KEYBOARD WITH KEYS HAVING GALVANIC CONTACTS |
JP2774721B2 (en) | 1991-12-25 | 1998-07-09 | アルプス電気株式会社 | N key rollover circuit |
EP0657842B1 (en) * | 1993-12-07 | 1999-03-10 | Seiko Epson Corporation | Touch panel input device and method of generating input signals for an information processing device |
US20120169611A1 (en) * | 2010-12-30 | 2012-07-05 | Hanxiang Chen | Smart touch screen keyboard |
CN102354265A (en) * | 2011-06-28 | 2012-02-15 | 埃派克森微电子(上海)股份有限公司 | Device and method for detecting key |
WO2013063722A1 (en) * | 2011-11-04 | 2013-05-10 | 智点科技(深圳)有限公司 | Mutual-capacitance-type active touch control system |
CN103793068B (en) * | 2014-01-29 | 2016-09-07 | 苏州达方电子有限公司 | Keyboard, the keyboard adjusting button conducting strength according to user and method of adjustment thereof |
-
2015
- 2015-12-14 TW TW104141977A patent/TWI581569B/en active
-
2016
- 2016-02-01 CN CN201610069320.1A patent/CN106872817B/en active Active
- 2016-04-27 US US15/139,350 patent/US9684383B1/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020175835A1 (en) * | 2001-05-07 | 2002-11-28 | Ohad Falik | A/D converter with comparators and low-power detection mode for resistive matrix keyboards |
US20060049965A1 (en) * | 2004-09-09 | 2006-03-09 | Laliberte Edward R | Method and apparatus for keyboard control with programmable debounce and jog |
US20070290889A1 (en) * | 2006-06-20 | 2007-12-20 | Qualcomm Incorporated | Two-Wire Connection to a Key Matrix in a Mobile Device |
US20080316066A1 (en) * | 2007-06-19 | 2008-12-25 | Fujitsu Limited | Key Control Circuit, Electronic Apparatus, Portable Device, and Key Control Method |
US20100253554A1 (en) * | 2009-04-03 | 2010-10-07 | Chiung-Chih Huang | Ghost key detecting circuit and related method |
US20160013806A1 (en) * | 2013-02-28 | 2016-01-14 | Christoph HELDEIS | Method for determining active input elements of an input arrangement and input arrangement |
US20140316735A1 (en) * | 2013-04-22 | 2014-10-23 | Richtek Technology Corporation | Protection Device and Calibration Method Thereof |
US20150206672A1 (en) * | 2014-01-17 | 2015-07-23 | Darfon Electronics Corp. | Keyboard, adjusted keyboard according to user operation and conducting strength adjustment method according to user operation |
CN203984397U (en) * | 2014-07-04 | 2014-12-03 | 深圳市普兰电子技术有限公司 | A kind of calibration circuit of new A DC key scanning circuit |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110266319A (en) * | 2019-06-06 | 2019-09-20 | 苏州达方电子有限公司 | Key scanning method, scanning method for key scanning circuit and input device |
US12124638B2 (en) | 2019-06-06 | 2024-10-22 | Darfon Electronics Corp. | Key scanning method and input device implemented therewith |
TWI806519B (en) * | 2022-03-24 | 2023-06-21 | 群光電子股份有限公司 | Electronic device and key scan method thereof |
CN117749180A (en) * | 2023-12-22 | 2024-03-22 | 大明电子股份有限公司 | Safety identification method and system for key signals |
Also Published As
Publication number | Publication date |
---|---|
US9684383B1 (en) | 2017-06-20 |
TW201722082A (en) | 2017-06-16 |
CN106872817A (en) | 2017-06-20 |
TWI581569B (en) | 2017-05-01 |
CN106872817B (en) | 2020-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9684383B1 (en) | Electronic apparatus and method for detecting status of keys thereof | |
US8405538B2 (en) | Cyclic A/D converter | |
US10408862B2 (en) | Multiple channel capacitive voltage divider scanning method and apparatus | |
US11043956B1 (en) | Analog to digital converting system, time-skew calibration method, and related computer program product | |
KR20110063339A (en) | Magnetic sensor device | |
JP5062213B2 (en) | Successive approximation type AD converter circuit | |
US10778238B1 (en) | Dual-slope analog to digital converter having parallel counting structure | |
JP2004340916A (en) | Battery charge / discharge monitoring circuit and battery charge / discharge monitoring method | |
US11496145B2 (en) | Pipeline analog to digital converter and timing adjustment method | |
CN110456271A (en) | Detection method, device, equipment and the storage medium of motor hall signal | |
US10289211B2 (en) | Keyboard apparatus and detection method for status of keys thereof | |
US7098835B2 (en) | Analog/digital conversion method and analog/digital conversion circuit | |
JP2001035335A (en) | Relay failure detecting device | |
JP4955725B2 (en) | Binary circuit | |
US11764798B2 (en) | Pipeline analog to digital converter and signal conversion method | |
JP2006135655A (en) | Semiconductor integrated circuit | |
US9696213B2 (en) | Temperature sensor with successive AD conversion with selective comparisons | |
JP2005151304A (en) | Analog / digital converter and microcomputer equipped with the same | |
CN101871991A (en) | Inspection device and inspection method for semiconductor integrated circuit device | |
CN114465623B (en) | Pipeline analog-to-digital converter and timing adjustment method | |
JP2000195397A (en) | Device for relay diagnosis | |
CN119966412A (en) | Analog-to-digital converter and data conversion method thereof | |
JP2023121064A (en) | Identification circuit and identification method | |
JP2024017037A (en) | sensor | |
CN116436464A (en) | ADC circuit and conversion method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: ITE TECH. INC., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:HOU, CHING-MIN;TSAI, AN-CHI;HUANG, TZU-I;REEL/FRAME:038482/0634 Effective date: 20160215 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YR, SMALL ENTITY (ORIGINAL EVENT CODE: M2551); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY Year of fee payment: 4 |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YR, SMALL ENTITY (ORIGINAL EVENT CODE: M2552); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY Year of fee payment: 8 |