Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
This is just to link a couple of similar threads. This one and this one. – Nick Alexeev Aug 26 '12 at 21:34

1 Answer

up vote 10 down vote accepted

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

share|improve this answer
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. – Mike Jul 16 '12 at 22:55
@Mike I'm glad I helped. – Bruno Ferreira Jul 16 '12 at 22:59
@Bruno - That was too easy! I don't think you deserve an upvote for this :-). (I did upvote, of course) – stevenvh Jul 17 '12 at 17:09
@stevenvh Thanks. All my problems should be as easy as this. :-) – Bruno Ferreira Jul 17 '12 at 18:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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