Forum Discussion
Altera_Forum
Honored Contributor
15 years agoInternal Clock HELP
Helloo.. I had a project to do on an Altera Cyclone II board, it's a Digital Calendar. I've completed it successfully but I have a problem with the clock, I have a 27MHz and 50MHz internal clo...
Altera_Forum
Honored Contributor
15 years agoa cascade of counters, something like this:
process -- clked on 27MHz
if Hz_count /= 27000000-1 then
Hz_count <= Hz_count +1;
else
Hz_count <= 0;
if seconds_count /= 59 then
seconds_count <= seconds_count + 1;
else
seconds_count <= 0;
if minutes_count /= 59 then
minutes_count <= minutes_count + 1;
else
minute_count <= 0;
if hours_count /= 23 then
hours_count <= hours_count + 1;
else
hours_count <= 0;
if days_count /= final_day then
days_count <= days_count + 1;
else
days_count <= 1;
end if;
end if;
end if;
end if;
end if;