I have changed the process like this:
buttons_process:process (key)
begin
if ((key(0) = '0' and key(0)'event)) then
run <= not run; -- switch ON/OFF does't work properly - why ??
reset <= '0';
end if;
if (key(1) = '0') then
hex6 <= "1000000"; -- 0
reset <= '1';
else
hex6 <= "1111001"; -- 1
end if;
end process;
but the key is still not toggling properly. If I change key(0) detection to rising edge
(key(0) = '1' and key(0)'event)
the key shouldn't be working from my opinion. But it is the same inproper toggling. What am I missing ?
Thanks for reply.