When this is finished it will be a complete tutorial on how to add more input pins to a microcontroller.

For this I will use the PICAXE as an example but it should be useful for PICs and AVRs and any other Microcontroller generally.

This project uses the 74HC165 chip and bit-bangs the SPI bus to control it. The result is that the number of inputs to you Microcontroller is limited only by the how many 165's you have and how long each "reading" of all the input pins can take.

This is the circuit I created to demonstrate

The top two switches on the blue DIP switch block are fed to the 165 and the 08M PICAXE reads them from the 165. Also in the image is a DS1307 RTC with crystal that have nothing to do with this project so please disregard them. The resistors and the wires need them are to serially program the PICAXE and so if you are using something other than the PICAXE you will not need them.