How to start a binary ripple counter from the middle?

Click For Summary

Discussion Overview

The discussion revolves around designing a binary ripple counter that starts counting from the number 3 and resets at 17. Participants explore various methods to achieve this, including the use of JK latches and logic gates, while addressing the challenges associated with starting and stopping the counter at specified values.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant describes their attempt to start the counter at 3 by ORing the three most significant bits (msbs) and ANDing the output with the two least significant bits (lsbs), but notes that this approach leads to a constant low reset signal.
  • Another participant questions the necessity of starting and stopping at arbitrary positions, suggesting a more conventional approach of allowing the counter to run normally while treating the output differently.
  • A participant mentions that JK latches typically start with both outputs low and suggests that adjustments may be needed to toggle the desired outputs high initially, although they later express doubt about the feasibility of this approach.
  • There is a suggestion that if JK latches have preset and reset capabilities, these could be utilized to achieve the desired starting point of 3.
  • One participant proposes using the output ¬Q to achieve a high state in a specific position, while also discussing the conditions under which a flip flop can be reset or set without a reset pin.
  • Another idea presented involves modifying the output of the two least significant bits to count in a non-standard sequence, suggesting the addition of logic gates to facilitate this translation.

Areas of Agreement / Disagreement

Participants express a range of ideas and approaches, with no clear consensus on the best method to start the counter at 3. Multiple competing views and uncertainties remain regarding the implementation and feasibility of the proposed solutions.

Contextual Notes

Participants acknowledge limitations in their approaches, including the potential complexity of adding external logic and the challenges of modifying the behavior of flip flops in a ripple counter configuration.

rasen58
Messages
71
Reaction score
2
I needed to make a ripple counter start from 3 and end at 17. I got it to reset to 0 when it reaches 17, but I can't get it to start from 3.
I am using 5 JK latches with LEDS attached to the outputs of each to represent each number.
To get it to stop at 17, I nanded the msb and lsb and connected it to the active low resets on the latches.
To start them at 3, I tried ORing the 3 msbs, and ORing the output of that to the 2 lsbs anded
3 = 00011, so if the msbs are all 0 and the 2 lsbs aren't 11, then it should output a 0. This works, but it also causes a problem, because now the reset is always low and it can never become a 1.
 
Physics news on Phys.org
Can I ask to what purpose you need to start and stop in these arbitrary positions? The more routine way to approach a problem like this is to let the counter run normally but treat the output differently.
 
Oh, my teacher just asked us to try it
 
Ahh, I see. Well, JK latches all start with both of their outputs low as far as I know, so that should tell you what you need to do to have the two you want start off high instead. Then you need to see what happens the first time each one toggles, which will lead you to another change you'll need to make. You do not need to tie any other gates to the first two.

Edit : I thought about this a minute longer and the initial thought I had isn't going to work. Not sure that it's possible now that I think about it more.
 
Last edited:
rasen58 said:
To get it to stop at 17, I nanded the msb and lsb and connected it to the active low resets on the latches.

Sometimes JKs have presets and resets. If not, there's always another way to reset or set a flip flop state. Your global reset signal should be another way, in addition to counter rollover, to start at 3.
 
aralbrec said:
If not, there's always another way to reset or set a flip flop state.

Through J and K. I didn't seem to finish my sentences in a few posts :)
 
How else would you reset a flip flop without an actual reset pin?
 
I haven't looked at this, but what happens if you take as your output ¬Q where you want a 1 in that position?
 
rasen58 said:
How else would you reset a flip flop without an actual reset pin?

When J=0 and K=1, the flip flop is reset on the next edge.
When J=1 and K=0, the flip flop is set on the next edge.

But I was not thinking of a ripple counter, sorry.

Instead of placing logic at the input, you can place logic at the output. One way is to count from 0 to 14 and add 3 with external logic. That would take a lot of gates and is not a good way to go.

Another idea which might be a winner is to change the bit values coming out of the two least significant bits. The two least significant bits count 00,01,10,11 but you want them to count 11,00,01,10. Can you add some logic at the output of those two smallest flip flops to make the translation?
 
Last edited:

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
12K
Replies
10
Views
5K
Replies
5
Views
13K
  • · Replies 1 ·
Replies
1
Views
14K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K