# Counter Scoreboard using JK flip flop connecting to a 7 segment (breadboard)

Discussion in 'Homework Help' started by xCMvYs, Jan 4, 2016.

1. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
hello,
i'm new here and this is my first thread
so i have this project hope you can help with it! thank you in advance.

Project:
2 switches (normally the switch is open.)
if the user presses on switch one the 7 segment will be incremented by 1
if the user presses on switch two the 7 segment will be incremented by 2
so if the result on the seven segment display was 3 and the user presses on switch nb 2, the result will be 5.
when it reaches 7 it will restart from 0

I am using 6 JK flip flop as the teacher recommended (3 for switch 1 and 3 for switch 2 since we're dealing with 3 bits max 000->111)
i found the equaions for JA, JB, JC and KA, KB, KC but i don't know if it's that way to find it. I considered X (switch 1) and Y (switch 2)... Is it correct? (calculation in the image below)

If my calculations are correct how should I connect the circuit and the 7 segment or do I need to do more calculations or need more components such as resistors, regulator...

Thank you again!!

2. ### AnalogKid Distinguished Member

Aug 1, 2013
4,696
1,297
If I understand the problem description correctly, there is only one 7-segment display, correct? If so, then there should be only one group of three flipflops. Without getting into synchronous counter techniques, let's keep things simple with a ripple counter approach. FF1 output clocks FF2, FF2 output clocks FF3. SW1 clocks FF1. That's the easy part.

Here is the fun part. OR SW2 with the output of FF1 before it enters the FF2 clock pin. In this way, SW2 increments the overall count by two with a single button press.

You didn't say what happens when the counter rolls over on a SW2 press. For example, if the counter is sitting at 7 and you press SW1, it goes to 0. If it is sitting at 7 and you press SW2, should it go to 0 and stop (the effect of incrementing by 1) or roll over to 1 (the effect of incrementing by 2)? Depending on the answer, a gate might have to be added to the output.

ak

3. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
yes there's one 7 segment display and what do you mean by FF1 output clocks FF2?
and if it's 7 and you press SW 2 it will go to 1 (our teacher didn't precise this but i'm assuming it will go to 1...)
Thank you so much for replying!!

4. ### nerdegutta Moderator

Dec 15, 2009
2,566
806
I guess he means:

When you press SW1, flipflop1s (FF1) output is clocking flipflop2s (FF2) input.

Sounds like homework - moved to Homework Forum.

5. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
No it's my final project... She told us to choose any project that's why i assumed it's gonna be from 7 to 1 when SW2 is pressed...

6. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Since it is a project for academic credit, it belongs in Homework Help. The kind of assistance and interaction is different for an academic problem than for other types of problems because the goal is different -- the focus is on YOU doing and learning, as opposed to just getting something working.

7. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
Oh okay sorry... I'm new here now i got what's the difference

8. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
No problem at all!

9. ### nerdegutta Moderator

Dec 15, 2009
2,566
806
You're welcome. Hope you like it here, and that you manage to breadboard your scoreboard.

10. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
Hope so! i'm trying to figure how to connect them together...

11. ### AnalogKid Distinguished Member

Aug 1, 2013
4,696
1,297
Do you understand that it actually goes from 7 to 0 to 1?

ak

12. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
when SW2 is pressed it will go from 7 to 0 to 1 right? not from 7 to 1 immediately?

13. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
It will be a lot better to discuss the logic if we have a proposed circuit diagram to work with. We can also then point out issues with the circuit and suggest alternatives.

14. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
from my calculation above, (i'm not sure if my calculation is right) this is the schematic that i drew:

this is my first time using JK flip flop... So i'm not sure if this the right way to connect them and where should i connect the clock and reset?

15. ### AnalogKid Distinguished Member

Aug 1, 2013
4,696
1,297
No. What I suggested adds 2 to the existing value, not 1 and then another 1. The output will change from 7 to 1 in nanoseconds.

The question is - is this what is desired, or do you want any rollover to stop at 0 until another input is received?

ak

16. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
i want it to be continuous! if the number was 7 and i press switch 2 i want the answer to be 1 and if i press switch 1 again, for example, the result will be 2 and so on...

i redrew my schematic (From my calculation above) for a better view...

Am I going the right way? Do I continue?

17. ### AnalogKid Distinguished Member

Aug 1, 2013
4,696
1,297
Why do you have six flipflops to implement a 3-bit counter?
Also, is it a requirement to design a synchronous counter? A ripple counter is much more simple.

ak

18. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Here's a hint that might make you see a simple implementation: To increment a counter by 2^n you increment the FF for bit n and let the rest of the counter do its thing.

djsfantasi likes this.
19. ### sailorjoe Member

Jun 4, 2013
361
63
Xcmvys, your schematic looks to me like you don't fully understand all the signals of the JK flip flops.
You're not using the clock inputs. Another hint. You don't need all those extraneous gates. But you will need a BCD to Seven Segment Converter.

20. ### xCMvYs Thread Starter New Member

Jan 4, 2016
11
0
i'm using six flipflops because from my calculation above 3 flipflops to increment by 1 and the other 3 to increment by 2 but i don't if this the right way that's why i'm asking you... P.S: That's my first time using JK flip flop (7476) that's why i'm having trouble how to connect them...

Can we do the ripple counter using IC: 7476?

yeah like i said this is my first time doing the JK flipflop...

yeah i was checking if my schematic is right for now because i need to see if it's right i want to know where should i connect the Clock and the Reset....?
And thank you for the BCD!

I didn't quite understand but i want it also to do (2^n)-1 for example if it was 1 and the user presser SW 2 it will increment by 2 it will become 3...