Forum Discussion
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- I use Cyclon II board to applied Counter program by verilog hdl code in quartus II when compiler program successful ok Now My problem I want start counter up when Press push button from 0 untel 15 binary display on board but my problem why neccessary press push button to increase cunter I want Generate Clock by itself. I believe My problem in Assinment clock in Quartus II. Please anyone clear My problem tell me. my code is module counter ( clk, reset, result, ena ); input clk; input reset; input ena; output [3:0] result; reg [3:0] result; always @(posedge clk or posedge reset) begin if (reset) result = 0; else if (ena) result = result + 1; end endmodule --- Quote End --- Hi ALMODAWAN, your code looks fine to me, but what is your clock frequency ? Who is driving the "ena" signal? Kind regards GPK