Patent ID: 8493098

Claim:
A compensation circuit for compensating an input offset voltage of a comparator, wherein the comparator includes two input terminals and an output terminal, wherein the two input terminals receive a differential alternating current (AC) input signal, and the output terminal provides an output signal that is related to the differential alternating current (AC) input signal, the compensation circuit comprising: a compensation comparator for comparing the output signal of the comparator to a reference threshold, wherein the output signal of the comparator spends a first amount of time above the reference threshold and a second amount of time below the reference threshold; a first voltage accumulator, the first voltage accumulator coupled to the compensation comparator, the first voltage accumulator producing a first voltage that is proportional to the first amount of time that the output signal of the comparator spends above the reference threshold; a second voltage accumulator, the second voltage accumulator coupled to the compensation comparator, the second voltage accumulator producing a second voltage that is proportional to the second amount of time that the output signal of the comparator spends below the reference threshold; the first voltage used to provide a first compensation signal to a first one of the two input terminals of the comparator; and the second voltage used to provide a second compensation signal to a second one of the two input terminals of the comparator.