module x7seg_4bit(
input clk,
input rst_n,
input [15:0] x, //等待显示的BCD码
output reg [6:0] a_to_g, //段信号
output reg [3:0] an //位选信号
);
//时钟分频 计数器
reg [20:0] clkdiv;
always @(posedge clk or negedge rst_n)
begin
if(!rst_n)
clkdiv<=21'd0;
四位数码管
最新推荐文章于 2023-05-31 16:44:00 发布