Search This Blog

Monday, July 15, 2013

Design of BCD to 7 Segment Driver for Common Anode Display using With Select (VHDL Code).

Design of BCD to 7 Segment Driver for Common Anode Display using With-Select Statement   (Data Flow Modeling Style)-


Output Waveform : BCD to 7 Segment Driver for Common Anode Display


VHDL Code-


-------------------------------------------------------------------------------
--
-- Title       : seg7_driver
-- Design      : vhdl_test
-- Author      : Naresh Singh Dobal
-- Company     : nsd
--
-------------------------------------------------------------------------------
--
-- File        : 7 Segment Driver for common Anode.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 <= "0000001" when "0000",
            "1001111" when "0001",
            "0010010" when "0010",
            "0000110" when "0011",
            "1001100" when "0100",
            "0100100" when "0101",
            "1100000" when "0110",
            "0001111" when "0111",
            "0000000" when "1000",
            "0001100" when "1001",
            "1111111" when others;

end seg7_driver_arc;

1 comment:

  1. Hello, I am using Quartus2 V8.1, when I simulate this code I cannot get the result, can you post your simulation steps. thx

    ReplyDelete