Search This Blog

Friday, April 11, 2014

Video Learning Series : Interfacing LED & Switch ::: Task - 2 with Codes & Video






 Video Learning Series : Interfacing LED & Switch ::: Task - 2


https://www.youtube.com/watch?v=rmpQ8F0dziY&list=UU91Msf7ixvSGlnx_RsKTd7Q   
Click Here For Video  ::: Video Learning Series (vhdlbynaresh.blogspot.com)



Video Link  -
https://www.youtube.com/watch?v=rmpQ8F0dziY&list=UU91Msf7ixvSGlnx_RsKTd7Q


 TASK 2  ::::    Interfacing LED & Switch With Cyclone II FPGA Device. -
Description -    LED's Starts Blinking when Switch is pressed & goes OFF 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 sl2 is
port (clk : in std_logic;
din : in std_logic;
dout : out std_logic_vector (7 downto 0));
end sl2;

architecture sl2_arc of sl2 is  --frequncy is 50 MHz
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;
        else
            dout <= (others => '0');
        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

No comments:

Post a Comment