How do you know which shift register to use?

I've only just started learning Arduino and electronics in general, so forgive me if this is a stupid question, but I just have to ask...

I've been jumping through some tutorials, and also read through a lot, since I've been missing the parts needed to actually build them, but enjoy reading through them anyway. I just finished a project using an LCD with a "backpack" . I guess this backpack is (among other things) a shift register, since I only needed the four wires to connect the screen to my board.

Now, I've been reading some projects where people are using the 74HC595N shift regs. - like the seven segment dice-stuff, and some dot matrix led-stuff, if I remember correctly. But then I came across a tutorial for the cheap membrane keypad, which is using a similar device (I say similar, 'cuz I'm not sure, but I guess this also is some sort of a shift reg) called PCF8574(P) I/O expander (tutorial link).

So - my question is: how do people (that'll be you lot) know what type of shift reg. to use on your exact project? One of the reasons I'm asking is that I just ordered a five-pack of the 595s from eBay, since they seemed so useful for different tutorials. Would it be possible to use one of those for a project with one of the membrane keypads, for instance?

You have to know what the I2C bus is.
The I2C bus used two wires SDA and SCL (and also ground).
It uses one master and can use many slaves. The 'slaves' on the I2C bus can be sensors or an LCD display and so on.

If you have this one:

It uses a I2C Input/Output expander. That is an I2C device (with internal shift register) that has a number of output and input pins.

The 74HC595 is a shift registers that needs to be connected to the Arduino with 3 pins, and gives 8 outputs. They are very fast and very usefull in many situations:

Other shift registers have inputs:

The cheap membrane keypads are connected with all wires to the Arduino. The Keypad library is the library you need:
http://playground.arduino.cc/Code/Keypad

Choice of shift register depends on its use. 74HC595 is pretty crummy for a lot of applications. It can only sink/source an absolute max of 70mA, any more and one risks burning out the VCC and GND pins. 70mA for 8 LEDs means only 8-9mA of current per output. If controlling other devices, it is perfectly fine - like controlling a transistor that then sinks current thru a motor, or relay coil, or a string of 3 LEDs powered from 12V.

There are choices - cd74AC164 can sink/source more current per IO pin, but doesn't have an output enable. It's also single stage, so the data clocked in shows up immediately. TPIC6B595 is a great alternative to 74HC595 when higher current needs sinking, or for sinking from a higher voltage; it's like having a 74HC595 and drive transistor all in one package. There are other variations of TPIC6x595 that can sink more current also. It also has output enable, drive it with a PWM for LED brightness control. Single stage drive anodes in a matrix and dual stage sinking current from common cathodes is a great way to multiplex an LED matrix as one example.

The kind of features found on shift registers are:

o length in bits - 4 or 8 or 16 are commonest.

o serial in->parallel out conversion (useful for outputs)

o parallel in->serial out conversion (useful for inputs - aka "parallel load")

o latched outputs (useful for flicker-free outputs while clocking)

o bidirectional shifting - can shift in either direction

o clock enable inputs - sometimes these are useful

o tri-state outputs (aka output-enable pin(s) - useful for driving a bus or shared signals

o asynchronous clear - a pin to reset the state independent of clocking

The '595 has serial->parallel, is 8 bit and latched, making it a flexible way
to control 8 outputs from 3 pins.

I like the '299 since it is 8-bit bidirectional, does serial->parallel and parallel->serial,
tri state outputs (shared with the parallel-load inputs) and does almost everything
(except it isn't latched...) For instance it is flexible enough to do SPI in hardware
when attached to a microprocessor bus (AFAICT).

When picking a shift register chip you need to know what your requirements are
from that list.

i'll make a comment for what it's worth since i think we're at about the same stage of our Arduino Journey.

i've also worked through the LCDisplay via i2c backpack, and then the 74HC595 shift registers to drive a 8x8 LED matrix which began opening the doors to learning about all sorts of chips out there that can help "simplify" our circuit setups.

i'd like to point out (if perhaps erroneously, i hope a senior will point it out) that the I2C backpack is not necessarily a shift register, although... hmm, you said "among other things"... and i suppose (not knowing the "gory" details) there must be some sort of "74HC595"-like chip that does the serial-to-conversion.

if i may ask the seniors a (related-)question of my own on this thread, would the presence of a "clock" and "latch (=chip select?)" pin indicate that the chip is infact a 'shift register' ?

retronet_RIMBA1ZO:
i'd like to point out (if perhaps erroneously, i hope a senior will point it out) that the I2C backpack is not necessarily a shift register, although... hmm, you said "among other things"... and i suppose (not knowing the "gory" details) there must be some sort of "74HC595"-like chip that does the serial-to-conversion.

Actually, I noticed yesterday, that it is a PCF8574T-chip on the backpack. At least on mine. Alongside the contrast adjustment pot and stuff.

Aaaaanyway:
To all of you: thanks for lots and lots of useful information. Some of it above my head atm, hehe, but I'm sure it'll come in handy and make more sense as i continue to play around in the electronics universe.