Patent ID: 7436913

Claim:
An automatic gain control apparatus for controlling a gain of a variable gain amplifier to enable an output signal of the variable gain amplifier to have a target gain level, comprising: a power detector for calculating a mean power of the output signal of the variable gain amplifier, and converting the calculated mean power into a binary code; a gain code generator for receiving a mean power code from the power detector, and generating a gain code corresponding to the received mean power code; and a voltage generator for receiving the gain code from the gain code generator, calculating a difference between the received gain code and a target gain code associated with the output signal of the variable gain amplifier to detect an error code, and generating a gain control voltage for compensating for the difference between the two gain codes on the basis of the detected error code, wherein the gain code generator includes: an encoder for receiving a binary value of a mean power value from the power detector, and generating an MSB (Most Significant Bit) position at which a specific value of 1 initially appears; an underflow/overflow detector for receiving an output value from the encoder, and determining whether the output value of the corresponding variable gain amplifier is outside of a prescribed range between a minimum gain level to a maximum gain level; a base-level gain code generator for receiving the output value from the encoder and an output signal indicative of generation of either one of underflow and overflow states from the underflow/overflow detector, and generating a base-level gain code corresponding to the generated state information; an offset-level gain code generator for receiving the output value from the encoder and the output signal indicative of generation of either one of underflow and overflow states from the underflow/overflow detector, and generating an offset-level gain code corresponding to the generated state information; and an adder for adding the base-level gain code and the offset-level gain code, and generating a gain code corresponding to the mean power detected by the power detector.