Maker Pro
Maker Pro

Counter

azuz

Apr 23, 2012
4
Joined
Apr 23, 2012
Messages
4
Hi Guys,

I study at the University and found in the Internet this useful site and I need your help....
I need u to guide me to design a counter circuit (counts from 0 to 14 using flip flop)
In General


Thanks in advanced
 

GreenGiant

Feb 9, 2012
842
Joined
Feb 9, 2012
Messages
842
What type of flip flops?

my personal preference is J/K flip flops

that coupled with some other logic gates (a few AND's and an OR or two)

and a 555 timer with some resistors and you have yourself a counter


Though if this is for homework I think you should have posted it in the Homework section, I also don't want to draw it completely out for you as its for school

Alex
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,723
Joined
Nov 17, 2011
Messages
13,723
Here http://en.wikipedia.org/wiki/Counter the workings of counters are explained.There is even a figure using JK-flipflops - just what you need.

Without further circuitry, a binary counter will count powers of 2 (2, 4, 8, 16, ...).
Since you want to count only from 0 to 14, you will have to devise a circuit that will make the counter go from 14->0 (instead of 14->15), You need to detect the counter state 14 and will have to use this detector signal to control the JK-inputs of the flipflops such that on the next active clock edge the flipflops all will reset to 0.

Hint: An obvious solution would be to detect the counter state 15 and use this signal to reset all flipflops asynchronously. However, this approach has several drawbacks and is therefore not recommended:
1) the state 15 shows for a short period of time at the outputs of the counter. This may confuse other logic.
2) If the flipflops behave drastically different, not all flipflops may be reset (assume one especially fast flipflop going to 0, then the state is no longer 15, the reset signal is cleared and some especially slow flipflops may not be reset in that time).
3) Mixing asynchronous and synchronous operation may lead to so called hazards or races, both conditions that can wreack havoc in the following logic stages.

Harald
 

azuz

Apr 23, 2012
4
Joined
Apr 23, 2012
Messages
4
Thanks Mr.Harald...

could u draw that circuit for me which count from 0 to 16 or 8 through Logic Works?



Here http://en.wikipedia.org/wiki/Counter the workings of counters are explained.There is even a figure using JK-flipflops - just what you need.

Without further circuitry, a binary counter will count powers of 2 (2, 4, 8, 16, ...).
Since you want to count only from 0 to 14, you will have to devise a circuit that will make the counter go from 14->0 (instead of 14->15), You need to detect the counter state 14 and will have to use this detector signal to control the JK-inputs of the flipflops such that on the next active clock edge the flipflops all will reset to 0.

Hint: An obvious solution would be to detect the counter state 15 and use this signal to reset all flipflops asynchronously. However, this approach has several drawbacks and is therefore not recommended:
1) the state 15 shows for a short period of time at the outputs of the counter. This may confuse other logic.
2) If the flipflops behave drastically different, not all flipflops may be reset (assume one especially fast flipflop going to 0, then the state is no longer 15, the reset signal is cleared and some especially slow flipflops may not be reset in that time).
3) Mixing asynchronous and synchronous operation may lead to so called hazards or races, both conditions that can wreack havoc in the following logic stages.

Harald
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Also take a look at twisted ring counters (a la the 4017). They have 2n states where n is the number of flip-flops.

I mention them because they have an interesting property of having only a single transition per clock cycle (i.e. only one flip-flop changes state on each clock cycle)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,723
Joined
Nov 17, 2011
Messages
13,723
Sorry,
neither do I have the time nor Logic Works to draw this circuit. It is not the way this forum is supposed to operate. We are not doing youre homework, you're supposed to solve the problem yourself. We give guidance and advice.

Start with a 1 bit counter using 1 JK-flipflop. It will count 0 - 1 - 0 - 1 ...
How would you realize that with one JK-flipflop?

Now add a second stage to build a 2 bit counter that will count 00 - 01 - 10 - 11 - 00 - ...
How do you have to connect the JK-flipflop of the second stage to the first flipflop to achieve this function?

From there it is easy to extned to any number of stages.

If you present your solution as a schematic diagram, I'll be happy to check it.

Harald
 

azuz

Apr 23, 2012
4
Joined
Apr 23, 2012
Messages
4
I am the one who is really sorry
i thought this forum is for share knowledge not to keep it:) Prof.Harald​
 

davenn

Moderator
Sep 5, 2009
14,262
Joined
Sep 5, 2009
Messages
14,262
I am the one who is really sorry
i thought this forum is for share knowledge not to keep it:) Prof.Harald​

we do share knowledge , but in the homework section we are here to help you , NOT do the project for you. which is what you were wanting.
We have lives and jobs too, we dont have 100's of spare hours to completely design other peoples projects for them, instead we expect them to do some work for themselves and we will check their progress :)
You will find this the guideline on any electronics forum

Read the guidelines of the homework section, so you understand its purpose :)

Hello and welcome to Electronics Point! The Homework Help forum has been created to allow students to obtain assistance with their electronics assignments. We won't be providing answers to questions posted here, but we can help you work through the problem - helping you to learn.

cheers
Dave
 
Last edited:

azuz

Apr 23, 2012
4
Joined
Apr 23, 2012
Messages
4
C the attached file.

and give me ur guidance.....
 

Attachments

  • Counter.jpg
    Counter.jpg
    58.7 KB · Views: 220

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,723
Joined
Nov 17, 2011
Messages
13,723
This circuit doesn't make sense.
You connected the clock to the reset inputs (plus you left the leftmost Tand C inputs open). Thus the flipflops will be reset with every clock and essentially do nothing.

Look again at my earlier advice:
Start with a 1 bit counter using 1 JK-flipflop. It will count 0 - 1 - 0 - 1 ...
How would you realize that with one JK-flipflop?

Now add a second stage to build a 2 bit counter that will count 00 - 01 - 10 - 11 - 00 - ...
How do you have to connect the JK-flipflop of the second stage to the first flipflop to achieve this function?

Start simple and consider the case of the 1 Bit counter (not very useful but a good starting point). How would you make it toggle between 1 and 0 at each clock? Hint: The toggle function is hidden in the name of the T-flipflop. Where or how do you have to connect the inputs T, Clk, Reset?
Once that works, What is the condition for the T-flipflop to count? From that you find out how to connect the output of the first flipflop to a second stage.
Post your solution and I'll have a look at it.

Harald
 
Top