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.

  • \$\begingroup\$ This is just to link a couple of similar threads. This one and this one. \$\endgroup\$ Commented Aug 26, 2012 at 21:34

1 Answer 1


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.

  • Data
  • Clock
  • Output latch

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

  • \$\begingroup\$ Hm Ok. I initially thought that but did not think it through enough. Clearing the bits in between each set rather than shifting sounds perfect. Thank you Bruno. \$\endgroup\$
    – Mike
    Commented Jul 16, 2012 at 22:55
  • \$\begingroup\$ @Mike I'm glad I helped. \$\endgroup\$ Commented Jul 16, 2012 at 22:59
  • \$\begingroup\$ @Bruno - That was too easy! I don't think you deserve an upvote for this :-). (I did upvote, of course) \$\endgroup\$
    – stevenvh
    Commented Jul 17, 2012 at 17:09
  • \$\begingroup\$ @stevenvh Thanks. All my problems should be as easy as this. :-) \$\endgroup\$ Commented Jul 17, 2012 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.