While I haven't yet used a STP16CP05MTR, I briefly skimmed through the datasheet and it appears that:
Yes, a STP16CP05MTR chip can be used to drive 16 LEDs, replacing two 74hc595 chips.
There is a good chance that the hardware can simply be substituted, with no change in software and minor changes in how the LEDs are connected.
From the software point of view,
- Sending out a 1 bit (HIGH) always makes the '16CP05 turn ON its output, turning ON the corresponding LED. Since the '595 can be wired up either way -- some people wire it up so a 0 bit turns the LED on, other people wire it up so a 1 bit turns the LED on -- this may or may not require changing the program.
- In software, I would make sure the program keeps the latch enable pin LOW most of the time, with a brief HIGH pulse after all the data for all the daisy-chained chips has been shifted out. It appears that should work fine for any number of '16CP05 or '595 or any mixture in a daisy chain. (With this software arrangement, it doesn't matter that the '595 latch-enable is "edge-triggered" and the other is "level triggered").
From a hardware point of view,
- swapping out those chips means you can get rid of the 16 "current limiting" resistors that you used with the two '595 chips, and replace them with a single "current set" resistor.
- You may also need to consider power dissipation -- the power that was being dissipated in resistors near to the '595 is now dissipated inside the '16CP05 chip.
- The '16CP05 gives you more flexibility than the '595 in the power rail. With the '595, you pretty much were forced to power the LEDs from a regulated 5VDC power rail. With a TLC5925 or '16CP05, you could power the LEDs the same way, but you also have the option of powering LEDs from unregulated 12VDC power rail.
As far as I can tell from a brief datasheet skim, the TLC5925 is pin-compatible with the '16CP05 and the TLC59282; all three work the same up to an output current of 45 mA per LED. The main difference is that '16CP05 can drive LEDs harder (up to 100 mA per LED).
You may also want to check out the chips listed at
Which SIPO chip is better, 74HC4094 or 74HC595 or something else?
Any of these chips -- the STP16CP05MTR, the TLC5925, a pair of 74hc595, a pair of 74HC4094, a pair of TPIC6595, etc. -- are more than adequate to turn LEDs full-on and full-off.
If you want the CPU to control the brightness of the LEDs to many values somewhere between full-on and full-off, you will want to look at other chips such as the TLC5940 or others in the TLC59xx family, the MAX6957, etc.