Thank you very muchs Peg and Rhinocerohead for your always trusted contributions.
I will test what you suggested me and I will tell you later.
Have a very nice week!
Gany
Hi Ganimides,
Still searching huh?
The method I suggested before (and presumably the one you where offered in Yahoo groups) could be modified for KBI.
All of the matrix decode is the same, the KBI simply enables an interrupt to be generated by a keypress (in this case you would turn all of the output side on and wait for the int) then after that the rest is the same.
This just saves you from constantly polling the keypad when nothing is happening.
The wiring and setup is the same, you use KBI pins for the input side of the matrix.
The main difference is to enable the KBI and then do at least the first part in a KBI ISR
Regards David
Yeah, looks good but.......
It would be very slightly more efficient to use 4 x KBI inputs and 3 x outputs. Only 3 outputs to turn on sequentially and you read 4 at once instead of three!
Regards Pedantic Peg
I knew someone would get me on that :smileyhappy:
One way you loop 3 times and make 4 branches and the other way you loop 4 times and make 3 branches. You're already going to have some variance on runtime depending on which key is pressed. But you're right, it would be statistically faster if you used 3 loops and 4 branches.