2005-12-14 03:47 PM
2005-11-29 06:42 AM
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 Chetan2005-11-29 11:53 PM
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... ;)2005-12-14 03:47 PM
Thank you...
Figured it out and also implemented considering the glitches..