Parallel-in / Serial-out Chip

I'm looking to get multiple digital inputs (high/low) onto a few pins on my Arduino. I found this chip: SN74HC165N, and I'm just wondering if I can use any of the available pins on my Arduino for the Clock, Latch, and Data pins, or do I need to use the specific, dedicated pins on the Arduino meant for this purpose?

Thanks!

Any 3 pins and the shiftIn() command.

Will be much faster if you can use D12, D13 for data & clock, and D10 for latch & then use SPI.transfer() to bring the data in:

digitalWrite (10, LOW);
digitalWrite (10, HIGH); // latch the data into the shift register
dataByte = SPI.transfer(0); // read the data

Doesn't have to be D10, but D10 must be an OUTPUT for the Arduino to be SPI master.

Thank you :slight_smile: