JacquesKleynhans
Member level 2
Hi Basic question, I have counter that generates a 400khz clock but I want both a normal an inverted clock. How can I do it. Code is below:
Thx in advance
Added after 1 hours 12 minutes:
Never mind I got it, used a (not)
palm >>>> Face
Code:
process(clk, reset)
begin
if reset = '1' then
sccbclk <= '0';
sccb_div <= "1100011";
elsif rising_edge(clk) then
if sccb_div = "0000000" then
sccbclk <= not(sccbclk);
sccb_div <= "1100011";
else
sccb_div <= sccb_div-1;
end if;
end if;
end process;
clock <= sccbclk; -- normal clock
Thx in advance
Added after 1 hours 12 minutes:
Never mind I got it, used a (not)
palm >>>> Face