Patent ID: 8390384

Claim:
An integrated circuit device with a frequency tunable internal clock oscillator having a precision frequency that is automatically maintained by using a charge time measurement unit (CTMU), said integrated circuit device comprising: a charge time measurement unit (CTMU) having a capacitor of known value and a constant current source of known value; a frequency tunable clock oscillator supplying a clock signal at a frequency to the CTMU; an analog-to-digital converter (ADC) coupled to the CTMU; and a digital processor having a memory, the digital processor is coupled to the CTMU, the frequency tunable clock oscillator and the ADC, wherein the digital processor causes the CTMU to begin charging the known value capacitor with the known value constant current source upon detection of a first logic transition of the clock signal indicating a beginning of a period thereof, the CTMU stops charging the capacitor upon detection of a second logic transition of the clock signal indicating an end of the period thereof, the ADC samples and converts a voltage on the capacitor to a digital voltage value, the digital processor reads the digital voltage value from the ADC and converts this digital voltage value into a period time value, the digital processor compares the period time value to a reference period time value, wherein: if the period time value is greater than the reference period time value then the digital processor causes the frequency tunable clock oscillator to increase the frequency thereof, if the period time value is less than the reference period time value then the digital processor causes the frequency tunable clock oscillator to decrease the frequency thereof, and if the period time value is substantially the same as the reference period time value then the frequency of the frequency tunable clock oscillator is not changed.