Re: keypad
Hello,
Atached is a common keypad implementation, you can have any number of columns (each additional column will require one I/O pin though.
the rows are initialized as inputs and are pulled high by the resistors.
the rows should be connected to Rb4-Rb7 and use the interrupt on change onthese pins feature.
the columns should be initialized as "low".
When a key is pressed, the row is pulled low and an interrupt triggered.
next you start the scanning routine:
Apply a low on one a single column and a high on the other columns and read the rows. The row wich reads low is the one where the key is pressed.
by combining the column/row info you got you can detect the key pressed.
I will send you the assembly code later because I am not on my personal PC now.
regards,
gam