Semiconductor equipment
The semiconductor device addresses the challenge of large circuit scale in capacitive touch detection by using frequency-based touch detection, reducing complexity and size while ensuring reliable and efficient operation.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-03-18
AI Technical Summary
Capacitive touch detection circuits require high-precision analog and digital circuits, leading to increased circuit scale due to the need for precise capacitance difference detection and prevention of false detections from external disturbances.
A semiconductor device with a touch detection circuit that compares the frequency of input signals with the frequency of the commercial power supply to detect touch, using a comparison calculation unit and a simplified circuit configuration that includes a clamp circuit, amplifier, hysteresis circuit, filter, counter, and CPU for reliable touch detection.
Reduces the circuit size and complexity of touch detection circuits while maintaining accuracy and stability, enabling faster touch detection with a simpler circuit design.
Smart Images

Figure 2026049295000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a semiconductor device, and more particularly to a semiconductor device in which a touch detection circuit is formed.
Background Art
[0002] Non-Patent Document 1 discloses a technique for estimating a person's posture and movement from a voltage induced in a copper plate embedded in the floor by the movement of a charged human body.
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By the way, in a capacitive touch detection circuit, it is necessary to detect a very small capacitance difference due to the presence or absence of touch, and it is also necessary to prevent false detection due to external disturbance. Therefore, there is a problem that a high-precision analog circuit and a digital circuit for measurement are required, and the circuit scale increases. Note that Non-Patent Document 1 is not a technique for detecting touch, so this problem cannot be solved.
[0005] The present disclosure has been made to solve such problems, and an object thereof is to realize a semiconductor device that reduces the circuit scale of a touch detection circuit.
[0006] Other problems and novel features will become apparent from the description of this specification and the accompanying drawings.
Means for Solving the Problems
[0007] A semiconductor device according to one embodiment includes a touch detection circuit that processes signals from an operating unit equipped on a device for operating a device that operates by being powered by a commercial power supply. The touch detection circuit includes a comparison calculation unit that detects the touch based on the result of comparing the frequency of the input signal input when the operator of the device touches the operating unit with the frequency of the commercial power supply. [Effects of the Invention]
[0008] According to the above embodiment, a semiconductor device that reduces the circuit size of the touch detection circuit can be provided. [Brief explanation of the drawing]
[0009] [Figure 1] This is a diagram illustrating equipment equipped with the semiconductor device according to Embodiment 1. [Figure 2] These are a circuit diagram and a block diagram showing the touch detection circuit according to Embodiment 1. [Figure 3] This is a diagram illustrating the control of the switch in the touch detection circuit according to Embodiment 1. [Figure 4] This is a diagram illustrating the operation of the touch detection circuit according to Embodiment 1. [Figure 5] These are a circuit diagram and a block diagram showing a touch detection circuit according to a modified example of Embodiment 1. [Figure 6] This is a circuit diagram showing a touch detection circuit according to a modified example of Embodiment 1. [Figure 7] This is a circuit diagram and a schematic diagram showing a touch detection circuit according to Embodiment 2. [Figure 8] These are a circuit diagram and a block diagram showing the touch detection circuit according to Embodiment 3. [Figure 9] This diagram illustrates the estimated accuracy of the corrected clock frequency. [Modes for carrying out the invention]
[0010] For clarity of explanation, the following descriptions and drawings have been omitted and simplified as appropriate. In each drawing, the same elements are denoted by the same reference numeral, and redundant explanations have been omitted where necessary. Furthermore, each element shown in the drawings as a functional block that performs various processes can be composed of a CPU (Central Processing Unit), memory, and other circuits in hardware terms, and implemented in software terms by a program loaded into memory, etc. Therefore, it will be understood by those skilled in the art that these functional blocks can be implemented in various forms by hardware, software running on the hardware, or a combination thereof, and are not limited to any one of these.
[0011] Embodiment 1 Referring to Figure 1, the semiconductor device according to Embodiment 1 has a touch detection circuit that processes signals from the operation unit 41. The operation unit 41 is installed in a device 30 such as a home appliance. The device 30 operates by being powered by a commercial power supply (e.g., an electrical outlet). The commercial power supply provides, for example, 100V AC power at 50Hz or 60Hz.
[0012] The operation unit 41, such as a touch panel, receives touch input from the operator 42. The operation unit 41 is not limited to a touch panel; it may also be a touchpad or touch buttons.
[0013] A voltage at the frequency of the commercial power supply (e.g., 50Hz, 60Hz) is induced on the operator's body. For example, it is known that when a person touches the probe of an oscilloscope, a sinusoidal waveform at the frequency of the commercial power supply is displayed on the oscilloscope screen. It is also known that when a person touches the input terminal of an audio amplifier, a hum at the frequency of the commercial power supply is emitted. The touch detection circuit detects the touch by detecting that the frequency of the voltage induced on the operator's body is the frequency of the commercial power supply.
[0014] In addition, a method of detecting a touch based on the amplitude of the voltage input from the operation unit 41 is also conceivable. However, since the amplitude of the voltage varies greatly depending on the distance from a commercial power supply (e.g., a power outlet) and the intensity of the touch, it is difficult to determine what voltage should be set as the threshold for detecting a touch, and it is considered that a touch cannot be detected stably.
[0015] When the amplitude of the input signal input from the operation unit 41 is small, the touch detection circuit amplifies the input signal so that the amplitude of the input signal swings fully. When the amplitude of the input signal input from the operation unit 41 is large, the touch detection circuit uses a clamp circuit to limit the input signal within a predetermined power supply voltage range. Then, since the touch detection circuit detects a touch by determining whether the frequency of the input signal is the same as that of the commercial power supply, the circuit configuration and control are simple.
[0016] The device 30 may be a general household electrical appliance that uses a commercial power supply, such as a refrigerator or a microwave oven.
[0017] FIG. 2 is a circuit diagram and a block diagram showing the touch detection circuit 100 according to Embodiment 1. The touch detection circuit 100 includes a touch input terminal 1, a clamp circuit 2, a capacitor 3, a switch 4, a switch 5, an amplifier 6, a hysteresis circuit 7, a filter 8, a counter 9, a comparison operation circuit 10, a CPU 21, a ROM (Read Only Memory) 22, a RAM (Random Access Memory) 23, a peripheral device 24, a clock generation circuit 25, and a built-in oscillator 26.
[0018] When the operator 42 touches the operation unit 41 described above, an input signal is input to the touch input terminal 1. The touch input terminal 1 is connected to an electrode provided on the operation unit 41. The touch input terminal 1 and the electrode may be integrally configured. The electrode or the touch input terminal 1 may come into contact with the finger of the operator 42. The touch input terminal 1 can also serve as another terminal such as a port and may be connected to a port I / O (Input / Output).
[0019] The clamp circuit 2 limits the input signal received at the touch input terminal 1 to a predetermined power supply voltage range. The clamp circuit 2 includes, for example, diodes D1 and D2. The cathode of diode D1 is connected to the power supply potential, and the anode of diode D1 is connected to the cathode of diode D2. The anode of diode D2 is connected to ground potential.
[0020] An input signal, voltage-limited by the clamp circuit 2, is input to one end of capacitor 3. The other end of capacitor 3 is connected to the input terminal of amplifier 6. Switch 4 works in cooperation with capacitor 3 to bias the input signal to amplifier 6 to the threshold potential of amplifier 6. For example, if amplifier 6 is an inverter that inverts and amplifies the waveform of the input signal, switch 4 is provided in the path between the output terminal and input terminal of amplifier 6, and when switch 4 is controlled to be ON, the input signal is biased to the threshold voltage of amplifier 6.
[0021] Switch 5 fixes the potential of the input terminals of amplifier 6 when the touch detection circuit 100 is not in use, preventing through-current from flowing into amplifier 6. Switch 5 is located in the path between the input terminals of amplifier 6 and ground potential. By controlling switch 5 to the ON state, through-current is prevented from flowing into amplifier 6.
[0022] Switches 4 and 5 may be semiconductor switches. Switches 4 and 5 are controlled to be on or off according to a control signal. The control signal may be generated by the CPU 21.
[0023] Amplifier 6 amplifies an input signal with a small amplitude relative to the power supply voltage. Amplifier 6 may also be an inverter that inverts and amplifies the waveform of the input signal. Amplifier 6 only needs to be able to transmit a voltage at the frequency of the commercial power supply (e.g., 50Hz, 60Hz), so it may be a low-gain amplifier composed of MOS (Metal-Oxide-Semiconductor) transistors with a long channel length L.
[0024] The amplifier 6 is not limited to an inverter. The amplifier 6 may be, for example, an inverting amplifier circuit or a non-inverting amplifier circuit including an operational amplifier. The amplifier 6 may amplify the input signal waveform without inverting it. The location of the switch 4 is not limited to the path between the output terminal and the input terminal of the amplifier 6; the switch 4 may be placed in the path between the circuit that generates the threshold voltage of the amplifier 6 and the input terminal of the amplifier 6.
[0025] The hysteresis circuit 7 has hysteresis characteristics and works in cooperation with the filter 8 to remove noise such as chattering from the output waveform of the amplifier 6. The hysteresis circuit 7 may also be, for example, an inverting buffer or a non-inverting buffer with hysteresis characteristics.
[0026] Filter 8 works in conjunction with the hysteresis circuit 7 to remove noise such as chattering from the output signal of amplifier 6. Filter 8 is connected in series with the hysteresis circuit 7. Filter 8 may include, for example, a low-pass filter and a digital filter that further removes noise components from the signal that has been denoised by the low-pass filter.
[0027] Counter 9 starts counting using the measurement clock as the count source in response to the rising edge of the input signal amplified by amplifier 6, and stops counting using the measurement clock in response to the next rising edge of the amplified input signal. Alternatively, counter 9 starts counting using the measurement clock as the count source in response to the falling edge of the input signal amplified by amplifier 6, and stops counting using the measurement clock in response to the next falling edge of the amplified input signal.
[0028] The comparison circuit 10 detects a touch based on the result of comparing the frequency of the input signal with the frequency of the commercial power supply. Specifically, if the count result from the counter 9 corresponds to the frequency of the commercial power supply, the comparison circuit 10 outputs a touch detection signal to the CPU 21 indicating that a touch has been detected. The function of the comparison circuit 10 may be implemented by hardware such as a circuit, or it may be implemented by the CPU 21 executing a program stored in the ROM 22.
[0029] The CPU 21, ROM 22, RAM 23, and peripheral devices 24 are interconnected via a data bus or the like. ROM 22 is a non-volatile memory device that stores computer programs. RAM 23 temporarily holds information when the CPU 21 is operating. The CPU 21 performs various functions, for example, by executing programs stored in ROM 22. The CPU 21 exchanges information with peripheral devices 24 via the data bus.
[0030] The clock generation circuit 25 supplies the CPU 21 with a clock based on an external oscillation from a ceramic or crystal oscillator, or a clock generated by the internal oscillator 26, as the operating clock. The clock generated by the clock generation circuit 25 is also supplied to the counter 9 as the measurement clock.
[0031] Referring to Figure 3, the control of the on / off states of switches 4 and 5 will be described. First, when the operation of the touch detection circuit 100 is stopped, switch 5 is controlled to the on state and switch 4 is controlled to the off state. In this case, touch input terminal 1 can be used as a general port. The level of the touch detection signal is undefined and in practice the previous value is retained.
[0032] When the touch detection circuit 100 starts operating, it first performs self-equalization. At this time, switch 5 is controlled to the off state and switch 4 is controlled to the on state. The level of the touch detection signal is undefined. By performing self-equalization, the input terminal of amplifier 6 is biased to the threshold voltage of amplifier 6. Self-equalization is performed for a predetermined time. The level of the touch detection signal is undefined.
[0033] After self-equalization, counter 9 counts the measurement clock for one cycle of the input signal. For example, if the frequency of the commercial power supply is 60Hz, the measurement clock count will be performed for approximately 16.7ms. The touch detection circuit 100 may count the measurement clock multiple times. When counting the measurement clock, switch 5 is controlled to the off state and switch 4 is controlled to the off state. The level of the touch detection signal is undefined.
[0034] When the count by counter 9 is finished, switch 5 is controlled to the ON state and switch 4 is controlled to the OFF state. If the count result corresponds to the frequency of the commercial power supply multiple times in a row, the comparison calculation circuit 10 may detect a touch. In this case, the touch detection circuit 100 can more reliably determine whether or not the frequency of the input signal is the frequency of the commercial power supply. For example, if a touch is detected, the comparison calculation circuit 10 sets the level of the touch detection signal to H level, and if no touch is detected, it sets the level of the touch detection signal to L level.
[0035] Based on the touch detection signal, the CPU 21's processing branches depending on whether it's flag determination or interrupt handling, and the CPU 21 performs the appropriate processing according to the software.
[0036] Figure 4 shows the count values corresponding to the frequency of the commercial power supply when the frequency of the commercial power supply is (50±1)Hz or (60±1)Hz and the frequency of the measurement clock is 4MHz. When the frequency of the commercial power supply is (60±1)Hz, the period T of the commercial power supply is 0.016393443 to 0.016949153s, and the count values corresponding to this period are 65573 to 67796. Similarly, when the frequency of the commercial power supply is (50±1)Hz, the count values corresponding to the period T of the commercial power supply are 78431 to 81632. Therefore, the comparison calculation circuit 10 detects a touch if the count value falls within 65573 to 67796 or 78431 to 81632, and does not detect a touch otherwise. The comparison calculation circuit 10 may also detect a touch if a count value corresponding to 50Hz is obtained a predetermined number of times, or if a count value corresponding to 60Hz is obtained a predetermined number of times.
[0037] Embodiment 1 detects touch by determining whether the frequency of the voltage induced on the human body matches the frequency of the commercial power supply, thus enabling touch detection with a simpler circuit configuration and control. Furthermore, Embodiment 1 can detect touch in the time of one cycle of the commercial power supply (e.g., 20ms for 50Hz, 16.7ms for 60Hz), thus reducing the time required for touch detection. Even when detecting a touch when three count values corresponding to the commercial power supply frequency are obtained, the time required for touch detection is approximately 50ms, which is shorter than the time required for capacitive touch detection (e.g., 140ms).
[0038] Embodiment 1 can be modified in various ways. For example, if the noise component of the output signal of amplifier 6 is small, the touch detection circuit 100 may not include the hysteresis circuit 7 and the filter 8.
[0039] Variation 1 Figure 5 is a circuit diagram and block diagram showing the configuration of a touch detection circuit 100 according to a modification 1 of Embodiment 1. The CPU 21 and other components are omitted from the illustration. The touch detection circuit 100 further includes a register 11. The register 11 stores a judgment value corresponding to the upper limit and a judgment value corresponding to the lower limit for each frequency (e.g., 50Hz, 60Hz). If the count result from the counter 9 falls between the judgment value corresponding to the upper limit and the judgment value corresponding to the lower limit, the comparison arithmetic circuit 10 outputs a touch detection signal indicating that a touch has been detected. A user using the touch detection circuit 100 can write any value as the judgment value to the register 11. The user may also write which frequency to use, 50Hz or 60Hz, to the register 11, and the touch detection circuit 100 may select which frequency to use based on position information or the like.
[0040] The accuracy of commercial power frequency varies by country and region. For example, the accuracy of commercial power frequency in Japan is approximately ±(0.2~0.3)Hz, while in North America it is around ±0.02Hz. In other words, the accuracy of commercial power frequency in North America is an order of magnitude higher than in Japan. When the accuracy of commercial power frequency is high, users can narrow the range of acceptable values to more precisely determine whether the frequency of an input signal is that of the commercial power supply.
[0041] Furthermore, the speed of the measurement clock supplied to counter 9 may be configured to be selectable by the user. Depending on the speed of the measurement clock, the measurement accuracy of the input signal frequency can be set to be coarse or fine depending on the application and circumstances. For example, the CPU 21 may refer to a value written to a register by the user and supply a measurement clock to counter 9 with a speed based on that value.
[0042] Variation 2 In the configurations shown in Figures 2 and 5, the input impedance of the touch input terminal 1 is high impedance. Therefore, in noisy environments, the touch input terminal 1 may pick up weak noise signals, potentially making it difficult for the touch detection circuit 100 to detect touches.
[0043] Figure 6 is a circuit diagram showing a touch detection circuit 100 according to a modified example 2 of Embodiment 1. The elements placed after the amplifier 6 are not shown. Comparing Figure 2 and Figure 6, Figure 6 includes a resistor 12 for stabilizing the input signal. The resistance value of resistor 12 may be 1M to 10MΩ, for example, similar to the input impedance of an oscilloscope probe.
[0044] Resistor 12 may be a pull-down resistor that pulls down the touch input terminal 1, or a pull-up resistor that pulls up the touch input terminal 1. Resistor 12 may include both a pull-down resistor and a pull-up resistor. One end of the pull-down resistor is connected to the touch input terminal 1, and the other end of the pull-down resistor is connected to ground potential. One end of the pull-up resistor is connected to the touch input terminal 1, and the other end of the pull-up resistor is connected to the power supply potential.
[0045] Resistor 12 is configured to switch on and off in response to a control signal, and may be a MOS resistor, for example. Resistor 12 is switched from the on state to the off state when touch detection is not performed. Multiple pull-up resistors or multiple pull-down resistors may be connected in parallel. The desired pull-down resistor or pull-up resistor is controlled to be on by register settings made by the user. This allows the combined resistance value of multiple pull-down resistors or multiple pull-up resistors to be optimized by the user according to the environment. For example, the CPU 21 may generate a control signal by referring to a register written by the user.
[0046] Embodiment 2 If the metal electrodes on the operating section 41 are exposed, repeated touching may cause corrosion of the metal electrodes. Furthermore, although typical semiconductor devices have built-in ESD (Electrostatic Discharge) protection circuits, it is undesirable for metal electrodes to be exposed. In Embodiment 2, the metal electrodes on the operating section 41 are covered with an insulating film.
[0047] Figure 7 shows a circuit diagram and schematic diagram of the touch detection circuit 100 according to Embodiment 2. Elements after the amplifier 6 are not shown. The touch input terminal 1 is connected to the metal electrode 52. Referring to the schematic diagram located below the arrow, the metal electrode 52 is provided on the substrate 51 on which the touch detection circuit 100 is installed, and an insulating film 53 is provided on the metal electrode 52. A guard ring 54 may be provided around the metal electrode 52 to separate it. The insulating film 53 may be placed on the surface of the operating section 41 in Figure 1.
[0048] Since a capacitive component is formed between the operator's finger 421 touching the insulating film 53 and the metal electrode 52, the capacitor 3 shown by the dotted line in the circuit diagram may be removed. Alternatively, the capacitance value of capacitor 3 must be determined considering the capacitive component between the finger 421 and the metal electrode 52. Because the capacitive component between the finger 421 and the metal electrode 52 and capacitor 3 are connected in series with each other, the overall capacitance becomes small, so it is necessary to increase the area of the metal electrode 52 or increase the capacitance of capacitor 3. For example, if the capacitance of capacitor 3 in Figure 2 is 2pF and the capacitance between the finger 421 and the metal electrode 52 in Figure 7 is 5pF, then if the capacitance of capacitor 3 in Figure 7 is C pF, then (1 / 5) + (1 / C) = (1 / 2) holds true. In this case, C = 3.3pF, so C needs to be larger than 2pF.
[0049] Embodiment 2 can reduce the effects of metal corrosion and ESD. Furthermore, since capacitor 3 is unnecessary, circuit area and cost can be reduced.
[0050] Embodiment 3 Figure 8 is a circuit diagram and block diagram showing a touch detection circuit 100 according to Embodiment 3. Comparing Figure 2 and Figure 8, the touch detection circuit 100 in Figure 8 further includes a measurement result storage register 13 and a frequency correction value calculation circuit 14.
[0051] If the comparison circuit 10 determines that the frequency of the input signal matches the frequency of the commercial power supply (e.g., 50Hz, 60Hz), it stores the frequency measurement result (e.g., the count result from counter 9) in the measurement result storage register 13.
[0052] The frequency correction value calculation circuit 14 calculates a correction value to correct the clock frequency of the clock generated by the internal oscillator 26 based on the measurement results stored in the measurement result storage register 13. The internal oscillator 26 generates a clock corrected based on the correction value calculated by the frequency correction value calculation circuit 14. The function of the frequency correction value calculation circuit 14 may be implemented by hardware such as a circuit, or it may be implemented by the CPU 21 executing a program stored in the ROM 22.
[0053] In embodiments 1 and 2, the frequency of the voltage induced in the human body is measured based on the measurement clock, but the accuracy of the measurement clock generated by the built-in oscillator 26 is reflected in the measurement result. Therefore, embodiment 3 corrects the clock based on the measurement result and uses the corrected clock as the operating clock.
[0054] The frequency of commercial power is relatively high-precision. The accuracy of the clock generated by the built-in oscillator 26 can be low to medium precision, sufficient to determine that the frequency of the input signal is the frequency of commercial power. By using a low to medium precision oscillator for the built-in oscillator 26, the circuit area of the touch detection circuit 100 can be reduced.
[0055] Generally, devices equipped with touch detection functionality perform polling when they receive touch input, and then perform various processes when a touch is detected. Therefore, by correcting the clock frequency of the built-in oscillator 26 each time a touch is detected, the system can always be operated with a highly accurate clock.
[0056] To improve the accuracy of frequency correction, it is preferable that the frequency of the measurement clock be sufficiently higher than the frequency of the commercial power supply (e.g., 50Hz, 60Hz). The inventors calculated the accuracy of the corrected clock frequency when the measurement clock is 4MHz and when the measurement clock is 30kHz. Referring to Figure 9, for example, if the measurement clock is 4MHz and the frequency of the commercial power supply is (50±0.3)Hz, considering the two gating errors at the start and stop of the count, the range of the count value is 79520 to 80484. Since the corrected frequency when the count value is 79520 is 3.976MHz, the maximum positive error of the commercial power supply frequency is 0.60%. Similarly, the maximum negative error of the commercial power supply frequency is -0.61%. When the measurement clock is 4MHz, the accuracy of the corrected clock frequency is approximately the same as the accuracy of the commercial power supply frequency. This accuracy does not include the error between the frequency of the built-in oscillator 26 and the correction value, but it is expected to fall within a practical level of ±1%. On the other hand, when the measurement clock is 30kHz, the frequency accuracy after correction reaches 1%, indicating low correction accuracy. Therefore, it is important to use a measurement clock with a frequency sufficiently higher than the frequency of the commercial power supply.
[0057] Embodiment 3 corrects the frequency accuracy of the built-in oscillator 26, enabling operation with a high-precision clock. Furthermore, by using a relatively low-precision built-in oscillator 26, the circuit area and cost can be reduced.
[0058] Although the present invention has been specifically described above based on embodiments, it goes without saying that the present invention is not limited to the above embodiments and can be modified in various ways without departing from its essence. [Explanation of symbols]
[0059] 100 Touch detection circuits 1 Touch input terminal 2. Clamp Circuit 3 Capacitors 4, 5 switches 6 Amplifier 7. Hysteresis Circuit 8 filters 9 counters 11 registers 12 resistors 13. Register for storing measurement results 14. Frequency Correction Value Calculation Circuit 21 CPU 22 ROM 23 RAM 24 Peripherals 25 Clock generation circuit 26. Internal oscillator 30 equipment 41 Operation section 42 Operator 421 fingers 51 circuit boards 52 Metal electrode 53 Insulating film 54 Guard Ring D1, D2 diodes
Claims
1. A semiconductor device having a touch detection circuit that processes signals from an operating unit equipped on a device for operating a device that operates by being powered by a commercial power supply, The touch detection circuit includes a comparison calculation unit that detects the touch based on a comparison between the frequency of the input signal received when the operator of the device touches the operating unit and the frequency of the commercial power supply. A semiconductor device equipped with [the necessary components].
2. In the semiconductor device described in claim 1, The aforementioned touch detection circuit is A clamping circuit that limits the input signal to a predetermined power supply voltage range, An amplifier that amplifies the input signal with a small amplitude relative to the power supply voltage, A first switch, in cooperation with the capacitive component between the part of the operator's body touching the device and the input terminal of the amplifier, biases the input signal to the threshold potential of the amplifier. A second switch that fixes the potential of the input terminal of the amplifier when the aforementioned touch is not detected, thereby preventing a through-current from flowing to the amplifier. Furthermore, The comparison unit is a semiconductor device that measures the frequency of the input signal using the output signal of the amplifier.
3. In the semiconductor device described in claim 2, The touch detection circuit further includes a counter that performs a count using the measurement clock as the count source in response to the rising or falling edge of the output signal of the amplifier. The comparison calculation unit measures the frequency of the input signal based on the count result from the counter, and is a semiconductor device.
4. In the semiconductor device described in claim 2, The touch detection circuit further comprises a hysteresis circuit and a filter connected in series with each other to remove noise from the output signal of the amplifier, wherein the semiconductor device is further a touch detection circuit.
5. In the semiconductor device described in claim 3, The touch detection circuit further includes a register that stores determination values corresponding to the upper and lower limits of each of a plurality of candidate frequencies of the commercial power supply. The comparison calculation unit compares the frequency of the input signal with the frequency of the commercial power supply by determining whether the count result from the counter falls between a determination value corresponding to the upper limit and a determination value corresponding to the lower limit of one of the plurality of candidates.
6. In the semiconductor device described in claim 3, A semiconductor device configured to allow the measurement accuracy of the input signal frequency to be changed according to the speed of the selected measurement clock.
7. In the semiconductor device described in claim 2, The touch detection circuit further comprises at least one of a pull-up resistor that pulls up the touch input terminal to which the input signal is input, and a pull-down resistor that pulls down the touch input terminal. A semiconductor device wherein the pull-up resistor and the pull-down resistor are switched from an on state to an off state when the touch is not detected.
8. In the semiconductor device described in claim 6, The touch detection circuit comprises at least one of a plurality of pull-up resistors and a plurality of pull-down resistors connected in parallel with each other. A semiconductor device configured such that the combined resistance value of the plurality of pull-up resistors can be changed by changing a pull-up resistor that is switched from an off state to an on state when the aforementioned touch is detected, and the combined resistance value of the plurality of pull-down resistors can be changed by changing a pull-down resistor that is switched from an off state to an on state when the aforementioned touch is detected.
9. In the semiconductor device described in claim 3, The touch detection circuit further includes a correction value calculation unit that calculates a correction value for correcting the clock frequency of the measurement clock generated by the built-in oscillator based on the count result from the counter, A semiconductor device in which the measurement clock having a clock frequency corrected by the aforementioned correction value is used as the operating clock.