Hi treqer,
I had added that shift register code with the existing code. please refer this:
entity disp is
Port ( main_clk : in STD_LOGIC;
displ_en_strob : in STD_LOGIC;
serial_clk : in std_logic;
serial_data : in std_logic;
reg0 : inout STD_LOGIC_vector(0 to 7);
reg1 : inout STD_LOGIC_vector(0 to 7);
reg2 : inout STD_LOGIC_vector(0 to 7);
reg3 : inout STD_LOGIC_vector(0 to 7);
reg4 : inout STD_LOGIC_vector(0 to 7);
reg5 : inout STD_LOGIC_vector(0 to 7);
reg6 : inout STD_LOGIC_vector(0 to 7);
reg7 : inout STD_LOGIC_vector(0 to 7);
col : out STD_LOGIC_vector(0 to 7);
row : out STD_LOGIC_vector(0 to 7));
end disp;
architecture Behavioral of disp is
signal cnt_s : std_logic_vector(0 to 2);
begin
SM : process (main_clk)
begin
if (main_clk'event and main_clk = '1') then
if (displ_en_strob = '1') then
cnt_s <= cnt_s + 1;
end if;
end if;
end process SM;
ds : process (cnt_s)
begin
if cnt_s = "000" then
col <= "01111111";
row <= reg0;
elsif cnt_s = "001" then
col <= "10111111";
row <= reg1;
elsif cnt_s = "010" then
col <= "11011111";
row <= reg2;
elsif cnt_s = "011" then
col <= "11101111";
row <= reg3;
elsif cnt_s = "100" then
col <= "11110111";
row <= reg4;
elsif cnt_s = "101" then
col <= "11111011";
row <= reg5;
elsif cnt_s = "110" then
col <= "11111101";
row <= reg6;
elsif cnt_s = "111" then
col <= "11111110";
row <= reg7;
end if;
end process ds;
shr : process (serial_clk)
begin
if (serial_clk'event and serial_clk = '0') then
reg7 <= reg7(1 to 7) & reg6(0);
reg6 <= reg6(1 to 7) & reg5(0);
reg5 <= reg5(1 to 7) & reg4(0);
reg4 <= reg4(1 to 7) & reg3(0);
reg3 <= reg3(1 to 7) & reg2(0);
reg2 <= reg2(1 to 7) & reg1(0);
reg1 <= reg1(1 to 7) & reg0(0);
reg0 <= reg0(1 to 7) & serial_data;
end if;
end process shr;
end architecture Behavioral;
------
I had attached the RTL Schematic also with that. Please refer that. Now i can give the data in the serial_data input to control the row data. If suppose i have to print the Character "A". what is the data i can send in the serial input?. can you please let me know.
https://obrazki.elektroda.pl/49_1312612459.jpg
thanks,
V. Prakash