Up-Down Counter Help!

Thread Starter

tokoolio

Joined Mar 28, 2010
4


So I included the waveform I drew in the picture. The first one is the clock pulse, the second is the output from the T-flip flop on the left, and the third is the output from the T-flip flop on the right. I'm really not sure if this is right. What I did was treated the flip flop on the right like a normal T-flip flop, toggling on a high clock pulse, and then since that output is connected to a xor whose output is connected to the other T-flip flop (I didn't know what the X meant, so I assumed it was a high) so whenever the output from the right was low the left output would toggle, and whenever the output on the right was high the left output would remain unchanged.

Can someone tell me what they think? I'm not confident about this.
 

Georacer

Joined Nov 25, 2009
5,182
Your output pulses are wrong. Remember, you are looking at an Up/Down Counter.

The Output 2 is constantly toggling between 0 and 1 on every clock cycle.
Output 1 depend on Output 2 and X in order to decide wheather it should toggle or not. In general, Output 1 toggles only if Output 2 is different than X.

If X is 0, Output 1 will toggle when Output 2 is 1.
If X is 1, Output 1 will toggle when Output 2 is 0.

Check here for a revision on count sequences: http://www.allaboutcircuits.com/vol_4/chpt_11/1.html

Write down a new Output Timeline and post it.
 

Thread Starter

tokoolio

Joined Mar 28, 2010
4


Ok so for example this is when X is high. The first wave (on top) is the clock pulse, the second is Q2, and the third is Q1. Q2 toggles on every positive edge, and since X is high Q1 toggles when Q2 is low. I wasn't sure if Q2 being low means it was just low, or it turns low, but I took it to mean if Q2 were just low, then Q1 would toggle, is that what is meant?

Anyway, is this wave ok?

Or does Q2 rise on the first rise of the clock pulse because Q2 is low, so T on the left flip flop is high, and then it would lower on the 3rd rise of the clock pulse because Q2 was just low? Is that it?
 
Last edited:

Thread Starter

tokoolio

Joined Mar 28, 2010
4
Actually the name suggests that for one X, it starts counting up, then counts down, then up, etc, and for the other X it starts counting down, then counts up, then down, etc. If that's the case, then I drew Q1 wrong. If I'm right, I just need to know which is which.
 

Georacer

Joined Nov 25, 2009
5,182
Output 1 will toggle according to Output 2 level not rising or falling front. Your timing diagram is correct.

Input X chooses whether the counter will count upwards or downwars.

An Up/Down counter is meant to count either up or down, according to user selection, not both simultaneously.
 
Top