When attempting to build a step-sequencer, I realized I didn't have a circuit for shifting 8 buttons in to my Arduino.
So, I've created a fritzing diagram of what I came up with. First though, I feel it prudent to mention a disclaimer: I have no clue what I am doing.
This circuit is centered around:
- 8-Bit Parallel-In/Serial-Out Shift Register - 74HC165N data sheet
- SN74HC165N - Arduino Playground example program
- SN74HC165 Shift-In Breakout schematic
Ultimately this circuit worked pretty well, though I do have a few questions to answer on the design.
- The 74HC595 serial-out shift register only requires 3 digital i/o pins, but this serial-in circuit requires 4. My gut tells me there is something I can do with the clock/clock inhibitor.
- I pulled the buttons up to 5v to keep them high when not activated. I ended up negating the byte in code. I assume I could've probably just pulled them down to ground.