??? 06/20/10 12:23 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#176780 - Two-step operation. Keyboard input + post-processing Responding to: ???'s previous message |
No need for complication.
Your keyboard scan code can be used as is. But you need to add a second step - postprocessing of the keyboard data based on timing. When button '2' is pressed, you may display an 'A'. If no other button is pressed for > x ms, then the 'A' is a keeper. If a different button is pressed, then the 'A' is a keeper, and you also emit the first possible character for the new button (or accept in case you have any 'enter' or 'ring' or similar button). If button '2' is returned once more with less than x ms, then you rotate through the possible characters for the '2' button (A, B, C, 2, Å, Ä, ...). This means that if you have a display where 'A' is visible, you must step back the cursor and replace the 'A' with a 'B'. And next time with a 'C'. You obviously do need a display, since it is much too complicated for a user to keep track of their input without proper feedback. In short - the keyboard scan code can be unchanged. It's enough that it returns which of the 12 keys that is pressed, after having properly debounced the keyboard. It's the layer above (probably a function called from the main loop) that gets a bit more complicated, but not by much. |
Topic | Author | Date |
Ideas for Multi-tap keyboard routine | 01/01/70 00:00 | |
just follow | 01/01/70 00:00 | |
Multi-tap is not too difficult | 01/01/70 00:00 | |
Two-step operation. Keyboard input + post-processing | 01/01/70 00:00 | |
State Machine! | 01/01/70 00:00 | |
Agree 100% | 01/01/70 00:00 | |
Time to code | 01/01/70 00:00 | |
Software Timers! | 01/01/70 00:00 | |
Practical Limits | 01/01/70 00:00 | |
Don't lock up in infinite loops everywhere | 01/01/70 00:00 | |
In the pseudo code... | 01/01/70 00:00 | |
State Machine | 01/01/70 00:00 | |
Divide by 5 | 01/01/70 00:00 | |
Timer resolution | 01/01/70 00:00 | |
State Machine | 01/01/70 00:00 | |
Looks not bad programming practice | 01/01/70 00:00 | |
Using Timer May Still be Possible | 01/01/70 00:00 | |
Done ! | 01/01/70 00:00 | |
Very Cool!!! | 01/01/70 00:00 | |
Compare with zero is better | 01/01/70 00:00 | |
Avoid ISR jitter using timer T1 | 01/01/70 00:00 | |
Code! | 01/01/70 00:00 | |
Thanks Munish...![]() | 01/01/70 00:00 |