共6条
1/1 1 跳转至页
ctqvsly FPGA DIY进程帖 更新UART和按键+数码管,视频已更

流水灯成功;
module NEW_LED(
clk,rst_n,
led
);
input clk;
input rst_n;
output [7:0]led;
reg [21:0]count;
reg clk0_r;
wire clk0;
always@(posedge clk or negedge rst_n)begin
if(!rst_n)begin
clk0_r<=0;
count<=0;
end
else if(count==21'd25000_000)begin
count<=0;
clk0_r<=~clk0_r;
end
else count<=count+1'b1;
end
assign clk0=clk0_r;
reg[7:0]led_r;
always@(posedge clk0 or negedge rst_n)begin
if(!rst_n)begin
led_r<=0;
end
else led_r<=led_r+1'b1;
end
assign led=led_r;
endmodule

按键消抖+数码管显示(可递增,可递减)原来是我用在测试数字电源时用的
源代码:Buttom Add.zip
视频连接:v.youku.com/v_show/id_XNDYyMjA4Mjc2.html
共6条
1/1 1 跳转至页