5
\$\begingroup\$

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.

\$\endgroup\$
10
\$\begingroup\$

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

\$\endgroup\$
  • \$\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 Jul 16 '12 at 22:55
  • \$\begingroup\$ @Mike I'm glad I helped. \$\endgroup\$ – Bruno Ferreira Jul 16 '12 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 Jul 17 '12 at 17:09
  • \$\begingroup\$ @stevenvh Thanks. All my problems should be as easy as this. :-) \$\endgroup\$ – Bruno Ferreira Jul 17 '12 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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