Keyboard input help

Discussion in 'VHDL' started by Rishi Dhupar, Aug 14, 2006.

  1. Rishi  Dhupar

    Rishi Dhupar Guest

    Hi,

    Trying to figure out how I can concatanate input from a keyboard. I
    cannot seem to figure out how I would store the number "12" from
    keyboard input. The user presses 1, gets stored somewhere then he
    presses 2, then that gets stored somewhere. How can I like put these
    together so verilog knows it is "12"?

    Basically I am just doing keyboard input to LCD output.
    Type in a 3 digit number on KB and press the space key, and it should
    print out the number * 2 to the LCD.

    Thanks for any help.

    Rishi Dhupar
    Rishi Dhupar, Aug 14, 2006
    #1
    1. Advertising

  2. On Mon, 13 Aug 2006, Rishi Dhupar wrote:

    "Trying to figure out how I can concatanate input from a keyboard. I
    cannot seem to figure out how I would store the number "12" from
    keyboard input. The user presses 1, gets stored somewhere then he
    presses 2, then that gets stored somewhere. How can I like put these
    together so verilog knows it is "12"?

    [..]"

    You could use just about any data structure, e.g. an array or a FIFO. This
    is not a Verilog newsgroup.
    Colin Paul Gloster, Aug 14, 2006
    #2
    1. Advertising

  3. Rishi  Dhupar

    backhus Guest

    Rishi Dhupar schrieb:
    > Hi,
    >
    > Trying to figure out how I can concatanate input from a keyboard. I
    > cannot seem to figure out how I would store the number "12" from
    > keyboard input. The user presses 1, gets stored somewhere then he
    > presses 2, then that gets stored somewhere. How can I like put these
    > together so verilog knows it is "12"?
    >
    > Basically I am just doing keyboard input to LCD output.
    > Type in a 3 digit number on KB and press the space key, and it should
    > print out the number * 2 to the LCD.
    >
    > Thanks for any help.
    >
    > Rishi Dhupar
    >

    Hi rishi,
    Verilog will never know what numbers you type in your keyboard. It's
    just not there anymore when you have your hardware running. It's all
    gates and FFs.

    Now back to what you want to do...
    It's the same thing as in your computer You get single characters from
    your keyboard. But neither a number 1 nor the ascii code of "1", but a
    scancode, you have to translate (if we are talking about common PS/2
    keyboards).Anyway, let's just assume you have the number 1 in a register
    and the number 2 in another register (or ram, whatever). If you want it
    to become a number 12 ou have to multiply the 1 by 10 and add the 2.
    It's called the decimal system. ;-)

    You have to distinguish between numerical values for calculation and
    chars for display purposes!

    Now guess what you have to do when you do the multiplication and want to
    display it?

    have a nice synthesis
    Eilert
    backhus, Aug 15, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Shaw
    Replies:
    1
    Views:
    834
    J. Romano
    Nov 10, 2003
  2. Starbase Commander

    Unbuffered keyboard input???

    Starbase Commander, Sep 10, 2004, in forum: Perl
    Replies:
    1
    Views:
    691
    J├╝rgen Exner
    Sep 11, 2004
  3. FabFreddy

    How to receive keyboard input?

    FabFreddy, Nov 25, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    777
    John Timney \( MVP \)
    Nov 25, 2005
  4. AJ
    Replies:
    0
    Views:
    342
  5. Replies:
    4
    Views:
    655
    Walter Roberson
    Sep 9, 2005
Loading...

Share This Page