BRIEF DESCRIPTION OF THE DRAWINGS
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
FIG. 1 illustrates a conventional auto gain control circuit with zero decibel gain;
FIG. 2 shows an auto gain control circuit according to an embodiment of the invention;
FIG. 3 shows a variable gain amplifier according to an embodiment of the invention; and
FIG. 4 shows a variable gain amplifier according to an embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTION
FIG. 2 shows auto gain control circuit 200 according to an embodiment of the invention. Auto gain control circuit 200 comprises first peak detector 210, variable gain amplifier 220, second peak detector 240, multiplexer 250 and controller 260. First peak detector 210 receives input signal S21 from input terminal Input and detects peaks of input signal S21 to generate first peak signal S23. Variable gain amplifier 220 receives input signal S21 and adjusts its gain to amplify input signal S21 to generate output signal S22 to output terminal Output according to control signal S26.
In an embodiment of the invention, variable gain amplifier 220 may amplify or attenuate input signal S21. For example, the range of the gain of variable gain amplifier 220 is −10 dB˜+10 dB. In another embodiment of the invention, variable gain amplifier 220 further comprises a plurality of attenuators (d1, d2 . . . dn) and a plurality of variable gain amplifiers (A1, A2 . . . An) coupled in serial, as shown in FIG. 3. Attenuators (d1, d2 . . . dn) may be voltage dividers. Second peak detector 240 is coupled to variable gain amplifier 220 to receive output signal S22 and detects peaks of output signal S22 to generate second peak signal S24. Multiplexer 250 is coupled to first peak detector 210 to receive first peak signal S23 and reference voltage Vref. Multiplexer 250 selectively outputs first peak signal S23 or reference voltage Vref according to control signal S3. Controller 260 is coupled to variable gain amplifier 220, second peak detector 240 and multiplexer 250. Controller 260 generates control signal S26 according to second peak signal S24 and one of first peak signal S23 and reference voltage Vref from multiplexer 250. Controller 260 further comprises comparator 264 and integrator 262. Comparator 264 compares second peak signal S24 and one of first peak signal S23 and reference voltage Vref from multiplexer 250 to generate comparative signal S25. Integrator 262 is coupled to comparator 264 and generates control signal S26 according to comparative signal S25.
According to an embodiment of the invention, integrator 262 comprises at least one capacitor. Integrator 262 accumulates charges of comparative signal S25 to generate corresponding control signal S26. For example, if multiplexer 250 selects to output first peak signal S23, after a period, auto gain control circuit 200 will stay locked. The gain of variable gain amplifier 220 will stabilize at 0 dB. Input signal S21 is thus equal to output signal S22. If multiplexer 250 selects to output reference voltage Vref, auto gain control circuit 200 generates comparative signal S25 by using comparator 264 to compare second peak signal S24 and reference voltage Vref. When second peak signal S24 exceeds reference voltage Vref, comparator 264 outputs comparative signal S25 to decrease charges of integrator 262 for decreasing a voltage level of control signal S26. Similarly, when second peak signal S24 is lower than reference voltage Vref, comparator 264 outputs comparative signal S25 to increase charges of integrator 262 for increasing the voltage level of control signal S26. Auto gain control circuit 200 uses control signal S26 to control variable gain amplifier 220 to adjust output range of output signal S22. Since integrator 262 comprises capacitors, output signal S22 will be gradually adjusted. Output signal S22 will not change sharply, avoiding saturation or abnormality of subsequent stage circuits. In addition, input signal S21 may be an audio signal with frequency range 400˜30 KHz.
FIG. 4 shows variable gain amplifier 400 according to an embodiment of the invention. Variable gain amplifier 400 comprises resistor 410, first transistor Q1, second transistor Q2, third transistor Q3 and fourth transistor Q4. Resistor 410 is coupled between first voltage source Vcc and output terminal Output. First transistor Q1 comprises a drain coupled to resistor 410, a gate coupled to input terminal Input and a source. Second transistor Q2 comprises a drain coupled to the source of first transistor Q1, a gate coupled to the source of first transistor Q1 and a source. Third transistor Q3 comprises a drain coupled to the source of second transistor Q2, a gate receiving control signal S26 and a source coupled to second voltage source Vss. Fourth transistor Q4 comprises a drain coupled to the source of first transistor Q1, a gate receiving control signal S26 and a source coupled to second voltage source Vss. In addition, first transistor Q1, second transistor Q2, third transistor Q3 and fourth transistor Q4 are all NMOS (Negative-Channel Metal Oxide Semiconductor) transistors.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.