Altera_Forum
Honored Contributor
13 years agousing clock
Hi!
I'm a beginner with my DE2-115 and vhdl programations. I'm trying to do a simple logic: make a led blink. To do this, I'm working with clock. But, I'm with some problems, because the led doesn't blink! It just stays on and not blinking. This is the code I'm using: entity TESTE_CLOCK is port( clk:in bit; clkout:out bit); end TESTE_CLOCK; architecture behavior of TESTE_CLOCK is begin process(clk) variable cnt : integer range 0 to 50000000; begin if(clk'event and clk='1') then if(cnt=50000000)then cnt:=0; clkout<='0'; else cnt := cnt+1; clkout<='1'; end if; end if; end process; end behavior; Help me, please. tnx efsuzin