Patent ID: 8836350

Claim:
A method for determining a capacitance of an external capacitor with an integrated circuit device, said method comprising the steps of: using only a sample and hold capacitor of an analog-to-digital converter (ADC) within the integrated circuit device to measure a sensor capacitor having a first electrode connected with an external pin of the integrated circuit device, wherein a measurement is performed by the following steps: charging from a voltage reference within the integrated circuit device the sample and hold capacitor to a first voltage by connecting the voltage reference with the single internal capacitor, wherein the sample and hold capacitor has a known capacitance; while keeping the voltage reference connected to the sample and hold capacitor, measuring a first voltage on the sample and hold capacitor with the ADC; discharging the external capacitor with a first switch in the integrated circuit device; disconnecting the voltage reference and coupling the sample and hold capacitor to the external capacitor with a second switch in the integrated circuit device so that some of the charge on the sample and hold capacitor is transferred to the external capacitor; de-coupling the sample and hold capacitor from the external capacitor and measuring a second voltage across the internal capacitor with the ADC in the integrated circuit device; and calculating a capacitance of the external capacitor from the measured first voltage, the measured second voltage, and the known capacitance of the sample and hold capacitor with a digital processor in the integrated circuit device.