a digital automatic gain control system includes an envelope detector coupled to a system input for converting an ac input signal into a dc output signal . an analog - to - digital converter has an input coupled to receive the output signal of the envelope detector and an output coupled to a digital register controlled by a digital control circuit . a programmable gain amplifier has control inputs coupled to receive an output of the digital register for controlling the gain of the programmable gain amplifier such that the signal level at a system output of the programmable gain amplifier remains substantially constant as the signal level at the system input varies within a specified dynamic range .