??? 06/20/10 16:00 Read: times |
#176784 - Agree 100% Responding to: ???'s previous message |
I agree 100% with the posts so far giving suggestions. Keep your existing 3x4 scanning algorithm same as it is today. If that algorithm is not already driven off a periodic scan via a timer interrupt now would be a good time to make it be working that way. In this manner the key pad input and scanning can take place completely in the foreground interrupt thread without disrupting the design and function of the main loop code.
Next design a state machine that services the needs for "data entry" coupled to a "display function" to support the multi-press functions from the key pad. The state machine can be part of the date entry buffer management. A timed duration detection of when keys are pressed will cycle the letter characters for each input position of the buffer when keys on the pad are pressed faster than a certain rate. This should be quite easy to implement these days as we have all our cell phones to look at for examples. I first implemented a multi-press text entry system back in 1986 for use in entering user names and other setup information into a 28 line PBX telephone station that used a Hitachi 6303 MCU. Back then it was a bit harder to implement this because I had to work out all the ideas and fine tune the algorithms to make it offer a smooth user experience. When that implementation was made we had each normal text key cycle through the number and both the upper and lower case letters. I have always thought that a nice enhancement of a multi-press system, that would work well with today's graphics type displays, would be display the active entry position as a scrollable image that shows the alternate choices available from a key as it is being pressed. This scheme makes it be possible to dynamically change the available character set that you make available from keypad. Here is an image of what that could look like. ![]() Michael Karas |
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 |