Y you want to always power the rows and columns?
Because otherwise there is not use of using the interrupt method. I am using the interrupt method so that the controller can do something useful when it's not polling. If I don't always power the rows OR columns, there will be no interrupt unless I am running a poll. And in that case, the MCU is still busy polling outside the ISR...
I think the side which I would otherwise be polling should be given a constant power. The controller can do something else in the main loop. When a button is pressed, an interrupt will be generated. So the controller will know some button has been pressed. To check which one, the controller will have to immediately (in the ISR) poll the keypad only once. Once it knows which key has been pressed, it can save the key in some GPR and the stored value can be used by main routine when it comes out of the ISR. The controller can go back to doing whatever else it was doing. This is not possible without giving constant power to the poll side. [Or is it?]
I prefer the polling method, use a timer to check a few times per second if anything has been pressed, as a bonus there is no need to debounce the keys.
Alex
Well the ONLY bonus is, there is no need to debounce the keys. BUT, this is a bit inefficient, don't you think? A controller interfaced with a keypad cannot do another job without rendering the keypad disabled. The keypad cannot be used during the time controller is doing something else... I guess that is the kind of problem which must have been the reason for existence of interrupts.
I'd go with the interrupt method, the MCU will easily be fast enough to enter the ISR and recognise which key has been pressed before the user has stopped pressing it.
That's a chance. Controllers can be slower and human can be faster (while pressing keys, I mean).
Guys, these are the procedures that I already mentioned in the original post! Sure, your opinions on them are welcome, too... But I meant to ask if there is any OTHER method there.
By the way, I did find one in Microchip's Tips 'N Tricks Compiled Notes... It was something about using resisters along the matrix and then using the ADC to find out which key was pressed depending on the incoming voltage.
That's a good idea too. But difficult to implement, error prone if not implemented right and certainly not NOVEL.