Video Learning Series : Interfacing LED & Switch ::: Task - 3
Click Here For Video ::: Video Learning Series (vhdlbynaresh.blogspot.com) |
Video Link -
https://www.youtube.com/watch?v=P5hYdB_n6xo&list=UU91Msf7ixvSGlnx_RsKTd7Q
TASK 3 :::: Interfacing LED & Switch With Cyclone II FPGA Device. -
Description - LED's Starts Blinking when Switch is pressed & Remains same as it's last update when Switch is released.
In our video we take 8 LED's as output packed in 7- segment package.
VHDL Code -
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity sl3 is
port (clk : in std_logic;
din : in std_logic;
dout : out std_logic_vector (7 downto 0));
end sl3;
architecture sl2_arc of sl3 is
begin
p0 : process (clk,din) is
variable m : std_logic_vector (24 downto 0) := (others=>'0');
begin
if (rising_edge (clk)) then
m := m + 1;
end if;
if (din='0') then
case m(24) is
when '0' => dout <= "00000000";
when others => dout <= "11111111";
end case;
end if;
end process p0;
end sl2_arc;
Please revert with your suggestions, likes and comments to make this video series successful and helpful to others.
I would love to read your suggestions and comments here below
Best Regard //
Naresh Singh Dobal
nsdobal@gmail.com
This comment has been removed by a blog administrator.
ReplyDelete