Ash12 wrote:
> Hi, how are we all??
>
> Im looking for some help / tips....
>
> Could somone help me design a divide by 2 counter using VHDL.
Define a variable of appropriate width. At reset, set it and the output
to 0. At each clock cycle, add one to the variable. When it's equal to
the number you want to divide by, reset it to 0 and toggle the output.
> Im looking to divide a clock input by 2, 4, 6, and 8...
The same basic code works for more or less arbitrary numbers. Note that
if you're coding for something like a recent
FPGA, you may be able to
use a built-in clock manager instead of building it yourself.
--
Later,
Jerry.
The universe is a figment of its own imagination.