Skip to main content
digichetan
Associate
December 14, 2005
Question

Keyboard interface

  • December 14, 2005
  • 3 replies
  • 883 views
Posted on December 15, 2005 at 00:47

Keyboard interface

This topic has been closed for replies.

3 replies

digichetan
Associate
November 29, 2005
Posted on November 29, 2005 at 15:42

Hi

I am working on ST72324 chip and have to program it for a 4X5 keyboard that is attached to PORT B and PORT C pins.

The problem is I have to detect the key press as well as the key release. The key press detection is not a problem but how can I capture a key release?

I am polling the keyboard every 2 millisecs using the timer interrupt.

Regards

Chetan

Viktor POHORELY
ST Employee
November 30, 2005
Posted on November 30, 2005 at 08:53

you should use flag flKeyPress, which is set when any key is pressed.

Then:

if ((flKeyPress) and (ScanKeyBoard() == noKEY)) //key released

and do it each 2 ms...

Do not forget that you should filter glitches on the switches... ;)

digichetan
Associate
December 14, 2005
Posted on December 15, 2005 at 00:47

Thank you...

Figured it out and also implemented considering the glitches..