Detailed Description
The following is a description of embodiments of the present invention with reference to specific embodiments, and those skilled in the art will understand the advantages and effects of the present invention from the contents provided in the present specification. The invention is capable of other and different embodiments and its several details are capable of modification and various other changes, which can be made in various details within the specification and without departing from the spirit and scope of the invention. The drawings of the present invention are for illustrative purposes only and are not intended to be drawn to scale. The following embodiments will further explain the related art of the present invention in detail, but the contents are not provided to limit the scope of the present invention.
It will be understood that, although the terms "first," "second," "third," etc. may be used herein to describe various components or signals, these components or signals should not be limited by these terms. These terms are used primarily to distinguish one element from another element or from one signal to another signal. In addition, the term "or" as used herein should be taken to include any one or combination of more of the associated listed items as the case may be.
Referring to fig. 2, fig. 2 is a schematic view of a capacitive touch device according to an embodiment of the present invention. The capacitive touch device 2 can also be implemented by a single chip and is coupled between a microcontroller 4 and at least one conductor (not shown in fig. 2) implemented as a key. The capacitive touch device 2 includes a capacitance detection circuit 20 and a touch value comparator 22. The capacitance detection circuit 20 is coupled to the microcontroller 4 and the at least one conductor. For convenience of the following description, the capacitance detection circuit 20 of fig. 2 also adopts an example of coupling only one conductor, i.e., the first conductor, but unlike the capacitance detection circuit 10 of fig. 1, the capacitance detection circuit 20 includes a charge transfer architecture composed of five switches SW1a, SW1b, SW2a, SW2b, and SW3a in addition to the storage capacitor Cs2 and the variable capacitor Cr which are connected in parallel. In the present embodiment, the capacitance detection circuit 20 is coupled to the first conductor through a pin P1, and the switch SW1b is coupled between a node C and the storage capacitor Cs2, wherein the node C is located between the pin P1 and the switch SW1 b.
In addition, the switch SW2a is coupled between the node C and the first power voltage Va, the switch SW3a is coupled between the second power voltage Vb and the storage capacitor Cs2, the switch SW3a and the switch SW1b are commonly coupled to the first terminal of the storage capacitor Cs2 through the node D, and the second terminal of the storage capacitor Cs2 is coupled to the ground voltage GND. Finally, the switch SW2b is coupled between the node D and the variable capacitor Cr, the switch SW1a is coupled between the ground voltage GND and the variable capacitor Cr, the switch SW1a and the switch SW2b are commonly coupled to the first terminal of the variable capacitor Cr through the node E, and the second terminal of the variable capacitor Cr is also coupled to the ground voltage GND. In other words, the capacitance detecting circuit 20 may further include a path selecting circuit (not shown in fig. 2) for generating a plurality of control signals (not shown in fig. 2) to respectively control the on/off of the five switches SW1a, SW1b, SW2a, SW2b, and SW3 a.
It should be noted that, compared to the operation method of the capacitance detection circuit 10, the capacitance detection circuit 20 is used for adjusting the capacitance value of the variable capacitor Cr in the first adaptive capacitance mode and detecting the capacitance value change of the first sensing capacitor (Cd1+ Cf1) in the first touch key mode to generate a first touch value (not shown in fig. 2) related to the first conductor. Therefore, as shown in fig. 2, in the first adaptive capacitance mode, the capacitance detection circuit 20 may first turn on the switch SW2a and the switch SW3a simultaneously, so as to provide a first charging path to charge the voltage Vdf of the first sensing capacitor (Cd1+ Cf1) to the first power supply voltage Va, and provide a second charging path to charge the voltage Vcs2 of the storage capacitor Cs2 to the second power supply voltage Vb, and then turn off the switch SW2a and the switch SW3a simultaneously.
As mentioned above, since the first sensing capacitor outside the chip has a first parasitic capacitor Cd1 mainly coming from the PCB in addition to the first finger capacitor Cf1, the first sensing capacitor can be simply expressed as (Cd1+ Cf 1). In addition, the second power voltage Vb is smaller than the first power voltage Va, and the capacitance detection circuit 20 may further include an internal regulator 205 for generating the first power voltage Va and the second power voltage Vb, but the present invention is not limited to the specific implementation of the internal regulator 205, and therefore details thereof are not repeated herein. In summary, the present embodiment may assume that the first power voltage Va is 2 volts and the second power voltage Vb is 1 volt (i.e., Vb is Va/2).
Next, the capacitance detecting circuit 20 simultaneously turns on the switch SW1a and the switch SW1b, so as to provide a discharging path to discharge the voltage of the variable capacitor Cr to the ground voltage GND, and provide a first charge transfer path to transfer the charge stored in the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs2, and then simultaneously turns off the switch SW1a and the switch SW1 b. Then, the capacitance detection circuit 20 simultaneously turns on the switch SW2a and the switch SW2b, so as to provide a first charging path to charge the voltage Vdf of the first sensing capacitor (Cd1+ Cf1) to the first power voltage Va, and provide a second charge transfer path to transfer the charge stored in the storage capacitor Cs2 to the variable capacitor Cr, and then simultaneously turns off the switch SW2a and the switch SW2b, and compares the voltage Vcs2 of the storage capacitor Cs2 after the charge is transferred to the variable capacitor Cr with the second power voltage Vb, and adjusts the capacitance value of the variable capacitor Cr according to the comparison result.
For example, if the voltage Vcs2 is greater than the second power voltage Vb, it means that the capacitance of the variable capacitor Cr is too small, so the capacitance detection circuit 20 can adjust the capacitance of the variable capacitor Cr by a variable capacitance controller 207; in contrast, if the voltage Vcs2 is smaller than the second power voltage Vb, it represents that the capacitance value of the variable capacitor Cr is too large, so the capacitance detection circuit 20 can adjust the capacitance value of the variable capacitor Cr by the variable capacitor controller 207. It should be noted that the capacitance detection circuit 20 may repeatedly provide the discharge path of the variable capacitor Cr plus the first charge transfer path and the first charge path plus the second charge transfer path, or cyclically turn on the switch SW1a plus SW1b and the switch SW2a plus SW2b until the voltage Vcs2 of the storage capacitor Cs2 after the charge transfer to the variable capacitor Cr is equal to the second power supply voltage Vb, or the voltage Vcs2 and the second power supply voltage Vb approach to be consistent, and the capacitance detection circuit 20 does not complete the first adaptive capacitance mode.
In other words, the purpose of the first adaptive capacitance mode is to adjust the capacitance value of the variable capacitor Cr to be equal to or close to the capacitance value of the current first sensing capacitor (Cd1+ Cf 1). In addition, it should be understood that the storage capacitor Cs2 is charged by the first sensing capacitor (Cd1+ Cf1) and the variable capacitor Cr is discharged by it. Therefore, this embodiment may only need to design the storage capacitor Cs2 to be about 200pF, so that it and the capacitance detection circuit 20 can be integrated into a single chip. Therefore, the capacitance detection circuit 20 does not need to be externally connected with a capacitor component, so that the detection error judgment caused by the influence of the change of the environmental temperature and humidity can be avoided. In contrast, a small capacitor with a built-in capacitance of about 200pF does not attenuate the variation of the touch value, but rather achieves a higher detection resolution.
In addition, in order to avoid the change of the first sensing capacitor (Cd1+ Cf1) due to the external influence, the capacitance detection circuit 20 must first complete the first adaptive capacitance mode before entering the first touch key mode. In other words, the capacitance detecting circuit 20 needs to perform the first adaptive capacitance mode within a fixed period of time, and after entering the first touch key mode, unlike the common voltage detecting method used by the capacitance detecting circuit 10 of fig. 1, which uses the comparator CP to detect whether the voltage Vcs reaches the reference voltage Vref, the capacitance detecting circuit 20 further includes a Voltage Controlled Oscillator (VCO)201 for simultaneously oscillating a first frequency generated by the voltage Vcs2 and a second frequency generated by the second power voltage Vb (neither shown in fig. 2). Therefore, when the external power supply is interfered by noise, the voltage Vcs2 and the second power supply voltage Vb are also simultaneously interfered by noise, and the frequencies of the first frequency and the second frequency that are mutually offset and subtracted are still close to the same, so that the capacitance detection circuit 20 can achieve the purpose of removing the noise interference from the external power supply, or the voltage-controlled oscillator 201 can synchronously cancel the noise interference from the external power supply, so as to achieve a higher detection resolution.
It should be noted that after the switch SW1b is turned on to transfer the charges stored in the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs2, the voltage Vcs2 of the storage capacitor Cs2 can be represented as: vcs2 [ Vcs2'× Cs + Va (Cd1+ Cf1) ]/(Cs + Cd1+ Cf1), where Vcs2' is the voltage Vcs2 before the switch SW1b is turned on to transfer the charge stored by the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs 2. In addition, after the switch SW2b is turned on to transfer the charge stored in the storage capacitor Cs2 to the variable capacitor Cr, the voltage Vcs2 of the storage capacitor Cs2 can be represented as follows: vcs2 is Vcs2 "Cs/(Cs + Cf1), where Vcs 2" is the voltage Vcs2 before the switch SW2b is turned on to transfer the charge stored by the storage capacitor Cs2 to the variable capacitor Cr. It can be seen that, if Cr is equal to (Cd1+ Cf1), the amount of charge transferred from the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs2 and from the storage capacitor Cs2 to the variable capacitor Cr is equal each time, so that the voltage Vcs2 of the storage capacitor Cs2 will be equal to the second power supply voltage Vb when the first adaptive capacitance mode is completed, or the voltage Vcs2 of the storage capacitor Cs2 can be stably maintained near the second power supply voltage Vb, so that the voltage-controlled oscillator 201 can stably oscillate out the same or nearly the same first frequency and second frequency. Since the details of adjusting the variable capacitance Cr are the same as those described above, the details thereof are not repeated herein.
On the other hand, as shown in fig. 2, in the first touch key mode, the capacitance detecting circuit 20 may turn on the switch SW1a and the switch SW1b at the same time, provide a discharging path to discharge the voltage of the variable capacitor Cr to the ground voltage GND, provide a first charge transfer path to transfer the charge stored in the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs2, and turn off the switch SW1a and the switch SW1b at the same time. Next, the capacitance detecting circuit 20 simultaneously turns on the switch SW2a and the switch SW2b, so as to provide a first charging path to charge the voltage of the first sensing capacitor (Cd1+ Cf1) to the first power voltage Va, and provide a second charge transfer path to transfer the charge stored in the storage capacitor Cs2 to the variable capacitor Cr, and then simultaneously turns off the switch SW2a and the switch SW2b, and detects the capacitance value change of the first sensing capacitor (Cd1+ Cf1) according to the voltage Vcs2 of the storage capacitor Cs2 after the charge is transferred to the variable capacitor Cr. Note that, as is clear from the foregoing, the capacitance detection circuit 20 does not use the voltage detection value, but in fact, the first frequency and the second frequency oscillated by the voltage controlled oscillator 201 reflect the voltage Vcs2 and the second power supply voltage Vb. Therefore, the capacitance detection circuit 20 at this time can be regarded as comparing the voltage Vcs2 of the storage capacitor Cs2 after the electric charge is transferred to the variable capacitance Cr with the second power supply voltage Vb, and detecting the change in the capacitance value of the first sensing capacitor (Cd1+ Cf1) according to the comparison result.
For example, if the voltage Vcs2 at this time is equal to the second power voltage Vb, it represents that the capacitance of the first sensing capacitor (Cd1+ Cf1) is unchanged. On the contrary, if the voltage Vcs2 at this time is greater than the second power voltage Vb, it means that the capacitance value of the first sensing capacitor (Cd1+ Cf1) becomes larger, so the capacitance detection circuit 20 can repeatedly provide the discharging path of the variable capacitor Cr plus the first charge transfer path and the first charging path plus the second charge transfer path, or alternatively, cyclically turn on the switches SW1a plus SW1b and SW2a plus SW2b, until after a fixed time, if the voltage difference between the voltage Vcs2 and the second power voltage Vb becomes larger and larger, or the voltage difference becomes stable, the microcontroller 4 at this time can determine that the finger is pressing the first conductor according to the variation of the capacitance value of the first sensing capacitor (Cd1+ Cf1), and if the voltage difference between the voltage Vcs2 and the second power voltage Vb becomes smaller and smaller, the microcontroller 4 can also determine that the finger is moving away from the first conductor.
In addition, as shown in fig. 2, the capacitance detection circuit 20 may further include a counter 203 and a touch value register 209. The counter 203 is coupled to the vco 201 for storing at least one value generated by the vco 201, and according to the at least one value, the counter 203 can generate a first touch value to reflect a change of a capacitance value of the first sensing capacitor (Cd1+ Cf 1). For example, when a finger presses the first conductor, even though the first parasitic capacitor Cd1 remains unchanged, the first finger capacitor Cf1 changes from 0pF to about 0.5pF, so that the charging increases, the voltage Vcs2 rises, and the first frequency oscillated by the vco 201 rises relatively. Therefore, in a fixed time, the value stored in the counter 203 will be increased and generate a corresponding first touch value, so that the microcontroller 4 can determine that the finger presses the first conductor according to the first touch value. On the other hand, when the finger leaves the conductor, the finger capacitance Cf returns to 0pF, so that the charging is reduced, the voltage Vcs2 is reduced, and the first frequency oscillated by the vco 201 is also relatively reduced. Therefore, in a fixed time, the value stored in the counter 203 will be decreased and generate a corresponding first touch value, so that the microcontroller 4 can determine that the finger does not press the first conductor according to the first touch value. In summary, the operation principle of the counter 203 generating the touch value and the microcontroller 4 determining the finger pressing state by the touch value on the counter 203 are well known to those skilled in the art, and therefore the details thereof will not be described herein.
It should be appreciated that the touch value register 209 is used to store the first touch value. As described above, the longer the time the microcontroller 4 determines the state of the finger-pressed key, the more power consumption thereof becomes. Therefore, as shown in fig. 2, the touch value comparator 22 IS coupled to the capacitance detection circuit 20 and the microcontroller 4, and determines whether to generate an interrupt signal IS to the microcontroller 4 according to the first touch value, so as to instruct the microcontroller 4 to read the first touch value from the touch value register 209. In the present embodiment, the touch value comparator 22 IS coupled to the touch value register 209 and IS configured to determine whether the first touch value exceeds or IS lower than at least one threshold, and when the first touch value exceeds or IS lower than the at least one threshold, the touch value comparator 22 determines to generate an interrupt signal IS to the microcontroller 4 to instruct the microcontroller 4 to read the first touch value. That IS, no matter the microcontroller 4 IS in the sleep or working state, the microcontroller 4 does not need to actively read the first touch value, but the microcontroller 4 does not need to read the first touch value until the touch value comparator 22 sends the interrupt signal IS. Therefore, when the microcontroller 4 is in the sleep state, the present embodiment can achieve the purpose of saving power, and when the microcontroller 4 is in the working state, the present embodiment can achieve the purpose of saving the efficiency of the microcontroller 4 because the microcontroller 4 does not need to read the first touch value constantly.
It is worth mentioning that, as mentioned above, the capacitance of the parasitic capacitor Cd is not consistent on each touch key (i.e. conductor). Therefore, for a product with a plurality of touch keys, the capacitance detection circuit 20 enables each touch key to have a capacitance corresponding to a variable capacitor Cr. For example, if the capacitance detection circuit 20 of fig. 2 is coupled to six conductors, i.e., the first to sixth conductors (not shown in fig. 2), the capacitance detection circuit 20 may be coupled to the second conductor through the pin P2, and adjust the capacitance of the variable capacitor Cr in the second adaptive capacitance mode, and so on, the capacitance detection circuit 20 may be coupled to the sixth conductor through the pin P6, and adjust the capacitance of the variable capacitor Cr in the sixth adaptive capacitance mode, so that the touch values of the touch keys on the counter 203 are consistent. In other words, the present embodiment can solve the problem of inconsistent touch values caused by different parasitic capacitances Cd when the plurality of touch keys are arranged on the PCB. It should also be understood that in the second adaptive capacitance mode, the storage capacitor Cs2 is charged by the second sense capacitor (Cd2+ Cf2) and the variable capacitor Cr is discharged by it, and so on, and in the sixth adaptive capacitance mode, the storage capacitor Cs2 is charged by the sixth sense capacitor (Cd6+ Cf6) and the variable capacitor Cr is discharged by it. Since the operation principle of the capacitance detection circuit 20 in each adaptive capacitance mode is similar to that described above, further description is omitted here.
In contrast, when entering the second touch key mode, the capacitance detection circuit 20 detects a capacitance value change of the second sensing capacitor (Cd2+ Cf2) to generate a second touch value related to the second conductor, and so on, when entering the sixth touch key mode, the capacitance detection circuit 20 detects a capacitance value change of the sixth sensing capacitor (Cd6+ Cf6) to generate a sixth touch value related to the sixth conductor. Since the operation principle of the capacitance detection circuit 20 in each touch key mode is also the same as that described above, further description is omitted here. It can be seen that the capacitance detection circuit 20 may further include a touch guide 211 coupled to the touch value comparator 22 and the variable capacitance controller 207, and when the touch value comparator 22 determines whether the interrupt signal IS generated, the touch guide 211 guides the capacitance detection circuit 20 to perform its corresponding touch key mode for the next conductor, and the touch guide 211 also instructs the variable capacitance controller 207 to adjust the capacitance value of the variable capacitance Cr to the capacitance value of the variable capacitance Cr adjusted in the adaptive capacitance mode of the next conductor. In practice, the touch guide 211 may couple the capacitance detection circuit 20 to one of the conductors through a multiplexer to perform the corresponding adaptive capacitance mode or touch key mode, but the invention is not limited thereto.
That is, the touch guide 211 records the capacitance value of the variable capacitor Cr adjusted by the variable capacitor controller 207 in the adaptive capacitance mode of each conductor, and in the touch key mode of each conductor, the touch guide 211 adjusts the capacitance value of the variable capacitor Cr through the variable capacitor controller 207 at that time, so that the touch values of each conductor on the counter 203 can be consistent. It should be noted that, in this embodiment, the microcontroller 4 may set that the touch guide 211 only needs to guide the capacitance detection circuit 20 to some conductors to perform the corresponding touch key mode, or the microcontroller 4 may set that the touch guide 211 guides the capacitance detection circuit 20 to each conductor one by one (i.e., automatically cycle) to perform the corresponding touch key mode, but the present invention is not limited thereto, and those skilled in the art should be able to design the touch guide according to actual needs or applications.
It should be noted that in one design, the counter 203 may average the value generated by the vco 201 each time with the values generated a few times before, for example, 15 times before, and let the microcontroller 4 only read the average value from the touch value register 209. Therefore, the present embodiment has an average value output whenever a new value is generated, and the present embodiment may refer to this design as an accumulation mode; alternatively, in another design, the counter 203 may sequentially place the generated touch values, i.e. the first to sixth touch values, into the touch value register 209 and enable the microcontroller 4 to read one by one, which is referred to as the true mode in this embodiment, but the invention is not limited thereto. As mentioned above, the operation principle of the counter 203 generating the touch value and the microcontroller 4 determining the finger pressing state by the touch value on the counter 203 are well known to those skilled in the art, and therefore the details thereof will not be described herein.
Finally, to further illustrate the operation process of the capacitive touch device 2, the present invention further provides an embodiment of the operation method thereof. Referring to fig. 3, fig. 3 is a flowchart illustrating steps of an operating method according to an embodiment of the invention. It should be noted that the operation method of fig. 3 can be used in the capacitive touch device 2 of fig. 2, so please refer to fig. 2 for understanding, but the invention does not limit the operation method of fig. 3 to be only used in the capacitive touch device 2 of fig. 2. Similarly, for the following description, fig. 3 also only illustrates an operation method of the capacitance detection circuit 20 for coupling to a conductor, i.e. the first conductor, but a person skilled in the art should be able to modify and expand the operation method provided by the present specification for the capacitance detection circuit 20 for coupling to a plurality of conductors, e.g. the first to sixth conductors, and therefore, the details are not repeated herein.
As shown in fig. 3, in step S301, the capacitance detecting circuit 20 adjusts the capacitance of the variable capacitor Cr in the first adaptive capacitance mode so that the capacitance of the variable capacitor Cr is equal to the capacitance of the current first sensing capacitor (Cd1+ Cf 1). Next, in step S302, the capacitance detecting circuit 20 detects a capacitance value of the first sensing capacitor (Cd1+ Cf1) in the first touch key mode to generate a first touch value related to the first conductor, and in step S303, stores the first touch value in the touch value register 209. Then, in step S304, the touch value comparator 22 determines whether to generate the interrupt signal IS to the microcontroller 4 according to the first touch value. If yes, go to step S305, issue an interrupt signal IS to instruct the microcontroller 4 to read the first touch value from the touch value register 209; if not, the process returns to step S302. In step S304, the touch value comparator 22 determines whether to generate the interrupt signal IS to the microcontroller 4 by determining whether the first touch value exceeds or falls below at least one threshold value. For example, when the first touch value exceeds or falls below at least one threshold value, the touch value comparator 22 determines to generate the interrupt signal IS to the microcontroller 4.
In addition, referring to fig. 4, fig. 4 is a flowchart illustrating a method of operating the capacitance detection circuit 20 in the first adaptive capacitance mode and the first touch key mode. Similarly, for the following description, fig. 4 only illustrates the operation method of the capacitance detection circuit 20 for coupling to a conductor, i.e. the first adaptive capacitance mode and the first touch key mode of the first conductor, but for the operation method of the capacitance detection circuit 20 for coupling to a plurality of conductors, e.g. the first to sixth adaptive capacitance modes and the first to sixth touch key modes of the first to sixth conductors, those skilled in the art should be able to modify and expand the content provided in the present specification, and therefore, the description thereof is not repeated herein. As shown in fig. 4, in step S401 in the first adaptive capacitance mode, a first charging path is provided to charge the voltage Vdf of the first sensing capacitor (Cd1+ Cf1) to the first power supply voltage Va, and a second charging path is provided to charge the voltage Vcs2 of the storage capacitor Cs2 to the second power supply voltage Vb. Next, in step S402 in the first adaptive capacitance mode, a discharge path is provided to discharge the voltage of the variable capacitance Cr to the ground voltage GND, and a first charge transfer path is provided to transfer the charge stored in the first sensing capacitance (Cd1+ Cf1) to the storage capacitance Cs 2.
Next, in step S403 in the first adaptive capacitance mode, a first charge path is provided to charge the voltage Vdf of the first sensing capacitor (Cd1+ Cf1) to the first power supply voltage Va, and a second charge transfer path is provided to transfer the charge stored in the storage capacitor Cs2 to the variable capacitor Cr. Then, in step S404 in the first adaptive capacitance mode, it is checked whether or not the voltage Vcs2 of the storage capacitor Cs2 after the charge transfer to the variable capacitor Cr is equal to the second power supply voltage Vb. If not, step S405 is executed to adjust the capacitance value of the variable capacitance Cr according to the comparison result between the voltage Vcs2 and the second power supply voltage Vb, and after step S405 is completed, the process returns to step S402 to step S404. In other words, steps S402 to S405 are repeatedly executed until the voltage Vcs2 of the storage capacitor Cs2 after the charge transfer to the variable capacitor Cr is equal to the second power supply voltage Vb, and the capacitance detection circuit 20 does not complete the adaptive capacitance mode.
In addition, in step S406 of the first touch key mode, a discharge path is provided to discharge the voltage of the variable capacitor Cr to the ground voltage GND, and a first charge transfer path is provided to transfer the charge stored in the first sensing capacitor (Cd1+ Cf1) to the storage capacitor Cs 2. Next, in step S407 of the first touch key mode, a first charging path is provided to charge the voltage of the first sensing capacitor (Cd1+ Cf1) to the first power voltage Va, and a second charge transfer path is provided to transfer the charge stored in the storage capacitor Cs2 to the variable capacitor Cr. Then, in step S408 in the first touch key mode, a change in the capacitance value of the first sensing capacitor (Cd1+ Cf1) is detected according to the voltage Vcs2 of the storage capacitor Cs2 after the charge is transferred to the variable capacitor Cr, and after step S408 is completed, the process returns to the step S406 to step S408. In other words, steps S406 to S408 are repeatedly executed, so that the capacitance detecting circuit 20 can generate the first touch value related to the first conductor to reflect the capacitance value change of the first sensing capacitance (Cd1+ Cf 1).
In summary, embodiments of the present invention provide a capacitive touch device and an operating method thereof, in which a storage capacitor is integrated into a single chip to avoid erroneous determination of detection caused by changes in ambient temperature and humidity, and each touch key can have a capacitance corresponding to a variable capacitor, or by adjusting the capacitance of the variable capacitor in each adaptive capacitance mode, the touch values of the touch keys on a counter can be consistent, thereby solving the problem of inconsistent touch values caused by different parasitic capacitances when the touch keys are disposed on a PCB. In addition, no matter the microcontroller is in a dormant state or a working state, the microcontroller does not need to actively read the touch value on the counter, but the microcontroller does not need to read the touch value on the counter until the touch value comparator sends out an interrupt signal. Therefore, when the microcontroller is in a dormant state, the invention can achieve the purpose of saving power, and when the microcontroller is in a working state, the invention can achieve the purpose of saving the efficiency of the microcontroller because the microcontroller does not need to read the touch value constantly.
The disclosure is only a preferred embodiment of the invention and should not be taken as limiting the scope of the invention, which is defined by the appended claims.