Search This Blog

Monday, July 15, 2013

Design of BCD to 7 Segment Driver for Common Kathode using with select statement (VHDL Code).

Design of BCD to 7 Segment Driver for Common Kathode Display using with-select (Data Flow Modeling Style)-


Output Waveform : BCD to 7-segment Driver


VHDL Code-

-------------------------------------------------------------------------------
--
-- Title       : seg7_driver
-- Design      : vhdl_test
-- Author      : Naresh Singh Dobal
-- Company     : nsd
--
-------------------------------------------------------------------------------
--
-- File        : 7 Segment Driver for common kathode.vhd

   
   
library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity seg7_driver is
     port(
         bcd : in STD_LOGIC_VECTOR(3 downto 0);
         seg7 : out STD_LOGIC_VECTOR(6 downto 0)
         );
end seg7_driver;

architecture seg7_driver_arc of seg7_driver is
begin

    with bcd select
    seg7 <= "1111110" when "0000",
            "0110000" when "0001",
            "1101101" when "0010",
            "1111001" when "0011",
            "0110011" when "0100",
            "1011011" when "0101",
            "0011111" when "0110",
            "1110000" when "0111",
            "1111111" when "1000",
            "1110011" when "1001",
            "0000000" when others;

end seg7_driver_arc;

No comments:

Post a Comment