0
\$\begingroup\$

I want an IC that has 8 outputs, that I can connect to 8 LED's in a circle. At any point in time one of the LED's is on. When I press a button, the next one turns on.

I know it can be done with 8 flip flops, but I imagine surely there is a ready-made IC I can just use to save time?

Thanks.

\$\endgroup\$
1

2 Answers 2

2
\$\begingroup\$

enter image description here

Figure 1. CD4017 sequencer.

For an eight LED counter you connect output 8 to the reset pin which will set it back to zero. See the datasheet.

\$\endgroup\$
4
  • \$\begingroup\$ You don't even need to faff with making the CD4017 (which is a decade counter) into an octal counter -- just get a CD4022 instead. \$\endgroup\$ Sep 3, 2017 at 13:53
  • \$\begingroup\$ @ThreePhaseEel since they cost the same and come in the same package (the outputs are not pin compatible!), I'd argue: use whatever you can get first. \$\endgroup\$ Sep 3, 2017 at 13:56
  • \$\begingroup\$ @ThreePhaseEel: I don't think I ever used the 4022. Does it drive the LEDs directly? \$\endgroup\$
    – Transistor
    Sep 3, 2017 at 14:03
  • \$\begingroup\$ @Transistor -- it's the octal version of the (more common) 4017, so yes \$\endgroup\$ Sep 3, 2017 at 14:03
1
\$\begingroup\$

There's more than one way to skin this cat

While the 4017 (with the funny reset wiring) and 4022 will both do this, there's another IC that can be persuaded to do this job, and that's the 74x299 shift register. This might be needed because the 4017/4022 parts are actually counter/decoder combos -- they use a twisted ring (Johnson) counter and a matching decoder internally, instead of a true one-hot ring counter, which is what the '299 circuit provides.

See below for how this works -- note that the RESET input to this circuit is active high and synchronous to the clock. D1 keeps R2 from loading down the IO0 output when RESET is pulled low, and R1 can be replaced with a short if you're using a 'HC(T)299 (which you should be).

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ Does it matter what happens internally if the output is the same? \$\endgroup\$ Sep 3, 2017 at 19:08
  • 1
    \$\begingroup\$ @CaptainCodeman -- a counter+decoder can glitch depending on implementation, while a ring counter can't glitch on you \$\endgroup\$ Sep 3, 2017 at 19:55

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