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

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
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)
AhjmWo1NgI3jwq94ZRddXSmN7I0aGWZebwEroQNz5CrI.jpg AjIPwewZwX-iunaI4gMeipMeo1WYBxTUVxw08OoPCpmn.jpg
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!!
 

AnalogKid

Joined Aug 1, 2013
8,251
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
 

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
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
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!!
 

WBahn

Joined Mar 31, 2012
25,064
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...
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.
 

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
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.
Oh okay sorry... I'm new here now i got what's the difference :)
 

WBahn

Joined Mar 31, 2012
25,064
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.
 

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
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.
from my calculation above, (i'm not sure if my calculation is right) this is the schematic that i drew:
AgG8aG3VZr-qoH6iKfFkM3WVgV4gpeqB4ZRwdKjJbfgT.jpg
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?
 

AnalogKid

Joined Aug 1, 2013
8,251
when SW2 is pressed it will go from 7 to 0 to 1 right? not from 7 to 1 immediately?
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
 

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
The question is - is this what is desired, or do you want any rollover to stop at 0 until another input is received?
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...
AuMu9NZ7YIaQlGUjF5xiRShJE1C81lbXNnNUHYuJ5mtd.jpg
Am I going the right way? Do I continue?
 

AnalogKid

Joined Aug 1, 2013
8,251
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
 

WBahn

Joined Mar 31, 2012
25,064
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.
 

sailorjoe

Joined Jun 4, 2013
361
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.
 

Thread Starter

xCMvYs

Joined Jan 4, 2016
11
Why do you have six flipflops to implement a 3-bit counter?
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...

Also, is it a requirement to design a synchronous counter? A ripple counter is much more simple.
Can we do the ripple counter using IC: 7476?

Xcmvys, your schematic looks to me like you don't fully understand all the signals of the JK flip flops.
yeah like i said this is my first time doing the JK flipflop...

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.
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!

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.
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...
 
Top