可逆计数器是一种双向计数器,可以进行递增计数,也可以进行递减计数,根据计数控制信号的不同,在时钟脉冲的作用下,计数器可以进行加1或减1的操作。
下面描述的是一个位宽为4的可逆计数器,即该计数器在不同控制信号下可以分别实现加法计数和减法计数的功能。
rst为同步复位信号,当rst = 1时,dout = 4’b0000;当load = 1时,输入信号din通过dout输出; 若add_en = 1时,计数器在每个时钟上升沿实现加1的操作,即实现加法计数功能;若add_en = 0时,计数器在每个时钟上升沿实现减1的操作,即实现减法计数功能。
A reversible counter is a two-way counter, which can be counted incrementally, and can also be counted. According to the difference of the count control signal, the counter can operate with 1 or minus 1 under the action of the clock pulse. The following is a reversible counter with a bit width of 4, that is, the counter can perform addition counting and subtraction counting separately under different control signals. RST is a synchronous reset signal, when RST = 1, dout = 4 'b0000; when load = 1, the input signal DIN is output through dout; if add_en = 1, the counter performs plus 1 operation on each clock rising edge, that is, the addition counting function is realized; if add_en = 0, the counter is implemented to reduce 1 operation on each clock rising edge, that is, real The counting function of the present subtraction. (2018-06-27, SQL, 105KB, 下载2次)
使用KEIL软件,使用STM32F407ZGT6芯片,实现四轮小车循迹、灭火、使用火焰传感器、红外循迹模块。
The use of KEIL software, using STM32F407ZGT6 chip, the realization of the four wheel car tracking, fire, flame sensor, infrared tracking module. (2017-07-18, SQL, 3266KB, 下载5次)
fir滤波器程序的实现
-Implement fir filter. (2004-12-22, SQL, 4KB, 下载28次)