Oscillator circuits are used in computers, computer peripherals, counters, timers, calculators, phase-locked loops, digital multimeters, oscilloscopes, and numerous other applications. An oscillator circuit may be used to provide a clock signal, to produce an accurate waveform, and the like.
A type of oscillator circuit referred to as a relaxation oscillator generally operates as follows. The relaxation oscillator charges a capacitor with a reference current, and discharges the capacitor rapidly if the capacitor voltage reaches a reference voltage. The charging and discharging of the capacitor generates a sawtooth waveform that is used to generate the output signal. Alternatively, the polarity of the current may be reversed when the reference voltage is reached, generating a triangle waveform rather than a sawtooth waveform.
Also, the reference voltage is typically provided by a bandgap reference, so that the reference voltage is substantially independent of temperature and supply voltage. The current used to charge the capacitor is also typically substantially independent of temperature and supply voltage. In this way, the oscillator frequency can be substantially independent of variations in temperature and supply voltage.