Hi guys again!.
I was thinking of using of GP32 KBI port pins.
How have I got to connect the matrix keypad to be able to read from?.Are there some appnotes of this?
I `m not familiarized with this method.
Could you recommend me some drwaing of it?
Thank you guys and have a nice week!.
Ganimides
Hi Ganimides,
Document M68HC05AG/AD shows you exactly how to implement a 4x4 matrix keypad. As it is for the old 05C8 it is just polled but it will give you the basic concepts.
The divider chain analogue method gets trickier and less reliable the more keys you use. I had a car that used this method for remote control of the radio with buttons on the steering wheel. It was always pot luck what actually happened when you pressed a button.
Regards David
Hello,
The analog voltage divider method will certainly reduce I/O pin requirements, assuming A/D channels are available. However, for the 4 x 3 matrix keypad case, I cannot see how to reduce the number of channels below three, one for each column. An example of this arrangement is shown in the attached file. Since only five different voltage levels are required (including zero for no key pressed) the reliability should be OK.
With the analog method, there could be ambiguity if more than one key is simultaneously pressed (with the usual digital scanning approach this can be readily detected). For the analog example shown, detection is straightforward if the multiple keys are in different columns of the keypad. If the multiple keys are in the same column, the voltage level would actually correspond to the key with the highest voltage level, so results would remain predictable.
Regards,
Mac
Yes BIgmac,you are right..this must be my error.I`m using just one AD input and this would explain why when I press some keys these don`t measure nothing.
I`m going to revert this situation and I tell you later what happened.
Have a nice weekend!.
Ganimides
Hello,
have a look at AN1775 Expanding digital inputs with an AD converter.
Hope this helps.
Eckhard