I'm still learning. I have a project in mind that will require more GPIO pins than what is available on an UNO. Most of those pins will be simple on/off type signals for controlling transistors that in turn control small motors. Sounds like a good use for an 8-bit 595 shift register right?
The way I am seeing a simplistic way of visualizing how a shift register works is this: 2 trays with room for 8 blocks each. Send over a bit to the "memory tray". Hit the latch empties the memory tray and it shifts over to the execute tray. Send over another bit to the memory tray, hit the latch. Now the first bit is in position 2 and the new bit is in position 1. I could also fill the memory tray with 8 bits, latch, and have a whole new execute tray.
If I have my execute tray as this: 00000100. Now I want to turn on bit 2 and leave 3 on, I should send this byte: 00000110. Latch. Now 2 and 3 are on.
The programming would be something like take a byte (CurrentState) and add or subtract a byte (00001000 for pin 5) to turn it on or off respectively.
The memory tray overflows into the memory tray of the next register if they are daisy chained together. So in a chain of 3, I could send out 3 bytes, the first byte sent landing in the memory tray of the last register in the chain. Then hit the latch and have new execute trays.
Is my visualization accurate? It may be too simplified so any help would be greatly appreciated.