A technique for dynamically calibrating a successive approximation charge
to digital converter by toggling at least some portion of the converter
between two predetermined states, with the design goal of balancing the
voltage and/or charge that is output in the two states. The two states
are chosen such that they are expected to generate the same output
voltage when the converter is in "normal" operation mode, e.g., within a
fraction of the Least Significant Bit (LSB) resolution of the converter.
If there is an imbalance, switching between the two calibration states
invariably generates a square wave signal that toggles between two
distinct values. A synchronous demodulator having a bandwidth centered at
the toggle frequency can then be used to accurately detect an amount of
error, which is then feedback to generate correction signals. If there
are undesirable static offsets introduced by the synchronous demodulator
or by the signal and/or charge levels output by the two differential
halves of the converter, a properly timed latch can be used to further
stabilize the error signal.