i know this place is where i search for info, so maybe this will help someone out.

here is some very basic, very verbose code that shows how to set the outputs of a 74hc164 shift register, and to read the 74hc164's (8 parrallel outputs, serial input) output values using a 74hc165 shift register (8 parrallel inputs, serial output). this is the beginning of concepts you would use to read a 8x8 matrix of buttons, or even drive a 8x8 matrix of led's.

digitalWrite(inloadPin, 0); // read into register (tells the 165 to take a snapshot of its input pins) digitalWrite(inloadPin, 1); // done reading into register, ready for us to read

for(int i=0; i<=7; i++){ // read each of the 165's 8 inputs (or its snapshot of it rather)

// tell the 165 to send the inputs pin state digitalWrite(inclockPin, 0); // read the current output temp = digitalRead(indataPin); // read the state // tell the 165 we are done reading digitalWrite(inclockPin, 1);