收藏 分享(赏)

单个数码管verilog程序.doc

上传人:HR专家 文档编号:11856447 上传时间:2021-03-02 格式:DOC 页数:2 大小:68KB
下载 相关 举报
单个数码管verilog程序.doc_第1页
第1页 / 共2页
单个数码管verilog程序.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

单个数码管verilog程序module seg1(clk,a,seg);input clk;output a;output 7:0 seg;reg 7:0 seg;reg a; reg 23:0 cnt1;reg 3:0 cnt2;always (posedge clk) begin a=1; end always (posedge clk) begin if(cnt1!=24hffffff) begin cnt1=cnt1+1; end else begin cnt1=0; cnt2=cnt2+1; if(cnt2!=10) begin case(cnt2) 4d1: seg=8b10000010; 4d2: seg=8b10111110; 4d3: seg=8b00100011; 4d4: seg=8b00011110; 4d5: seg=8b01001010; 4d6: seg=8b01000010; 4d7: seg=8b10101110; 4d8: seg=8b00000010; 4d9: seg=8b00001010; default :seg=8b11111111; endcase end else cnt2=0; end end endmodule

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 中等教育 > 小学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报