Patent ID: 7893768

Claim:
An apparatus comprising: an amplifier having a first gain and a second gain that are selected by a first selection signal, wherein the amplifier receives an input voltage and generates a plurality of output voltages by amplifying the input voltage by one of the first and second gains, and wherein the amplifier includes an impedance network that is adapted to generate a first impedance and a second impedance that correspond to the first and second gains based on the first selection signal; a comparator that receives the plurality of output voltages from the amplifier, wherein the comparator compares the greater of the plurality of outputs from the amplifier to one of a first threshold voltage and a second threshold voltage; a switch network that is adapted to provide at least one of the first and second threshold voltages to the comparator based on a second selection signal; and gain adjustment logic that receives an output from the comparator, that provides the first selection signal to the amplifier, and that provides the second selection signal to the switch network, wherein the gain adjustment logic provides a hysteresis when transitioning from the second gain to the first gain.