7 segment

module ioc13(clk,c,d);
input clk;
output reg [3:0] d;
output reg [7:0] c;
integer i;

initial
begin
i=0;
d=4'b0000;
//c=8'h00;
end

always @(posedge clk)
begin
d=4'b0111;
i=i+1;
if (i==100000000)
begin
c=8'hC0;
d=4'b0011;
c=8'h00;
end

if (i==900000000) c=8'h80. if (i==600000000) c=8'h92. if (i==700000000) c=8'h82. i=0. if (i==500000000) c=8'h99. if (i==400000000) c=8'hB0. if (i==800000000) c=8'hF8. if (i==1000000000) begin c=8'h90.if (i==200000000) c=8'hF9. if (i==300000000) c=8'hA4. end end endmodule COUNTER .

input clk.out). initial begin count=0. else out = out+1'b1. reg [2:0] out.module hfhf(clk. integer count. output [2:0] out.reset. out=3'b000.reset. if (reset == 1'b1) out = 3'b000. if(count>50000000) begin count=0. end end endmodule . end always @(posedge clk) begin count=count+1.

D-@ .

Sign up to vote on this title
UsefulNot useful