I have a 3 bit ripple counter (using t flip flops) and I want the counter to reset to one when it reaches 7 i.e. the counter counts from 1 to 6. My idea was that I could hook the three outputs from the counter together and place a resistor and led in series such that when the counter reaches 111 (6 in binary) that it will be able to overcome the resistor and light up the led (the led is just to test if it works, then I can hook the led up to the necessary reset and set pins of the counter). When the number is 001 or 011 for example, there will not be enough power from the outputs to over come the resistor.

I was just wondering if this theory is possible, or if there is another way to do this without using logic gates. I'm currently using a 9v battery and the cmos dual d-type flip flops are 4013be components.

Also i'm pretty new to electronics so sorry if I'm missing anything obvious!

Regards, David

  • \$\begingroup\$ Do you mean reset to zero when it reaches 7? Also, the obvious way to do this is by logic gates, why can't you use these? \$\endgroup\$
    – Chu
    Commented May 5, 2015 at 7:59
  • \$\begingroup\$ You could do it using diode-transistor-logic but most would say that still counts as a logic gate, even if it's not on a chip. What's the reason for not wanting to use logic gates? \$\endgroup\$
    – John U
    Commented May 5, 2015 at 9:06
  • \$\begingroup\$ Hi guys; Chu, I want it to reset to 1 when it reaches 6, I'm bulding an electronic die. So eg when it reaches 6 and then the next number will be 1. The reason I'm not using logic is because I want it to be a simple circuit and to use as little chips as possible :) Do you think that my original proposal is possible? \$\endgroup\$
    – Dave
    Commented May 5, 2015 at 10:16
  • \$\begingroup\$ 111 binary is not 6. \$\endgroup\$ Commented May 5, 2015 at 12:06
  • \$\begingroup\$ @OlinLathrop - He wants 111 to provide an asynchronous force to 001, with the process faster than the eye can easily detect. \$\endgroup\$ Commented May 5, 2015 at 18:02

2 Answers 2


The resistor and LED will almost certainly not work, or be very unreliable. This is because the LED and resistor are analog components. Connecting this to 4013B's may illuminate very slightly when the output is 001/010/100, more with 011/101/110, and most with 111, but that is three "brightness levels." Digital means "OFF" or "no voltage", meaning no electricity goes anywhere, and "ON" or "voltage", meaning Vcc or the supply voltage comes out. Any component with more than these states is not digital.

This also will not follow a logical brightening sequence:

Binary Decimal Brightness
000    0       0
001    1       1
010    2       1
011    3       2
100    4       1
101    5       2
110    6       2
111    7       3

Digital circuits do not like to "drive" analog circuits. The 4013B outputs can only drive so much current into anything else, which typically limits how many other digital inputs they can be connected to. This is called "fan-out" and must be taken into consideration when connecting multiple components. Some devices are better at this than others; the NXP HEF4013B outputs can source/sink about 1mA when supplied from a 9v battery, see page 5. Even though you could connect an LED like this, it will probably not illuminate visibly with 1+1+1 = 3mA of current. This also is not recommended because it will cause the outputs to "float" somewhere other than LOW or HIGH states, as the LED is demanding more power than the 4013 can supply. Whenever an input or output is "somewhere between low or high", the device can dissipate too much power and overheat, leading to it's destruction. Digital inputs are especially sensitive to this. All unused inputs must be tied to either LOW or HIGH.

The best answer is to use some other logic gates to do the actual logic, and use a device designed to drive analog components to illuminate any LED's desired (such as 1-6, or sides of a die.) Such devices are typically called "buffers" or "line drivers" and there are literally hundreds of variants.

  • \$\begingroup\$ Hi rdtsc, thanks for your help, really had no idea about the constraints of analog and digital! Just a quick question, would it be possible to use a D flip-flop to reset it when it reaches 7? Eg, by hooking up the outputs of the other flip-flops to the d flip-flop, using the reset set data Q & !Q and clock inputs, in such a way that it could reset the counter? Let me know if I need to clarify! \$\endgroup\$
    – Dave
    Commented May 6, 2015 at 14:07

If you want the simplest possible circuit, as your Toggle Flip Flops have a 'set' pin and a 'reset' pin then it is quite straight forward, but it does require Logic gates. In fact it requires only 1, a 3-input AND gate.

Basically connect the outputs of your flip flops to your 3 input AND gate (which you can actually make with 3 diodes and a resistor if you want), and connect the output of the AND gate to the 'set' input of your first flip-flop (bit 0), and the 'reset' input of your other two flip flops (bits 1 & 2).

In this configuration, the moment all of the flip-flops reach 7 (111), it will immediately set the value back to 1 (001).

If you don't want the AND gate, and have access to 3 diodes and a resistor (somewhere in the range of 1k-100k), then you essentially use the following to make an AND gate:

                     ^ Vdd
         Diodes      |
In 0 o----|<|----.  [ ] R1
                 |   |
In 1 o----|<|----+---+-----o Out
In 2 o----|<|----'
  • \$\begingroup\$ Hi Tom, thanks for your answer. Looks like I will have to end up using a logic gate for this! Although I was wondering, would it be possible to use a D flip-flop to reset it when it reaches 7? Eg, by hooking up the outputs of the other flip-flops to the d flip-flop, using the reset set data Q & !Q and clock inputs, in such a way that it could reset the counter? Let me know if I'm not making sense aha \$\endgroup\$
    – Dave
    Commented May 6, 2015 at 14:06
  • \$\begingroup\$ @Dave how do you plan on wiring all three other ones up to the fourth? If you just connect them all directly then what happens if one is low and one is high? They short out. A D Flip-Flop isn't a substitute for an AND gate. \$\endgroup\$ Commented May 6, 2015 at 15:47
  • \$\begingroup\$ what i was thinking is if there is some kind of set up using the individual values when the total binary is 100 then 101 then 110 then 111, hooked up to the d flip flop in such away that it will reset the counter to 001, taking into account the original 555 clock is also available. Do you think there is a possibility this could work? \$\endgroup\$
    – Dave
    Commented May 7, 2015 at 22:54
  • \$\begingroup\$ An AND gate, even if it is the diode one above is going to be by far the simplest way of doing it. I don't know of any way to do it with D Flip-flops that doesn't involve logic gates. You have need a function with 3 inputs and 1 output, which will require combinational logic. \$\endgroup\$ Commented May 7, 2015 at 23:04
  • \$\begingroup\$ There is 1 exception, but it would require you to have 4 more toggle flip-flops. You basically have two counters, one that goes from 1 up to 6 (your output), and one which is 4 bit that goes from 2 up to 7. The moment the 4-bit counter reaches 8 (which can be detected by looking at just the MSB), then you reset the 3-bit counter to 1, and the 4-bit counter back to 2. \$\endgroup\$ Commented May 7, 2015 at 23:06

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.