# counter 0-12 rollover, DIGITAL circuits

Discussion in 'Homework Help' started by yey123, Sep 14, 2009.

1. ### yey123 Thread Starter New Member

Jul 20, 2008
2
0
I've got a problem making this circuit...

Using the combination of D FF and JK FF or 2 D FF, i have to make a circuit that will count from 0-12...

can anyone suggest something if what gates am i going to use or to add. And what connection will I make for it to function.

any suggestion will surely be appreciated,,
tnx a lot..

2. ### beenthere Retired Moderator

Apr 20, 2004
15,815
283
You could always look at a counter IC's internal logic, like a 74LS161.

3. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
You can't count to 12 with only 2 flipflops, never mind what type. You can only count from 0 to 3 with a pair. To count to 12 you need four flipflops. To compute this number you take the ceiling of log to the base 2 of the maximum count.
Code ( (Unknown Language)):
1.
2. ceil(log 12/log 2) = ceil(1.079181246/0.301029995)
3.  = ceil(3.584962501)
4.  = 4
5.

4. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
True, but the internal logic won't tell him how to go from the representation of 12 back to the representation of 0. In fact a designer may design the counter so it progresses through some other sequence of states like {3,4,5,6,7,8,9,10,11,12,13,14,15}. Most counters, like the 74xx161 have a TC output that makes this kind of syncronous reload a piece of cake.

Nov 6, 2005
1,015
69
6. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
Indubiously! Except that the OP wants a divide by 13, as there are 13 elements(states) in the set {0,1,2,3,4,5,6,7,8,9,10,11,12}