Originally Posted By: kuabi

I am trying to get my head around the button matrix.My problem seems to be when I add another row. Only 1 encoder works and 1 works on one button only. Are there set pins for rows and columns and do they need to be used in a certain order?

kuabi
buttons are dynamically numbered sequentially. first goes button maxtrix(BM). second - shift registers(SR).

so if you earlier had BM 1*8, SR bind starts from "9" position.
when you increase BM to 2*8, SR goes to "17" position.
more, BM reading algorytm:

loop_for_colunms
set column to high state
loop_for_rows
read row state
end_loop_rows
clear column high state
end_loop_columns

every time when you change button's sources you are need to reset encoder/joystick buttons.