Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9029769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:19:30+00:00 2026-06-16T07:19:30+00:00

Now that I have managed to shift my text while writing, I want to

  • 0

Now that I have managed to shift my text while writing, I want to implement another feature, scrolling the text 1 digit per second. So for example I will will write “STACK” from keyboard, and then when I toggle a pin it will start floating on the seven segment display. I am getting multiple clocks error as I expected. Now, I got over that error with a counter but the text is not scrolling properly, random characters appear on random locations.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.numeric_std.all;

entity my_shifter is
        port(clk      : in  std_logic;
            doShift : in std_logic;--shift mode
            Scan_Dav : in  std_logic;--from keyboard module, new data
            Data_in  : in  std_logic_vector (7 downto 0);--scancode of the key pressed
            O1 : out std_logic_vector(7 downto 0);
            O2 : out std_logic_vector(7 downto 0);
            O3 : out std_logic_vector(7 downto 0);
            O4 : out std_logic_vector(7 downto 0)
            );
end my_shifter;

architecture bhv of my_shifter is

signal bytes : std_logic_vector(63 downto 0):=(others => '0');
signal Scan_Dav_Sync: std_logic_vector(1 downto 0):="00";
signal Previous_Scan_Dav: std_logic:='0';
signal shift : std_logic:='0';
signal flag : std_logic:='0';
signal first_letter: std_logic_vector(7 downto 0):="00000000";
begin
    process(clk)
        variable var:integer range 0 to 50000000 :=0;
        begin
            if rising_edge(clk) then
                if var = 50000000 then
                    var:=0;
                    flag<='0';
                    shift <= '1';
                else
                    flag <= '1';
                    var:=var+1;
                    shift <= '0';
                end if;
            end if;
    end process;

    process (clk, doShift) 
        begin
            case doShift is

                when '0' =>
                    if rising_edge(clk) then
                        Scan_Dav_Sync(0) <= Scan_Dav;
                        Scan_Dav_Sync(1) <= Scan_Dav_Sync(0);
                        Previous_Scan_Dav <= Scan_Dav_Sync(1);
                        if (Previous_Scan_Dav = '0') and (Scan_Dav_Sync(1) = '1') then
                            bytes <= bytes (bytes'high-8 downto 0) & Data_in;
                        end if;
                    end if;--till here it works fine.

                when '1' => -- this is where it messes up
                    if (shift = '1' and flag = '0' ) then
                        first_letter <= bytes(bytes'high downto bytes'high-7);
                        bytes <= bytes (bytes'high-8 downto 0) & first_letter;
                    end if; 

                when others =>--ignore here
                    bytes <= bytes (bytes'high-8 downto 0) & Data_in;

            end case;
    end process;
    O1 <= bytes(31 downto 24);
    O2 <= bytes(23 downto 16);
    O3 <= bytes(15 downto 8);
    O4 <= bytes(7 downto 0);
end bhv;

I wonder how I can overcome this issue? What or where is the error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:19:31+00:00Added an answer on June 16, 2026 at 7:19 am

    Most likely you can get away with this working if you make your second process a sane clocked process.

    Something like:

    process (clk) 
    begin
        if rising_edge(clk) then
            case doShift is
                when '0' =>
                    Scan_Dav_Sync(0) <= Scan_Dav;
                    Scan_Dav_Sync(1) <= Scan_Dav_Sync(0);
                    Previous_Scan_Dav <= Scan_Dav_Sync(1);
                    if (Previous_Scan_Dav = '0') and (Scan_Dav_Sync(1) = '1') then
                        bytes <= bytes (bytes'high-8 downto 0) & Data_in;
                    end if;
    
                when '1' =>
                    if (shift = '1' and flag = '0' ) then
                        first_letter <= bytes(bytes'high downto bytes'high-7);
                        bytes <= bytes (bytes'high-8 downto 0) & first_letter;
                    end if; 
    
                when others =>
                    bytes <= bytes (bytes'high-8 downto 0) & Data_in;
    
            end case;
        end if;
    end process;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 windows now that i want to open maximized but should be
My project is almost done, and thanks to stackoverflow. Now that I have managed
i have a datagrid that contains 3 DataGridTemplateColumns that hold radioButtons. now i want
Now that I have decided upon Firebird , with the help of StackOverflow :),
Now that I have a read-only application working, I am working on the insert
I'm re-casting a question I asked earlier now that I have an idea of
Possible Duplicate: JavaScript: formatting number with exactly two decimals Now that I have got
I have a follow up question to this one . Now that I have
Edit: original question below, but I revise it now that I have some code
I develop a game that will have to load jpg images that now i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.