How to start a binary ripple counter from the middle?

In summary, you need to set the two least significant bits of the output of the flip flops to make them count 11,00,01,10.
  • #1
rasen58
71
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
  • #2
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.
 
  • #3
Oh, my teacher just asked us to try it
 
  • #4
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:
  • #5
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.
 
  • #6
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 :)
 
  • #7
How else would you reset a flip flop without an actual reset pin?
 
  • #8
I haven't looked at this, but what happens if you take as your output ¬Q where you want a 1 in that position?
 
  • #9
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:

Related to How to start a binary ripple counter from the middle?

1. How does a binary ripple counter work?

A binary ripple counter is a type of electronic circuit that counts binary numbers. It works by using a series of flip-flops, which are memory elements that store a binary value of 0 or 1. The output of each flip-flop is connected to the input of the next flip-flop, creating a chain. When a clock signal is applied, the flip-flops change state in a sequential manner, resulting in a binary count.

2. What is the purpose of starting a binary ripple counter from the middle?

Starting a binary ripple counter from the middle allows for a more efficient use of the circuit. Instead of starting from 0 and counting all the way up to the desired number, starting from the middle allows for a shorter counting sequence. This is especially useful when the counter is used in a system with a limited number of clock cycles.

3. How do I start a binary ripple counter from the middle?

To start a binary ripple counter from the middle, you need to preset the flip-flops to the desired starting value. This can be done by applying the appropriate binary inputs to the flip-flops. Then, when the clock signal is applied, the counter will start counting from the preset value.

4. Are there any limitations to starting a binary ripple counter from the middle?

Yes, there are some limitations to starting a binary ripple counter from the middle. The first limitation is that the starting value must be a valid binary number that can be represented by the number of flip-flops in the counter. Additionally, the starting value must be lower than the maximum count of the counter. Starting from a value higher than the maximum count will result in an incorrect sequence.

5. What are some practical applications of a binary ripple counter starting from the middle?

A binary ripple counter starting from the middle can be used in various electronic devices, such as digital clocks, timers, and frequency dividers. It can also be used in communication systems to keep track of data packets and in computer processors to keep track of instructions. In general, any application that requires counting in binary can benefit from starting the counter from the middle.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
10
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
11K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
25
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
13K
Back
Top