digital logic

Thread Starter

matt-nick

Joined Dec 15, 2014
10
hi guys, i posted a thread recentley about creating a counting circuit which counts in a set order rather than 1 to 15 in numerical order.

i was just curcious as to wether it would be possible to link a jk flip flop counting cirtuit to a decade counter as there are only ten values i need to count, the other 5 are do not car items. and if so can you then make the decade coounter count in a chosen sequence such as 8 - 1 - 5 - 12 - 3 etc.

many thanks
 

MikeML

Joined Oct 2, 2009
5,444
A counter (state-machine) has some number of flip-flops (state elements). A decade counter usually has either four of five flip-flops. The maximum number of unique states for a given number of flip-flops is 2^n, or 16 states for 4ff or 32 states for 5ff, so a decade counter makes some of the states into "dont-cares" so as to count in a decimal sequence.

In order to make a counter count in a different sequence, you must change the steering logic, not add more flip-flops. The new sequence comes out of the steering logic which decodes the "Present state" and encodes the inputs of the flip-flops (be they JK or something else) so that the "Next state" is the one in desired counting sequence. In other words, it is all about the steering logic...
 

tshuck

Joined Oct 18, 2012
3,534
Note: steering logic is generally referred to as input forming logic.

If you see the thread I linked in your other thread, the Karnaugh maps are used to minimize the input forming logic, based on the desired count sequence (which can be anything, provided it is deterministic), and is described by the state transition table.
 

WBahn

Joined Mar 31, 2012
29,979
hi guys, i posted a thread recentley about creating a counting circuit which counts in a set order rather than 1 to 15 in numerical order.

i was just curcious as to wether it would be possible to link a jk flip flop counting cirtuit to a decade counter as there are only ten values i need to count, the other 5 are do not car items. and if so can you then make the decade coounter count in a chosen sequence such as 8 - 1 - 5 - 12 - 3 etc.

many thanks
You are still missing a state -- there are 16 states.

If your counter has exactly ten used states, then you can use a decade counter and simply decode the outputs so that you remap them from the 0-9 sequence to the sequence you want. You could even start the map at any of the ten states, which might result in a simpler mapping.

If you want to use the outputs of your machine directly, then using a counter IC is not a very good approach because it already has the excitation logic hardwired into it to make it count in a particular sequence and you don't have good access to it in order to override it. So you would be left with a kluge. Better to just use four flip flops and design the excitation logic directly -- it's not that hard.
 
Top