Search This Blog

Saturday, July 20, 2013

Design of BCD to 7 Segment Driver for Common Cathode Display using CASE statements (VHDL Code).






Design of  BCD to 7 Segment Driver for Common Cathode Display uisng CASE Statements (Behavior Modeling Style).



Ouptut Waveform :   BCD to 7 Segment Driver for Common Cathode Display.



VHDL Code-


-------------------------------------------------------------------------------
--
-- Title       : bcd_to_7seg_CC
-- Design      : vhdl_upload 1
-- Author      : Naresh Singh Dobal
-- Company     : nsd
-- VHDL Tutorials & exercise by Naresh Singh Dobal
--
-------------------------------------------------------------------------------
--
-- File        : BCD to 7 segment driver using case statements for common cathode.vhd


library IEEE;
use IEEE.STD_LOGIC_1164.all;

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


architecture bcd_to_7seg_arc of bcd_to_7seg_CC is
begin

    segment7 : process (bcd) is
    begin
        case bcd is
            when "0000" => seg7 <= "1111110";
            when "0001" => seg7 <= "0110000";
            when "0010" => seg7 <= "1101101";
            when "0011" => seg7 <= "1111001";
            when "0100" => seg7 <= "0110011";
            when "0101" => seg7 <= "1011011";
            when "0110" => seg7 <= "0011111";
            when "0111" => seg7 <= "1110000";
            when "1000" => seg7 <= "1111111";
            when "1001" => seg7 <= "1110011";
            when others => seg7 <= "0000000";
        end case;
    end process segment7;

end bcd_to_7seg_arc;

1 comment: