实验目的:利用BCD码计数器和7段码转换器子电路
实验工具:Quartus ii软件和meli软件联合仿真
实验过程截图
实验结果截图
实验代码:
module BCDcount (Clock, Clear, E, BCD1, BCD0); input Clock, Clear, E;
output reg [3:0] BCD1, BCD0;
always @(posedge Clock)
begin
if (Clear)
begin
BCD1<=0;
BCD0<=0;
end
else if (E)
if (BCD0= 4'b1001)
begin
BCD0<=0;
if (BCD1 == 4'b1001)
BCD1<=0;
else
BCD1<=BCD1 +1;
end
else
BCD0<=BCD0+ 1;
end
endmodule
实验视频链接:哔哩哔哩搜索
【期末考试实验一-哔哩哔哩】https://b23.tv/5outl8