??? 04/07/06 13:21 Read: times |
#113820 - true.... Responding to: ???'s previous message |
as per mr russel`s observations "the key won't be repeating at anywhere near 500uS! "....the logic here is just to see for key down nd increment a count if its found pressed.and if this count reaches a fix threshold (which is here = 500usec * 80 = 40 milliseconds)then a valid key press is registered.one hing i skipped in that code was"AT EVERY TIMER INTERRUPT RELOAD THE TIMER WITH CONFIGURATIONS TO FIRE AGAIN AT 500 USEC,,,LIKE AUTO RELOAD MODE"
EXPLANATION FOR FAST INCREMENT MODE>>>>if the key is found continusely pressed consecutively for 5 increments WITHOUT SEEING ANY KEY UP then the threshold will change to (10 * 500usec) 5 milliseconds and now the increment rate will change to 1 increment per 5 milliseconds and will remain so till the key is released. and as per mr eric`s comment>>>i wrote this code offline using note pad and copy pasted here in hurry ,due to which i was`nt able to indent or comment the code. SAIF ULLAH KHALID |
Topic | Author | Date |
LCD repeat function in C | 01/01/70 00:00 | |
First thought | 01/01/70 00:00 | |
if its roundrobin | 01/01/70 00:00 | |
last post | 01/01/70 00:00 | |
Sounds fine | 01/01/70 00:00 | |
the one issue | 01/01/70 00:00 | |
stuck key | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
Code Review | 01/01/70 00:00 | |
this must be excellent switches | 01/01/70 00:00 | |
excellent debounce for bad switches![]() | 01/01/70 00:00 | |
better code version | 01/01/70 00:00 | |
no comments, captals, no indenting | 01/01/70 00:00 | |
It could do with some improvement! | 01/01/70 00:00 | |
I did not comment on that, it may very w | 01/01/70 00:00 | |
true.... | 01/01/70 00:00 | |
led to so much misinformation in this fo | 01/01/70 00:00 |