Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Counter's increment in 1 second using 50MHz Clock in Altera DE2 Board

Status
Not open for further replies.

duttasankha

Newbie level 3
Newbie level 3
Joined
Oct 29, 2011
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,302
Hi!
I am trying to use the 50 MHz clock in the DE2 board and I have a counter which needs to increment in every second using this clock. I tried different procedures to accomplish this task but none of them seems to be working. Now I am thinking of using a clock divider to get 1 Hz from the 50 MHz clock and that I will fed into the counter's clock input. It would be really very helpful if anyone could help me in this issue. If someone have got any other idea then I would be glad even more.Thanking you in advance.
 

Hope it will be helpful

module delay_1s(delay,CLOCK_50);
output reg delay;
input CLOCK_50;
reg [25:0] count;
always @(posedge CLOCK_50)
begin
if(count==26'd49_999_999)
begin
count<=26'd0;
delay<=1;
end
else
begin
count<=count+1;
delay<=0;
end
end
endmodule
 
Thank you very much for the code...the code is perfect and the program is running perfectly...thank you again.....
 
Both of you are beginners on this forum as I see, but on good way that helping each other.
If you want more points (more possibilities) click on "helpful" if threate is helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top