首页 > 编程知识 正文

数码管显示数字0到9编程(七段数码管显示译码器)

时间:2023-05-04 01:19:01 阅读:122085 作者:4560

` time scale1ns/1 psmodulehex7seg (input [ 3: ] x,outputlogic [6 : 0] a_to_g ); always_combBegincase(x )4(b0000:a_to_g=7) b000001; 4'b0001: a_to_g=7'b1001111; 4'b0010: a_to_g=7'b0010010; 4'b0011: a_to_g=7'b0000110; 4'b0100: a_to_g=7'b1001100; 4'b0101: a_to_g=7'b0100100; 4'b0110: a_to_g=7'b0100000; 4'b0111: a_to_g=7'b0001111; 4'b1000: a_to_g=7'b0000000; 4'b1001: a_to_g=7'b0000100; 4'b1010: a_to_g=7'b0001000; 4'b1011: a_to_g=7'b1100000; 4'b1100: a_to_g=7'b0110001; 4'b1101: a_to_g=7'b1000010; 4'b1110: a_to_g=7'b0110000; 4'b1111: a_to_g=7'b0111000; 结束案例结束模块

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。