Dear sir, Currently i m using 4x4 Maatix key pad. To this we can implemnt 16Key functionalities. I have 16key functionalities more to implement. i.e.single key can be used as multiple key functionality. For example norma mobile phone key pad where for text message, Numeric '1' is there under it ',',';','.'. In Numeric key '2' under it 'a','b','c' is there.
I want to write an key pad driver where it should work as Mobile phone key pad. Pls give me some sggestion and sample Code regarding this.
Right sir.
But i have one key named as 'Key_1'.If i press that key for first time it should be Process Nemric key '1' functi0n.At the same time if press it two times then it sholud process Alphanumeric key_"a' function.
How can i write the routine fir that?
This is where you should sit down and think.
How will the program know that you have pressed it two times to get an 'A' or two times to get '1' two times? The mobile phone requires you to wait a while if you need to press the same button twice in a row to get two '1' instead of an 'A'.
So you obviously also have to figure out how to measure time - or if you may use any other stimuli to inform when two presses are a mode shift or two activations.
We can't supply the source code for your school assignments.
Sounds like a job for a State Machine - aka "Finite State Machine" or "FSM" for short...