- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi i want a vhdl code to compute the time duration for every keystroke in the keyboard take to pressed or released .any help plz
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean a standard PS2 keyboard, as used for a computer? Or do you mean a keypad with discrete buttons?
A standard keyboard uses a serial protocol. So, every key press and release results in a code being sent - all of which will take the same amount of time, every time. This is 11 bits for every key stroke, at a baud rate anywhere from 10kHz to 16kHz. If you mean a keypad, then you really need an oscilloscope to allow you to look at the raw signal, complete with key press 'bounce' noise, to determine how long it takes to settle. You can't really do this with rtl. Yes, you could start a counter (to time the key stroke) when you first detect an edge. You could stop the counter when you received 'a few' clock cycles at the final steady state. However, you're not going to detect the key bounce. So, I'd anticipate you ending up measuring x clock cycles that will, probably, be the same each time - and not at all accurate. Regards, Alex
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page