An up-down counter, multiplier, digital-to-analog (D/A) converter, and high-speed comparators are employed to achieve an automatic gain control (AGC) circuit, which corrects the pair of characteristic roots of the overall system automatically to the imaginary axis of the complex frequency plane. A negative feedback technique with digital hardware is applied on the loop gain control. No lowpass filter is needed to detect the oscillation amplitude. Thus, this technique is suitable for sinusoidal oscillators with a wide oscillation frequency range. Wien-bridge and phase-shift oscillators with an oscillation frequency range from 17 Hz to 1 MHz are tested with the proposed AGC circuit. The total harmonic distortions of the Wien-bridge sinusoidal oscillator with the proposed AGC circuit are verified to be very small. An application to a variable-frequency sinusoidal oscillator is also described. The experimental results demonstrate the static characteristics and dynamic responses of the overall system.