Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

i want to set time with keypad or keyboard using DE2 board

hello

i got the digital clock using vhdl. but my code is to set the time with switches.

i want to set the time by using keyboard or keypad.

so, i think i don't have many things to change in my VHDL coding.

but i have no idea to work with keyboard or keypad.

if you know about that plz help me...........

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    First, how do you connect the keyboard or keypad. Just buttons is easiest. For each button a GPIO pin and then you could just read that. Another option is to use protocols like PS/2 or USB. I have some experience in designing hardware for PS/2 and if you only want to read the design is relatively simple. I have no idea how to use USB. There might be a design in the IP catalogue you can use.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thank sir

    but i don't know how to write VHDL code for this time set with keypad or keyboard.

    if you don't mind, can you explain me more? no matter ps/2 or usb sir
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Well, you have a module that reads input from the keyboard/pad.

    You will have to find out which type of character encoding is used and than you have to convert this to a number.

    This number can be used as input to set the time.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks sir

    can you share me the link to read.

    i don't know where i can get it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I don't have any links to this. I have some books on my shelf concerning protocols etc.

    But I imagine you'll find the same information if you use your favorite web search engine.