4x4 keypad to Microcontroller
Figuring out the matrix wiring of the 4x4 keypad is dead simple with an ohm meter. Attach the meter leads to selected pairs of the conductors in the connection cable. Then press the buttons one at a time to see which switch closes the connection between the selected conductors. If you write down the connection numbers as 1 to 8 and then make a table of the selected pairs in sequence and which switch closes each pair. Some pairs will not cause any closures to be registered. When this happens you will know that the selected pair of connection wires are either both row wires in the switch matrix or column wires.