[go: up one dir, main page]

CN102025332A - Gain control circuit and its gain control method - Google Patents

Gain control circuit and its gain control method Download PDF

Info

Publication number
CN102025332A
CN102025332A CN2009101767876A CN200910176787A CN102025332A CN 102025332 A CN102025332 A CN 102025332A CN 2009101767876 A CN2009101767876 A CN 2009101767876A CN 200910176787 A CN200910176787 A CN 200910176787A CN 102025332 A CN102025332 A CN 102025332A
Authority
CN
China
Prior art keywords
signal
voltage
count value
ramp
gain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2009101767876A
Other languages
Chinese (zh)
Inventor
戴枝德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhenyi Technology Co ltd
Original Assignee
Zhenyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhenyi Technology Co ltd filed Critical Zhenyi Technology Co ltd
Priority to CN2009101767876A priority Critical patent/CN102025332A/en
Publication of CN102025332A publication Critical patent/CN102025332A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Amplifiers (AREA)
  • Control Of Amplification And Gain Control (AREA)

Abstract

本发明揭露一种增益控制电路及其增益控制方法,其先连续输出一计数值,接着据此产生一斜波信号,且在一控制电压信号与斜波信号交迭的电压值,依据斜波信号取得初始计数值,并藉此决定放大电路的初始增益。之后,在放大电路的输出信号的高、低电压分别大、小于一预设的上、下限检测电压时,利用一检测信号调整斜波信号的直流准位,最后在电压值依据斜波信号取得小于初始计数值的计数值,并藉此降低初始增益。本发明利用调整斜波信号直流准位的方式,不但可防止音频放大电路的输出信号失真,又能限制音频放大电路的输出信号大小,以保护扬声器或耳朵。

Figure 200910176787

The present invention discloses a gain control circuit and a gain control method thereof, which first continuously outputs a count value, then generates a ramp signal accordingly, and obtains an initial count value according to the ramp signal at a voltage value where a control voltage signal overlaps with the ramp signal, thereby determining the initial gain of the amplifier circuit. Afterwards, when the high and low voltages of the output signal of the amplifier circuit are respectively greater than and less than a preset upper and lower limit detection voltage, a detection signal is used to adjust the DC level of the ramp signal, and finally a count value less than the initial count value is obtained according to the ramp signal at the voltage value, thereby reducing the initial gain. The present invention utilizes a method of adjusting the DC level of the ramp signal to not only prevent the output signal of the audio amplifier circuit from being distorted, but also limit the output signal size of the audio amplifier circuit to protect the speaker or the ear.

Figure 200910176787

Description

增益控制电路及其增益控制方法 Gain control circuit and its gain control method

技术领域technical field

本发明有关一种控制技术,特别是关于一种增益控制电路及其增益控制方法。The invention relates to a control technology, in particular to a gain control circuit and a gain control method thereof.

背景技术Background technique

模拟式的电子增益控制可由及尔伯特单元(Gilbert cell)来达成,Gilbert cell的基本转换特性为Y=kX,其中Y为输出信号,而X为输入信号,k为常数。由上面公式可知放大倍数或信号增益可定义为Y/X,而Y/X=k,因此k即为输出信号Y对输入信号X的增益。Analog electronic gain control can be achieved by a Gilbert cell. The basic conversion characteristic of a Gilbert cell is Y=kX, where Y is the output signal, X is the input signal, and k is a constant. It can be seen from the above formula that the amplification factor or signal gain can be defined as Y/X, and Y/X=k, so k is the gain of the output signal Y to the input signal X.

以下请同时参阅图1与图2(a)至图2(c),相较于模拟式的电子增益控制,数字式的电子增益控制电路对音频放大电路10有较大的动态范围及较精确的控制,其中图2(a)为计数器18的输出信号波形图;第2(b)图为音量控制电压信号与锯齿波产生器20产生的锯齿波信号波形图,锯齿波信号是根据计数器18输出的计数值来产生的;图2(c)为比较器22输出的闩锁信号波形图。数字式的电子增益控制电路的基本原理为使用一比较器22来比较音量控制电压信号与锯齿波信号,当音量控制电压信号与锯齿波信号的电压相等时,比较器22输出一闩锁信号至状态暂存控制器24中,锁住计数器18的内容,此计数器18的内容用来控制音频放大电路10中的电阻14、16的数值,进而决定放大电路10的增益。但在某一固定电压增益状况下,如果放大电路10的输入信号太大,则放大电路10输出信号有可能超过额定电压而产生严重失真,换言之,此时输出信号的最高电压会被限制在电源电压,且其最低电压会被限制在地电压。Please refer to FIG. 1 and FIG. 2(a) to FIG. 2(c) at the same time. Compared with the analog electronic gain control, the digital electronic gain control circuit has a larger dynamic range and more accurate audio amplifier circuit 10. The control of wherein Fig. 2 (a) is the output signal waveform figure of counter 18; No. 2 (b) figure is the sawtooth wave signal waveform figure that volume control voltage signal and sawtooth wave generator 20 produce, and sawtooth wave signal is according to counter 18 The output count value is generated; FIG. 2(c) is a waveform diagram of the latch signal output by the comparator 22. The basic principle of the digital electronic gain control circuit is to use a comparator 22 to compare the volume control voltage signal and the sawtooth wave signal. When the volume control voltage signal is equal to the voltage of the sawtooth wave signal, the comparator 22 outputs a latch signal to In the state temporary storage controller 24 , the content of the counter 18 is locked. The content of the counter 18 is used to control the values of the resistors 14 and 16 in the audio amplifier circuit 10 , and then determine the gain of the amplifier circuit 10 . However, under a certain fixed voltage gain condition, if the input signal of the amplifying circuit 10 is too large, the output signal of the amplifying circuit 10 may exceed the rated voltage and cause severe distortion. voltage, and its minimum voltage will be limited to the ground voltage.

因此,本发明在针对上述的困扰,提出一种增益控制电路及其增益控制方法,其解决习知所产生的问题。Therefore, the present invention aims at the above problems and proposes a gain control circuit and a gain control method thereof, which solve the problems caused by the prior art.

发明内容Contents of the invention

本发明的目的在于,解决现有电子增益控制电路容易产生失真的技术问题。The purpose of the present invention is to solve the technical problem that the existing electronic gain control circuit is prone to distortion.

本发明的主要目的,在于提供一种增益控制电路及其增益控制方法,其利用调整斜波信号直流准位的方式,不但可防止音频放大电路的输出信号失真,又能限制音频放大电路的输出信号大小,以保护扬声器或耳朵。The main purpose of the present invention is to provide a gain control circuit and its gain control method, which can not only prevent the output signal distortion of the audio amplifier circuit, but also limit the output of the audio amplifier circuit by adjusting the DC level of the ramp signal. Signal size to protect speakers or ears.

为达上述目的,本发明提供一种增益控制电路,其连接一放大电路,此放大电路输出一输出信号,此增益控制电路包含一计数器,其连续输出一计数值,计数器连接一斜波(ramp)产生器,斜波产生器根据计数值输出一斜波信号,当上述斜波信号产生器为三角波信号产生器或锯齿波信号产生器时,则斜波信号产生器输出的斜波信号分别为三角波信号或锯齿波信号。放大电路与计数器连接一处理器,处理器接收斜波信号与一控制电压信号,并在控制电压信号与斜波信号交迭的电压值,从计数器中取得与斜波信号对应的计数值作为第一计数值并暂存,且藉第一计数值决定放大电路的增益大小。另有一电压检测器,其预设一上、下限检测电压,并接收输出信号,且在输出信号的高电压大于上限检测电压,或输出信号的低电压小于下限检测电压时,输出一检测信号,斜波产生器与电压检测器连接一直流准位调节器,其接收检测信号,以调整斜波信号的直流准位,使处理器从计数器中取得与斜波信号对应且小于第一计数值的计数值,以作为第二计数值更新第一计数值,又藉第二计数值降低放大电路的增益。To achieve the above object, the present invention provides a gain control circuit, which is connected to an amplifying circuit, and the amplifying circuit outputs an output signal. The gain control circuit includes a counter, which continuously outputs a count value, and the counter is connected to a ramp (ramp ) generator, the ramp wave generator outputs a ramp wave signal according to the count value, and when the above ramp wave signal generator is a triangular wave signal generator or a sawtooth wave signal generator, the ramp wave signals output by the ramp wave signal generator are respectively Triangular wave signal or sawtooth wave signal. The amplifying circuit and the counter are connected to a processor, and the processor receives the ramp signal and a control voltage signal, and obtains the count value corresponding to the ramp signal from the counter as the first voltage value at which the control voltage signal and the ramp signal overlap. A count value is temporarily stored, and the gain of the amplifying circuit is determined by the first count value. There is also a voltage detector, which presets an upper and lower limit detection voltage, and receives the output signal, and outputs a detection signal when the high voltage of the output signal is greater than the upper limit detection voltage, or the low voltage of the output signal is lower than the lower limit detection voltage, The ramp wave generator and the voltage detector are connected to a DC level adjuster, which receives the detection signal to adjust the DC level of the ramp wave signal, so that the processor obtains from the counter a value corresponding to the ramp wave signal and less than the first count value. The count value is used as the second count value to update the first count value, and the gain of the amplifying circuit is reduced by the second count value.

其中所述处理器更包含:一比较器,其接收所述斜波信号与所述控制电压信号,并在所述控制电压信号与所述斜波信号交迭于所述电压值时,输出一第一闩锁信号,在所述斜波信号的直流准位被调整后,在所述控制电压信号与所述斜波信号交迭于所述电压值时,输出一第二闩锁信号;以及一状态暂存控制器,其连接所述计数器与所述放大电路,并在所述控制电压信号与所述斜波信号交迭于所述电压值时,接收所述第一闩锁信号,以在所述电压值从所述计数器中取得与所述斜波信号对应的所述计数值作为所述第一计数值并暂存,且藉所述第一计数值决定所述放大电路的增益大小,或在所述斜波信号的直流准位被调整后,并在所述控制电压信号与所述斜波信号交迭于所述电压值时,接收所述第二闩锁信号,并在所述电压值从所述计数器中取得与所述斜波信号对应且小于所述第一计数值的所述计数值,以作为所述第二计数值更新所述第一计数值,又藉所述第二计数值降低所述放大电路的增益。Wherein the processor further includes: a comparator, which receives the ramp signal and the control voltage signal, and outputs a comparator when the control voltage signal and the ramp signal overlap at the voltage value a first latch signal, outputting a second latch signal when the control voltage signal and the ramp signal overlap at the voltage value after the DC level of the ramp signal is adjusted; and A state temporary storage controller, which is connected to the counter and the amplification circuit, and receives the first latch signal when the control voltage signal and the ramp signal overlap at the voltage value, to Obtain the count value corresponding to the ramp signal from the counter at the voltage value as the first count value and temporarily store it, and use the first count value to determine the gain of the amplifying circuit , or after the DC level of the ramp signal is adjusted, and when the control voltage signal and the ramp signal overlap at the voltage value, the second latch signal is received, and the The voltage value obtains the count value corresponding to the ramp signal and smaller than the first count value from the counter, so as to update the first count value as the second count value, and by using the The second count value decreases the gain of the amplifying circuit.

其中所述斜波信号的波形斜率为正或负时,所述直流准位调节器分别调升或调降所述斜波信号的直流准位,以进而降低所述放大电路的增益。When the waveform slope of the ramp signal is positive or negative, the DC level adjuster increases or decreases the DC level of the ramp signal respectively, so as to further reduce the gain of the amplifying circuit.

其中在所述输出信号的高电压大于所述上限检测电压时,所述输出信号与所述上限检测电压交错的两时间点之间的时间区间愈长,则所述斜波信号的直流准位调整的幅度愈高;在所述输出信号的低电压大于所述下限检测电压时,所述输出信号与所述下限检测电压交错的两时间点之间的时间区间愈长,则所述斜波信号的直流准位调整的幅度愈高。Wherein when the high voltage of the output signal is greater than the upper limit detection voltage, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, the DC level of the ramp signal The higher the adjustment range is; when the low voltage of the output signal is greater than the lower limit detection voltage, the longer the time interval between the two time points where the output signal and the lower limit detection voltage are interleaved, the ramp wave The higher the adjustment range of the DC level of the signal is.

其中所述控制电压信号为模拟信号;所述计数器为环形计数器(ringcounter);所述放大电路为音频放大器,且所述控制电压信号为音量控制电压信号,且所述放大电路接收一输入信号并将其放大后,输出所述输出信号。Wherein the control voltage signal is an analog signal; the counter is a ring counter (ringcounter); the amplifying circuit is an audio amplifier, and the control voltage signal is a volume control voltage signal, and the amplifying circuit receives an input signal and After it is amplified, the output signal is output.

本发明亦提供一种增益控制方法,其接收一放大电路输出的输出信号,以控制放大电路的增益大小,此增益控制方法首先连续输出一计数值,接着根据计数值产生一斜波信号,再来接收此斜波信号与一控制电压信号,并在控制电压信号与斜波信号交迭的电压值,取得与斜波信号对应的计数值作为第一计数值并暂存,又藉第一计数值决定放大电路的初始增益。初始增益被决定后,如果输出信号的高电压大于一预设的上限检测电压,或输出信号的低电压小于一预设的下限检测电压,则电压检测器输出一检测信号,直流准位调节器接收到此检测信号后,即调整斜波信号的直流准位,最后在电压值取得与斜波信号对应且小于第一计数值的计数值,以作为第二计数值更新第一计数值,并藉第二计数值降低该初始增益。The present invention also provides a gain control method, which receives an output signal from an amplifying circuit to control the gain of the amplifying circuit. The gain control method first outputs a count value continuously, then generates a ramp signal according to the count value, and then Receive the ramp wave signal and a control voltage signal, and obtain the count value corresponding to the ramp wave signal as the first count value at the overlapping voltage value of the control voltage signal and the ramp wave signal, and temporarily store it, and borrow the first count value Determines the initial gain of the amplifier circuit. After the initial gain is determined, if the high voltage of the output signal is greater than a preset upper limit detection voltage, or the low voltage of the output signal is lower than a preset lower limit detection voltage, the voltage detector outputs a detection signal, and the DC level regulator After receiving the detection signal, the DC level of the ramp signal is adjusted, and finally a count value corresponding to the ramp signal and smaller than the first count value is obtained from the voltage value to update the first count value as the second count value, and The initial gain is decreased by the second count value.

在接收所述斜波信号与所述控制电压信号,以取得所述第一计数值,并决定所述初始增益的步骤更包含下列步骤:接收所述斜波信号与所述控制电压信号,且在所述控制电压信号与所述斜波信号交迭于所述电压值时,输出一第一闩锁信号;以及接收所述第一闩锁信号,以在所述电压值取得与所述斜波信号对应的所述计数值作为所述第一计数值并暂存,又藉所述第一计数值决定所述初始增益。The step of receiving the ramp signal and the control voltage signal to obtain the first count value and determining the initial gain further includes the following steps: receiving the ramp signal and the control voltage signal, and outputting a first latch signal when the control voltage signal and the ramp signal overlap at the voltage value; The count value corresponding to the wave signal is temporarily stored as the first count value, and the initial gain is determined by the first count value.

其中在取得所述第二计数值,并藉此降低所述初始增益的步骤更包含下列步骤:输出一第二闩锁信号;以及接收所述第二闩锁信号,以在所述电压值取得与所述斜波信号对应且小于所述第一计数值的所述计数值,以作为所述第二计数值更新所述第一计数值,并藉所述第二计数值降低所述初始增益。Wherein the step of obtaining the second count value and thereby reducing the initial gain further includes the following steps: outputting a second latch signal; and receiving the second latch signal to obtain the voltage at the voltage value The count value corresponding to the ramp signal and smaller than the first count value is used as the second count value to update the first count value, and the initial gain is reduced by the second count value .

其中所述斜波信号的波形斜率为正或负时,则在接收所述检测信号,以调整所述直流准位的步骤中,分别调升或调降所述斜波信号的直流准位,以降低所述初始增益。Wherein, when the waveform slope of the ramp wave signal is positive or negative, in the step of receiving the detection signal to adjust the DC level, respectively increase or decrease the DC level of the ramp signal, to reduce the initial gain.

其中在所述输出信号的高电压大于所述上限检测电压时,所述输出信号与所述上限检测电压交错的两时间点之间的时间区间愈长,则所述斜波信号的直流准位调整的幅度愈高;在所述输出信号的低电压小于所述下限检测电压时,所述输出信号与所述上限检测电压交错的两时间点之间的时间区间愈长,则所述斜波信号的直流准位调整的幅度愈高。Wherein when the high voltage of the output signal is greater than the upper limit detection voltage, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, the DC level of the ramp signal The higher the adjustment range is; when the low voltage of the output signal is less than the lower limit detection voltage, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, the ramp wave The higher the adjustment range of the DC level of the signal is.

本发明的有益效果在于,利用调整斜波信号直流准位的方式,不但可防止音频放大电路的输出信号失真,又能限制音频放大电路的输出信号大小,以保护扬声器或耳朵。The beneficial effect of the present invention is that by adjusting the DC level of the ramp signal, not only can the output signal of the audio amplifier circuit be prevented from being distorted, but also the output signal of the audio amplifier circuit can be limited to protect speakers or ears.

附图说明Description of drawings

图1为先前技术之电路方块图;Fig. 1 is the circuit block diagram of prior art;

图2(a)至图2(c)为先前技术之计数器输出之信号、音量控制电压信号、正斜率之锯齿波信号,及其对应之闩锁信号波形图;Figure 2(a) to Figure 2(c) are the signal output by the counter in the prior art, the volume control voltage signal, the sawtooth wave signal with a positive slope, and the corresponding latch signal waveforms;

图3为本发明之第一实施例电路方块图;Fig. 3 is the circuit block diagram of the first embodiment of the present invention;

图4(a)至图4(b)为本发明之计数器输出之信号、音量控制电压信号、正斜率之锯齿波信号波形图;Fig. 4 (a) to Fig. 4 (b) are the signal output by the counter of the present invention, the volume control voltage signal, the sawtooth wave signal waveform diagram of positive slope;

图5为本发明之在第一实施例中的放大电路之输入信号与输出信号波形图;FIG. 5 is a waveform diagram of an input signal and an output signal of an amplifying circuit in the first embodiment of the present invention;

图6(a)至图6(b)为本发明之计数器输出之信号、音量控制电压信号、负斜率之锯齿波信号波形图;Fig. 6 (a) to Fig. 6 (b) are the signal output by the counter of the present invention, the volume control voltage signal, the sawtooth wave signal waveform diagram of the negative slope;

图7为本发明之第二实施例电路方块图;Fig. 7 is the circuit block diagram of the second embodiment of the present invention;

图8(a)至图8(c)为本发明之计数器输出之信号、音量控制电压信号、正斜率之锯齿波信号,及其对应之闩锁信号波形图;Figure 8(a) to Figure 8(c) are the signals output by the counter, the volume control voltage signal, the positive slope sawtooth wave signal, and the corresponding latch signal waveform diagrams of the present invention;

图9为本发明之在第二实施例中的放大电路之输入信号与输出信号波形图;FIG. 9 is a waveform diagram of an input signal and an output signal of an amplifying circuit in a second embodiment of the present invention;

图10(a)至图10(c)为本发明之计数器输出之信号、音量控制电压信号、负斜率之锯齿波信号,及其对应之闩锁信号波形图;Figure 10(a) to Figure 10(c) are the signals output by the counter, the volume control voltage signal, the sawtooth wave signal with a negative slope, and the corresponding latch signal waveform diagrams of the present invention;

图11为本发明之音量控制电压信号、正斜率之锯齿波信号,及放大电路之输出信号实验波形图。Fig. 11 is an experimental waveform diagram of the volume control voltage signal, the positive slope sawtooth signal, and the output signal of the amplifier circuit of the present invention.

附图标记说明:Explanation of reference signs:

10-放大电路;12-放大器;14-电阻;16-电阻;18-计数器;20-锯齿波产生器;22-比较器;24-状态暂存控制器;26-放大电路;28-放大器;30-电阻;32-电阻;34-环形计数器;36-锯齿波产生器;38-处理器;40-电压检测器;42-直流准位调节器;44-比较器;46-状态暂存控制器。10-amplification circuit; 12-amplifier; 14-resistance; 16-resistance; 18-counter; 20-sawtooth wave generator; 22-comparator; 24-status temporary storage controller; 26-amplification circuit; 30-resistor; 32-resistor; 34-ring counter; 36-sawtooth wave generator; 38-processor; 40-voltage detector; 42-DC level regulator; 44-comparator; 46-status temporary storage control device.

具体实施方式Detailed ways

下面以较佳的实施例图及配合详细的说明,对本发明的结构特征及所达成的功效进行说明:The structural features of the present invention and the achieved effects are described below with preferred embodiment drawings and detailed descriptions:

本发明之增益控制电路连接一放大电路,并接收一控制电压信号,以决定放大电路之增益大小。以下将控制电压信号与放大电路分别以音量控制电压信号、音频放大电路为例,说明本发明之电路架构及动作。The gain control circuit of the present invention is connected with an amplifying circuit and receives a control voltage signal to determine the gain of the amplifying circuit. In the following, the control voltage signal and the amplifying circuit are respectively taken as examples of the volume control voltage signal and the audio amplifying circuit to illustrate the circuit structure and operation of the present invention.

请参阅图3、图4(a)至图4(b),其中图3为第一实施例之电路方块图;图4(a)为计数器输出之信号波形图;图4(b)为正斜率之锯齿波信号与音量控制电压信号波形图。本发明连接一音频放大电路26,此放大电路26包含一放大器28、电阻30、电阻32,放大器28之正输入端接收一参考信号,负输入端连接电阻30、电阻32,并接收一输入信号,放大器28之输出端连接电阻32,放大器28将该输入信号放大后,在放大器28之输出端输出一输出信号。由于电阻30、电阻32之电阻值分别为Ri、Rf,因此放大电路26之增益为-(Rf/Ri)。Please refer to Fig. 3, Fig. 4 (a) to Fig. 4 (b), wherein Fig. 3 is the circuit block diagram of the first embodiment; Fig. 4 (a) is the signal waveform diagram output by the counter; Fig. 4 (b) is positive Slope sawtooth signal and volume control voltage signal waveform diagram. The present invention is connected to an audio amplifier circuit 26, and the amplifier circuit 26 includes an amplifier 28, a resistor 30, and a resistor 32. The positive input terminal of the amplifier 28 receives a reference signal, and the negative input terminal is connected to a resistor 30 and a resistor 32 to receive an input signal. , the output end of the amplifier 28 is connected to the resistor 32, the amplifier 28 amplifies the input signal, and outputs an output signal at the output end of the amplifier 28. Since the resistance values of the resistor 30 and the resistor 32 are respectively Ri and Rf, the gain of the amplifying circuit 26 is -(Rf/Ri).

本发明包含一作为计数器之环形计数器(ring counter)34,与和其连接之一斜波产生器,斜波产生器根据计数器34连续输出之计数值产生斜波(ramp)信号,此斜波产生器可为锯齿波产生器或三角波产生器,而产生的信号则为锯齿波信号或三角波信号,在此实施例中,斜波产生器以锯齿波产生器36为例。由于环形计数器34输出之计数值为周期性,因此锯齿波信号之周期与计数值的周期相同,在此实施例中,环形计数器34输出之计数值每循环八次为一个周期,此八次的计数值依序分别为000、001、010、011、100、101、110、111,第九次之后的计数值则又会从000开始数起,而锯齿波信号在计数值每跳一次后,就会提升或降低一固定电压幅度,当第九次的计数值输出时,锯齿波信号会回到原对应计数值000之电压值,换言之,锯齿波信号之每一电压值,对应一计数值,且锯齿波信号之波形斜率可设定为正或负。The present invention includes a ring counter (ring counter) 34 as a counter, and a ramp generator connected to it, the ramp generator generates a ramp (ramp) signal according to the count value continuously output by the counter 34, and the ramp generates The generator can be a sawtooth wave generator or a triangular wave generator, and the generated signal is a sawtooth wave signal or a triangular wave signal. In this embodiment, the ramp wave generator is the sawtooth wave generator 36 as an example. Because the count value output by the ring counter 34 is periodic, the period of the sawtooth wave signal is the same as the cycle of the count value. In this embodiment, the count value output by the ring counter 34 is cycled eight times as a cycle. The counting values are 000, 001, 010, 011, 100, 101, 110, 111 in sequence, and the counting value after the ninth time will start counting from 000, and the sawtooth wave signal will It will increase or decrease a fixed voltage range. When the ninth count value is output, the sawtooth wave signal will return to the original voltage value corresponding to the count value 000. In other words, each voltage value of the sawtooth wave signal corresponds to a count value. , and the waveform slope of the sawtooth signal can be set as positive or negative.

锯齿波产生器36与放大电路26之电阻30、32连接一处理器38,处理器38接收锯齿波信号与一为模拟信号之音量控制电压信号,并在音量控制电压信号与锯齿波电压信号交迭之时,从计数器34中取得与锯齿波信号对应之计数值作为第一计数值并暂存之,且藉第一计数值决定电阻30、32之数值,进而决定放大电路26之增益大小。The sawtooth wave generator 36 and the resistors 30 and 32 of the amplifying circuit 26 are connected to a processor 38, and the processor 38 receives the sawtooth wave signal and a volume control voltage signal that is an analog signal, and alternates between the volume control voltage signal and the sawtooth wave voltage signal. When repeating, the count value corresponding to the sawtooth signal is obtained from the counter 34 as the first count value and temporarily stored, and the values of the resistors 30 and 32 are determined by the first count value, and then the gain of the amplifier circuit 26 is determined.

放大电路26之输出端连接一电压检测器40,其预设一上、下限检测电压,并接收输出信号,且在输出信号之高电压大于上限检测电压,或输出信号之低电压小于下限检测电压时,输出一检测信号。电压检测器40透过一直流准位调节器42连接锯齿波产生器36,直流准位调节器42接收检测信号,以调升或调降斜波信号之直流准位,使处理器38从计数器34中取得与斜波信号对应且小于第一计数值的计数值,以作为第二计数值更新第一计数值,又藉第二计数值降低放大电路26之增益。The output end of the amplifying circuit 26 is connected to a voltage detector 40, which presets an upper and lower limit detection voltage, and receives the output signal, and when the high voltage of the output signal is greater than the upper limit detection voltage, or the low voltage of the output signal is lower than the lower limit detection voltage , output a detection signal. The voltage detector 40 is connected to the sawtooth wave generator 36 through a DC level adjuster 42. The DC level adjuster 42 receives the detection signal to increase or decrease the DC level of the ramp wave signal, so that the processor 38 can read from the counter In step 34, a count value corresponding to the ramp wave signal and smaller than the first count value is obtained to update the first count value as the second count value, and the gain of the amplifying circuit 26 is reduced by the second count value.

请同时参阅图5,以下叙述第一实施例之动作,并以正斜率之锯齿波信号为例。在时间点t2之前,音量控制电压信号与锯齿波信号交迭于电压值Va,其对应于锯齿波信号之第一个周期波形中的时间点t1,因此此刻处理器38会在t1从计数器34取出与锯齿波信号之电压值Va对应的计数值100,作为第一计数值且暂存之,并藉此决定电阻30、32之数值,以决定放大电路26之初始增益。由于锯齿波信号与音量控制电压信号,在锯齿波信号之每一个周期中都会交迭一次,因此此决定增益的动作在锯齿波信号之每一个周期中也会动作一次。且因为在时间点t2前,锯齿波信号与音量控制电压信号交迭之电压点所对应之计数值皆为100,所以放大电路26之增益也不变。Please refer to FIG. 5 at the same time. The operation of the first embodiment will be described below, and a sawtooth signal with a positive slope will be used as an example. Before the time point t2 , the volume control voltage signal and the sawtooth wave signal overlap at a voltage value V a , which corresponds to the time point t1 in the first cycle waveform of the sawtooth wave signal, so the processor 38 will be at the moment t 1 Take out the count value 100 corresponding to the voltage value V a of the sawtooth signal from the counter 34 as the first count value and temporarily store it, and use it to determine the values of the resistors 30 and 32 to determine the initial gain of the amplifier circuit 26. Since the sawtooth wave signal and the volume control voltage signal overlap once in each period of the sawtooth wave signal, the action of determining the gain is also performed once in each period of the sawtooth wave signal. And because before the time point t2 , the count value corresponding to the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is 100, so the gain of the amplifying circuit 26 also remains unchanged.

换言之,在时间点t2前,放大电路26接收一高、低电压分别为+V1、-V1之原输入信号,则根据初始增益输出一原输出信号,在此例中,此原输出信号之高、低电压等于电压检测器40之上、下限检测电压+Vref、-VrefIn other words, before the time point t2 , the amplifying circuit 26 receives an original input signal whose high and low voltages are respectively +V 1 and -V 1 , and then outputs an original output signal according to the initial gain. In this example, the original output The high and low voltages of the signal are equal to the upper and lower limit detection voltages +V ref and -V ref of the voltage detector 40 .

在时间点t2后,将原输入信号增大,使放大电路26接收一高、低电压分别为+V2、-V2之增大之输入信号,其中+V2大于+V1,-V2小于-V1。若此时放大电路26之初始增益不变,则放大电路26会输出一高、低电压分别为+V3、-V3之放大之输出信号,其中+V3大于+Vref,-V3小于-Vref,因此电压检测器40会输出一检测信号至直流准位调节器42中,以控制直流准位调节器42调升锯齿波信号的直流准位。After the time point t2 , increase the original input signal so that the amplifying circuit 26 receives an increased input signal whose high and low voltages are respectively + V2 and -V2 , where + V2 is greater than + V1 , - V 2 is smaller than -V 1 . If the initial gain of the amplifying circuit 26 remains unchanged at this time, the amplifying circuit 26 will output an amplified output signal whose high and low voltages are respectively +V 3 and -V 3 , where +V 3 is greater than +V ref and -V 3 is less than −V ref , so the voltage detector 40 outputs a detection signal to the DC level regulator 42 to control the DC level regulator 42 to increase the DC level of the sawtooth wave signal.

调升后的锯齿波信号,从波形图来看,锯齿波信号与音量控制电压信号交迭之电压点,位于锯齿波信号之较低位置处,在时间点t2后,此电压点对应于锯齿波信号之第一个周期波形中的时间点t3,因此此刻处理器38会在t3从计数器34取出与锯齿波信号之电压值Va对应且小于第一计数值之计数值010,作为第二计数值且藉此更新第一计数值,并藉第二计数值改变电阻30、32之数值,以降低放大电路26之初始增益。The ramped sawtooth wave signal, from the waveform diagram, the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is located at the lower position of the sawtooth wave signal. After time point t2 , this voltage point corresponds to The time point t3 in the first cycle waveform of the sawtooth wave signal, so at this moment the processor 38 will take out the count value 010 corresponding to the voltage value Va of the sawtooth wave signal and smaller than the first count value from the counter 34 at t3, As the second count value, the first count value is updated accordingly, and the values of the resistors 30 and 32 are changed by the second count value, so as to reduce the initial gain of the amplifying circuit 26 .

由于放大电路26之增益被降低了,因此放大电路26会输出一高、低电压分别为+V4、-V4之修正之输出信号,其中+V4小于+Vref,-V4大于-Vref,如此便可降低输出失真、限制音频放大电路之输出信号大小,以保护扬声器或耳朵。值得一提的是,在放大之输出信号中,输出信号与上限检测电压交错之两时间点之间的时间区间愈长,即t4与t5之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低;或在放大之输出信号中,输出信号与下限检测电压交错之两时间点之间的时间区间愈长,即t6与t7之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低。Since the gain of the amplifying circuit 26 is reduced, the amplifying circuit 26 will output a modified output signal whose high and low voltages are respectively +V 4 and -V 4 , where +V 4 is less than +V ref and -V 4 is greater than - V ref , so that the output distortion can be reduced, and the output signal size of the audio amplifier circuit can be limited to protect the speaker or ears. It is worth mentioning that in the amplified output signal, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, that is, the longer the time interval between t4 and t5 , the sawtooth signal The higher the magnitude of the DC level adjustment, the lower the gain of the amplifying circuit 26 is reduced; or in the amplified output signal, the longer the time interval between the two time points where the output signal and the lower limit detection voltage intersect, that is, t The longer the time interval between 6 and t7 , the higher the adjustment range of the DC level of the sawtooth signal, and the lower the gain of the amplifying circuit 26 is reduced.

以下请参阅图3、图5、图6(a)至图6(b),其中图6(a)为计数器输出之信号波形图;图6(b)为负斜率之锯齿波信号与音量控制电压信号波形图。以下叙述第一实施例之另一动作,其与上述动作方式类似,并以负斜率之锯齿波信号为例。在时间点t2之前,音量控制电压信号与锯齿波信号交迭于电压值Va,其对应于锯齿波信号之第一个周期波形中的时间点t1,因此此刻处理器38会在t1从计数器34取出与锯齿波信号之电压值Va对应的计数值010,作为第一计数值且暂存之,并藉此决定电阻30、32之数值,以决定放大电路26之初始增益。Please refer to Figure 3, Figure 5, Figure 6(a) to Figure 6(b) below, where Figure 6(a) is the signal waveform diagram output by the counter; Figure 6(b) is the negative slope sawtooth signal and volume control Voltage signal waveform diagram. Another operation of the first embodiment is described below, which is similar to the above-mentioned operation, and a sawtooth signal with a negative slope is used as an example. Before the time point t2 , the volume control voltage signal and the sawtooth wave signal overlap at a voltage value V a , which corresponds to the time point t1 in the first cycle waveform of the sawtooth wave signal, so the processor 38 will be at the moment t 1 Take out the count value 010 corresponding to the voltage value V a of the sawtooth signal from the counter 34 as the first count value and temporarily store it, and use it to determine the values of the resistors 30 and 32 to determine the initial gain of the amplifier circuit 26.

换言之,在时间点t2前,放大电路26接收一高、低电压分别为+V1、-V1之原输入信号,则根据初始增益输出一原输出信号,在此例中,此原输出信号之高、低电压等于电压检测器40之上、下限检测电压+Vref、-VrefIn other words, before the time point t2 , the amplifying circuit 26 receives an original input signal whose high and low voltages are respectively +V 1 and -V 1 , and then outputs an original output signal according to the initial gain. In this example, the original output The high and low voltages of the signal are equal to the upper and lower limit detection voltages +V ref and -V ref of the voltage detector 40 .

在时间点t2后,将原输入信号增大,使放大电路26接收一高、低电压分别为+V2、-V2之增大之输入信号,其中+V2大于+V1,-V2小于-V1。若此时放大电路26之初始增益不变,则放大电路26会输出一高、低电压分别为+V3、-V3之放大之输出信号,其中+V3大于+Vref,-V3小于-Vref,因此电压检测器40会输出一检测信号至直流准位调节器42中,以控制直流准位调节器42调降锯齿波信号的直流准位。After the time point t2 , increase the original input signal so that the amplifying circuit 26 receives an increased input signal whose high and low voltages are respectively + V2 and -V2 , where + V2 is greater than + V1 , - V 2 is smaller than -V 1 . If the initial gain of the amplifying circuit 26 remains unchanged at this time, the amplifying circuit 26 will output an amplified output signal whose high and low voltages are respectively +V 3 and -V 3 , where +V 3 is greater than +V ref and -V 3 is less than −V ref , so the voltage detector 40 outputs a detection signal to the DC level regulator 42 to control the DC level regulator 42 to lower the DC level of the sawtooth wave signal.

调降后的锯齿波信号,从波形图来看,锯齿波信号与音量控制电压信号交迭之电压点,位于锯齿波信号之较高位置处,在时间点t2后,此电压点对应于锯齿波信号之第一个周期波形中的时间点t3,因此此刻处理器38会在t3从计数器34取出与锯齿波信号之电压值Va对应且小于第一计数值的计数值001,作为第二计数值且藉此更新第一计数值,并藉第二计数值改变电阻30、32之数值,以降低放大电路26之初始增益。The sawtooth wave signal after adjustment, from the waveform diagram, the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is located at a higher position of the sawtooth wave signal. After time point t2 , this voltage point corresponds to The time point t3 in the first cycle waveform of the sawtooth wave signal, so at this moment the processor 38 will take out the count value 001 corresponding to the voltage value Va of the sawtooth wave signal and less than the first count value from the counter 34 at t3, As the second count value, the first count value is updated accordingly, and the values of the resistors 30 and 32 are changed by the second count value, so as to reduce the initial gain of the amplifying circuit 26 .

由于放大电路26之增益被降低了,因此放大电路26会输出一高、低电压分别为+V4、-V4之修正之输出信号,其中+V4小于+Vref,-V4大于-Vref,如此便可降低输出失真、限制音频放大电路之输出信号大小,以保护扬声器或耳朵。同样地,在放大之输出信号中,输出信号与上限检测电压交错之两时间点之间的时间区间愈长,即t4与t5之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低;或在放大之输出信号中,输出信号与下限检测电压交错之两时间点之间的时间区间愈长,即t6与t7之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低。Since the gain of the amplifying circuit 26 is reduced, the amplifying circuit 26 will output a modified output signal whose high and low voltages are respectively +V 4 and -V 4 , where +V 4 is less than +V ref and -V 4 is greater than - V ref , so that the output distortion can be reduced, and the output signal size of the audio amplifier circuit can be limited to protect the speaker or ears. Similarly, in the amplified output signal, the longer the time interval between the two time points where the output signal intersects with the upper limit detection voltage, that is, the longer the time interval between t4 and t5 , the DC level of the sawtooth wave signal The higher the magnitude of the bit adjustment, the lower the gain of the amplifying circuit 26; or in the amplified output signal, the longer the time interval between the two time points where the output signal and the lower limit detection voltage intersect, that is, t6 and t The longer the time interval between 7 , the higher the adjustment range of the DC level of the sawtooth signal, and the lower the gain of the amplifying circuit 26 is reduced.

以下介绍本发明之第二实施例,请参阅图7,其与第一实施例的差异仅在于利用一比较器44与一状态暂存控制器46来取代处理器。比较器44连接锯齿波产生器36,并接收锯齿波信号与音量控制电压信号,并在音量控制电压信号与锯齿波电压信号交迭于一电压值V时,输出一第一闩锁信号;在锯齿波信号之直流准位被调整后,并在音量控制电压信号与锯齿波电压信号交迭于上述电压值V时,输出一第二闩锁信号。状态暂存控制器46连接比较器44与放大电路26之电阻30、32,并接收第一闩锁信号,以从计数器34中取得与锯齿波信号之电压值V对应的计数值作为第一计数值并暂存之,且藉第一计数值决定放大电路26之增益大小;或接收第二闩锁信号,以从计数器34中取得与锯齿波信号之电压值V对应且小于第一计数值的计数值,以作为第二计数值更新第一计数值,又藉第二计数值降低放大电路26之增益。The second embodiment of the present invention will be introduced below. Please refer to FIG. 7 . The difference between it and the first embodiment is that a comparator 44 and a state register controller 46 are used to replace the processor. The comparator 44 is connected to the sawtooth wave generator 36, and receives the sawtooth wave signal and the volume control voltage signal, and outputs a first latch signal when the volume control voltage signal and the sawtooth wave voltage signal overlap at a voltage value V; After the DC level of the sawtooth wave signal is adjusted, and when the volume control voltage signal and the sawtooth wave voltage signal overlap at the voltage value V, a second latch signal is output. The state temporary storage controller 46 is connected to the comparator 44 and the resistors 30 and 32 of the amplifying circuit 26, and receives the first latch signal to obtain the count value corresponding to the voltage value V of the sawtooth signal from the counter 34 as the first count value and temporarily store it, and determine the gain size of the amplifying circuit 26 by the first count value; or receive the second latch signal to obtain from the counter 34 the value corresponding to the voltage value V of the sawtooth signal and smaller than the first count value The count value is used as the second count value to update the first count value, and the gain of the amplifying circuit 26 is reduced by the second count value.

以下叙述第二实施例之动作,并以正斜率之锯齿波信号为例,请同时参阅图7、图8(a)至图8(c)与图9,其中图8(a)为计数器输出之信号波形图;图8(b)为正斜率之锯齿波信号与音量控制电压信号波形图;图8(c)为闩锁信号波形图。The action of the second embodiment is described below, and a sawtooth wave signal with a positive slope is taken as an example, please refer to Figure 7, Figure 8(a) to Figure 8(c) and Figure 9 at the same time, where Figure 8(a) is the counter output The signal waveform diagram; Figure 8(b) is the waveform diagram of the positive slope sawtooth signal and the volume control voltage signal; Figure 8(c) is the latch signal waveform diagram.

在时间点t2之前,音量控制电压信号与锯齿波信号交迭于电压值Va,其对应于锯齿波信号之第一个周期波形中的时间点t1,因此此刻比较器44会输出一第一闩锁信号至状态暂存控制器46中,使状态暂存控制器46在t1从计数器34取出与锯齿波信号之电压值Va对应的计数值100,作为第一计数值且暂存之,并藉此决定电阻30、32之数值,以决定放大电路26之初始增益。由于锯齿波信号与音量控制电压信号,在锯齿波信号之每一个周期中都会交迭一次,因此此决定增益的动作在锯齿波信号之每一个周期中也会动作一次。且因为在时间点t2前,锯齿波信号与音量控制电压信号交迭之电压点所对应之计数值皆为100,所以放大电路26之增益也不变。Before the time point t2 , the volume control voltage signal and the sawtooth wave signal overlap at the voltage value V a , which corresponds to the time point t1 in the first period waveform of the sawtooth wave signal, so the comparator 44 will output a The first latch signal is sent to the state temporary storage controller 46, so that the state temporary storage controller 46 takes out the count value 100 corresponding to the voltage value Va of the sawtooth signal from the counter 34 at t1 , as the first count value and temporarily Save it, and use it to determine the value of the resistors 30, 32 to determine the initial gain of the amplifying circuit 26. Since the sawtooth wave signal and the volume control voltage signal overlap once in each period of the sawtooth wave signal, the action of determining the gain is also performed once in each period of the sawtooth wave signal. And because before the time point t2 , the count value corresponding to the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is 100, so the gain of the amplifying circuit 26 also remains unchanged.

换言之,在时间点t2前,放大电路26接收一高、低电压分别为+V1、-V1之原输入信号,则根据初始增益输出一原输出信号,在此例中,此原输出信号之高、低电压等于电压检测器40之上、下限检测电压+Vref、-VrefIn other words, before the time point t2 , the amplifying circuit 26 receives an original input signal whose high and low voltages are respectively +V 1 and -V 1 , and then outputs an original output signal according to the initial gain. In this example, the original output The high and low voltages of the signal are equal to the upper and lower limit detection voltages +V ref and -V ref of the voltage detector 40 .

在时间点t2后,将原输入信号增大,使放大电路26接收一高、低电压分别为+V2、-V2之增大之输入信号,其中+V2大于+V1,-V2小于-V1。若此时放大电路26之初始增益不变,则放大电路26会输出一高、低电压分别为+V3、-V3之放大之输出信号,其中+V3大于+Vref,-V3小于-Vref,因此电压检测器40会输出一检测信号至直流准位调节器42中,以控制直流准位调节器42调升锯齿波信号的直流准位。After the time point t2 , increase the original input signal so that the amplifying circuit 26 receives an increased input signal whose high and low voltages are respectively + V2 and -V2 , where + V2 is greater than + V1 , - V 2 is smaller than -V 1 . If the initial gain of the amplifying circuit 26 remains unchanged at this time, the amplifying circuit 26 will output an amplified output signal whose high and low voltages are respectively +V 3 and -V 3 , where +V 3 is greater than +V ref and -V 3 is less than −V ref , so the voltage detector 40 outputs a detection signal to the DC level regulator 42 to control the DC level regulator 42 to increase the DC level of the sawtooth wave signal.

调升后的锯齿波信号,从波形图来看,锯齿波信号与音量控制电压信号交迭之电压点,位于锯齿波信号之较低位置处,在时间点t2后,此电压点对应于锯齿波信号之第一个周期波形中的时间点t3,因此此刻比较器44会输出第二闩锁信号至状态暂存控制器46中,使状态暂存控制器46在t3从计数器34取出与锯齿波信号之电压值Va对应且小于第一计数值的计数值010,作为第二计数值且藉此更新第一计数值,并藉第二计数值改变电阻30、32之数值,以降低放大电路26之初始增益。The ramped sawtooth wave signal, from the waveform diagram, the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is located at the lower position of the sawtooth wave signal. After time point t2 , this voltage point corresponds to The time point t3 in the first cycle waveform of the sawtooth wave signal, so at this moment the comparator 44 will output the second latch signal to the state temporary storage controller 46, so that the state temporary storage controller 46 is from the counter 34 at t3 Take out the count value 010 corresponding to the voltage value V a of the sawtooth signal and smaller than the first count value as the second count value and thereby update the first count value, and change the values of the resistors 30 and 32 by the second count value, To reduce the initial gain of the amplifying circuit 26.

由于放大电路26之增益被降低了,因此放大电路26会输出一高、低电压分别为+V4、-V4之修正之输出信号,其中+V4小于+Vref,-V4大于-Vref,且此第二实施例所能达成的功效与第一实施例相同。Since the gain of the amplifying circuit 26 is reduced, the amplifying circuit 26 will output a modified output signal whose high and low voltages are respectively +V 4 and -V 4 , where +V 4 is less than +V ref and -V 4 is greater than - V ref , and the effect achieved by the second embodiment is the same as that of the first embodiment.

另外,在放大之输出信号中,输出信号与上限检测电压交错之两时间点之间的时间区间愈长,即t4与t5之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低;或在放大之输出信号中,输出信号与下限检测电压交错之两时间点之间的时间区间愈长,即t6与t7之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低。In addition, in the amplified output signal, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, that is, the longer the time interval between t4 and t5 , the DC level of the sawtooth wave signal The higher the adjustment range is, the lower the gain of the amplifying circuit 26 is reduced; or in the amplified output signal, the time interval between the two time points where the output signal and the lower limit detection voltage intersect is longer, that is, t6 and t7 The longer the time interval, the higher the adjustment range of the DC level of the sawtooth signal, and the lower the gain of the amplifying circuit 26 is reduced.

以下请参阅图7、图9、图10(a)至图10(c),其中图10(a)为计数器输出之信号波形图;图10(b)为负斜率之锯齿波信号与音量控制电压信号波形图;图10(c)为闩锁信号之波形图。以下叙述第二实施例之另一动作,其与上述动作方式类似,并以负斜率之锯齿波信号为例。在时间点t2之前,音量控制电压信号与锯齿波信号交迭于电压值Va,其对应于锯齿波信号之第一个周期波形中的时间点t1,因此此刻比较器44会输出一第一闩锁信号至状态暂存控制器46中,使状态暂存控制器46在t1从计数器34取出与锯齿波信号之电压值Va对应的计数值010,作为第一计数值且暂存之,并藉此决定电阻30、32之数值,以决定放大电路26之初始增益。Please refer to Figure 7, Figure 9, Figure 10(a) to Figure 10(c) below, where Figure 10(a) is the signal waveform diagram output by the counter; Figure 10(b) is the negative slope sawtooth signal and volume control Waveform diagram of the voltage signal; Figure 10(c) is a waveform diagram of the latch signal. Another operation of the second embodiment is described below, which is similar to the above-mentioned operation, and a sawtooth signal with a negative slope is used as an example. Before the time point t2 , the volume control voltage signal and the sawtooth wave signal overlap at the voltage value V a , which corresponds to the time point t1 in the first period waveform of the sawtooth wave signal, so the comparator 44 will output a The first latch signal is sent to the state temporary storage controller 46, so that the state temporary storage controller 46 takes out the count value 010 corresponding to the voltage value Va of the sawtooth signal from the counter 34 at t1 , as the first count value and temporarily Save it, and use it to determine the value of the resistors 30, 32 to determine the initial gain of the amplifying circuit 26.

换言之,在时间点t2前,放大电路26接收一高、低电压分别为+V1、-V1之原输入信号,则根据初始增益输出一原输出信号,在此例中,此原输出信号之高、低电压等于电压检测器40之上、下限检测电压+Vref、-VrefIn other words, before the time point t2 , the amplifying circuit 26 receives an original input signal whose high and low voltages are respectively +V 1 and -V 1 , and then outputs an original output signal according to the initial gain. In this example, the original output The high and low voltages of the signal are equal to the upper and lower limit detection voltages +V ref and -V ref of the voltage detector 40 .

在时间点t2后,将原输入信号增大,使放大电路26接收一高、低电压分别为+V2、-V2之增大之输入信号,其中+V2大于+V1,-V2小于-V1。若此时放大电路26之初始增益不变,则放大电路26会输出一高、低电压分别为+V3、-V3之放大之输出信号,其中+V3大于+Vref,-V3小于-Vref,因此电压检测器40会输出一检测信号至直流准位调节器42中,以控制直流准位调节器42调降锯齿波信号的直流准位。After the time point t2 , increase the original input signal so that the amplifying circuit 26 receives an increased input signal whose high and low voltages are respectively + V2 and -V2 , where + V2 is greater than + V1 , - V 2 is smaller than -V 1 . If the initial gain of the amplifying circuit 26 remains unchanged at this time, the amplifying circuit 26 will output an amplified output signal whose high and low voltages are respectively +V 3 and -V 3 , where +V 3 is greater than +V ref and -V 3 is less than −V ref , so the voltage detector 40 outputs a detection signal to the DC level regulator 42 to control the DC level regulator 42 to lower the DC level of the sawtooth wave signal.

调降后的锯齿波信号,从波形图来看,锯齿波信号与音量控制电压信号交迭之电压点,位于锯齿波信号之较高位置处,在时间点t2后,此电压点对应于锯齿波信号之第一个周期波形中的时间点t3,因此此刻比较器44会输出一第二闩锁信号至状态暂存控制器46中,使状态暂存控制器46在t3从计数器34取出与锯齿波信号之电压值Va对应且小于第一计数值的计数值001,作为第二计数值且藉此更新第一计数值,并藉第二计数值改变电阻30、32之数值,以降低放大电路26之初始增益。The sawtooth wave signal after adjustment, from the waveform diagram, the voltage point where the sawtooth wave signal overlaps with the volume control voltage signal is located at a higher position of the sawtooth wave signal. After time point t2 , this voltage point corresponds to The time point t3 in the first cycle waveform of the sawtooth wave signal, so at this moment the comparator 44 will output a second latch signal to the state temporary storage controller 46, so that the state temporary storage controller 46 is from the counter at t3 34 Take out the count value 001 corresponding to the voltage value V a of the sawtooth signal and smaller than the first count value as the second count value and thereby update the first count value, and change the values of the resistors 30 and 32 by the second count value , to reduce the initial gain of the amplifying circuit 26.

由于放大电路26之增益被降低了,因此放大电路26会输出一高、低电压分别为+V4、-V4之修正之输出信号,其中+V4小于+Vref,-V4大于-Vref,且此第二实施例所能达成的功效与第一实施例相同。Since the gain of the amplifying circuit 26 is reduced, the amplifying circuit 26 will output a modified output signal whose high and low voltages are respectively +V 4 and -V 4 , where +V 4 is less than +V ref and -V 4 is greater than - V ref , and the effect achieved by the second embodiment is the same as that of the first embodiment.

另外,在放大之输出信号中,输出信号与上限检测电压交错之两时间点之间的时间区间愈长,即t4与t5之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低;或在放大之输出信号中,输出信号与下限检测电压交错之两时间点之间的时间区间愈长,即t6与t7之间的时间区间愈长,则锯齿波信号之直流准位调整的幅度愈高,放大电路26之增益被降得更低。In addition, in the amplified output signal, the longer the time interval between the two time points where the output signal and the upper limit detection voltage intersect, that is, the longer the time interval between t4 and t5 , the DC level of the sawtooth wave signal The higher the adjustment range is, the lower the gain of the amplifying circuit 26 is reduced; or in the amplified output signal, the time interval between the two time points where the output signal and the lower limit detection voltage intersect is longer, that is, t6 and t7 The longer the time interval, the higher the adjustment range of the DC level of the sawtooth wave signal, and the lower the gain of the amplifying circuit 26 is reduced.

请参阅图11,此图为利用图7之电路所实验出的波形图,其中上图为音量控制电压信号与输出信号。在18毫秒(ms)之前,音量控制电压信号持续增加,输出信号也持续增大。在接近18毫秒之前,输出信号已靠近上限检测电压,故输出信号随即在18毫秒之后被微量降低。在18.9毫秒时,输出信号超过上限检测电压。此时音量控制电压信号已经不再变化,但输出信号却被大幅度的降低。图11之下图为音量电压控制电压信号与锯齿波信号,其时间轴为上图之18毫秒至20毫秒之间之放大图,在时间约为18.2毫秒时,由于输出信号超过上限检测电压,锯齿波信号之直流准位被提升,以致在约18.86毫秒时,音量控制电压信号交迭于锯齿波信号于较低之计数值,而降低放大器之增益,以致输出信号之振幅缩小。由下图可知,在一长时间后,锯齿波信号的直流准位慢慢回至原直流准位,而使音量控制电压信号交迭锯齿波信号于较高之计数值,而使输出信号慢慢回到原有之振幅大小。Please refer to Figure 11, which is a waveform diagram obtained by using the circuit in Figure 7. The upper figure shows the volume control voltage signal and output signal. Before 18 milliseconds (ms), the volume control voltage signal continues to increase, and the output signal also continues to increase. Before nearly 18 milliseconds, the output signal is close to the upper limit detection voltage, so the output signal is slightly reduced after 18 milliseconds. At 18.9 milliseconds, the output signal exceeds the upper limit detection voltage. At this time, the volume control voltage signal no longer changes, but the output signal is greatly reduced. The lower figure in Figure 11 shows the volume voltage control voltage signal and the sawtooth wave signal, and its time axis is an enlarged view between 18 milliseconds and 20 milliseconds in the upper figure. When the time is about 18.2 milliseconds, because the output signal exceeds the upper limit detection voltage, The DC level of the sawtooth signal is raised, so that at about 18.86 milliseconds, the volume control voltage signal overlaps with the sawtooth signal at a lower count value, and the gain of the amplifier is reduced, so that the amplitude of the output signal is reduced. It can be seen from the figure below that after a long time, the DC level of the sawtooth signal slowly returns to the original DC level, so that the volume control voltage signal overlaps the sawtooth signal at a higher count value, and the output signal slows down. Slowly return to the original amplitude.

综上所述,本发明利用调整斜波信号直流准位的方式,限制音频放大电路的输出信号大小,以保护扬声器与耳朵。To sum up, the present invention uses the method of adjusting the DC level of the ramp signal to limit the output signal of the audio amplifier circuit to protect the speaker and the ears.

以上对本发明的描述是说明性的,而非限制性的,本专业技术人员理解,在权利要求限定的精神与范围之内可对其进行许多修改、变化或等效,但是它们都将落入本发明的保护范围内。The above description of the present invention is illustrative rather than restrictive. Those skilled in the art understand that many modifications, changes or equivalents can be made to it within the spirit and scope of the claims, but they will all fall into within the protection scope of the present invention.

Claims (10)

1. a gain control circuit is characterized in that, this gain control circuit connects an amplifying circuit, and this amplifying circuit is exported an output signal, and this gain control circuit comprises:
One counter, it exports a count value continuously;
One ramp generator, it connects this counter, and exports a ramp signal according to this count value;
One processor, connect this amplifying circuit and this counter, and receive this ramp signal and one control voltage signal, and at the magnitude of voltage of this control voltage signal and this ramp signal crossover, from this counter, obtain this count value corresponding as first count value and temporary, and this first count value of mat determines the gain size of this amplifying circuit with this ramp signal;
One voltage detector, its default upper and lower limit detects voltage, and receives this output signal, and detects voltage at the high voltage of this output signal greater than this upper limit, or the low-voltage of this output signal is exported a detection signal when detecting voltage less than this lower limit; And
The accurate position of one direct current adjuster, connect this ramp generator and this voltage detector, and receive this detection signal, with the accurate position of the direct current of adjusting this ramp signal, make this processor from this counter, obtain corresponding and less than this count value of this first count value with this ramp signal, to upgrade this first count value as second count value, this second count value of mat reduces the gain of this amplifying circuit again.
2. gain control circuit as claimed in claim 1 is characterized in that, this processor more comprises:
One comparator, it receives this ramp signal and this control voltage signal, and at this control voltage signal and this ramp signal crossover during in this magnitude of voltage, export one first latch-up signal, after the accurate position of the direct current of this ramp signal is adjusted, during in this magnitude of voltage, export one second latch-up signal at this control voltage signal and this ramp signal crossover; And
One state is kept in controller, it connects this counter and this amplifying circuit, and at this control voltage signal and this ramp signal crossover during in this magnitude of voltage, receive this first latch-up signal, from this counter, to obtain this count value corresponding at this magnitude of voltage as this first count value and temporary with this ramp signal, and this first count value of mat determines the gain size of this amplifying circuit, or after the accurate position of the direct current of this ramp signal is adjusted, and at this control voltage signal and this ramp signal crossover during in this magnitude of voltage, receive this second latch-up signal, and from this counter, obtain corresponding and less than this count value of this first count value with this ramp signal at this magnitude of voltage, to upgrade this first count value as this second count value, this second count value of mat reduces the gain of this amplifying circuit again.
3. gain control circuit as claimed in claim 1 is characterized in that, when the waveform slope of this ramp signal was plus or minus, the accurate position of this direct current adjuster increased or downgrade the accurate position of direct current of this ramp signal respectively, with so that reduce the gain of this amplifying circuit.
4. gain control circuit as claimed in claim 1, it is characterized in that, when the high voltage of this output signal detects voltage greater than this upper limit, time interval between two time points that this output signal and this upper limit detection voltage interlock is longer, and then the amplitude of accurate adjustment of the direct current of this ramp signal is higher; When the low-voltage of this output signal detected voltage greater than this lower limit, the time interval between two time points that this output signal and this lower limit detection voltage interlock was longer, and then the amplitude of accurate adjustment of the direct current of this ramp signal is higher.
5. gain control circuit as claimed in claim 1 is characterized in that, this ramp signal generator is sawtooth signal generator or triangular signal generator, and the signal of its generation is respectively sawtooth signal or triangular signal; This control voltage signal is an analog signal; This counter is a ring counter; This amplifying circuit is an audio frequency amplifier, and this control voltage signal is volume control voltage signal, and this amplifying circuit receives an input signal and it is amplified after, export this output signal.
6. gain control method, the output signal that it receives amplifying circuit output, is characterized in that this gain control method comprises the following step to control the gain size of this amplifying circuit:
(A) export a count value continuously;
(B) produce a ramp signal according to this count value;
(C) receive this ramp signal and a control voltage signal, and at the magnitude of voltage of this control voltage signal and this ramp signal crossover, obtain this count value corresponding with this ramp signal as first count value and temporary, this first count value of mat determines the initial gain of this amplifying circuit again;
(D) detect voltage at the high voltage of this output signal greater than a default upper limit, or the low-voltage of this output signal is exported a detection signal, and is carried out next step when detecting voltage less than a default lower limit;
(E) receive this detection signal, with the accurate position of the direct current of adjusting this ramp signal; And
(F) obtain corresponding with this ramp signal and less than this count value of this first count value at this magnitude of voltage, upgrading this first count value as second count value, and this second count value of mat reduces this initial gain.
7. gain control method as claimed in claim 6 is characterized in that, this step (C) more comprises the following step:
Receive this ramp signal and this control voltage signal, and during in this magnitude of voltage, export one first latch-up signal at this control voltage signal and this ramp signal crossover; And
Receive this first latch-up signal, to obtain this count value corresponding with this ramp signal at this magnitude of voltage as this first count value and temporary, this first count value of mat determines this initial gain again.
8. gain control method as claimed in claim 6 is characterized in that, this step (F) more comprises the following step:
Export one second latch-up signal; And
Receive this second latch-up signal, obtaining corresponding with this ramp signal at this magnitude of voltage and less than this count value of this first count value, upgrading this first count value as this second count value, and this second count value of mat reduces this initial gain.
9. gain control method as claimed in claim 6 is characterized in that, when the waveform slope of this ramp signal is plus or minus, then in this step (E), increases or downgrade the accurate position of direct current of this ramp signal respectively, to reduce this initial gain.
10. gain control method as claimed in claim 6, it is characterized in that, when the high voltage of this output signal detects voltage greater than this upper limit, time interval between two time points that this output signal and this upper limit detection voltage interlock is longer, and then the amplitude of accurate adjustment of the direct current of this ramp signal is higher; When the low-voltage of this output signal detected voltage less than this lower limit, the time interval between two time points that this output signal and this upper limit detection voltage interlock was longer, and then the amplitude of accurate adjustment of the direct current of this ramp signal is higher.
CN2009101767876A 2009-09-18 2009-09-18 Gain control circuit and its gain control method Pending CN102025332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101767876A CN102025332A (en) 2009-09-18 2009-09-18 Gain control circuit and its gain control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101767876A CN102025332A (en) 2009-09-18 2009-09-18 Gain control circuit and its gain control method

Publications (1)

Publication Number Publication Date
CN102025332A true CN102025332A (en) 2011-04-20

Family

ID=43866285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101767876A Pending CN102025332A (en) 2009-09-18 2009-09-18 Gain control circuit and its gain control method

Country Status (1)

Country Link
CN (1) CN102025332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166587A (en) * 2011-12-16 2013-06-19 富泰华工业(深圳)有限公司 audio processing circuit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0328180A1 (en) * 1988-02-05 1989-08-16 Koninklijke Philips Electronics N.V. Amplifier arrangement with output-swing limitation
CN101106361A (en) * 2006-07-12 2008-01-16 震一科技股份有限公司 Complementary Gain Control Circuit
TW200816626A (en) * 2006-09-20 2008-04-01 Princeton Technology Corp Automatic-gain control circuit
CN101262204A (en) * 2007-03-09 2008-09-10 普诚科技股份有限公司 Voltage Control Circuit and Variable Gain Amplifier

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0328180A1 (en) * 1988-02-05 1989-08-16 Koninklijke Philips Electronics N.V. Amplifier arrangement with output-swing limitation
CN101106361A (en) * 2006-07-12 2008-01-16 震一科技股份有限公司 Complementary Gain Control Circuit
TW200816626A (en) * 2006-09-20 2008-04-01 Princeton Technology Corp Automatic-gain control circuit
CN101262204A (en) * 2007-03-09 2008-09-10 普诚科技股份有限公司 Voltage Control Circuit and Variable Gain Amplifier

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166587A (en) * 2011-12-16 2013-06-19 富泰华工业(深圳)有限公司 audio processing circuit

Similar Documents

Publication Publication Date Title
US11431310B2 (en) Tracking and correcting gain of open-loop driver in a multi-path processing system
US10924069B2 (en) System and method for low distortion capacitive signal source amplifier
US9337795B2 (en) Systems and methods for gain calibration of an audio signal path
CN100492912C (en) A signal processing method and device
CN100566176C (en) Automatic gain control device
US9019012B2 (en) Amplifier circuit with offset control
US8223981B2 (en) Wide dynamic range microphone
US20160344360A1 (en) System and Method for High Input Capacitive Signal Amplifier
US9407224B2 (en) Digital microphone device with extended dynamic range
US9831843B1 (en) Opportunistic playback state changes for audio devices
GB2553867A (en) Reconfiguring paths in a multiple path analog-to-digital converter
CN1750388A (en) High frequency power amplifier and transmitter
KR20160005721A (en) Signal processing for mems capacitive transducers
US11329620B2 (en) Tracking and correcting gain of open-loop driver in a multi-path processing system
CN100492889C (en) Timing adjustment method and timing adjustment device
KR102231887B1 (en) Calibration of dual-path pulse width modulation systems
US9306504B2 (en) Waveform shaping for audio amplifiers
US11791774B2 (en) Window based supply voltage conditioning circuit for noise filtering
CN102025332A (en) Gain control circuit and its gain control method
CN102931931A (en) Anti-sound break circuit for D-class power amplifier chip
CN109031101A (en) A kind of volume production test circuit of power amplifier AGC output power
US10819300B2 (en) Analog microphone and control method thereof technical field of the disclosure
CN202906845U (en) Anti-cracking voice circuit for D-class power amplifier chip
US7965142B2 (en) Gain control circuit and its gain control method
US10020778B1 (en) Reducing audio artifacts in an amplifier with configurable final output stage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20110420

C20 Patent right or utility model deemed to be abandoned or is abandoned