hi....i have tested my 3x4 matrix keypad, and now i am trying to let my keypad to work like the computer keyboard, which i can press a key such as( shift + 8 )== (*)... instead of doing that, i am trying to press the # of my 3x4 keypad which act as (shift) and pressing other numbers on my keypad, it will come out with different result...
Do you have any suggestion on that??? can the 3x4 keypad do that??
This is not so easy to do with a matrix keyboard as it will just read this first keypress in the scan routine. IanP has the right idea. I would do it with a timed subroutine of a few seconds which is entered when you press #. You could then add an offset to your normal codes to give you a new set. So the procedure would be to press # followed by another key, say within 3 seconds or so. Hope this is of some help.
Have a look to the Atmel matrix keyboard scaning application note for AVR . There it is pointed that some pressed key combination can give false detected key . But this can be eliminated if diodes will be used between rows and switch to column in key detection circuit (although it is not mentioned there).
Thsi application uses interresting method for quick key detection - first it set rows to output and column to input with pullup . and lookks for any non 0xff value on columns .
When such value will be detected , it swaps columns and rows data direction vice versa and reads rows input - if no multiple key detection scheme is needed it is 4 times faster than scanning multiple columns (for 4x4 keypad).
I once implemented a 2-key system. Not a complete solution, but it works. The limitation is that I partitioned the keypad into 2 segments, with each segment occupying column(s). This is because detection conflicts often occur when keys from the same column are pressed.
I have an idea, it will probably work, but you will have to play with it a bit.
If you will see the link tip #7: https://ww1.microchip.com/downloads/en/DeviceDoc/40040b.pdf
you can implament reading your keyboard with 1 pin with the A/D. Insted of using the complete 5V range, you can use other resistors so 0 - 2.5V will by the keys and when you will press the # it will take you to the upper part of 2.5V - 5V.
With a good A/D program you will be able to read the exact keys you are pressing.
thanks for all your help..... i have tested by adding a subroutine is that when i pressed "#" then the key will do something different....but... it seems that the keypad can't work this way....is there still any suggestion that can help me???
On these keypads you cannot press 2 buttons (well you can, but micro will be confused)
Use a lock function with a time routine if you press '#' for 3 secs then it will turn
into a shift button, then all the other buttons can be read and function as
different ones thru your software, if Shift On then button 1 is Cat.
You can use an LED as an indicator that shift is ON.
hi
this is a better option to use a keyboard for multipurposes, you can use two defferent routines for this purpose in which you can keep a check on (#) if pressed and then can take different functions.
hi,
you can eliminate multiple key scanning without any futhur modication to programme.just by adding some diodes.following pic from mx21 freescale proccessor
reference manual.For complete circuit look at the mx21 development board keypad circuit.