What is wrong with my counter?

Thread Starter

stormturk

Joined May 10, 2009
8
SOLVED:
The Solution

Hello everyone,
I am trying to build a counter to count from 0000 to 1111
And I connected it to a 7 Segment LED.
I couldnt see the result though, I wonder what I did wrong.


Here is the Multimedia Logic Design:
Rich (BB code):
http://www.speedyshare.com/345699215.html
Cheers
 
Last edited:

steinar96

Joined Apr 18, 2009
239
I assume you are going for a synchronous binary counter. In that case a flip flop is complemented when all the bits in the lower significant positions are equal to 1.

As i remember seeing the circuit setup you are missing an AND gate in the beginning, which is setup just like the others. The count enable is connected to the j and k pins of the first flip flop but it should also be connected to an AND gate who's other input is Q of the first flop.
The output of this gate is connected to the jk pins of the next flip flop (nr 2).
The rest of the circuit is alright by the looks of it.
 

Thread Starter

stormturk

Joined May 10, 2009
8

well, first of all, thanks for the answer
I fixed the circuit as you told, if I didn't misunderstand
and I simulated it, this is the result, nothing changes.
I am not sure, but should there be a serial input or shifting or sth like that?
All I wanna do is to take this output from the led:
0 -> 1 -> 2 -> 3 -> 4............ -> 9 -> A -> B -> ........ -> E -> F
But it looks broken and nothing changes... I google 3-4 bit counters, my circuit looks ok. Something is missing... but still coulnd't solve..
 

steinar96

Joined Apr 18, 2009
239
The output of the first AND gate should also be connected to the input of the second AND gate, just as the later gates. I forgot to mention that earlier :)
 

steinar96

Joined Apr 18, 2009
239
I just looked up the design in a book i have, and it shown exactly as your last correction of the circuit besides 1 small proplem which is that the output of the last AND gate is connected to the Q of flip-flop nr 2 in the schematic (see the dot where the output of the last AND gate crosses Q2).

So if all the connections are ok. The circuit should work in reality. If it doesnt work after correcting this then there might be a proplem with the simulation. Make sure all the connections in the simulation are complete, for example if you take a look at the Q output of flip flop 3. You'll see that the wire to the input of the second AND gate is connected to the pin in a manner that might not "complete the circuit". It's positioned so that it touches the Q pin but still is behind the "connection" dot.

I'm not familiar with the simulation so it might not matter, but this circuit should work after you fix the last proplem.
 
Last edited:

Thread Starter

stormturk

Joined May 10, 2009
8
well, I been searching many resources, it seems my circuit is true, I even tried with 3 flip flops for 3 bit counter, it didn't work. I think something wrong about the program, thank you all for your help..
 

JoeJester

Joined Apr 26, 2005
4,390
There is nothing wrong with your circuit. I replaced the hex display with four LEDs and it works just fine.

What clock frequency did you use?
 

Thread Starter

stormturk

Joined May 10, 2009
8
well I replaced with leds too, it didn't work. I set the frequency to 20, then tried 1, 5, 10 maybe 100. maybe it's about multimedia logic. which simulator are you using?
 

JoeJester

Joined Apr 26, 2005
4,390
Your original diagram didn't have presets and clears on the J/K ff's. You changed the models which changed the rules.

I'm using TINA. My J/K ff's had presets and clear so I had to deal with those pins.
 

Attachments

Thread Starter

stormturk

Joined May 10, 2009
8
you are right, ff's needed to be set, but I couldnt understand the sense, that's why I tried to make work the other one. Well, I still don't know but will try to learn, thanks for your help.
 
Top