ADVERTISEMENT
ADVERTISEMENT

Examples of Designing of Arbitrary Sequence Counters and Bidirectional Counter

Here, we are going to have a detailed discussion about how we can design counters which can count in some random sequence and the steps to design these types of counters with an example. Also, we will also read about the designing process of bidirectional counters.
Submitted by Saurabh Gupta, on April 07, 2021

Example 1:

Design a modulo-5 counter to count the random sequence 0,1,3,7,6. Design should include circulatory to ensure that if we end in any unwanted state. The next clock pulse will reset the counter to zero. Implement the circuit using T-flip-flops.

Solution:

Follow the following steps to design a modulo-5 counter:

Step 1: The number of flip-flops required to design a mod-5 counter can be determined by using the equation: 2n >= N, where n is equal to the number of flip-flops and N is the mod number. In this case, the possible value on n which satisfies the above equation is 3. Hence, the required number of flip-flops is 3.

Step 2: Drawing the state diagram. Here, in the given sequence used states are: 0,1,3,7,6 and the unused states are: 2,4,5. For those unused states, the next state must be zero. Hence, a state diagram can be drawn as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (1)

Step 3: Using the excitation table of T flip-flop, we need to obtain the flip-flop inputs for each state that we obtained in step 2 and now we will enter it into a table as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (2)

Step 4: Making K-Map for each input combination and simplifying it to get the minimized Boolean expression.

Designing of Arbitrary Sequence Counters and Bidirectional Counter (3)

Step 5: Using the Boolean expressions obtained in step 4, now we will draw the required counter circuit which can be shown as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (4)

Note: Q2 is the MSB bit and Q0 is the LSB bit.

Example 2:

Design a synchronous counter to count the following sequence 7,4,3,1,5,0,7,4,3,... Implement the circuit using T-flip-flops.

Solution:

Step 1: Total number of states is 6. Therefore, the number of flip-flops required to design the counter can be determined by using the equation: 2n >= N, where n is equal to no. of flip-flop and N is the mod number. In this case, the possible value on n which satisfies the above equation is 3. Hence, the required number of flip-flops is 3.

Step 2: Drawing the state diagram. Here, in the given sequence used states are: 7,4,3,1,5,0 and the unused states are: 2 and 6. For those unused states, the next states are treated as don’t cares. Hence, a state diagram can be drawn as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (5)

Step 3: Using the excitation table of T flip-flop, we need to obtain the flip-flop inputs for each state that we obtained in step 2 and now we will enter it into a table as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (6)

Step 4: Making K-Map for each input combination and simplifying it to get the minimized Boolean expression.

Designing of Arbitrary Sequence Counters and Bidirectional Counter (7)

Designing of Arbitrary Sequence Counters and Bidirectional Counter (8)

Designing of Arbitrary Sequence Counters and Bidirectional Counter (9)

Step 5: Using the Boolean expressions obtained in step 4, now we will draw the required counter circuit which can be shown as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (10)

Designing of Up/Down counter (or) Multimode counter (or) Bidirectional Counter

The counter which is capable of progressing in either direction i.e., in ascending order (incrementing order) or descending order (decreasing order) through a certain counting sequence is known as an up/down Counter.

Usually, Up/Down operation of the counter is controlled by a mod (M) signal. When M=1, the counter follows the up sequence (0,1,2, 3, ..., n).

And when M=0, the counter goes through the down sequence (n, n-1, n-2, ..., 1, 0)

Example 3:

Design a 3-bit synchronous up/down counter or bidirectional counter using T flip-flop.

Solution:

Step 1: The number of flip-flops required is: 3 (since a 3-bit counter needs to be designed.)

Step 2: The type of flip-flop being used is T flip-flop.

Step 3: Drawing the state diagram:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (11)

Step 4: Draw the excitation table:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (12)

Step 5: Making K-Map for each input combination and simplifying it to get the minimized Boolean expression.

Designing of Arbitrary Sequence Counters and Bidirectional Counter (13)

Designing of Arbitrary Sequence Counters and Bidirectional Counter (14)

Step 6: Using the Boolean expressions obtained in step 5, now we will draw the required counter circuit which can be shown as:

Designing of Arbitrary Sequence Counters and Bidirectional Counter (15)

ADVERTISEMENT



ADVERTISEMENT



Comments and Discussions


ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.