Semiconductor device, and capacitive sensor device

JPWO2023182075A5Inactive Publication Date: 2024-12-09
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024510046
Authority / Receiving Office
JP · JP
Patent Type
Applications
Priority Date
2023-03-14
Filing Date
2023-03-14
Publication Date
2024-12-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Capacitive sensor devices face challenges in detecting capacitance with high accuracy due to manufacturing variations, leading to potential errors and increased chip size from additional capacitor circuits required for compatibility with different sensor capacitors.

Method used

A semiconductor device with a capacitive sensor circuit that includes a reference capacitance circuit and correction capacitance circuits, allowing for variable capacitance addition and subtraction to accurately detect changes in capacitance, thereby correcting errors and maintaining chip size.

Benefits of technology

Enables high-accuracy capacitance detection while preventing chip size increases by using correction capacitance circuits to adjust for manufacturing variations and test operations.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

A semiconductor device according to the invention of the present application comprises: an electrode pad connected between an externally attached capacitor and a first node; a reference capacitance circuit for applying a reference electrostatic capacitance to a second node; a determining circuit for supplying a charging current to the electrode pad from a first relay terminal via the first node and supplying a charging current from a second relay terminal to the reference capacitance circuit via the second node, and then determining whether an electrostatic capacitance of the capacitor has changed, by comparing the magnitudes of potentials at the first and second relay terminals; a first adjustment capacitance circuit for applying to the first node an electrostatic capacitance equivalent to an adjustment amount indicated by a capacitance adjustment signal if an increase / decrease adjustment selection signal indicates an increasing adjustment; and a second adjustment capacitance circuit for applying to the second node an electrostatic capacitance equivalent to the adjustment amount indicated by the capacitance adjustment signal if the increase / decrease adjustment selection signal indicates a decreasing adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Semiconductor device and capacitive sensor device

[0001] The present invention relates to a semiconductor device and a capacitance sensor device including a capacitance sensor circuit that detects changes in the capacitance of a capacitor.

[0002] An IC tag has been proposed that has the function of detecting the history of changes in the environmental temperature to which an item is exposed during transportation or storage, and wirelessly transmitting the detected information (for example, Patent Document 1).

[0003] The IC tag has an externally attached sensor for detecting changes in environmental temperature: a capacitor (hereinafter referred to as the sensor capacitor) with a block of wax as a dielectric filled between its electrodes, to which an absorbing section has been added that absorbs the liquid wax when the block of wax liquefies. When the environmental temperature of the capacitor reaches a high enough temperature to reach the melting point of the wax, the wax filled between the electrodes of the sensor capacitor liquefies and is absorbed by the absorbing section. As a result, the area between the electrodes of the sensor capacitor is filled with air. At this time, because the dielectric constant of air is smaller than that of wax, the capacitance of the sensor capacitor decreases and the impedance increases.

[0004] Therefore, the IC tag is provided with a circuit that detects such a change in impedance as a change in the capacitance of the sensor capacitor, and wirelessly transmits data indicating the detection result.

[0005] The data wirelessly transmitted from the IC tag is received by a predetermined receiving device. The receiving device compares the received detection result, i.e., the impedance value of the sensor capacitor, with a predetermined threshold value to determine whether the wax has melted. If it is determined that the wax has melted, it is confirmed that the tag has been exposed to a high-temperature environment that exceeds the melting point of the wax.

[0006] In addition, a capacitance sensor device has been proposed in which, rather than using a predetermined threshold value, a capacitance circuit having a reference capacitance for comparison is provided within the semiconductor device, and the reference capacitance of this capacitance circuit is compared with the terminal potential when the sensor capacitor is charged and discharged, thereby making it possible to detect the capacitance of the sensor capacitor within the semiconductor device (see, for example, Patent Document 2).

[0007] In addition, in order to accommodate two types of sensor capacitors with different capacitances, the capacitance sensor device is provided with two systems of capacitance circuits that are set to reference capacitances corresponding to the respective capacitances.

[0008] JP 2007-333484 A JP 2021-71363 A

[0009] However, in the capacitance sensor device described in Patent Document 2, due to manufacturing variations and the like, errors may occur in the detection results of the capacitance of the sensor capacitor, which may result in a decrease in detection accuracy.

[0010] Furthermore, the capacitance sensor device described in Patent Document 2 is provided with two capacitance circuits set to different reference capacitances to accommodate two systems of sensor capacitors with different capacitance values, as well as a dedicated capacitance circuit for testing the capacitance circuits. This increases the proportion of the IC chip occupied by these capacitance circuits, resulting in an increase in chip size.

[0011] SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a semiconductor device and a capacitance sensor device that are capable of detecting the capacitance of a capacitor with high accuracy while suppressing an increase in chip size.

[0012] A semiconductor device according to the present invention includes: an electrode pad connected between a capacitor to be detected and a first node for externally connecting the capacitor; a reference capacitance circuit having a reference capacitance and adding the reference capacitance to a second node; a determination circuit including first and second relay terminals, supplying a charging current from the first relay terminal to the electrode pad via the first node and supplying a charging current from the second relay terminal to the reference capacitance circuit via the second node, and subsequently comparing the magnitude of the potentials of the first relay terminal and the second relay terminal to detect the capacitance of the capacitor and determine whether the capacitance of the capacitor has changed; a first correction capacitance circuit having a variable capacitance and adding a specified capacitance to the first node; and a second correction capacitance circuit having a variable capacitance and adding a specified capacitance to the second node.

[0013] The capacitance sensor device according to the present invention includes a sensor capacitor whose capacitance changes in response to environmental changes, a first node to which an electrode of the sensor capacitor is connected, a reference capacitance circuit having a reference capacitance and adding the reference capacitance to a second node, and first and second relay terminals, and supplies a charging current from the first relay terminal to the electrode pad via the first node, and also supplies a charging current from the second relay terminal to the reference capacitance circuit via the second node, and subsequently compares the magnitude of the potential of the first relay terminal and the second relay terminal to determine the capacitance of the sensor. The capacitance correction circuit includes: a determination circuit that determines whether the capacitance of the capacitor has changed; a first correction capacitance circuit that receives an increase / decrease correction selection signal that indicates whether to select an increase / decrease correction or a decrease correction, and a capacitance correction signal that indicates the amount of correction for the capacitance, and adds, to the first node, a capacitance equivalent to the amount of correction indicated by the capacitance correction signal when the increase / decrease correction selection signal indicates the increase correction; and a second correction capacitance circuit that receives the increase / decrease correction selection signal and the capacitance correction signal, and adds, to the second node, a capacitance equivalent to the amount of correction indicated by the capacitance correction signal when the increase / decrease correction selection signal indicates the decrease correction.

[0014] In the present invention, if an error occurs in the capacitance detection result of the capacitor to be detected, causing the capacitance to be smaller than the desired expected value (capacitance) due to manufacturing variations or the like, the first correction capacitance circuit can make a correction to increase the decrease in capacitance. Furthermore, even if an error occurs in the capacitance detection result that causes the capacitance to be larger than the expected value, the second correction capacitance circuit can make a correction to reduce the increase in capacitance. In this case, it is sufficient for the first and second correction capacitance circuits to provide only a capacitance sufficient to correct the capacitance detection error caused by manufacturing variations or the like. Furthermore, by using the correction capacitance circuits, it is possible to not only make the above-mentioned increase correction and decrease correction, but also test the operation of each.

[0015] Therefore, according to the present invention, it is possible to detect the capacitance of a capacitor with high accuracy while suppressing an increase in chip size.

[0016] 1 is a perspective view showing the appearance of a sensor tag 150 including a capacitance sensor device. FIG. 2 is a plan view of a device formed on the surface of a substrate 110, seen through a protective plate 120 of the sensor tag 150. FIG. 3 is a diagram showing a form when wireless communication is performed between the sensor tag 150 and a reader / writer 200. FIG. 4 is a block diagram showing the configuration of a circuit formed on an IC chip 100. FIG. 5 is a block diagram showing the configuration of a capacitance sensor circuit 15. FIG. 6 is a diagram showing the operation of a switching circuit SW. FIG. 7 is a circuit diagram showing the configuration of a determination circuit JC. FIG. 8 is a circuit diagram showing a control circuit 41, a trimming signal selection circuit 42, and a clock signal control circuit CLKC included in a calibration circuit CAL. FIG. 9 is a circuit diagram showing a trimming signal generation circuit 43 included in the calibration circuit CAL. FIG. 10 is a circuit diagram showing the internal configuration of a capacitance circuit CAP10. FIG. 11 is a circuit diagram showing a part of the internal configuration of a correction capacitance circuit TRM0 (TRM1). FIG. 12 is a circuit diagram showing another part of the internal configuration of the correction capacitance circuit TRM0 (TRM1). FIG. 13 is a time chart showing a calibration operation. FIG. 14 is a time chart showing the internal operation of a determination circuit JC. 1 is an equivalent circuit diagram of a circuit included between an electrode pad P2 and an input terminal CIN0M2 of a switching circuit SW. 2 is a diagram showing the contents of first to fourth correction modes and the states of various control signals for implementing each of the modes. 3 is a diagram showing the states of various control signals for implementing the setting of a decrease correction test and the setting of an increase correction test.

[0017] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail. In the following description of each embodiment and in the accompanying drawings, the same reference numerals are used to designate substantially the same or equivalent parts.

[0018] 1 is a perspective view showing the appearance of a sensor tag 150 including a capacitance sensor device according to the present invention. The sensor tag 150 is, for example, a passive RFID (Radio Frequency Identification) IC tag that has the function of detecting whether or not it has been exposed to an environmental temperature higher than a predetermined temperature and wirelessly transmitting that information.

[0019] The sensor tag 150 includes a substrate 110 having a plurality of devices, which will be described below, formed on one surface thereof, and a protective plate 120 attached to one surface of the substrate 110 so as to cover the plurality of devices. The substrate 110 and the protective plate 120 are flexible substrates made of, for example, PET (polyethylene terephthalate) or the like.

[0020] FIG. 2 is a plan view of the device formed on the surface of the substrate 110 as viewed from the direction of the white arrow shown in FIG. 1 through the protection plate 120 of the sensor tag 150. In FIG.

[0021] As shown in FIG. 2, devices such as an IC (Integrated Circuit) chip 100, an antenna 20, and a sensor capacitor 50 are formed on one surface of a substrate 110.

[0022] The antenna 20 is made of, for example, a conductive wiring material, and is connected to an electrode pad of an IC chip 100 serving as a semiconductor device.

[0023] The sensor capacitor 50 has a structure in which its own capacitance changes irreversibly depending on the ambient temperature, and functions as a temperature sensor that detects changes in the ambient temperature based on the change in capacitance.

[0024] For example, as shown in FIG. 2 , the sensor capacitor 50 includes comb-shaped electrodes W1 and W2 arranged along one surface of the substrate 110, and wax WX filling the spaces between the teeth of the electrodes W1 and W2. The electrodes W1 and W are arranged in a comb-shaped planar pattern, with the teeth of each electrode arranged alternately and facing each other. The wax WX serves as the capacitor's dielectric. The wax WX remains solid when the ambient temperature is below a predetermined melting point and liquefies when the ambient temperature exceeds the melting point. Therefore, when the sensor capacitor 50 is exposed to an ambient temperature higher than the melting point, the wax WX, acting as a dielectric, liquefies and flows out from between the electrodes W1 and W2, reducing the capacitance of the sensor capacitor 50.

[0025] As a result, the sensor capacitor 50 as a temperature sensor has a predetermined first capacitance when the environmental temperature is below a predetermined temperature (the melting point of the wax), and changes to a second capacitance lower than the first capacitance when the environmental temperature rises above the predetermined temperature. Note that even if the environmental temperature subsequently returns to below the melting point of the wax WX, the wax WX that has flowed out does not return, so the sensor capacitor 50 maintains the second capacitance state described above.

[0026] One end of each of the electrodes W1 and W2 of the sensor capacitor 50 is connected to an electrode pad (described later) serving as an external terminal of the IC chip 100.

[0027] The IC chip 100 included in the sensor tag 150 is formed with a circuit that detects the capacitance of the sensor capacitor 50 and wirelessly transmits various information based on this capacitance and an identification ID to the reader / writer 200 as shown in Fig. 3. The various information based on the capacitance of the sensor capacitor 50 includes information indicating whether the IC chip 100 has been exposed to an environmental temperature higher than a predetermined temperature, information indicating the capacitance, etc.

[0028] FIG. 4 is a block diagram showing the configuration of the circuit formed on the IC chip 100. As shown in FIG.

[0029] As shown in FIG. 4, the IC chip 100 includes a rectifier circuit 11, a power supply circuit 12, a transmitter / receiver circuit 13, a controller 14, a nonvolatile memory 16, and a capacitance sensor circuit 15 formed thereon.

[0030] An antenna 20 is connected to the rectifier circuit 11 via an electrode pad PX. The antenna 20 receives a high-frequency signal representing received information (including a command code) obtained by receiving radio waves from the reader / writer 200, and a high-frequency current for wireless power supply via the electrode pad PX, and supplies these to the rectifier circuit 11.

[0031] The rectifier circuit 11 rectifies the high-frequency current to obtain a DC voltage, which is supplied to the power supply circuit 12. The rectifier circuit 11 also rectifies and detects the high-frequency signal to obtain a signal, which is supplied as a received signal to the transmitter / receiver circuit 13. The rectifier circuit 11 also supplies the modulated signal supplied from the transmitter / receiver circuit 13 to the antenna 20.

[0032] The power supply circuit 12 generates a constant power supply voltage VD based on the DC voltage supplied from the rectifier circuit 11, and supplies this voltage to the transmitter / receiver circuit 13, controller 14, memory 16, and capacitance sensor circuit 15. By receiving this power supply voltage VD, the transmitter / receiver circuit 13, controller 14, memory 16, and capacitance sensor circuit 15 each perform the following operations. Note that the memory 16 stores an identification ID of this IC chip 100 and correction data for correcting capacitance detection errors of the capacitance sensor circuit 15 resulting from manufacturing variations of the IC chip 100.

[0033] The transmitting / receiving circuit 13 obtains a command code by demodulating the received signal supplied from the rectifying circuit 11, and supplies the command code to the controller 14. The transmitting / receiving circuit 13 also supplies to the rectifying circuit 11 a modulated signal obtained by modulating a carrier signal corresponding to, for example, the UHF band, HF (High Frequency) band, or LF (Low Frequency) band used in short-range wireless communication with transmission information supplied from the controller 14.

[0034] The controller 14 first reads out the identification ID and the correction data from the memory 16 and takes them in.

[0035] Next, based on the correction data, the controller 14 supplies the capacitance sensor circuit 15 with various instruction signals (described later) for increasing or decreasing the capacitance detection error of the capacitance sensor circuit 15. Thereafter, the controller 14 supplies the capacitance sensor circuit 15 with various control signals for detecting the capacitance of the sensor capacitor 50.

[0036] The capacitance sensor circuit 15 compares the capacitance of the sensor capacitor 50 with the reference capacitance in response to the various control signals. Based on the comparison result, the capacitance sensor circuit 15 determines whether the capacitance of the sensor capacitor 50 has changed from a first capacitance to a second capacitance that is lower than the first capacitance. The capacitance sensor circuit 15 supplies the determination result to the controller 14.

[0037] Based on the determination result, the controller 14 generates temperature change information indicating whether the sensor tag 150 has been exposed to an environmental temperature higher than a predetermined temperature, and supplies information including the temperature change information and its own identification ID to the transmission / reception circuit 13 as the above-mentioned transmission information.

[0038] As a result, the sensor tag 150 wirelessly transmits temperature change information indicating whether or not the sensor tag 150 has been exposed to an environmental temperature higher than a predetermined temperature, and an identification ID, to the reader / writer 200 as shown in FIG.

[0039] The configuration of the capacitance sensor circuit 15 will be described in detail below.

[0040] 4, the capacitance sensor circuit 15 is connected to electrode pads P0 to P2 as external terminals of the IC chip 100. The electrode pads P0 to P2 are so-called bonding pads, and all have parasitic capacitances of the same capacitance value.

[0041] The electrode pad P0 is an electrode pad for externally connecting the electrode W1 of the electrodes W1 and W2 of the sensor capacitor 50. The electrode pad P2 is an electrode pad for externally connecting the electrode W2 of the sensor capacitor 50.

[0042] FIG. 5 is a block diagram showing the configuration of the capacitance sensor circuit 15.

[0043] The capacitance sensor circuit 15 includes diodes D0 to D3, resistors R0 and R1, a calibration circuit CAL, a determination circuit JC, a switching circuit SW, an additional capacitor CX, a capacitance circuit CAP10, and correction capacitance circuits TRM0 and TRM1.

[0044] The electrode pad P0 is connected to the anode of a diode D0, the cathode of a diode D1, and one end of a resistor R0. A power supply voltage is applied to the cathode of the diode D0, and the anode of the diode D1 is grounded. The other end of the resistor R0 is connected via a node n0 to an input terminal CIN0P of the switching circuit SW and one end of an additional capacitor CX, and the other end of the additional capacitor CX is connected via a node n20 to an input terminal CIN0M2 of the switching circuit SW.

[0045] The electrode pad P1 is connected to the anode of the diode D2, the cathode of the diode D3, one end of the resistor R1, and the capacitance connection terminal CIN of the capacitance circuit CAP10 via a node n40. A power supply voltage is applied to the cathode of the diode D2, and the anode of the diode D3 is grounded. The other end of the resistor R1 is connected to the input terminal CIN1P of the switching circuit SW via a node n1.

[0046] The electrode pad P2 is grounded.

[0047] The additional capacitor CX may be a capacitor of any structure, such as a MIM (Metal-Insulator-Metal) capacitor, a MOM (Metal Oxide Metal) capacitor, or a MOS (Metal Oxide Semiconductor) capacitor. The diodes D0 to D3 have the same parasitic capacitances at their cathodes and anodes. The resistors R0 and R1 have the same resistance values.

[0048] The above-mentioned diodes D0 to D3 and resistors R0 and R1 constitute an electrostatic breakdown protection circuit that protects the internal circuits (SW, JC, CAL, CAP10, TRM0 and TRM1) from electrostatic discharge that enters from outside the IC chip 100 via the electrode pads P0 and P1.

[0049] Furthermore, the resistances R0 and R1 and the parasitic capacitances of the nodes n0, n1, n20, and n40 act as filters, so the IC chip 100 has high resistance to noise that enters from outside the IC chip 100 via the electrode pads P0 and P1.

[0050] The switching circuit SW has input terminals CIN0M2, CIN0P, and CIN1P, and relay terminals CIN0 and CIN1. The switching circuit SW receives a switching signal OPT2 from the controller 14 that indicates, in two values ​​(for example, ground potential and power supply potential), whether the capacitance of the sensor capacitor 50 is large, that is, greater than a predetermined value, or small, that is, equal to or less than a predetermined value.

[0051] Hereinafter, the higher potential of the two values ​​will be referred to as the H level, and the lower potential will be referred to as the L level.

[0052] The switching circuit SW connects one of the input terminals CIN0M2 and CIN0P to the relay terminal CIN0 based on the switching signal OPT2.

[0053] FIG. 6 is a diagram showing the operation of the switching circuit SW.

[0054] As shown in Figure 6, when the switching signal OPT2 is at L level, the switching circuit SW connects the input terminal CIN0P to the relay terminal CIN0. At this time, the input terminal CIN0M2 is in a high impedance state (HiZ). On the other hand, when the switching signal OPT2 is at H level, the switching circuit SW connects the input terminal CIN0M2 to the relay terminal CIN0. At this time, the input terminal CIN0P is in a high impedance state (HiZ). Note that the input terminal CIN1P is always connected to the relay terminal CIN1.

[0055] The relay terminal CIN0 of the switching circuit SW is connected to the relay terminal CIN0 of the judgment circuit JC and the capacitance connection terminal CIN of the correction capacitance circuit TRM0 via a node n50. The relay terminal CIN1 of the switching circuit SW is connected to the relay terminal CIN1 of the judgment circuit JC and the capacitance connection terminal CIN of the correction capacitance circuit TRM1 via a node n60.

[0056] In other words, when the switching signal OPT2 is at an H level indicating that the capacitance of the sensor capacitor 50 is large, the switching circuit SW switches from a state in which node n50 is connected to electrode pad P0 via node n0 and resistor R0 to a state in which node n50 is connected to electrode pad P0 via additional capacitor CX and resistor R0.

[0057] The determination circuit JC charges and discharges the sensor capacitor 50 via the node n50, the switching circuit SW, the node n0 (or the additional capacitor CX), the resistor R0, and the electrode pad P0. The determination circuit JC also charges and discharges the capacitance circuit CAP10 via the relay terminal CIN1, the node n60, the switching circuit SW, the node n1, and the resistor R1.

[0058] The determination circuit JC then compares the magnitude of the potential of the relay terminal CIN0, which is generated by charging and discharging the sensor capacitor 50, with the magnitude of the potential of the relay terminal CIN1, which is generated by charging and discharging the capacitance circuit CAP10. Based on the result of this comparison, the determination circuit JC determines whether the capacitance of the sensor capacitor 50 has changed from the first capacitance to the second capacitance, and supplies a detection signal COUT indicating the determination result to the calibration circuit CAL and the controller 14. The determination circuit JC further determines whether the difference between the potential of the relay terminal CIN0 and the potential of the relay terminal CIN1 is smaller than a predetermined value, i.e., whether the two are substantially the same, and supplies a flag signal COUT2 indicating the determination result to the controller 14.

[0059] Furthermore, the judgment circuit JC executes its own leak test in response to the leak test signal ILT supplied from the controller 14 and the clock signal CLKIN supplied from the calibration circuit CAL.

[0060] FIG. 7 is a circuit diagram showing the configuration of the determination circuit JC.

[0061] As shown in FIG. 7, the judgment circuit JC has a leak test reception unit 30, a control unit 31, a bias signal generation unit 32, a first current supply unit 33, a second current supply unit 34, a differential amplifier unit 35, a timing generation circuit 36, an inverter unit 37, and a data latch unit 38.

[0062] The leak test reception unit 30 is composed of an inverter INV4 and an inverter INV5. The output terminal of the inverter INV4 is connected to the input terminal of the inverter INV5.

[0063] The inverter INV4 receives the leak test signal ILT at its input terminal, inverts the level of the signal, and supplies the inverted signal ILTB to the current supply units 33 and 34, and also supplies this signal to the inverter INV5. The inverter INV5 inverts the level of the inverted signal IILTB and supplies it to the bias signal generation unit 32 as a control signal IILT.

[0064] The control unit 31 is made up of NAND0, NAND1, NAND2 and an inverter INV0.

[0065] NAND0, NAND1, and NAND2 are two-input NAND gate circuits that output a NAND. NAND0 receives the clock signal CLKIN at one input terminal. NAND1 and NAND2 form a flip-flop circuit. NAND1 receives the clock signal CLKIN at one input terminal. The output terminal of NAND1 is connected to the other input terminal of NAND0. One input terminal of NAND2 is connected to the output terminal of NAND1 and the other input terminal of NAND0 via node n9. The output terminal of NAND2 is connected to the other input terminal of NAND1 via node n10. NAND0 maintains an L level while the output of NAND1 is at an H level, and while the output of NAND1 is at an L level, it outputs a signal obtained by inverting the level of the clock signal CLKIN to node n2 as the clock signal CLK. The input terminal of the inverter INV0 is connected to the output terminal of NAND0 via the node n2. The inverter INV0 inverts the level of the output signal of NAND0 input to its input terminal and supplies the inverted signal to the bias signal generating unit 32 as an inverted clock signal.

[0066] The bias signal generating unit 32 includes a transistor PM6, a transistor NM9, a transistor NM10, and a transistor NM13.

[0067] The transistor PM6 is composed of a P-channel MOSFET (Metal Oxide Semiconductor Field Effect Transistor). The source of the transistor PM6 is connected to the power supply, and the drain is connected to node n3. The gate of the transistor PM6 receives the control signal IILT. The transistors NM9, NM10, and NM13 are composed of N-channel MOSFETs, which are second conductivity type transistors. The gate of the transistor NM9 receives the inverted clock signal output by the inverter INV0. The drain of the transistor MN9 is connected to node n3, and its source is connected to the drain of the transistor MN10. The source of the transistor NM10 is grounded, and its gate is connected to node n3. The transistor NM13 is composed of an N-channel MOSFET. The source of the transistor NM13 is grounded, and its drain is connected to node n3. The gate of the transistor NM13 receives the control signal IILT.

[0068] The current supply unit 33 includes transistors PM2, NM2, and NM11.

[0069] The transistor PM2 is composed of a P-channel MOSFET, which is a transistor of a first conductivity type. The source of the transistor PM2 is connected to a power supply, and the gate is connected to node n2. The drain of the transistor PM2 is connected to relay terminal CIN0. The transistors NM2 and NM11 are composed of N-channel MOSFETs, which are transistors of a second conductivity type. The gate of the transistor NM2 is connected to node n2, and the drain is connected to relay terminal CIN0. The source of the transistor NM2 is connected to the drain of the transistor NM11. The source of the transistor NM11 is grounded, and the inverted signal IILTB is received at its gate.

[0070] The current supply unit 34 includes transistors PM3, NM3, and NM12.

[0071] The transistor PM3 is composed of a P-channel MOSFET, which is a transistor of a first conductivity type. The source of the transistor PM3 is connected to a power supply, and the gate is connected to node n2. The drain of the transistor PM3 is connected to relay terminal CIN1. The transistors NM3 and NM12 are composed of N-channel MOSFETs, which are transistors of a second conductivity type. The gate of the transistor NM3 is connected to node n2, and the drain is connected to relay terminal CIN1. The source of the transistor NM3 is connected to the drain of the transistor NM12. The source of the transistor NM12 is grounded, and its gate receives the inverted signal IILTB.

[0072] The differential amplifier unit 35 is a differential amplifier circuit that amplifies and outputs the potential difference between the relay terminals CIN0 and CIN1. The differential amplifier unit 35 includes transistors PM0, PM1, NM0, NM1, and NM8.

[0073] The transistors PM0 and PM1 are composed of P-channel MOSFETs, which are transistors of a first conductivity type. The sources of the transistors PM0 and PM1 are connected to a power supply, and the gates are connected to each other and commonly grounded. The drain of the transistor PM0 is connected to the node n4 and the drain of the transistor NM0. The drain of the transistor PM1 is connected to the node n5 and the drain of the transistor NM1.

[0074] The transistors NM0, NM1, and NM8 are configured by N-channel MOSFETs, which are transistors of the second conductivity type. The gate of the transistor NM0 is connected to the drain of the transistor PM2 and the drain of the transistor NM2, and is also connected to the relay terminal CIN0. The gate of the transistor NM1 is connected to the drain of the transistor PM3 and the drain of the transistor NM3, and is also connected to the relay terminal CIN1.

[0075] The source of transistor NM8 is grounded, and the drain is connected to the sources of transistors NM0 and NM1. The gate of transistor NM8 is connected to node n3, and is connected to the gate of transistor NM10, the drain of transistor PM6, and the drain of transistor NM9 via node n3. Transistor NM8 functions as a constant current source circuit. The constant current (tail current) output by transistor NM8 as a constant current source circuit is controlled by a bias signal from bias signal generating unit 32 (i.e., the potential of node n3).

[0076] The timing generation circuit 36 ​​includes NOR0, NOR1, NOR2, NAND3, an inverter INV1, an inverter INV2, and an inverter INV3.

[0077] The input terminal of the inverter INV1 is connected to the node n7. The inverter INV1 inverts the level of the signal at the node n7 and supplies an inverted signal to the NOR1. The input terminal of the inverter INV2 is connected to the node n6. The inverter INV2 inverts the level of the signal at the node n6 and supplies an inverted signal to the NOR2.

[0078] NOR1 and NOR2 are two-input NOR gate circuits that output a NOR. One of the input terminals of NOR1 is connected to a node n6 in common with the input terminal of the inverter INV2. The other input terminal of NOR1 is connected to the output terminal of the inverter INV1. NOR1 supplies to NOR0 a signal that is the NOR of the signal at node n6 and the inverted signal output from the inverter INV1.

[0079] One of the input terminals of NOR2 is connected to a node n7 in common with the input terminal of the inverter INV1. The other input terminal of NOR2 is connected to the output terminal of the inverter INV2. NOR2 supplies to NOR0 a signal that is the NOR of the signal on node n7 and the inverted signal output from the inverter INV2.

[0080] NAND3 is a two-input NAND gate circuit that outputs a negative logical product. One of the input terminals of NAND3 is connected to node n6. The other input terminal of NAND3 is connected to node n7. NAND3 supplies a signal representing the negative logical product of the signal on node n6 and the signal on node n7 to inverter INV3, and also supplies this signal to the data latch unit 38 via node n12.

[0081] The inverter INV3 inverts the level of the signal output from NAND3 and supplies the inverted signal to NOR0 via the node n11.

[0082] NOR0 is a three-input NOR gate circuit that outputs a NOR. NOR0 supplies a signal representing the result of the NOR of the signals output from NOR1, NOR2, and inverter INV3 to NAND2 of the control unit 31 via node n8.

[0083] The inverter unit 37 is a circuit unit that inverts and outputs the output signal from the differential amplifier unit 35. The inverter unit 37 includes transistors PM4, PM5, NM4, NM5, NM6, and NM7.

[0084] The transistors PM4 and PM5 are configured as P-channel MOSFETs, which are transistors of a first conductivity type, and the transistors NM4 to NM7 are configured as N-channel MOSFETs, which are transistors of a second conductivity type.

[0085] The source of the transistor PM4 is connected to the power supply, and the gate is connected to the node n4. The gate of the transistor NM4 is connected to the power supply, and the drain is connected to the node n6 in common with the drain of the transistor PM4. The transistor NM5 is composed of an N-channel MOSFET, which is a second conductivity type transistor. The source of the transistor NM5 is grounded, the drain is connected to the source of the transistor NM4, and the gate is connected to the node n4.

[0086] The source of the transistor PM5 is connected to the power supply and the gate is connected to the node n5. The gate of the transistor NM6 is connected to the power supply and the drain is connected to the node n7 in common with the drain of the transistor PM5. The source of the transistor NM7 is grounded, the drain is connected to the source of the transistor NM6, and the gate is connected to the node n5.

[0087] Due to the above-described configurations of the differential amplifier section 35 and the inverter section 37, a signal indicating whether the potential of the relay terminal CIN1 is higher than the potential of the relay terminal CIN0 is output to the node n6. Also, a signal indicating whether the potential of the relay terminal CIN0 is higher than the potential of the relay terminal CIN1 is output to the node n7.

[0088] The above-mentioned transistors PM0 and PM1 are formed to have the same dimensions (gate length, gate width, etc.). Similarly, the transistors PM2 and PM3, PM4 and PM5, NM0 and NM1, NM2 and NM3, NM4 and NM6, and NM5 and NM7 are each formed to have the same dimensions.

[0089] The data latch section 38 is composed of a first latch circuit LT1 and a second latch circuit LT2.

[0090] A clock signal CLK is supplied to the clock terminals of the latch circuits LT1 and LT2 via a node n2. A signal input terminal of the latch circuit LT1 is connected to a node n7, and a signal input terminal of the latch circuit LT2 is connected to a node n12.

[0091] The latch circuit LT1 captures the signal at the node n7 while the clock signal CLK is at the L level.

[0092] When the clock signal CLK transitions from L level to H level, the latch circuit LT1 outputs a signal obtained by inverting the signal level of the node n7 captured immediately before that as the detection signal COUT indicating whether the capacitance of the sensor capacitor 50 has changed from a first capacitance to a second capacitance lower than the first capacitance. Thereafter, the latch circuit LT1 holds the captured signal level and outputs it as the detection signal COUT until the clock signal CLK transitions again from L level to H level.

[0093] The latch circuit LT2 captures the signal at the node n12 while the clock signal CLK is at the L level. When the clock signal CLK transitions from the L level to the H level, the latch circuit LT2 outputs a signal obtained by inverting the signal level of the node n12 captured immediately before that as the flag signal COUT2 indicating whether the potentials of the relay terminals CIN0 and CIN1 are substantially the same.

[0094] The calibration circuit CAL receives a calibration enable signal CALEN, a sensor enable signal CSREN, a clock signal CLK, and a first trimming signal TC<n:0> (n is an integer of 2 or more) from the controller 14 .

[0095] The calibration enable signal CALEN is a binary signal for switching between a normal mode in which the judgment circuit JC performs a normal operation and a calibration mode in which the judgment circuit JC performs a calibration operation. The calibration enable signal CALEN is, for example, at H level when representing the calibration mode and at L level when representing the normal mode.

[0096] The sensor enable signal CSREN is a signal for switching the capacitance sensor circuit 15 between an active state (a normal mode state in which normal operation is performed) and an inactive state (a non-active mode state). For example, when the sensor enable signal CSREN is at an L level, it indicates the non-active mode, and when it is at an H level, it indicates the normal mode.

[0097] The first trimming signal TC<n:0> is an (n+1)-bit data signal for specifying the capacitance to be set in the capacitance circuit CAP10 (i.e., the capacitance including the parasitic capacitance outside the IC chip 100 that is added to the sensor capacitor 50). In this case, by specifying the capacitance of the capacitance circuit CAP10 using the first trimming signal TC<n:0>, the parasitic capacitance generated outside the IC chip 100 can be canceled.

[0098] Furthermore, the calibration circuit CAL receives the detection signal COUT output from the judgment circuit JC.

[0099] The calibration circuit CAL generates a control signal ICAL, a second trimming signal TCO<n:0>, a trimming signal ITC<n:0>, and a clock signal CLKIN in response to CALEN, CSREN, CLK, TC<n:0>, and COUT.

[0100] The operation of the calibration circuit CAL will be described in detail below.

[0101] 8 and 9 are circuit diagrams showing the configuration of the calibration circuit CAL.

[0102] The calibration circuit CAL includes a control circuit 41, a trimming signal selection circuit 42, a clock signal control circuit CLKC shown in FIG. 8, and a trimming signal generation circuit 43 shown in FIG.

[0103] The control circuit 41 is composed of an inverter INV40 and an inverter INV41.

[0104] The output terminal of the inverter INV40 is connected to the input terminal of the inverter INV41. A calibration enable signal CALEN is supplied to the input terminal of the inverter INV40. The inverter INV40 inverts the signal level of the binary calibration enable signal CALEN and outputs it as the inverted control signal ICALB. The inverter INV41 inverts the signal level of the inverted control signal ICALB and outputs it as the control signal ICAL.

[0105] The control circuit 41 supplies a control signal ICAL to the trimming signal selection circuit 42 and the trimming signal generation circuit 43 as well as to the capacitance circuit CAP10.

[0106] The trimming signal selection circuit 42 is made up of n+1 signal selection sections 42-0 to 42-n.

[0107] The signal selection units 42-0 to 42-n receive first selection signals TC<0> to TC<n> and second selection signals TCO<0> to TCO<n>.

[0108] The first selection signals TC<0> to TC<n> are signals that form the respective digits of the first trimming signal TC<n:0> sent from the controller 14, and each has a binary signal level, i.e., a predetermined L level or H level. The second selection signals TCO<0> to TCO<n> are signals that form the respective digits of the second trimming signal TCO<n:0>, and each has a binary signal level (L level or H level). The second selection signals TCO<0> to TCO<n> are generated by a trimming signal generation circuit 43 (described later).

[0109] The signal selection unit 42-0 includes transistors PM40-0, NM40-0, PM50-0, and NM50-0. A control signal ICAL output from the control circuit 41 is supplied to the gate of the transistor PM40-0. The source of the transistor PM40-0 and the drain of the transistor NM40-0 are connected to each other and are supplied with a first selection signal TC<0>. The drain of the transistor PM40-0 and the source of the transistor NM40-0 are connected to each other.

[0110] The gate of transistor NM40-0 and the gate of transistor PM50-0 are connected to each other and are supplied with the inverted control signal ICALB. The source of transistor PM50-0 and the drain of transistor NM50-0 are connected to each other and are supplied with the second select signal TCO<0>. The gate of transistor NM50-0 is supplied with the control signal ICAL output from the control circuit 41. The drain of transistor PM50-0 and the source of transistor NM50-0 are connected to each other.

[0111] The connection between the drain of the transistor PM40-0 and the source of the transistor NM40-0 and the connection between the drain of the transistor PM50-0 and the source of the transistor NM50-0 are connected to each other, and the signal selection section 42-0 outputs the selection signal ITC<0> from this connection end.

[0112] The signal selection units 42-1 to 42-n also have a similar configuration. For example, the signal selection unit 40-n includes transistors PM40-n, NM40-n, PM50-n, and NM50-n. A control signal ICAL output from the control circuit 41 is supplied to the gate of the transistor PM40-n. The source of the transistor PM40-n and the drain of the transistor NM40-n are connected to each other and are supplied with a first selection signal TC<n>. The drain of the transistor PM40-n and the source of the transistor NM40-n are connected to each other.

[0113] The gate of transistor NM40-n and the gate of transistor PM50-n are connected to each other and are supplied with the inverted control signal ICALB. The source of transistor PM50-n and the drain of transistor NM50-n are connected to each other and are supplied with the second select signal TCO<n>. The gate of transistor NM50-n is supplied with the control signal ICAL output from the control circuit 41. The drain of transistor PM50-n and the source of transistor NM50-n are connected to each other.

[0114] The connection point between the drain of the transistor PM40-n and the source of the transistor NM40-n is connected to the connection point between the drain of the transistor PM50-n and the source of the transistor NM50-n, and the signal selection unit 42-n outputs the selection signal ITC<n> from this connection end.

[0115] With the above-described configuration, the control circuit 41 and the trimming signal selection circuit 42 select one of the first trimming signal TC<n:0> and the second trimming signal TCO<n:0> based on the calibration enable signal CALEN.

[0116] That is, when the calibration enable signal CALEN is at L level, the control circuit 41 and the trimming signal selection circuit 42 select the first trimming signal TC<n:0>, whereas when the calibration enable signal CALEN is at L level, the control circuit 41 and the trimming signal selection circuit 42 select the second trimming signal TCO<n:0>.

[0117] Then, the control circuit 41 and the trimming signal selection circuit 42 select one of TCO<n:0> and TC<n:0> and supply it to the capacitance circuit CAP10 as a trimming signal ITC<n:0>.

[0118] The clock signal control circuit CLKC receives a clock signal CLK and a sensor enable signal CSREN, each of which has two values ​​(H level and L level), sent from the controller 14 .

[0119] The clock signal control circuit CLKC generates a binary output clock signal ICLK and an inverted clock signal ICLKB obtained by inverting the signal level of the output clock signal ICLK in response to the clock signal CLK and the sensor enable signal CSREN. That is, when the signal level of the sensor enable signal CSREN is L level, the clock signal control circuit CLKC generates an output clock signal ICLK that is fixed at L level. On the other hand, when the signal level of the sensor enable signal CSREN is H level, the clock signal control circuit CLKC generates an output clock signal ICLK that is in phase with the clock signal CLK.

[0120] The clock signal control circuit CLKC supplies the generated output clock signal ICLK to the determination circuit JC as the clock signal CLKIN, and also supplies the inverted clock signal ICLKB to the trimming signal generation circuit 43 .

[0121] 9, the trimming signal generation circuit 43 includes latch circuits LT3, LT4, LT10-0 to LT10-n, and LT20-0 to LT20-n. The trimming signal generation circuit 43 also includes an inverter INV42, inverters INV50-0 to INV50-(n+1), and inverters INV60-0 to INV60-n. The trimming signal generation circuit 43 also includes a NAND40 and NANDs 50-0 to 50-n.

[0122] The signal input terminal Q of the latch circuit LT3 is connected to a power supply. An inverted clock signal ICLKB is supplied to the clock terminal of the latch circuit LT3. A control signal ICAL is supplied to the input terminal RN of the latch circuit LT3. The output terminal QN of the latch circuit LT3 is connected to the input terminal of the inverter INV42 via a node n30. The output terminal of the inverter INV42 is connected to the signal input terminal Q of the latch circuit LT4 via a node n31.

[0123] The latch circuit LT4 has a clock terminal supplied with an inverted clock signal ICLKB, an input terminal RN supplied with a control signal ICAL, and an output terminal QN of the latch circuit LT3 connected to one input terminal of the NAND gate 40 via a node n32.

[0124] The other input terminal of NAND40 is connected to the output terminal of inverter INV42. The output terminal of NAND40 is connected to the input terminal of inverter INV50-(n+1). NAND40 supplies an output signal INTB<n+1> to the input terminal of inverter INV50-(n+1). Inverter INV50-(n+1) inverts the output signal INTB<n+1> from NAND40 and supplies the output signal INT<n+1> to latch circuit LT10-n.

[0125] An inverted clock signal ICLKB is supplied to the clock terminal of the latch circuit LT10-n. A control signal ICAL is supplied to the input terminal RN of the latch circuit LT10-n. A signal input terminal Q of the latch circuit LT10-n is connected to the output terminal of the inverter INV50-(n+1). The latch circuit LT10-n outputs an output signal INTB<n> from the output terminal QN. The output terminal QN of the latch circuit LT10-n is connected to the input terminal of the inverter INV50-n, as well as to the clock terminal of the latch circuit LT20-n and one of the input terminals of NAND50-n.

[0126] The inverter INV50-n outputs an output signal INT<n> obtained by inverting the output signal INTB<n> from the output terminal QN of the latch circuit LT10-n. The output terminal of the inverter INV50-n is connected to the signal input terminal of the latch circuit LT10-(n-1).

[0127] An inverted clock signal ICLKB is supplied to the clock terminal of the latch circuit LT10-(n-1). A control signal ICAL is supplied to the input terminal RN of the latch circuit LT10-(n-1). A signal input terminal Q of the latch circuit LT10-(n-1) is connected to the output terminal of the inverter INV50-n. The latch circuit LT10-n outputs an output signal INTB<n-1> from the output terminal QN. The output terminal QN of the latch circuit LT10-n is connected to the input terminal of the inverter INV50-(n-1), as well as to the clock terminal of the latch circuit LT20-(n-1) and one of the input terminals of the NAND50-(n-1).

[0128] The inverter INV50-(n-1) outputs an output signal INT<n-1> obtained by inverting the output signal INTB<n-1> from the output terminal QN of the latch circuit LT10-(n-1).

[0129] Similarly, the inverted clock signal ICLKB is supplied to the clock terminal of each of the following latch circuits LT10-k (k=(n-2) to 1). A control signal ICAL is supplied to the input terminal RN of the latch circuit LT10-k. The signal input terminal Q of the latch circuit LT10-k is connected to the output terminal of the inverter INV50-(k+1). The output terminal QN of the latch circuit LT10-k is connected to the input terminal of the inverter INV50-k, as well as to the clock terminal of the latch circuit LT20-k and one of the input terminals of NAND50-k.

[0130] An inverted clock signal ICLKB is supplied to the clock terminal of the latch circuit LT10-0. A control signal ICAL is supplied to the input terminal RN of the latch circuit LT10-0. An output signal INT<1> of the inverter INV50-n is supplied to the signal input terminal Q of the latch circuit LT10-0. The latch circuit LT10-0 outputs an output signal INTB<0> from the output terminal QN. The output terminal QN of the latch circuit LT10-0 is connected to the input terminal of the inverter INV50-0, as well as to the clock terminal of the latch circuit LT20-0 and one of the input terminals of NAND50-0.

[0131] The input terminal of each of the inverters INV60-0 to INV60-n is supplied with the detection signal COUT output from the judgment circuit JC. The inverters INV60-0 to INV60-n output a signal obtained by inverting the level of the detection signal COUT from their output terminals and supply the signal to the signal input terminal Q of each of the latch circuits LT20-0 to LT20-n.

[0132] The clock terminal of the latch circuit LT20-n is supplied with an output signal from the output terminal QN of the latch circuit LT10-n. The input terminal RN of the latch circuit LT20-n is supplied with a sensor enable signal CSREN. The signal input terminal Q of the latch circuit LT20-n is connected to the output terminal of the inverter INV60-n. The output terminal QN of the latch circuit LT20-n is connected to the other input terminal of the NAND50-n.

[0133] The clock terminal of the latch circuit LT20-(n-1) is supplied with an output signal from the output terminal QN of the latch circuit LT10-(n-1). The input terminal RN of the latch circuit LT20-(n-1) is supplied with a sensor enable signal CSREN. The signal input terminal Q of the latch circuit LT20-(n-1) is connected to the output terminal of the inverter INV60-(n-1). The output terminal QN of the latch circuit LT20-(n-1) is connected to the other input terminal of the NAND50-(n-1).

[0134] Similarly, the output signal from the output terminal QN of the latch circuit LT10-k is supplied to the clock terminal of the latch circuit LT20-k (k is an integer from (n-2) to 0). The sensor enable signal CSREN is supplied to the input terminal RN of the latch circuit LT20-k. The signal input terminal Q of the latch circuit LT20-k is connected to the output terminal of the inverter INV60-k. The output terminal QN of the latch circuit LT20-k is connected to the other input terminal of the NAND50-k.

[0135] In latch circuits LT3, LT4, LT10-0 to LT10-n, and LT20-0 to LT20-n, when the signal level of the signal input to input terminal RN is L level, the output signal from output terminal QN is fixed at H level. On the other hand, when the signal level of the signal input to input terminal RN is H level, a signal that is an inverted signal of the signal input to signal input terminal Q at the rising edge of the clock terminal is output from output terminal QN.

[0136] The NANDs 50-0 to 50-n generate the second selection signals TCO<0> to TC<n> by performing a NAND operation on the output signals from the latch circuits LT10-0 to LT10-n and the output signals from the latch circuits LT20-0 to LT20-n. As a result, the second trimming signals TCO<n:0> are generated by the calibration circuit CAL and supplied to the trimming signal selection circuit 42 and the controller 14.

[0137] The second trimming signal TCO<n:0> is temporarily stored in the memory 16 by the controller 14. Thereafter, every time the power is turned on, the controller 14 reads out the second trimming signal TCO<n:0> from the memory 16 and supplies it to the calibration circuit CAL as the first trimming signal TC<n:0>.

[0138] Next, the configuration of the capacitance circuit CAP10 will be described.

[0139] The capacitance circuit CAP10 is a so-called variable capacitor circuit that includes a plurality of capacitors and is capable of selectively switching the capacitance value of the capacitance of the entire circuit.

[0140] The capacitance circuit CAP10 receives a 7-bit margin trimming signal TM<6:0> and a switching signal OPT2 from the controller 14. Furthermore, the capacitance circuit CAP10 receives a control signal ICAL and a trimming signal ITC<n:0> from the calibration circuit CAL.

[0141] FIG. 10 is a circuit diagram showing the configuration of the capacitance circuit CAP10.

[0142] As shown in FIG. 10, the capacitance circuit CAP10 includes a first circuit section 10A, a second circuit section 10B, and a signal generating circuit 44.

[0143] The first circuit unit 10A includes capacitors CAP20-0, CAP20-1, ..., CAP20-n and transistors NM20-0, NM20-1, ..., NM20-n, which are N-channel MOSFETs. One end of each of the capacitors CAP20-0 to CAP20-n is connected to a capacitance connection terminal CIN via a common line, and the other end is connected to the drain of the transistor NM20-1 to NM20-n. The source of each of the transistors NM20-0 to NM20-n is grounded, and the gates of each receive selection signals ITC<0>, ITC<1>, ..., ITC<n> supplied from the calibration circuit CAL.

[0144] The second circuit section 10B includes seven capacitors CAP30-0 to 30-6 and seven transistors NM30-0 to 30-6, each of which is an N-channel MOSFET. One end of each of the capacitors CAP30-0 to 30-6 is connected to the capacitance connection terminal CIN via a common line. The other end of the capacitor CAP30-0 is connected to the drain of the transistor NM30-0. Similarly, the other ends of the capacitors CAP30-1 to 30-6 are connected to the drains of the transistors NM30-1 to 30-6, respectively. The sources of the transistors NM30-0 to 30-6 are grounded. Selection signals ITM<0> to ITM<6> are supplied to the gates of the transistors NM30-0 to 30-6, respectively.

[0145] The capacitance of the capacitors CAP30-0 to CAP30-6 is largest for CAP30-6, decreasing in the order of CAP30-5, CAP30-4, CAP30-3, CAP30-2, CAP30-1, and CAP30-0. In this case, the capacitance ratio of each of CAP30-0 to CAP30-6 is, for example, 1:2:4:8:16:32:64.

[0146] The signal generating circuit 44 includes seven AND gates AND20-0 to AND20-6 and an EXOR gate as an exclusive OR gate.

[0147] The EXOR generates an enable signal en indicating the result of the exclusive OR of the switching signal OPT2 and the control signal ICAL. That is, the EXOR generates an H-level enable signal en when the switching signal OPT2 and the control signal ICAL are at different binary levels (H or L), and generates an L-level enable signal en when the switching signal OPT2 and the control signal ICAL are at the same binary level. The EXOR supplies the enable signal en generated as described above to one of the input terminals of each of the AND gates AND20-0 to 20-6.

[0148] The other input terminal of each of the AND gates AND20-0 to AND20-6 is supplied with a margin trimming signal TM<0>, TM<1>, ..., TM<6> sent from the controller 14. When the enable signal en is at an L level, the AND gates AND20-0 to AND20-6 generate selection signals ITM<0>, ITM<1>, ..., ITM<6>, all of which are at an L level, and supply these signals to the gates of the transistors NM30-0 to NM30-6. On the other hand, when the enable signal en is at an H level, the AND gates AND20-0 to AND20-6 supply the margin trimming signals TM<0>, TM<1>, ..., TM<6> to the gates of the transistors NM30-0 to NM30-6 as selection signals ITM<0>, ITM<1>, ..., ITM<6>.

[0149] With this configuration, CAP10 becomes a variable capacitor whose capacitance changes according to the selection signals ITC<0> to ITC<n> and the margin trimming signals TM<6:0>. In other words, at this time, CAP10 becomes a capacitor whose capacitance is set according to the selection signals ITC<0> to ITC<n> and the margin trimming signals TM<6:0>.

[0150] In addition, CAP10 is a capacitor that provides a first reference capacitance for determining whether the capacitance of the sensor capacitor 50 has dropped below a predetermined value when the sensor capacitor 50 is connected to the electrode pads P0 and P2.

[0151] Next, the configuration of the correction capacitance circuits TRM0 and TRM1 will be described.

[0152] The correction capacitance circuits TRM0 and TRM1 are variable capacitor circuits that correct for capacitance detection errors of the sensor capacitor 50 due to manufacturing variations in the IC chip 100. In other words, the correction capacitance circuit TRM0 is used to increase the capacitance deviation if it is confirmed during testing of the IC chip 100 before shipment that the capacitance detection result for the sensor capacitor 50 deviates lower than the desired capacitance. On the other hand, the correction capacitance circuit TRM1 is used to decrease the capacitance deviation if it is confirmed during testing of the IC chip 100 before shipment that the capacitance detection result for the sensor capacitor 50 deviates higher than the desired capacitance. In addition to error correction, the correction capacitance circuit TRM0 also serves as a test circuit for testing calibration and determination operations.

[0153] The correction capacitance circuits TRM0 and TRM1 have the same internal configuration.

[0154] 11 and 12 are circuit diagrams showing examples of the internal configurations of the correction capacitance circuits TRM0 and TRM1, respectively.

[0155] 11 and 12, the correction capacitance circuit TRM0 (TRM1) includes NOR gates NOR100 and NOR101, inverters INV109 and IMV110, AND gates AND142 to AND153, and an exclusive OR gate EXOR2. The correction capacitance circuit TRM0 (TRM1) further includes NAND gates NAND100 to NAND108, NAND110 to NAND118, NAND120 to NAND128, and NAND130 to NAND141, capacitors CAP100 to CAP108, and N-channel MOSFETs NMOS100 to NMOS108.

[0156] The correction capacitance circuit TRM0 (TRM1) also includes a TRM terminal that receives a capacitance correction trimming signal TRM<13:0> sent from the controller 14. The correction capacitance circuit TRM0 (TRM1) receives TRM<13> of TRM<13:0> at its SEL terminal as an increase / decrease correction selection signal SEL or an inverted increase / decrease correction selection signal SELB that selects whether the correction capacitance circuit TRM0 or TRM1 will be used to correct the capacitance. For example, when correcting the capacitance using the correction capacitance circuit TRM0, the controller 14 supplies an H-level increase / decrease correction selection signal SEL to the SEL terminal of the correction capacitance circuit TRM1, and also supplies an L-level inverted increase / decrease correction selection signal SELB to the SEL terminal of the correction capacitance circuit TRM0. On the other hand, when correcting the capacitance using the correction capacitance circuit TRM1, the controller 14 supplies an H-level inverted increase / decrease correction selection signal SELB to the SEL terminal of the correction capacitance circuit TRM0, and also supplies an L-level increase / decrease correction selection signal SEL to the SEL terminal of the correction capacitance circuit TRM1.

[0157] The capacitance correction trimming signal TRM<12:0> is broken down as follows: TRM<12:8>: Basic capacitance correction trimming signal TRM<7:4>: Capacitance correction trimming signal added when measuring a large capacitance TRM<3:0>: Capacitance correction trimming signal added when measuring a small capacitance.

[0158] The correction capacitance circuit TRM0 (TRM1) also includes an OPT2 terminal that receives a switching signal OPT2 sent from the controller 14, a TEST terminal that receives a test signal TEST, and a TESTB terminal that receives an inverted test signal TESTB obtained by inverting the level of the test signal TEST. The test signal TEST is a signal that has an H level when a test is performed to determine whether the detection operation and calibration (described later) by the capacitance sensor circuit 15 are performed normally, and an L level otherwise. The switching signal OPT2 is a signal that is set to an H level when the capacitance of the sensor capacitor 50 is large, and an L level when it is small.

[0159] The correction capacitance circuit TRM0 (TRM1) also includes a TM terminal for receiving a margin trimming signal TM<6:0> sent from the controller 14, an EN terminal for receiving an enable signal EN, and an OPT terminal for receiving a test increase / decrease designation signal OPT described below. The test increase / decrease designation signal OPT is a signal that designates, by means of two values ​​(H level, L level), whether an increase correction test or a decrease correction test is to be performed on the detected capacitance.

[0160] As shown in FIG. 5, the EN terminal and TM terminal of the correction capacitance circuit TRM1 are all grounded, and a fixed power supply voltage is supplied to the OPT terminal and TM terminal.

[0161] Furthermore, the correction capacitance circuit TRM0 (TRM1) has a CIN terminal connected to the node n50 (n60) shown in FIG.

[0162] 11, first input terminals of AND142 to AND146 receive capacitance correction trimming signals TRM<8> to TRM<12>, respectively. Second input terminals of AND142 to AND146 receive an increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB). When the increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB) is at H level, AND142 to AND146 supply the capacitance correction trimming signals TRM<8> to TRM<12> as separation trimming signals ITRM<4> to ITRM<8> to first input terminals of NAND114 to NAND118 shown in FIG. In addition, when the increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB) has an L level, AND142 to AND146 supply separation trimming signals ITRM<4> to ITRM<8>, each of which indicates an L level, to the first input terminals of NAND114 to NAND118 shown in Figure 12.

[0163] The inverter INV109 inverts the level of the increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB) and supplies the inverted increase / decrease correction selection signal SELB to the first input terminals of NOR100 and NOR101. The inverter INV110 inverts the level of the switching signal OPT2 and supplies an inverted switching signal to the second input terminal of NOR10.

[0164] NOR100 supplies a signal of H level when the inverted increase / decrease correction selection signal SELB and the switching signal OPT2 are both at L level, and a signal of L level when either one or both are at H level, to the first input terminals of NAND134 to NAND137. NOR101 supplies a signal of H level when the inverted increase / decrease correction selection signal SELB and the inverted switching signal are both at L level, and a signal of L level when either one or both are at H level, to the first input terminals of NAND138 to NAND141.

[0165] The second input terminals of NAND134 to NAND137 receive the capacitance correction trimming signals TRM<0> to TRM<3>, respectively. The second input terminals of NAND138 to NAND141 receive the capacitance correction trimming signals TRM<4> to TRM<7>, respectively. The output terminals of NAND134 to NAND137 are connected to the first input terminals of NAND130 to NAND133, respectively. The output terminals of NAND138 to NAND141 are connected to the second input terminals of NAND130 to NAND133, respectively. The signals output from the output terminals of NAND130 to NAND133, respectively, are supplied as separate trimming signals ITRM<0> to ITRM<3> to the first input terminals of NAND110 to NAND113 shown in FIG. 12.

[0166] That is, with this configuration, when the increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB) is at H level and the switching signal OPT2 is at L level, the capacitance correction trimming signal TRM<3:0> for measuring small capacitance is supplied as separate trimming signals ITRM<0> to ITRM<3> to the first input terminals of the NANDs 110 to 113. On the other hand, when the increase / decrease correction selection signal SEL (inverted increase / decrease correction selection signal SELB) is at H level and the switching signal OPT2 is at H level, the capacitance correction trimming signal TRM<7:4> for measuring large capacitance is supplied as separate trimming signals ITRM<0> to ITRM<3> to the first input terminals of the NANDs 110 to 113.

[0167] EXOR2 receives the test increase / decrease designation signal OPT and the enable signal EN, and supplies an enable signal en of H level if the two have different binary levels, or of L level if the two have the same binary level, to the first input terminals of AND147 to AND153.

[0168] The second input terminals of AND147 to AND153 receive the margin trimming signals TM<0> to TM<6>, respectively. When the enable signal en is at an H level, AND147 to AND153 supply the margin trimming signals TM<0> to TM<6> as separate trimming signals ITRM<0> to ITRM<6> to the first input terminals of NAND121 to NAND127 shown in Figure 12. When the enable signal en is at an L level, AND147 to AND153 supply the separate trimming signals ITRM<0> to ITRM<6>, each indicating the L level, to the first input terminals of NAND121 to NAND127.

[0169] In FIG. 12, the first input terminal of each of NAND 120 and NAND 128 is grounded.

[0170] A second input terminal of each of NAND110 to NAND118 receives the inverted test signal TESTB, and a second input terminal of each of NAND120 to NAND128 receives the test signal TEST.

[0171] The output terminals of NAND110 to NAND118 are connected to the first input terminals of NAND100 to NAND 108. The output terminals of NAND120 to NAND128 are connected to the second input terminals of NAND100 to NAND 108.

[0172] The signals output from the output terminals of NAND100 to NAND108 are supplied as gate signals NCNT<0> to NCNT<8> to the gate terminals of transistors NMOS100 to NMOS108, respectively.

[0173] That is, according to the configuration shown in FIG. 12, when the test signal TEST is at an L level indicating the normal mode, a series of 9-bit signals consisting of the following capacitance correction trimming signals supplied from the controller 14, TRM<12:8>, TRM<3:0> or TRM<12:8>, TRM<7:4>, are supplied as gate signals NCNT<0> to NCNT<8> to the gate terminals of the transistors NMOS100 to NMOS108, respectively.

[0174] On the other hand, when the test signal TEST is at an H level indicating the test mode, a 9-bit signal series consisting of 0, TM<6:0>, 0, including the following margin trimming signals supplied from the controller 14, is supplied as gate signals NCNT<0> to NCNT<8> to the gate terminals of the transistors NMOS100 to NMOS108.

[0175] The source terminals of the transistors NMOS100 to NMOS108 are each grounded.

[0176] The drain terminals of the transistors NMOS100 to NMOS108 are connected to one terminal of each of the capacitors CAP100 to CAP108. The other terminals of the capacitors CAP100 to CAP108 are all connected to the capacitance connection terminal CIN. The capacitances of the capacitors CAP100 to CAP108 are the largest, decreasing in order from CAP107, CAP106, CAP105, CAP104, CAP103, CAP102, CAP101, and CAP100. In this case, the capacitance of CAP100, which has the smallest capacitance among the capacitors CAP100 to CAP108, is equal to, for example, the capacitance of the capacitor CAP30-0 with the smallest capacitance included in the second circuit unit 10B of the capacitance circuit CAP10 shown in FIG. 10 . The capacitance ratio of the capacitors CAP100 to CAP108 is, for example, 1:2:4:8:16:32:64:128:256.

[0177] The operation of the capacitance sensor circuit 15 will now be described in detail.

[0178] First, when a sensor capacitor 50 with a relatively small capacitance is used, the controller 14 supplies an L-level switching signal OPT2 to the switching circuit SW and the capacitance circuit CAP10. In response to the L-level switching signal OPT2, the switching circuit SW connects its input terminal CIN0P to the relay terminal CIN0. This connects the electrode W1 of the sensor capacitor 50 to the relay terminal CIN0 of the determination circuit JC via the electrode pad P0, resistor R0, node n0, the switching circuit SW, and node n50. At this time, the relay terminal CIN1 of the determination circuit JC is connected to the capacitance connection terminal CIN of the capacitance circuit CAP10 via node n60, the switching circuit SW, node n1, resistor R1, and node n40.

[0179] Then, the controller 14 performs a calibration to automatically calibrate the capacitance of the capacitance circuit CAP10 to a capacitance including the capacitance of the sensor capacitor 50 and the parasitic capacitance of the wiring path. In performing this calibration, the controller 14 supplies an L-level leak test signal ILT to the determination circuit JC.

[0180] FIG. 13 is a time chart showing the calibration operation executed by the calibration circuit CAL under the control of the controller 14. In FIG.

[0181] [Inactive Mode IM1] First, the controller 14 supplies the sensor enable signal CSREN and the calibration enable signal CALEN at the L level to the calibration circuit CAL. As a result, the input terminals RN of the latch circuits LT20-0 to LT20-n shown in Figure 9 all go to the L level. At this time, the output clock signal ICLK goes to the L level, the inverted clock signal ICLKB goes to the H level, the control signal ICAL goes to the L level, and the inverted control signal ICALB goes to the L level.

[0182] 8 are turned on when the gates of the transistors PM40-0 to PM40-n of the trimming signal selection circuit 42 are supplied with an L-level control signal ICAL. Also, the transistors NM40-0 to NM40-n are turned on when the gates of the transistors NM40-0 to NM40-n are supplied with an H-level inverted control signal ICALB.

[0183] On the other hand, transistors PM50-0 to PM50-n are turned off when an H-level inverted control signal ICALB is supplied to their gates. Transistors NM50-0 to NM50-n are turned off when an L-level control signal ICAL is supplied to their gates. This causes the trimming signal selection circuit 42 to output the first selection signals TC<0> to TC<n> as the selection signals ITC<0> to ITC<n>. That is, the first trimming signal TC<n:0> is output as the trimming signal ITC<n:0>.

[0184] 9 outputs an H-level signal from the output terminal QN of the latch circuit LT3, latch circuit LT4, latch circuits LT10-0 to LT10-n, and latch circuits LT20-0 to LT20-n of the trimming signal generating circuit 43. As a result, INT<n+1:0> (i.e., INT<n+1>, INT<n>, ... INT<0>) and TCO<n:0> (i.e., TCO<n>, TCO<n-1>, ... TCO<0>) all become L-level.

[0185] At this time, since the output clock signal ICLK is at L level, the clock signal CLKIN also goes to L level. Because the clock signal CLKIN is at L level, the detection signal COUT and the flag signal COUT2 are held at H level, which is their immediately preceding data value. In Figure 13, this state is shown as inactive mode IM1.

[0186] [Normal mode NM (initial state IS1)] After that, the controller 14 changes the sensor enable signal CSREN from L level to H level. As a result, the clock signal control circuit CLKC outputs an output clock signal ICLK that is in phase with the clock signal CLK and outputs an inverted signal of the clock signal CLK as an inverted clock signal ICLKB. At this time, the signals output from the output terminals QN of the latch circuits LT3, LT4, LT10-0 to LT10-n, and LT20-0 to LT20-n shown in FIG. 9 remain H level, so that the signals INT<n+1:0> and TCO<n:0> are all maintained at L level.

[0187] Since the output clock signal ICLK is in phase with the clock signal CLK, the clock signal CLKIN is also in phase with the clock signal CLK. The rising edge of the clock signal CLKIN activates the capacitance sensor circuit 15, which outputs the detection signal COUT and the flag signal COUT2. For example, if the dielectric between the electrodes of the sensor capacitor 50 is in a solid state before melting and the capacitance value of the capacitance circuit CAP10 is smaller than that of the sensor capacitor 50, the signal levels of the detection signal COUT and the flag signal COUT2 will both be L level. In Figure 13, the period in this state is shown as the normal mode NM (initial state IS1).

[0188] [Calibration Mode CM] Thereafter, the controller 14 transitions the calibration enable signal CALEN from L level to H level. As a result, the control signal ICAL becomes H level and the inverted control signal ICALB becomes L level. The transistors PM40-0 to PM40-n of the trimming signal selection circuit 42 are turned off when their gates are supplied with the H level control signal ICAL, and the transistors NM40-0 to PM40-n are turned off when their gates are supplied with the L level inverted control signal ICALB. On the other hand, the transistors PM50-0 to PM50-n are turned on when their gates are supplied with the L level inverted control signal ICALB, and the transistors NM50-0 to PM50-n are turned on when their gates are supplied with the H level control signal ICAL.

[0189] As a result, the trimming signal selection circuit 42 outputs the second selection signals TCO<0> to TCO<n> as the selection signals ITC<0> to ITC<n>. That is, the second trimming signal TCO<n:0> is output as the trimming signal ITC<n:0>. Since the signals INT<n+1:0> and TCO<n:0> are all at the L level, the signals of the trimming signals ITC<n:0> are also all at the L level.

[0190] 9 rises at the falling edge of the first clock signal CLK, and falls at the falling edge of the second clock signal CLK. Therefore, the output signal INT<n+1> of the inverter INV50-(n+1) of the trimming signal generation circuit 43 is at H level only between the first and second clock signals CLK during the calibration mode CM.

[0191] Here, the circuit formed by the latch circuits LT10-n to LT10-0 and the inverters INV50-n to INV50-0 in FIG. 9 is a shift register that shifts and outputs each bit of INT<n:0>. Therefore, the H pulse of the output signal INT<n+1> shifts sequentially from the output signal INT<n> to INT<0> after the falling edge of the third clock of the clock signal CLK. When the output signal INT<n> is at H level, the output signal INTB<n> is at L level, and therefore the second selection signal TCO<n> is at H level. At this time, all of the INT<n-1:0> are at L level.

[0192] In this way, since the second trimming signal TCO<n:0> is output as the trimming signal ITC<n:0>, among the capacitors CAP20-n to CAP20-0 of the capacitance circuit CAP10 shown in Fig. 10, only the capacitor CAP20-n functions as a capacitance, and the other capacitors do not function. On the other hand, for the capacitors CAP30-6 to CAP30-0, when the calibration enable signal CALEN goes high, the control signal ICAL also goes high.

[0193] Therefore, ITM<6:0> (i.e., selection signals ITM<0> to ITM<6>) becomes the same signal as the margin trimming signal TM<6:0>, and capacitors CAP30-6 to CAP30-0 function as capacitors with a capacitance corresponding to the signal input of the margin trimming signal TM<6:0>.

[0194] In this state, when the clock signal CLK rises, the detection signal COUT output from the judgment circuit JC is supplied to the calibration circuit CAL. Therefore, at the subsequent falling edge of the clock signal CLK, INTB<n> rises and INT<n> falls, so that an inverted signal of the detection signal COUT is stored in the latch circuit 20-n of the trimming signal generation circuit 43 shown in Figure 9. This is held as the output data of the second selection signal TCO<n> while the calibration enable signal CALEN is at H level.

[0195] Here, the capacitance sensor circuit 15 of this embodiment is designed to output an L-level detection signal COUT when the dielectric between the electrodes of the sensor capacitor 50 is in a solid state before melting, and to output an H-level detection signal COUT after melting.

[0196] That is, when the determination circuit JC of the capacitance sensor circuit 15 determines that the capacitance of the capacitance circuit CAP10 (reference capacitance) is smaller than the capacitance of the sensor capacitor 50, the detection signal COUT becomes L level, and as a result, an H level second selection signal TCO<n> is output. On the other hand, when the determination circuit JC determines that the capacitance of the capacitance circuit CAP10 is larger than the capacitance of the sensor capacitor 50, the detection signal COUT becomes H level, and as a result, an L level second selection signal TCO<n> is output.

[0197] Then, with the next clock, TCO<n-1> goes to the H level, and INT<n-2:0> all remain at the L level. Therefore, when TCO<n> is at the H level, that is, when the capacitance circuit CAP10 has a smaller capacitance than the sensor capacitor 50, the capacitor CAP20-n of the capacitance circuit CAP10 functions as a capacitance. On the other hand, when TCO<n> is at the L level, that is, when the capacitance circuit CAP10 has a larger capacitance than the sensor capacitor 50, the capacitor CAP20-n of the capacitance circuit CAP10 does not function as a capacitance.

[0198] 10, only CAP20-(n-1) functions as a capacitor, and the other capacitors do not function as capacitors. When the clock signal CLK rises in this state, the detection signal COUT output from the judgment circuit JC is supplied to the calibration circuit CAL. At this time, at the subsequent falling edge of the clock signal CLK, INTB<n-1> rises and INT<n-1> falls. Therefore, an inverted signal obtained by inverting the signal level of the detection signal COUT is stored in the latch circuit 20-(n-1) of the trimming signal generation circuit 43 shown in FIG. 9, and this signal is held as the second selection signal TCO<n-1> while the calibration enable signal CALEN is at H level.

[0199] Thereafter, an inverted signal obtained by inverting the signal level of the detection signal COUT is stored in the latch circuit LT20-0, and the same process is repeated until this is held as TCO<0> as long as the calibration enable signal CALEN is at H level.

[0200] In this way, if the capacitance of the sensor capacitor 50 is larger than the capacitance of the capacitance circuit CAP10 over the period during which the calibration enable signal CALEN is at H level, a series of operations are performed to decrease the capacitance of the capacitance circuit CAP10, and if the capacitance of the sensor capacitor 50 is smaller than the capacitance of the capacitance circuit CAP10, to increase the capacitance of the capacitance circuit CAP10. In other words, the second trimming signals TCO<n:0> are set so that the capacitance of the capacitance circuit CAP10 becomes equal to the solid-state capacitance of the sensor capacitor 50.

[0201] 13, the period of this state is shown as a calibration mode CM. During the calibration mode, the controller 14 supplies a margin trimming signal TM<6:0> to the capacitance circuit CAP10, which sets a margin equal to, for example, half of the difference between the capacitance of the sensor capacitor 50 before the dielectric melts and the capacitance of the sensor capacitor 50 after the dielectric melts. After the calibration is completed, the controller 14 stores the second trimming signal TCO<n:0> immediately after the calibration in the non-volatile memory 16.

[0202] [Inactive mode IM2] After that, the power supply is cut off (period P-OFF in FIG. 13), and when the power is turned on again, the controller 14 reads the second trimming signal TCO<n:0> from the memory 16 and supplies it to the calibration circuit CAL as the first trimming signal TC<n:0>. In FIG. 13, the period of this state is shown as inactive mode IM2.

[0203] [Normal mode NM (initial state IS2)] Then, the controller 14 transitions the sensor enable signal CSREN from L level to H level and supplies the calibration enable signal CALEN at L level to the calibration circuit CAL to operate the capacitance sensor circuit 15. At this time, because the calibration enable signal CALEN and the switching signal OPT2 are both L level, the (6+1) bits ITM<6:0> (i.e., selection signals ITM<0> to ITM<6>) of the signal generation circuit 44 shown in FIG. 10 all become L level. As a result, none of the capacitors CAP30-0 to CAP30-6 function as electrostatic capacitances.

[0204] Therefore, the capacitance of the capacitance circuit CAP10, i.e., the reference capacitance, is set to a capacitance value between the first capacitance before the dielectric melts and the second capacitance after the dielectric melts of the sensor capacitor 50, including the parasitic capacitance outside the IC chip 100. In Fig. 13, the period of this state is shown as the normal mode NM (initial state IS2).

[0205] In short, in the series of calibration processes described above, the controller 14 supplies a margin trimming signal TM (referred to as a first trimming signal) to the second circuit unit 10B of the capacitance circuit CAP10, which sets the capacitance of the second circuit unit 10B to a margin capacitance. The calibration circuit CAL performs calibration by supplying a second trimming signal TCO (ITC) to the first circuit unit 10A, which sets the capacitance of the first circuit unit 10A of the capacitance circuit CAP10 to a capacitance that changes stepwise over time.

[0206] During the calibration process, when the determination circuit JC determines that the potential of the first relay terminal CIN0 is equal to the potential of the second relay terminal CIN1, the controller 14 stores the second trimming signal TCO (ITC) in the nonvolatile memory 16. Then, the next time the power is turned on, the controller 14 sets the capacitance of the first circuit unit 10A of the capacitance circuit CAP10 using the second trimming signal TCO (ITC) stored in the memory 16.

[0207] Therefore, the above-described calibration can cancel the parasitic capacitance outside the IC chip 100 and set the capacitance of the capacitance circuit CAP10 to an intermediate level between the capacitance before and after the dielectric of the sensor capacitor 50 melts. This makes it possible to accurately determine whether the dielectric filling between the electrodes of the sensor capacitor 50 has melted.

[0208] In the above embodiment, the calibration circuit CAL is used to calibrate the capacitance circuit CAP10 to a reference capacitance that serves as a threshold for detecting a change in the capacitance of the sensor capacitor 50.

[0209] However, the calibration operation by the calibration circuit CAL can also be used to detect the capacitance of the capacitors connected to the electrode pads P0 and P2. For example, if the judgment circuit JC outputs an H-level flag signal COUT2 during the aforementioned calibration operation, the controller 14 captures the trimming signal ITC<n:0> output by the calibration circuit CAL at that time. In this case, the trimming signal ITC<n:0> captured by the controller 14 at the time the H-level flag signal COUT2 is output represents the combined capacitance of the capacitors CAP20-0 to CAP20-n of the capacitance circuit CAP10, and its value is equal to the capacitance of the capacitors connected to the electrode pads P0 and P2. Therefore, the controller 14 supplies information indicating the capacitance corresponding to the captured trimming signal ITC<n:0>, together with the above-mentioned identification ID, to the transmission / reception circuit 13 as transmission information. As a result, the sensor tag 150 wirelessly transmits information indicating the capacitance of the capacitor connected to the electrode pads P0 and P2 and the identification ID to the reader / writer 200, as shown in Fig. 3. Therefore, the reader / writer 200 can wirelessly know the capacitance of the capacitor connected to the electrode pads P0 and P2 of the sensor tag 150.

[0210] Next, the internal operation of the decision circuit JC shown in FIG. 7 will be described with reference to the time chart shown in FIG.

[0211] In Figure 14, the period during which the dielectric between the electrodes of the sensor capacitor 50 is not melted is represented as period T1, the period during which the dielectric has melted to a certain extent and the capacitance of the sensor capacitor 50 and the capacitance of the capacitance circuit CAP10 are approximately equal is represented as period T2, and the period after the dielectric of the sensor capacitor 50 has completely melted is represented as period T3.

[0212] First, the operation during the period T1 will be described.

[0213] [First Initial State IS1] When the calibration circuit CAL supplies an L-level clock signal CLKIN to the judgment circuit JC, the potential of node n2 shown in FIG. 7 becomes H-level. As a result, the potentials of nodes n0 and n1 become L-level, and the potentials of nodes n3, n4, and n5 become H-level. Furthermore, the potentials of nodes n6 and n7 become L-level, the potential of node n8 becomes H-level, the potential of node n9 becomes H-level, the potential of node n10 becomes L-level, and the potential of node n11 becomes L-level. In FIG. 14, the period of this state is shown as a first initial state IS1.

[0214] In the first initial state IS1, the potential of the node n2 is at the H level, and therefore the value of the detection signal COUT output from the first latch circuit LT1 is the value that was held immediately before that point. That is, since the dielectric between the electrodes of the sensor capacitor 50 is in a state before melting, the detection signal COUT is output at the L level.

[0215] Similarly, because the potential of node n2 is at H level, the value of flag signal COUT2 output from second latch circuit LT2 is also the value that was held immediately before that. That is, because the capacitance of sensor capacitor 50 is greater than the capacitance of capacitance circuit CAP10, flag signal COUT2 is output at L level.

[0216] [First charging period CP1] After that, when the clock signal CLKIN transitions to H level, the potential of node n2 goes to L level. The potential of node n2 is inverted by inverter INV0, and the H-level inverted signal is applied to the gate of transistor NM9. This activates the bias signal generating unit 32, and node n3 goes to intermediate potential Vx. As a result, a bias signal at the intermediate potential Vx level is supplied to the gate of transistor NM8, which serves as a constant current source.

[0217] Furthermore, because the potential of node n2 is at the L level, both transistors NM2 and NM3 are in the OFF state, and both transistors PM2 and PM3 are in the ON state, causing the judgment circuit JC to send charging currents from relay terminals CIN0 and CIN1 to the sensor capacitor 50 and capacitance circuit CAP10 via nodes n0 and n1, respectively, to charge the sensor capacitor 50 and capacitance circuit CAP10.

[0218] During period T1, the dielectric of the sensor capacitor 50 has not yet melted, so the capacitance of the sensor capacitor 50 is a predetermined first capacitance, which is greater than the capacitance (referred to as the reference capacitance) of the capacitance circuit CAP10. Therefore, the capacitance circuit CAP10 is charged faster than the sensor capacitor 50, and the potential of node n1 rises earlier than that of node n0.

[0219] The potential of node n1 is applied to the gate of transistor NM1, and the potential of node n5 drops due to the operation of differential amplifier unit 35. On the other hand, the potential of node n0 rises later than that of node n1, and therefore the potential of node n4 hardly drops at all due to the function of differential amplifier unit 35. In Figure 14, this period is shown as a first charging period CP1.

[0220] [First charge detection period CDP1] Thereafter, when the potential of node n5 drops to the threshold level Vth of the inverter section 37, the potential of node n7 goes high, and a high-level signal is captured by the first latch circuit LT1. Furthermore, because the potential of node n6 is low, even if the potential of node n7 goes high, the potential of node n12 remains high, and the potential of node n11 remains low. As a result, a high-level signal is captured by the second latch circuit LT2. In FIG. 14 , this period is shown as the first charge detection period CDP1.

[0221] During the first charge detection period CDP1, the potentials of nodes n8, n10, and n9 change sequentially with a time difference. Specifically, when the potential of node n7 becomes H level, the potential of node n8 becomes L level. In response to the change in the potential of node n8, the potential of node n10 becomes H level. In response to the change in the potential of node n10, the potential of node n9 becomes L level.

[0222] [First discharge period DP1] When the potential of node n9 becomes L level, the potential of node n2 changes to H level. As a result, a H level signal is supplied as a clock signal to the clock terminal of the first latch circuit LT1. At this time, because node n7 is H level, the first latch circuit LT1 takes in the H level signal and outputs an inverted L level signal as the detection signal COUT.

[0223] Similarly, an H-level signal is supplied as a clock signal to the clock terminal of the second latch circuit LT2. At this time, since the node n12 is at H level, the second latch circuit LT2 takes in the H-level signal and outputs an inverted L-level signal as the flag signal COUT2.

[0224] Furthermore, when the potential of node n2 becomes high, an inverted signal of low level, which is the inverted potential of node n2, is applied to the gate of transistor NM9. This causes the bias signal generator 32 to be in the OFF state (i.e., in an inactive state), and the potential of node n3 becomes high. This causes a high-level bias signal to be supplied to the gate of transistor NM8, turning on transistor NM8 as a constant current source. Furthermore, transistors NM2 and NM3 are in the ON state, and transistors PM2 and PM3 are in the OFF state, causing the sensor capacitor 50 and capacitance circuit CAP10 to discharge via relay terminals CIN0 and CIN1. In FIG. 14, this state is shown as a first discharge period DP1.

[0225] [First discharge detection period DDP1] After that, when the potential of node n5 rises to the threshold level Vth of the inverter unit 37, the potential of node n7 goes low and the potential of node n8 goes high. After that, when the clock signal CLKIN goes low, the potential of node n9 goes high and the potential of node n10 goes low. In Figure 14, the period in this state is shown as a first discharge detection period DDP1.

[0226] Next, the operation during period T2 (that is, the state in which the dielectric has melted to some extent and the capacitance of the sensor capacitor 50 and the capacitance of the capacitance circuit CAP10 have become substantially equal) will be described.

[0227] [Second Initial State IS2] When an L-level clock signal CLKIN is supplied to the judgment circuit JC, the potential of node n2 becomes H-level. As a result, the potentials of nodes n0 and n1 become L-level, and the potentials of nodes n3, n4, and n5 become H-level. Furthermore, the potentials of nodes n6 and n7 become L-level, the potential of node n12 becomes H-level, the potential of node n11 becomes L-level, the potential of node n8 becomes H-level, the potential of node n9 becomes H-level, and the potential of node n10 becomes L-level. In Figure 14, the period of this state is shown as a second initial state IS2.

[0228] In the second initial state IS2, since the potential of the node n2 is at H level, the detection signal COUT output from the first latch circuit LT1 is in a state of holding the previous data value of L level. Similarly, the flag signal COUT2 output from the second latch circuit LT2 is also in a state of holding the previous data value of L level.

[0229] [Second charging period CP2] After that, when the clock signal CLKIN goes high, the potential of node n2 goes low. The potential of node n2 is inverted by inverter INV0, and the high-level inverted signal is applied to the gate of transistor NM9. This activates the bias signal generating unit 32, and node n3 goes to intermediate potential Vx. As a result, a bias signal at the intermediate potential Vx level is supplied to the gate of transistor NM8, which serves as a constant current source.

[0230] Furthermore, because the potential of node n2 is at the L level, both transistors NM2 and NM3 are in the OFF state, and both transistors PM2 and PM3 are in the ON state, causing the judgment circuit JC to send charging currents from relay terminals CIN0 and CIN1 to the sensor capacitor 50 and capacitance circuit CAP10 via nodes n0 and n1, respectively, to charge the sensor capacitor 50 and capacitance circuit CAP10.

[0231] During period T2, the dielectric melts to some extent, and the sensor capacitor 50 and the capacitance circuit CAP10 have approximately the same capacitance (i.e., the reference capacitance). As a result, the sensor capacitor 50 and the capacitance circuit CAP10 are charged at approximately the same speed, and the potentials of the nodes n0 and n1 rise over time at approximately the same rate (i.e., the difference in the rate of rise is less than a predetermined value).

[0232] The potential of node n0 is applied to the gate of transistor NM0, and the operation of differential amplifier 35 causes the potential of node n4 to decrease. Meanwhile, the potential of node n1 is applied to the gate of transistor NM1, and the operation of the differential amplifier causes the potential of node n5 to decrease. Because the rates of increase in the potentials of nodes n0 and n1 are approximately the same, the potentials of nodes n4 and n5 also decrease at approximately the same rate (i.e., the difference in the degree of decrease is less than a predetermined value). In Figure 14, this period is shown as a second charging period CP2.

[0233] [Second charge detection period CDP2] Thereafter, when the potential of node n4 drops to the threshold level Vth of the inverter unit 37, the potential of node n6 goes to H level. Similarly, when the potential of node n5 drops to the threshold level Vth of the inverter unit 37, the potential of node n7 goes to H level. Because the rates of drop in the potential of node n4 and node n5 are approximately the same, the potentials of node n6 and node n7 go to H level at approximately the same time.

[0234] As the potentials of nodes n6 and n7 become H level, the potential of node n12 becomes L level and the potential of node n11 becomes H level. Furthermore, the potentials of nodes n8, n10, and n9 change sequentially with a time difference. Specifically, as the potentials of nodes n6 and n7 become H level and the potential of node n11 becomes H level, the potential of node n8 becomes L level. In response to the change in the potential of node n8, the potential of node n10 becomes H level. In response to the change in the potential of node n10, the potential of node n9 becomes L level. In Figure 14, the period of this state is shown as a second charge detection period CDP2.

[0235] [Second discharge period DP2] Furthermore, because the clock signal CLKIN is at H level and the potential of node n9 is at L level, node n2, which is the NAND of these signals, becomes H level. At this time, because node n7 is at H level, an H level signal is captured by the first latch circuit LT1. Therefore, the first latch circuit LT1 inverts this signal and outputs an L level inverted signal as the detection signal COUT. Furthermore, because the potential of node n12 is at L level, an L level signal is captured by the second latch circuit LT2. Therefore, the second latch circuit LT2 inverts this signal and outputs an H level inverted signal as the flag signal COUT2.

[0236] Furthermore, when the potential of node n2 becomes high, an inverted signal of low level, which is the inverted potential of node n2, is applied to the gate of transistor NM9. This causes the bias signal generator 32 to be in the OFF state (i.e., in an inactive state), and the potential of node n3 becomes high. This causes a high-level bias signal to be supplied to the gate of transistor NM8, turning on transistor NM8 as a constant current source. Furthermore, transistors NM2 and NM3 are in the ON state, and transistors PM2 and PM3 are in the OFF state, causing the sensor capacitor 50 and capacitance circuit CAP10 to discharge via relay terminals CIN0 and CIN1. In FIG. 14, this state is shown as a second discharge period DP2.

[0237] [Second Discharge Detection Period DDP2] Thereafter, when the potential of node n4 rises to the threshold level Vth of the inverter unit 37, the potential of node n6 goes low. Similarly, when the potential of node n5 rises to the threshold level Vth of the inverter unit 37, the potential of node n7 goes low. As a result, the potential of node n12 goes high, the potential of node n11 goes low, and the potential of node n8 goes high. Thereafter, when the clock signal CLKIN goes low, the potential of node n9 goes high, and the potential of node n10 goes low. In FIG. 14, this period is shown as the second discharge detection period DDP2.

[0238] Next, the operation during period T3 (that is, the state in which the dielectric is completely melted) will be described.

[0239] [Third Initial State IS3] When an L-level clock signal CLKIN is supplied to the judgment circuit JC, the potential of node n2 becomes H-level. As a result, the potentials of nodes n0 and n1 become L-level, and the potentials of nodes n3, n4, and n5 become H-level. Furthermore, the potentials of nodes n6 and n7 become L-level, the potential of node n12 becomes H-level, the potential of node n11 becomes L-level, the potential of node n8 becomes H-level, the potential of node n9 becomes H-level, and the potential of node n10 becomes L-level. In Figure 14, the period of this state is shown as a third initial state IS3.

[0240] In the third initial state IS3, the potential of the node n2 is at H level, so the detection signal COUT output from the first latch circuit LT1 is in a state of holding the previous data value of L level, and the flag signal COUT2 output from the second latch circuit LT2 is also in a state of holding the previous data value of H level.

[0241] [Third charging period CP3] After that, when the clock signal CLKIN goes high, the potential of node n2 goes low. The potential of node n2 is inverted by inverter INV0, and the high-level inverted signal is applied to the gate of transistor NM9. This activates the bias signal generating unit 32, and node n3 goes to intermediate potential Vx. As a result, a bias signal at the intermediate potential Vx level is supplied to the gate of transistor NM8, which serves as a constant current source.

[0242] Furthermore, because the potential of node n2 is at the L level, both transistors NM2 and NM3 are in the OFF state, and both transistors PM2 and PM3 are in the ON state, causing the judgment circuit JC to send charging currents from relay terminals CIN0 and CIN1 to the sensor capacitor 50 and capacitance circuit CAP10 via nodes n0 and n1, respectively, to charge the sensor capacitor 50 and capacitance circuit CAP10.

[0243] During period T3, the dielectric of the sensor capacitor 50 is melted, and therefore the capacitance of the sensor capacitor 50 is the second capacitance, which is smaller than the reference capacitance of the capacitance circuit CAP10. Therefore, the sensor capacitor 50 is charged faster than the capacitance circuit CAP10, and the potential of node n0 rises earlier than that of node n1.

[0244] The potential of node n0 is applied to the gate of transistor NM0, and the potential of node n4 drops due to the operation of differential amplifier unit 35. On the other hand, the potential of node n1 rises later than that of node n0, and therefore the potential of node n5 hardly drops at all due to the function of differential amplifier unit 35. In Figure 14, this period is shown as a third charging period CP3.

[0245] [Third charge detection period CDP3] Thereafter, when the potential of node n4 drops to the threshold level Vth of the inverter section 37, the potential of node n6 goes high. Meanwhile, because the potential of node n5 does not drop, node n7 is maintained at low, and a low-level signal is captured by the first latch circuit LT1. Furthermore, because the potential of node n7 is low, even if the potential of node n6 changes to high, the potential of node n12 is maintained at high, and the potential of node n11 is maintained at low. In Figure 14, this period is shown as a third charge detection period CDP3.

[0246] During the third charge detection period CDP3, the potentials of nodes n8, n10, and n9 change sequentially with a time difference. Specifically, when the potential of node n6 becomes H level, the potential of node n8 becomes L level. In response to the change in the potential of node n8, the potential of node n10 becomes H level. In response to the change in the potential of node n10, the potential of node n9 becomes L level.

[0247] [Third discharge period DP3] When the potential of node n9 becomes L level, the potential of node n2 becomes H level. As a result, a H level signal is supplied as a clock signal to the clock terminal of the first latch circuit LT1. At this time, because node n7 is L level, the first latch circuit LT1 takes in the L level signal and outputs an inverted H level signal as the detection signal COUT.

[0248] Furthermore, an H-level signal is supplied as a clock signal to the clock terminal of the second latch circuit LT2. At this time, since the node n12 is at H level, the second latch circuit LT2 takes in the H-level signal, inverts the signal level, and outputs an inverted L-level signal as the flag signal COUT2.

[0249] Furthermore, when the potential of node n2 becomes high, an inverted signal of low level, which is the inverted potential of node n2, is applied to the gate of transistor NM9. This causes the bias signal generator 32 to be in the OFF state (i.e., in an inactive state), and the potential of node n3 becomes high. This causes a high-level bias signal to be supplied to the gate of transistor NM8, turning on transistor NM8 as a constant current source. Furthermore, transistors NM2 and NM3 are in the ON state, and transistors PM2 and PM3 are in the OFF state, causing the sensor capacitor 50 and capacitance circuit CAP10 to discharge via relay terminals CIN0 and CIN1. In FIG. 14, this state is shown as a third discharge period DP3.

[0250] [Third Discharge Detection Period DDP3] After that, when the potential of node n4 rises to the threshold level Vth of the inverter unit 37, the potential of node n6 goes low and the potential of node n8 goes high. After that, when the clock signal CLKIN goes low, the potential of node n9 goes high and the potential of node n10 goes low. In Figure 14, the period in this state is shown as the third discharge detection period DDP3.

[0251] Thus, in the capacitance sensor circuit 15, when the dielectric between the electrodes of the externally connected sensor capacitor 50 has not yet melted, the determination circuit JC outputs an L-level detection signal COUT and an L-level flag signal COUT2. When the dielectric has melted to a certain extent and the capacitances of the sensor capacitor 50 and the capacitance circuit CAP10 have become approximately equal, the determination circuit JC outputs an L-level detection signal COUT and an H-level flag signal COUT2. When the dielectric has completely melted, the determination circuit JC outputs an H-level detection signal COUT and an L-level flag signal COUT2.

[0252] Therefore, the capacitance sensor circuit 15 can obtain information (COUT) indicating whether the dielectric of the externally connected sensor capacitor 50 has melted, that is, whether the capacitance of the sensor capacitor 50 has changed. Furthermore, the capacitance sensor circuit 15 can obtain information (COUT2) indicating whether the sensor capacitor 50 and the capacitance circuit CAP10 have approximately the same capacitance.

[0253] Furthermore, in the capacitance sensor circuit 15, current is consumed only during the first charging period CP1, the first charging detection period CDP1, the second charging period CP2, the second charging detection period CDP2, the third charging period CP3, and the third charging detection period CDP3 shown in Fig. 14, and no current is consumed during other periods. Therefore, even when the capacitance of the sensor capacitor 50 and the capacitance of the capacitance circuit CAP10 become approximately equal, it is possible to suppress the current consumption of the entire circuit by setting the frequency of the clock signal CLKIN to a low value.

[0254] 7, even when the capacitances of the sensor capacitor 50 and the capacitance circuit CAP10 become approximately equal, information relating to the capacitance of the sensor capacitor 50 can be transmitted to the reader / writer 200 without increasing the current. Also, information indicating whether the capacitances of the sensor capacitor 50 and the capacitance circuit CAP10 are approximately equal can be transmitted to the reader / writer 200.

[0255] It should be noted that even when a sensor capacitor 50 having a relatively large capacitance is externally connected, the calibration operation shown in FIG. 13 and the detection process shown in FIG. 14 are performed.

[0256] At this time, the controller 14 supplies a low-level leak test signal ILT to the judgment circuit JC and a high-level switching signal OPT2 to the switching circuit SW and the capacitance circuit CAP10. In response to the low-level switching signal OPT2, the switching circuit SW connects its input terminal CIN0M2 to the relay terminal CIN0. This connects the electrode W1 of the sensor capacitor 50 to the relay terminal CIN0 of the judgment circuit JC via the electrode pad P0, resistor R0, additional capacitor CX, switching circuit SW, and node n50. At this time, the relay terminal CIN1 of the judgment circuit JC is connected to the capacitance connection terminal CIN of the capacitance circuit CAP10 via node n60, switching circuit SW, node n1, resistor R1, and node n40.

[0257] In the judgment circuit JC, when comparing the potential of the electrode of the sensor capacitor 50 with the potential of the capacitance connection terminal CIN of the capacitance circuit CAP10, the sensor capacitor 50 is charged in each of the first to third charging periods CP1 to CP3 shown in Figure 14.

[0258] In this case, if the capacitance of the sensor capacitor 50 is large, the current consumed in the charging operation will be larger than if the capacitance is small. Furthermore, if the speed at which the sensor capacitor 50 and the external parasitic capacitance of the IC chip 100 are charged is fast, the power supply voltage generated by the power supply circuit 12 will drop, which may cause malfunction.

[0259] Therefore, in the capacitance sensor circuit 15, an additional capacitor CX is provided between the electrode pad P0 connecting the electrode W1 of the sensor capacitor 50 having a relatively large capacitance and the input terminal CIN0M2 of the switching circuit SW so as to be connected in series with the sensor capacitor 50.

[0260] 14, the judgment circuit JC supplies the charging current sent from its input terminal CIN0M2 to the additional capacitor CX, and supplies the charging current sent from its input terminal CIN1P to the capacitance circuit CAP10. As a result, the capacitance circuit CAP10 is charged, and the additional capacitor CX and the sensor capacitor 50 are charged.

[0261] Here, the circuit included between the electrode pad P0 and the input terminal CIN0M2 of the switching circuit SW is represented by the equivalent circuit shown in Fig. 15. Note that CAPP shown in Fig. 15 represents the combined parasitic capacitance obtained by combining the parasitic capacitances of the diodes D0 and D1, the resistor R0, and the electrode pad P0 shown in Fig. 5.

[0262] Therefore, in the equivalent circuit shown in Figure 15, the combined capacitance CAPT when viewed from the input terminal CIN0M2 side of the switching circuit SW is given by: CAPT = (CAP1 + CAP2) · CAP2 / (CAP1 + CAPP + CAP2) CAP1: capacitance of the sensor capacitor 50 CAP2: capacitance of the additional capacitor CX CAPP: combined parasitic capacitance of P0, R0, D0, and D1

[0263] As a result, even if the capacitance CAP1 of the sensor capacitor 50 is large, the combined capacitance CAPT can be reduced by reducing the capacitance CAP2 of the additional capacitor CX connected in series therewith.

[0264] Therefore, according to the capacitance sensor circuit 15, even if the capacitance CAP1 of the externally connected sensor capacitor 50 is relatively large, it is possible to perform the above-mentioned calibration and capacitance detection process without increasing the current consumed to charge the composite capacitance CAPT.

[0265] Incidentally, the capacitance detection result (potential of relay terminals CIN0 and CIN1) by the capacitance sensor circuit 15 may contain errors due to manufacturing variations in the IC chip 100, but the capacitance sensor circuit 15 has a function to correct this error using correction capacitance circuits TRM0 and TRM1.

[0266] To use this correction function, first, an error that occurs in the capacitance detection result of the capacitance sensor circuit 15 included in the manufactured IC chip is measured, and then, based on the measurement result, correction data indicating the amount of error and whether to perform an increasing correction to correct in the increasing direction or a decreasing correction to correct in the decreasing direction is stored in advance in the memory 16.

[0267] After the product is shipped, when the power is turned on, the controller 14 controls the correction capacitance circuits TRM0 and TRM1 in accordance with the following first to fourth correction modes based on the type (large capacity, small capacity) of the sensor capacitor 50 to be detected and the above-mentioned correction data.

[0268] FIG. 16 is a diagram showing the control signals (TEST, TESTB, SEL, SELB, OPT, OPT2, EN) that the controller 14 supplies to the correction capacitance circuits TRM0 and TRM1 for each of the first to fourth correction modes, and the contents of each correction mode.

[0269] The operations of the first to fourth correction modes will be described below in order.

[0270] [First Correction Mode] The first correction mode is implemented by the controller 14 when the sensor capacitor 50 is of the large capacitance type and the correction data indicates an increasing correction.

[0271] To execute the first correction mode, the controller 14 supplies an H-level switching signal OPT2 to the switching circuit SW, the capacitance circuit CAP10, and the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 16. This causes the switching circuit SW to connect the electrode W1 of the sensor capacitor 50 to the node n50 via the electrode pad P0, the resistor R0, and the additional capacitor CX.

[0272] In the first correction mode, the controller 14 supplies a test signal TEST, an inverted test signal TESTB, a test increase / decrease designation signal OPT, and an enable signal EN, each of which has two values ​​(L level, H level), to the correction capacitance circuits TRM0 and TRM1, as shown in FIG. 16.

[0273] Furthermore, the controller 14 generates an increase / decrease correction selection signal SEL having an L level based on the correction data as shown in FIG. 16 and supplies it to the correction capacitance circuit TRM1, and also generates an inverted increase / decrease correction selection signal SELB of an H level that prompts an increase correction and supplies it to the correction capacitance circuit TRM0.

[0274] Furthermore, in the first correction mode, the controller 14 generates capacitance correction trimming signals TRM<12:0> that represent the capacitance error indicated by the correction data as an increment, and supplies them to the correction capacitance circuits TRM0 and TRM1.

[0275] As a result, the correction capacitance circuit TRM0 becomes a capacitor having a composite capacitance of the capacitors selected by the 9-bit gate signal NCNT<8:0> represented by the capacitance correction trimming signals TRM<12:8> and TRM<7:4> from among the capacitors CAP100 to CAP108. At this time, the correction capacitance circuit TRM0 adds the composite capacitance to node n50 by connecting one end of the capacitor having the composite capacitance to node n50 via the capacitance connection terminal CIN.

[0276] In the first correction mode, the test signal TEST and the increase / decrease correction selection signal SEL are supplied to the correction capacitance circuit TRM1 at L level, so that the gate signals NCNT<8:0> are all at L level, and therefore, in the first correction mode, the correction capacitance circuit TRM1 does not add capacitance to the node n60.

[0277] Therefore, in the first correction mode, the capacitance of the correction capacitance circuit TRM0 is added to the capacitance of the sensor capacitor 50. Therefore, when the detected capacitance of the sensor capacitor 50 is lower than the expected value, the first correction mode is executed to make a correction by increasing the capacitance by the amount of the decrease.

[0278] [Second Correction Mode] The second correction mode is implemented by the controller 14 when the sensor capacitor 50 is of the large capacitance type and the correction data indicates a reduced correction.

[0279] To execute the second correction mode, the controller 14 supplies an H-level switching signal OPT2 to the switching circuit SW, the capacitance circuit CAP10, and the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 16. This causes the switching circuit SW to connect the electrode W1 of the sensor capacitor 50 to the node n50 via the electrode pad P0, the resistor R0, and the additional capacitor CX.

[0280] In the second correction mode, the controller 14 supplies a test signal TEST, an inverted test signal TESTB, a test increase / decrease designation signal OPT, and an enable signal EN, each of which has two values ​​(L level, H level), to the correction capacitance circuits TRM0 and TRM1, as shown in FIG. 16.

[0281] Furthermore, based on the correction data, the controller 14 generates an increase / decrease correction selection signal SEL having an H level that prompts a decrease correction as shown in FIG. 16 and supplies it to the correction capacitance circuit TRM1, and also generates an inverted increase / decrease correction selection signal SELB having an L level and supplies it to the correction capacitance circuit TRM0.

[0282] Furthermore, in the second correction mode, the controller 14 generates capacitance correction trimming signals TRM<12:0> that represent the capacitance error indicated by the correction data as a reduction amount, and supplies the signals to the correction capacitance circuits TRM0 and TRM1.

[0283] As a result, the correction capacitance circuit TRM1 becomes a capacitor having a composite capacitance of the capacitors selected by the 9-bit gate signal NCNT<8:0> represented by the capacitance correction trimming signals TRM<12:8> and TRM<7:4> from among the capacitors CAP100 to CAP108. At this time, the correction capacitance circuit TRM1 adds the composite capacitance to the node n60 by connecting one end of the capacitor having the composite capacitance to the node n60 via the capacitance connection terminal CIN.

[0284] In the second correction mode, the test signal TEST and the inverted increase / decrease correction selection signal SELB are supplied to the correction capacitance circuit TRM0 at L level, so that all of the gate signals NCNT<8:0> are at L level, and therefore, no capacitance is added to the node n50 by the correction capacitance circuit TRM0 in the second correction mode.

[0285] Therefore, by adding the capacitance of the correction capacitance circuit TRM1 to the capacitance of the capacitance circuit CAP10 in the second correction mode, the capacitance as the detection result (e.g., the potential of CIN0) for the sensor capacitor 50 is relatively reduced. Therefore, when the detection result of the capacitance of the sensor capacitor 50 (e.g., the potential of CIN0) is higher than the expected value, the second correction mode is executed to perform a correction that reduces the capacitance corresponding to the increase.

[0286] [Third Correction Mode] The third correction mode is implemented by the controller 14 when the sensor capacitor 50 is of the small capacitance type and the correction data indicates an increasing correction.

[0287] To execute the third correction mode, the controller 14 supplies a switching signal OPT2 having an L level to the switching circuit SW, the capacitance circuit CAP10, and the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 16. As a result, the switching circuit SW connects the electrode W1 of the sensor capacitor 50 to the node n50 via the electrode pad P0, the resistor R0, and the node n0.

[0288] In the third correction mode, the controller 14 supplies a test signal TEST, an inverted test signal TESTB, a test increase / decrease designation signal OPT, and an enable signal EN, each of which has two values ​​(L level, H level), to the correction capacitance circuits TRM0 and TRM1, as shown in FIG. 16.

[0289] Furthermore, the controller 14 generates an increase / decrease correction selection signal SEL having an L level based on the correction data as shown in FIG. 16 and supplies it to the correction capacitance circuit TRM1, and also generates an inverted increase / decrease correction selection signal SELB of an H level that prompts an increase correction and supplies it to the correction capacitance circuit TRM0.

[0290] Furthermore, in the third correction mode, the controller 14 generates capacitance correction trimming signals TRM<12:0> that represent the capacitance error indicated by the correction data as an increment, and supplies the signals to the correction capacitance circuits TRM0 and TRM1.

[0291] As a result, the correction capacitance circuit TRM0 becomes a capacitor having a composite capacitance of the capacitors selected by the 9-bit gate signal NCNT<8:0> represented by the capacitance correction trimming signals TRM<12:8> and TRM<3:04> from among the capacitors CAP100 to CAP108. At this time, the correction capacitance circuit TRM0 adds the composite capacitance to node n50 by connecting one end of the capacitor having the composite capacitance to node n50 via the capacitance connection terminal CIN.

[0292] In the third correction mode, the test signal TEST and the increase / decrease correction selection signal SEL are supplied to the correction capacitance circuit TRM1 at L level, so that the gate signals NCNT<8:0> are all at L level, and therefore, in the first correction mode, the correction capacitance circuit TRM1 does not add capacitance to the node n60.

[0293] Therefore, in the third correction mode, the capacitance of the correction capacitance circuit TRM0 is added to the capacitance of the sensor capacitor 50. Therefore, when the detection result of the capacitance of the sensor capacitor 50 (for example, the potential of CIN0) is lower than the expected value, the third correction mode is executed to make a correction to increase the capacitance by the amount of the decrease.

[0294] [Fourth Correction Mode] The fourth correction mode is implemented by the controller 14 when the sensor capacitor 50 is of a small capacitance type and the correction data indicates reduced correction.

[0295] To execute the fourth correction mode, the controller 14 supplies a switching signal OPT2 having an L level to the switching circuit SW, the capacitance circuit CAP10, and the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 16. As a result, the switching circuit SW connects the electrode W1 of the sensor capacitor 50 to the node n50 via the electrode pad P0, the resistor R0, and the node n0.

[0296] In the fourth correction mode, the controller 14 supplies a test signal TEST, an inverted test signal TESTB, a test increase / decrease designation signal OPT, and an enable signal EN, each of which has two values ​​(L level, H level), to the correction capacitance circuits TRM0 and TRM1, as shown in FIG. 16.

[0297] Furthermore, based on the correction data, the controller 14 generates an increase / decrease correction selection signal SEL having an H level that prompts a decrease correction as shown in FIG. 16 and supplies it to the correction capacitance circuit TRM1, and also generates an inverted increase / decrease correction selection signal SELB having an L level and supplies it to the correction capacitance circuit TRM0.

[0298] Furthermore, in the fourth correction mode, the controller 14 generates capacitance correction trimming signals TRM<12:0> that represent the capacitance error indicated by the correction data as a reduction amount, and supplies the signals to the correction capacitance circuits TRM0 and TRM1.

[0299] As a result, the correction capacitance circuit TRM1 becomes a capacitor having a composite capacitance of the capacitors selected by the 9-bit gate signal NCNT<8:0> represented by the capacitance correction trimming signals TRM<12:8> and TRM<7:4> from among the capacitors CAP100 to CAP108. At this time, the correction capacitance circuit TRM1 adds the composite capacitance to the node n60 by connecting one end of the capacitor having the composite capacitance to the node n60 via the capacitance connection terminal CIN.

[0300] In the fourth correction mode, the test signal TEST and the inverted increase / decrease correction selection signal SELB are supplied to the correction capacitance circuit TRM0 at L level, so that the gate signals NCNT<8:0> are all at L level, and therefore, no capacitance is added to the node n50 by the correction capacitance circuit TRM0 in the fourth correction mode.

[0301] Therefore, by adding the capacitance of the correction capacitance circuit TRM1 to the capacitance of the capacitance circuit CAP10 in the fourth correction mode, the capacitance as the detection result (for example, the potential of CIN0) for the sensor capacitor 50 is relatively reduced. Therefore, when the detection result of the capacitance of the sensor capacitor 50 (for example, the potential of CIN0) is higher than the expected value, the fourth correction mode is executed to perform a correction to reduce the capacitance corresponding to the increase.

[0302] Next, the test operation of the capacitance sensor circuit 15 will be described.

[0303] In the capacitance sensor circuit 15, to check whether the calibration operation and the determination operation have been performed correctly, a reduction correction test is performed after performing a reduction correction of the capacitance, and an increase correction test is performed after performing an increase correction of the capacitance. Note that, when performing the reduction correction test, the following reduction correction test settings are first made.

[0304] [Settings for Reduction Correction Test] When performing a reduction correction test, first, the controller 14 supplies an H-level test signal TEST and an L-level inverted test signal TESTB to the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 17. Furthermore, the controller 14 supplies an L-level test increase / decrease designation signal OPT and an H-level enable signal EN to the correction capacitance circuit TRM0, as shown in Fig. 17.

[0305] Furthermore, the controller 14 also supplies the margin trimming signal TM<6:0> set in the capacitance circuit CAP10 to the correction capacitance circuit TRM0.

[0306] In addition, since the correction capacitance circuit TRM1 is fixedly applied with a ground voltage equivalent to the L level as the margin trimming signal TM<6:0>, no capacitance is added to the node n60 while it is receiving the above-mentioned H-level test signal TEST and L-level inverted test signal TESTB.

[0307] Meanwhile, in the correction capacitance circuit TRM0, a signal obtained by shifting the margin trimming signal TM<6:0> set in the capacitance circuit CAP10 by one bit toward the most significant bit is supplied as a gate signal NCNT<7:1> to the gate terminals of the transistors NMOS107 to NMOS100 as shown in Fig. 12. As a result, the correction capacitance circuit TRM0 adds the combined capacitance of the capacitors CAP108 to CAP100 shown in Fig. 12 selected in accordance with the margin trimming signal TM<6:0> to the node n50 via the capacitance connection terminal CIN.

[0308] Therefore, through the above operation, the capacitance (composite capacitance) of the correction capacitance circuit TRM0 becomes twice the margin capacitance set in the second circuit section 10B of the capacitance circuit CAP10.

[0309] Then, with a capacitance C50 corresponding to the capacitance of the sensor capacitor 50 added to the electrode pad P0, the controller 14 executes the calibration mode CM described above until the combined capacitance of the correction capacitance circuit TRM0 and the capacitance C50 becomes equal to the capacitance of the capacitance circuit CAP10. At this time, the controller 14 supplies the trimming signal TCO<n:0>, which is used when the combined capacitance of the correction capacitance circuit TRM0 and the capacitance C50 becomes equal to the capacitance of the capacitance circuit CAP10, to the calibration circuit CAL as TC<n:0>. Furthermore, the controller 14 supplies a high-level sensor enable signal CSREN and a low-level calibration enable signal CALEN to the calibration circuit CAL, and also supplies a low-level switching signal OPT2 to the capacitance circuit CAP10. At this time, since the calibration enable signal CALEN becomes low, the control signal ICAL also becomes low, and all of the ITM<6:0> signals in FIG. 10 also become low. Therefore, none of the capacitors CAP30-0 to 30-6 shown in FIG. 10 functions as the electrostatic capacitance of the capacitance circuit CAP10.

[0310] As a result, the capacitance of the capacitance circuit CAP10, i.e., the capacitance of the relay terminal CIN1 of the judgment circuit JC, is set to a value obtained by subtracting the margin capacitance based on the margin trimming signal TM<6:0> from the combined capacitance obtained by adding the capacitance C50 to the current capacitance of the correction capacitance circuit TRM.

[0311] Thereafter, the controller 14 supplies an enable signal EN at an L level to the correction capacitance circuit TRM0. At this time, since the test increase / decrease designation signal OPT is at an L level, ITM<6:0> shown in FIG. 11 all become an L level. Therefore, none of the capacitors CAP108-CAP100 shown in FIG. 12 function as the electrostatic capacitance of the correction capacitance circuit TRM0.

[0312] As a result, the capacitance of the relay terminal CIN0 of the judgment circuit JC is set to a value obtained by subtracting the margin capacitance based on the margin trimming signal TM<6:0> from the capacitance of the relay terminal CIN1 of the judgment circuit JC.

[0313] Therefore, according to the setting for the reduction correction test, by switching the enable signal EN from H level to L level, it is possible to test the operation of the capacitance sensor circuit 15 in a state where the capacitance of the relay terminal CIN0 of the judgment circuit JC is reduced by the margin capacitance based on the margin trimming signal TM<6:0>.

[0314] [Settings for Incremental Correction Test] When performing an incremental correction test, the controller 14 first supplies an H-level test signal TEST and an L-level inverted test signal TESTB to the correction capacitance circuits TRM0 and TRM1, as shown in Fig. 17. The controller 14 also supplies an HL-level test increase / decrease designation signal OPT and an H-level enable signal EN to the correction capacitance circuit TRM0, as shown in Fig. 17.

[0315] Furthermore, the controller 14 supplies the margin trimming signals TM<6:0> set in the capacitance circuit CAP10 to the correction capacitance circuit TRM0.

[0316] In addition, since the correction capacitance circuit TRM1 is fixedly applied with a ground voltage equivalent to the L level as the margin trimming signal TM<6:0>, no capacitance is added to the node n60 while it is receiving the above-mentioned H-level test signal TEST and L-level inverted test signal TESTB.

[0317] In the correction capacitance circuit TRM0, since the enable signal EN and the test increase / decrease designation signal OPT are both at H level, ITM<6:0> shown in Fig. 11 are all at L level. Therefore, none of the capacitors CAP108-CAP100 shown in Fig. 12 function as the electrostatic capacitance of the correction capacitance circuit TRM0.

[0318] As a result, the capacitance of the correction capacitance circuit TRM0 becomes substantially zero, and the capacitance of the relay terminal CIN0 of the determination circuit JC of the correction capacitance circuit TRM0 becomes a capacitance C50 equivalent to the capacitance of the sensor capacitor 50.

[0319] The controller 14 then executes the calibration mode CM described above until the capacitance C50 and the capacitance of the capacitance circuit CAP10 become equal. At this time, the controller 14 supplies the trimming signal TCO<n:0>, which is used when the capacitances C50 and CAP10 become equal, to the calibration circuit CAL as TC<n:0>. Furthermore, the controller 14 supplies an H-level sensor enable signal CSREN and an L-level calibration enable signal CALEN to the calibration circuit CAL, and also supplies an L-level switching signal OPT2 to the capacitance circuit CAP10. At this time, since the calibration enable signal CALEN becomes L, the control signal ICAL also becomes L, and all of the ITM<6:0> signals in FIG. 10 also become L. Therefore, none of the capacitors CAP30-0 to CAP30-6 shown in FIG. 10 function as capacitance for the capacitance circuit CAP10.

[0320] As a result, the capacitance of the capacitance circuit CAP10, i.e., the capacitance of the relay terminal CIN1 of the judgment circuit JC, is set to a value obtained by subtracting the margin capacitance based on the margin trimming signal TM<6:0> from the capacitance C50.

[0321] Thereafter, the controller 14 supplies an enable signal EN at an L level to the correction capacitance circuit TRM0. At this time, because the test increase / decrease designation signal OPT is at an H level, a signal obtained by shifting the margin trimming signal TM<6:0> by one bit toward the most significant bit is supplied as the gate signal NCNT<7:1> to the gate terminals of the transistors NMOS107 to NMOS100 as shown in FIG. 12. As a result, the correction capacitance circuit TRM0 adds the combined capacitance of the capacitors CAP108 to CAP100 shown in FIG. 12 selected in accordance with the gate signal NCNT<7:1> representing the margin trimming signal TM<6:0> to the node n50 via the capacitance connection terminal CIN.

[0322] Therefore, according to the setting for the increase correction test, by switching the enable signal EN from H level to L level, it is possible to test the operation of the capacitance sensor circuit 15 in a state where the capacitance of the relay terminal CIN0 of the judgment circuit JC is increased by the margin capacitance based on the margin trimming signal TM<6:0>.

[0323] In addition, in the above-mentioned settings for the reduction correction test and the increase correction test, the margin trimming signal TM<6:0> makes it possible to set the capacitance of the capacitance circuit CAP10 to a capacitance that is less by an amount equivalent to half the difference between the capacitance of the dielectric in the sensor capacitor 50 before it melts and the capacitance of the dielectric after it melts.

[0324] Furthermore, it is possible to perform both an increase correction and a decrease correction of the capacitance detection result, regardless of whether the capacitance of the sensor capacitor to be measured is large or small. Also, by using the correction capacitance circuit TRM0 provided for the increase correction in both the increase correction test and the decrease correction test, it is possible to reduce the chip size of the IC chip 100.

[0325] Next, the leak test mode of the capacitance sensor circuit 15 will be described.

[0326] In the leak test mode, the controller 14 supplies a high-level leak test signal ILT to the decision circuit JC, causing the inverted signal IILTB in the decision circuit JC shown in FIG.

[0327] 7 receives the H-level control signal IILT at its gate and turns off, and the transistor NM13 receives the H-level control signal IILT at its gate and turns on.

[0328] The transistor NM11 receives the inverted signal IILTB at L level at its gate and is turned off. Similarly, the transistor NM12 receives the inverted signal IILTB at L level at its gate and is turned off.

[0329] As a result, both the node n0 and the node n1 shown in Fig. 5 are in a high impedance state, and the potential of the node n3 shown in Fig. 7 becomes L level.

[0330] When the potential of the node n3 becomes L level, the transistor NM8 is turned off, and therefore no through current flows between the bias signal generating unit 32 and the differential amplifier unit 35. This state period is the leakage test mode.

[0331] In this way, in the leak test mode, the controller 14 supplies an H-level leak test signal ILT to the determination circuit JC, thereby putting the node n0 to which the sensor capacitor 50 is connected and the node n1 to which the capacitance circuit CAP10 is connected into a high impedance state. Therefore, it becomes possible to perform a screening test to detect short-circuit defects and the like of the electrode pad P0 in the test process after manufacturing the IC chip 100.

[0332] In the above embodiment, the sensor capacitor 50 is configured such that the capacitance decreases when the ambient temperature exceeds the melting point of the wax used as a dielectric. However, it may be configured such that the capacitance increases when the ambient temperature exceeds the melting point of the wax.

[0333] Furthermore, instead of the wax described above, a material that irreversibly changes its form from solid to liquid in response to humidity, vibration, or the like may be used as the dielectric of the sensor capacitor 50. For example, if the dielectric irreversibly changes its form from solid to liquid when exposed to an environment with a humidity above a predetermined level or a humidity below a predetermined level, it would be possible to detect a change in humidity as an environmental change. Furthermore, if the dielectric irreversibly changes its form from solid to liquid in response to vibrations above a predetermined level, it would be possible to detect vibrations as an environmental change.

[0334] In the above embodiment, the margin trimming signal TM is 7 bits, and the capacitance correction trimming signal TRM is 13 bits. Furthermore, the 13-bit capacitance correction trimming signal TRM<12:0> is divided into a basic capacitance correction trimming signal TRM<12:8>, a capacitance correction trimming signal TRM<7:4> added when measuring a large capacitance, and a capacitance correction trimming signal TRM<3:0> added when measuring a small capacitance. However, the number of bits for each signal is not limited to the above numbers, and may be any number of bits as long as it is at least two or more.

[0335] Furthermore, the configurations of the correction capacitance circuits TRM0 and TRM1 are not limited to those shown in FIGS.

[0336] Furthermore, in the correction capacitance circuits TRM0 and TRM1 shown in FIG. 12, one terminal of each of the parallel-connected capacitors is connected to the ground level by an NMOS transistor connected thereto, but one terminal of each of the parallel-connected capacitors may be simultaneously grounded by a single transistor.

[0337] In addition, in the correction capacitance circuits TRM0 and TRM1 shown in FIG. 12, a plurality of capacitors connected in series may be employed instead of the capacitors connected in parallel.

[0338] In short, the IC chip 100 (semiconductor device) including the capacitance sensor circuit 15 may include an electrode pad (P0) for externally connecting the capacitor (50) to be detected, as well as the following: a reference capacitance circuit, first and second nodes, a judgment circuit, and first and second correction capacitance circuits. That is, the first node (n50) is connected to the electrode pad (P0). The reference capacitance circuit (CAP10) adds a reference capacitance to the second node (n60). The judgment circuit (JC) includes first and second relay terminals (CIN0, CIN1) and supplies a charging current from the first relay terminal (CIN0) to the electrode pad (P0) via the first node (n50) and also supplies a charging current from the second relay terminal (CIN1) to the reference capacitance circuit (CAP10) via the second node (n60). The determination circuit (JC) compares the magnitude of the potential at each of the first and second relay terminals to detect the capacitance of the capacitor (50) and determine whether or not the capacitance has changed.

[0339] The first correction capacitance circuit (TRM0) has a variable capacitance and adds a specified capacitance to the first node (n50). That is, the first correction capacitance circuit (TRM0) receives an increase / decrease correction selection signal (SEL) indicating whether to select an increase correction or a decrease correction, and a capacitance correction signal (TRM) indicating the amount of capacitance correction. When the increase / decrease correction selection signal (SEL) indicates an increase correction, the first correction capacitance circuit (TRM0) adds a capacitance to the first node (n50) by the amount of correction indicated by the capacitance correction signal (TRM).

[0340] The second correction capacitance circuit (TRM1) has a variable capacitance and adds a specified capacitance to the second node (n60). That is, the second correction capacitance circuit (TRM1) receives an increase / decrease correction selection signal (SELB) and a capacitance correction signal (TRM), and when the increase / decrease correction selection signal indicates a decrease correction, adds a capacitance corresponding to the correction amount indicated by the capacitance correction signal (TRM) to the second node (n60).

[0341] With this configuration, if an error occurs in the detection result of the capacitance of the capacitor that causes it to be smaller than the desired expected value (capacitance) due to manufacturing variations, etc., the first correction capacitance circuit can make a correction to increase the decrease in capacitance. Furthermore, even if an error occurs in the detection result of the capacitance that causes it to be larger than the expected value, the second correction capacitance circuit can make a correction to reduce the increase in capacitance.

[0342] In this case, it is sufficient that the first and second correction capacitance circuits provide only a capacitance corresponding to the estimated capacitance error due to manufacturing variations, etc. Furthermore, the first correction capacitance circuit can be used to perform not only the above-mentioned increase correction and decrease correction, but also the setting of an increase correction test and a decrease correction test.

[0343] Therefore, according to the present invention, it is possible to detect the capacitance of a capacitor with high accuracy while suppressing an increase in chip size.

[0344] 15 Capacitance sensor circuit 50 Sensor capacitor CAL Calibration circuit CAP10 Capacitance circuit JC Judgment circuit P0 to P2 Electrode pads SW Switching circuit TRM0, TRM1 Correction capacitance circuit

Claims

1. an electrode pad connected between a capacitor to be detected and a first node, for connecting the capacitor to an external device; a reference capacitance circuit having a reference capacitance and applying the reference capacitance to the second node; a determination circuit including first and second relay terminals, which supplies a charging current from the first relay terminal through the first node to the electrode pad and also supplies a charging current from the second relay terminal through the second node to the reference capacitance circuit, and subsequently detects the capacitance of the capacitor and determines whether the capacitance of the capacitor has changed by comparing the magnitude of the potential of each of the first relay terminal and the second relay terminal; a first correction capacitance circuit having a variable capacitance and adding a specified capacitance to the first node; a second correction capacitance circuit having a variable capacitance and adding a specified capacitance to the second node.

2. the first correction capacitance circuit receives an increase / decrease correction selection signal indicating whether to select an increase correction or a decrease correction, and a capacitance correction signal indicating an amount of correction of capacitance, and adds a capacitance of the amount of correction indicated by the capacitance correction signal to the first node when the increase / decrease correction selection signal indicates the increase correction; 2. The semiconductor device according to claim 1, wherein the second correction capacitance circuit receives the increase / decrease correction selection signal and the capacitance correction signal, and adds, to the second node, a capacitance equivalent to the correction amount indicated by the capacitance correction signal when the increase / decrease correction selection signal indicates the decrease correction.

3. the reference capacitance circuit is connected to the second node and includes first and second circuit portions having variable capacitance; a controller that supplies a first trimming signal to the second circuit unit to set a capacitance of the second circuit unit to a margin capacitance; a calibration circuit that performs calibration by supplying a second trimming signal to the first circuit unit, the second trimming signal setting the capacitance of the first circuit unit to a capacitance that changes stepwise over time, The controller:

3. The semiconductor device according to claim 1, wherein when the determination circuit determines that the potential of the first relay terminal is equal to the potential of the second relay terminal during execution of the calibration, the second trimming signal is stored in a non-volatile memory, and the capacitance of the first circuit portion is set by the second trimming signal stored in the memory the next time power is turned on.

4. The controller: When a reduction correction test is performed, the first correction capacitance circuit is controlled so as to add a capacitance corresponding to the margin capacitance based on the first trimming signal instead of the capacitance correction signal to the first node, and then the calibration circuit is caused to perform the calibration; 4. The semiconductor device according to claim 3, wherein when the determination circuit determines during execution of the calibration that the potential of the first relay terminal is equal to the potential of the second relay terminal, the first correction capacitance circuit controls the capacitance added to the first node to be zero, thereby reducing the capacitance of the first relay terminal by an amount corresponding to the margin capacitance.

5. The controller: When an increase correction test is to be performed, the capacitance added by the first correction capacitance circuit to the first node is set to zero, and then the calibration is performed by the calibration circuit; 4. The semiconductor device according to claim 3, wherein when the determination circuit determines during execution of the calibration that the potential of the first relay terminal is equal to the potential of the second relay terminal, the first correction capacitance circuit is controlled so as to add a capacitance corresponding to the margin capacitance to the first node based on the first trimming signal instead of the capacitance correction signal, thereby increasing the capacitance of the first relay terminal by an amount corresponding to the margin capacitance.

6. An additional capacitor; 3. The semiconductor device according to claim 1, further comprising: a switching circuit which receives a switching signal indicating whether the capacitance of the capacitor is greater than a predetermined value, and when the switching signal indicates the greater value, switches a state in which the first node is connected to the electrode pad to a state in which the first node is connected to the electrode pad via the additional capacitor.

7. A sensor capacitor whose capacitance changes in response to environmental changes; a first node to which an electrode of the sensor capacitor is connected; a reference capacitance circuit having a reference capacitance and applying the reference capacitance to the second node; a determination circuit including first and second relay terminals, which supplies a charging current from the first relay terminal through the first node to the electrode pad and also supplies a charging current from the second relay terminal through the second node to the reference capacitance circuit, and subsequently determines whether or not the capacitance of the sensor capacitor has changed by comparing the magnitude of the potential of each of the first relay terminal and the second relay terminal; a first correction capacitance circuit that receives an increase / decrease correction selection signal indicating whether to select an increase correction or a decrease correction, and a capacitance correction signal indicating a correction amount of capacitance, and adds a capacitance equivalent to the correction amount indicated by the capacitance correction signal to the first node when the increase / decrease correction selection signal indicates the increase correction; a second correction capacitance circuit that receives the increase / decrease correction selection signal and the capacitance correction signal, and adds a capacitance equivalent to the correction amount indicated by the capacitance correction signal to the second node when the increase / decrease correction selection signal indicates the decrease correction.

8. the first correction capacitance circuit receives an increase / decrease correction selection signal indicating whether to select an increase correction or a decrease correction, and a capacitance correction signal indicating an amount of correction of capacitance, and adds a capacitance of the amount of correction indicated by the capacitance correction signal to the first node when the increase / decrease correction selection signal indicates the increase correction; 8. The capacitance sensor device according to claim 7, further comprising: a second correction capacitance circuit that receives the increase / decrease correction selection signal and the capacitance correction signal, and adds a capacitance equivalent to the correction amount indicated by the capacitance correction signal to the second node when the increase / decrease correction selection signal indicates the decrease correction.

9. the reference capacitance circuit is connected to the second node and includes first and second circuit portions having variable capacitance; a controller that supplies a first trimming signal to the second circuit unit to set a capacitance of the second circuit unit to a margin capacitance; a calibration circuit that performs calibration by supplying a second trimming signal to the first circuit unit, the second trimming signal setting the capacitance of the first circuit unit to a capacitance that changes stepwise over time, The controller: The capacitance sensor device according to claim 7 or 8, characterized in that when the judgment circuit judges that the potential of the first relay terminal is equal to the potential of the second relay terminal during execution of the calibration, the second trimming signal is stored in a non-volatile memory, and the capacitance of the first circuit portion is set by the second trimming signal stored in the memory when the power is next turned on.

10. The controller: When a reduction correction test is performed, the first correction capacitance circuit is controlled so as to add a capacitance corresponding to the margin capacitance based on the first trimming signal instead of the capacitance correction signal to the first node, and then the calibration circuit is caused to perform the calibration; 10. The capacitive sensor device according to claim 9, characterized in that, when the determination circuit determines that the potential of the first relay terminal is equal to the potential of the second relay terminal during execution of the calibration, the first correction capacitance circuit controls the capacitance added to the first node to be zero, thereby reducing the capacitance of the first relay terminal by an amount corresponding to the margin capacitance.

11. The controller: When an increase correction test is to be performed, the capacitance added by the first correction capacitance circuit to the first node is set to zero, and then the calibration is performed by the calibration circuit; 10. The capacitive sensor device according to claim 9, wherein when the determination circuit determines that the potential of the first relay terminal is equal to the potential of the second relay terminal during execution of the calibration, the first correction capacitance circuit is controlled to add a capacitance corresponding to the margin capacitance to the first node based on the first trimming signal instead of the capacitance correction signal, thereby increasing the capacitance of the first relay terminal by an amount corresponding to the margin capacitance.

12. An additional capacitor; The capacitance sensor device according to claim 7 or 8, further comprising a switching circuit which receives a switching signal indicating whether the capacitance of the capacitor is larger than a predetermined value, and when the switching signal indicates the large capacitance, switches a state in which the first node is connected to the electrode pad to a state in which the first node is connected to the electrode pad via the additional capacitor.