# Up/down sequence counter using 74191

Discussion in 'Homework Help' started by Eman_Ali, Nov 28, 2014.

1. ### Eman_Ali Thread Starter New Member

Nov 28, 2014
5
0
Hi all, I need to make up/down counter using 74191 that generates the following sequences
9, 8, 7, 6,5,4,9,...
1,2,3,4,5,6,....
The Ic has 4 inputs A,B,C,D. How will I connect my 6-inputs (each of 4-bits ) to the Ic.
Thanks.

File size:
39.3 KB
Views:
294
2. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
First, you need to show YOUR attempt to solve YOUR homework problem.

You also need to express your problem more clearly. You are saying that you have to make a single counter that generates two different sequences. What determines which sequence is produced? Are you supposed to be able to switch between the two sequences at any time by flipping a switch? What?

What are these six four-bit inputs you are talking about. That's 24 bits of input. The IC only has a total of eight input pins, and that's counting the clock.

3. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,507
512
Each of your numbers is represented by 4 bits (A, B, C, D).
Now it is time to write a truth table. Go ahead and write it out.

4. ### Eman_Ali Thread Starter New Member

Nov 28, 2014
5
0
Ok,I have worked on displaying only the first sequence (9,8,7,6,5,4,9..) for now, if the counter output is other than (9 to 4) the digit 9 is loaded. The pin (up/down) is connected high. I used a k-map to simplify the out put Y. Attatched is my attempt. Ive done it on bread board but it only displays (3 then 2). Do you have any suggestions ? Thanks

File size:
28.2 KB
Views:
197
5. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
Things look okay at first glance. Your direction pin isn't "up/down" it is "down/up". It makes a difference. Think of the name as being two different but equivalent names, "down" and "/up". A HI input means that "down" is TRUE and, equivalently, that "NOT up" is TRUE. Avoids a lot of confusion. Also, on your diagrams, be sure that you indicate that the Load signal is active-LO. You can do that with a bubble at the pin or by calling the signal "/load".

Do you have access to an oscilloscope or logic analyzer so that you can look at the signals on the various pins? It may be nothing more than a simple breadboarding error.

Eman_Ali likes this.
6. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,507
512
That truth table looks too simple.
Your truth table should have Present State, Next State.

7. ### Eman_Ali Thread Starter New Member

Nov 28, 2014
5
0
Unfortunately, I don't, but I have another look on the wiring. Thanks a lot !

Nov 28, 2014
5
0
File size:
39.2 KB
Views:
176
9. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,507
512
Ok, I see your point. I might have been thinking of designing from ground up, but you don't need that, you already have 74191 that does the counting.
So.
1) Select down count.
2) Load 9.
3) Enable count.
4) You counted down to 4. The next transition from 4 to 3, what happens here? Stop?

10. ### Eman_Ali Thread Starter New Member

Nov 28, 2014
5
0
Yes, Do you think its a bread board problem or a problem with the steps of design its self ?

11. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
Since he is using a counter, his diagram becomes more generalized in which he has one "state" which includes all counter values for which the counter decrements and another "state" which includes all counter values for which the counter resets.

12. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
No, he goes back to 9. This is implied by his first post where he has "9,8,7,6,5,4,9,...". Since the counter has an asynchronous reset, he needs to trap a count value of 3 (which should last for such a short time that it can't be seen on the display, although any circuit looking at the output might well respond to it -- a point that is often overlooked in digital design classes).

Eman_Ali likes this.
13. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,507
512
How do you generate clock signal?
If you run it slow, you could just hook up led to Q0-Q3 and see your 74191 outputs. Like the first value should be 9. You said that you saw 3, I assume on 7 segment. So you are not really seeing output of 74191. It may or may not matter, I admit. But since you are not getting right result you have to troubleshoot the circuit and it makes sense to start with the first block of the circuit.

Eman_Ali likes this.
14. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
Given the quick look I gave it, I think your design is okay. I would look at the implementation. One way to do this, if you can't spot something wrong fairly quickly, is to simplify the design and just feed back, say, Q2 to the /load input and reset the counter to something that has Q2 asserted, such as a value of 7. This should then count 7,6,5,4,(3)7,... where (3)7 means that it goes to state 3 momentarily before going to 7.

Eman_Ali likes this.
15. ### WBahn Moderator

Mar 31, 2012
18,088
4,917
Slowing your clock is a very good idea. If you know how, you could even make a single-step circuit so that you get one clock pulse each time you press a button. Something like this really should be one of the first circuits that digital courses have students implement as it is very useful.

16. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,507
512
We did these circuits in lab and we used frequency generator, so we could slow it down or speed it up pretty much as much as we liked. Made for pretty light show, at times.

17. ### KJ6EAD Senior Member

Apr 30, 2011
1,426
364
One way to implement what WBahn and shteii01 have suggested is to set up a 556 timer so one timer is a monostable to generate a single clock pulse from a button push and the other timer is a slow astable. This is a convenient tool for breadboarding digital circuits.

18. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,402
1,227
Take and post a picture of your breadboarded circuit.