techniques of compensating frequency in an output in reference to a reference frequency signal are disclosed . the reference frequency signal may be from a crystal oscillator or other oscillators . due to the changes of the temperature , the reference frequency signal drifts . according to one aspect of the techniques , a temperature frequency correction word is generated in accordance with a frequency compensation value in view of a current temperature to generate a substantially temperature compensated frequency output from a reference frequency signal . the frequency control word is produced from a successive approximation circuit configured to produce the temperature frequency correction word in accordance with the frequency compensation value in view of the current temperature . both the temperature frequency correction word and a frequency control word are data represented in a sequence of bits . as a result , the compensated frequency output can be of high precision .