Hi Dave
I had a shot at the 7 segment decoder and was quite pleased because I think I am almost there .
It does count pulses, it does decode them, and it does display them correctly on a 7 segment display
but,
it only does it if I use a switch to clock the circuit,
If I connect the count input to CLOCK_50 it turns on 6 of the seven segments and just sits there
I thought at first it might be too fast but I dont think so as I am using the last 4 bits of a 27 stage counter
Here is the code I came up with
Library IEEE;
Use IEEE.numeric_std.all;
use IEEE.STD_Logic_1164.all;
entity Led_Blink is
port
(
clk : in STD_Logic;
q : buffer unsigned (27 downto 24);
Dec_Out :out unsigned (6 downto 0)
);
end Led_Blink;
architecture Counter of Led_Blink is
signal count : unsigned(27 downto 24);
begin
process (clk)
begin
if rising_edge (clk) then
count <= count + 1;
end if ;
end process ;
q<=(count);
Process (q)
begin
case q is
when "0000" =>
Dec_Out <= "1000000";
when "0001" =>
Dec_Out <= "1111001";
when "0010" =>
Dec_Out <= "0100100";
when "0011" =>
Dec_Out <= "0110000";
when "0100" =>
Dec_Out <= "0011001";
when "0101" =>
Dec_Out <= "0010010";
when "0110" =>
Dec_Out <= "0000011";
when "0111" =>
Dec_Out <= "1111000";
when "1000" =>
Dec_Out <= "0000000";
when "1001" =>
Dec_Out <= "0011000";
when others =>
Dec_Out <= "1111111";
end case;
end process ;
end Counter;
Don