Altera_Forum
Honored Contributor
16 years agoreset MAX II
hi, i would like to know if i can rely on the power-on-reset of MAX II to know the initial values of the outputs? or should i use external reset? thanks sharen
A neat way is to use modulo adder(variable counter steps) as follows:
choose a free running binary accumulator (say for simplicity of discussion) that has capacity of 256 maximum. Increment it from zero by adding a step of your choice between 1 and 255 then use the overflow as your clock enable to control clock rate on whatever logic. if step = 1 then it gives overflow flag every 256 clocks. if step= 128 then it overflows every 2 clocks and so on. You will need another counter to generate the step of 1~255 that is enabled on the button. To detect overflow flag add one extra bit to accumulator i.e. use 9 bits for our simple example. This 9th bit will give you directly one pulse whenever overflow occurs since the accumulator is binary limited to 255 and rolls over. The clock enable rate for a step size (s) = s/2^8 * clock rate