I am having trouble making the code for kind of an OnRelease function
When a button is pressed there will be a '0' bit when not pressed there will be a '1' bit. I need to wait for the button to be pressed, and then to wait for it to be release before anything happens.... can someone please
help?
***load is the signal from the button
When a button is pressed there will be a '0' bit when not pressed there will be a '1' bit. I need to wait for the button to be pressed, and then to wait for it to be release before anything happens.... can someone please
help?
***load is the signal from the button
Code:
begin
if(Reset='1') then timer:="0000"; load_count:="00";
elsif(CLK'event and CLK='1') then
if(launch_in='1') then GAMEOVER<='1';
elsif(load='0' and load_count="00") then
--if (load='1') then
timer:=data_in;
load_count:="01";
--end if;
elsif(load='0' and load_count="01") then
--if(load='1') then
start_temp:='1';
load_count:="10";
--end if;
elsif(load='0' and load_count="10") then
--if(load='1') then
pause_temp:='1';
load_count:="11";
--end if;
elsif(load='0' and load_count="11") then
--if(load='1') then
pause_temp:='0';
load_count:="00";
--end if;
end if;
end if;