摘要 |
PURPOSE:To calculate a moving average value through a simple digital circuit by calculating an average value of values within some specific time successively, and detecting whether the value exceeds a preset value or not. CONSTITUTION:A clock oscillator 8 for sampling, an (M+1)-stage shift register 7 which is written synchronously with it, an up/down counter 10 which counts up to at least M, and a digital comparator 11 are provided. The counter does not count when the data of the 1st stage of the shift register 7 is equal in value to the data of the (M+1)th stage wherein the data is written finally, and counts up or down synchronously with the clock oscillator 8 according to the state of difference between the data of the 1st and the (M+1)th stage of the shift register 7 when they are different. Further, the up/down counter 10 does not count up when counting up to M and does not count down when counting down to 0. |