Divide by N clock/frequency
I'd use a down counter that you can preset with a value. 

You then have a latch to store N/2. 

Each time the counter reaches zero you toggle a D-type output latch and reload the counter.

The output from the D-Type will then be 50% mark-space clock at your desired frequency.







simulate this circuit &ndash; Schematic created using CircuitLab

BTW: This is basically how every timer works in common micros.