I have max four outputs coming from a PIC. I need these four outputs (or one serially) to simultaneously control 16 pins with a logic level. This is for a clock application.
A BCD could accomplish this but I don't believe it is the correct way and no one stocks them.
A set of latches could do this, but that would require me to individually latch each bit and reset when I need to switch the output.
A demux could accomplish this, if one existed that would allow multiple output pins to be high at the same time. Serial to parallel demuxers looked perfect, but all I have found only permit one pin being high at a time.
I'm looking for some type of IC.
Best Answer
The easiest way is to use one 16 bit shift register (or two 8 bit shift registers connected together). That would require only 3 pins.
You would need a 16 bit variable where you set or clear the bits, then you shift the data through the shift register, and then activate the output latch.
You can use two 74HCT595