Test the matrix with simple LEDs bevore connecting the matrix... elsewhere you get very confused by programming and testing...