Connecting a 74HC595 to the Bus Pirate
From wiki.countercaster.com
The 74HC595 is a really handy, very cheap 8-bit latching shift register chip. I have used it for directly and indirectly driving LEDs and indirectly driving Nixie Tubes. Multiple 74HC595's can be chained together, allowing for an almost limitless number of outputs. And all the while, only four microprocessor pins (or three if you tie pin 13 (output enable) to ground) to control one or more 74HC595s.
Here I demonstrate how to interface it with the Bus Pirate. The Bus Pirate is really handy for learning how to interface an unfamiliar chip without having to write a line of microprocessor code. Or if you simply haven't built that bit of the project that interfaces with the 74HC595 just yet.
Hardware setup:
- Connect Bus Pirate MOSI to pin 14 (serial data in) of the 74HC595
- Connect Bus Pirate CLK to pin 11 (clock) of the 74HC595
- Connect Bus Pirate CS to pin 12 (latch enable) of the 74HC595
- Connect Bus Pirate AUX to pin 13 (output enable) of the 74HC595
From the terminal, enter RAW3WIRE (Fast Speed, Normal outputs) mode:
M <enter> 8 <enter> 2 <enter> 2 <enter>
Enable the 74HC595's outputs by setting the Bus Pirate AUX pin low ('a'):
a <enter>
(the 74HC595's output enable pin is active low.)
To change the 74HC595's' 8 outputs, simply write one byte (0b11111111) and toggle the Bus Pirate CS pin ({}):
0b11111111 {} <enter>
(writing the byte fills the shift register and toggling the CS pin latches the data in the shift register.)
