Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to Design a counter which counts 0, 4, 8, 2, 6

Status
Not open for further replies.

Eng Ali

New Member
1. Design a counter which counts 0, 4, 8, 2, 6, and repeats using:
1.a using JK flip flops
1.b using T flip flops
1.c using D flip flops


2. Modify your design in question 1.a so that the circuit works according to the following function table
X Y F
0 0 Clear
0 1 No Change
1 0 Parallel Loading
1 1 Count


3. Design a circuit that detects the pattern 010 in a serial input X considering:
3.a Overlapping
3.b No overlapping
 
1. Design a counter which counts 0, 4, 8, 2, 6, and repeats using:
1.a using JK flip flops
1.b using T flip flops
1.c using D flip flops


2. Modify your design in question 1.a so that the circuit works according to the following function table
X Y F
0 0 Clear
0 1 No Change
1 0 Parallel Loading
1 1 Count


3. Design a circuit that detects the pattern 010 in a serial input X considering:
3.a Overlapping
3.b No overlapping
 
For the first question, you will want to create truth tables for the counting sequence, then use the excitation tables for the respective flip flops. This will give you the information for the karnaugh maps for each flip flop input and therefore equations flip flop inputs.
 
Increment by four an 8 bit counter.
 
I think you should start with a moore or mealy diagram. :)
 
I have attached a partly completed design (that I did for someone else) for a Sychronous Modulo 6 counter.

This should give you a starting point in the art of sequential counter design.
 

Attachments

  • Counter-Mod 6.gif
    Counter-Mod 6.gif
    32 KB · Views: 9,576
but how many bits should i use in truth table design and how can i deal with the order of the numbers

please i need more explain .
 
ok

but how can i deal with the order of the number
and can anyone help me with the truth table that i should start with it
 
ok

but how can i deal with the order of the number I don't know what you mean by this statement.
and can anyone help me with the truth table that i should start with it
Your counter has to count in the specified sequence.

You will need 4 Flip Flops since the highest number is 8.

So make a "Next State" table as I did in my attachment in Post #4 with 1, 2, 3 & 4 replaced by 4, 8, 2, 6 with their binary equivalents.

Then fill in the JK columns.

If I were you, I would start with the Modulo 6 counter in Post #4, understand what I did and then complete the Next State table. ie. fill in the blank cells in the table.

Then post it so I can check it for you.

Then start on your counter.
 
Last edited:
thank you very much for your help and Excuse me for my poor language .


"I don't know what you mean by this statement."

i mean i found it hard to make a counter with these sequence of numbers
because there's not serial like 1 2 3 4 5 6 ,,,,

and this is the next state table with JK flip flop
 

Attachments

  • KD.doc
    29.5 KB · Views: 1,143
thank you very much for your help and Excuse me for my poor language . You're welcome. Your English is generally understandable, I'll ask for clarification if there is anything else that I don't understand.


"I don't know what you mean by this statement."

i mean i found it hard to make a counter with these sequence of numbers
because there's not serial like 1 2 3 4 5 6 ,,,,

and this is the next state table with JK flip flop

The numbers don't have to be in a numeric sequence.

I'll look at your attachments later & comment on them.
 
You're welcome.

I have made some changes to your attachment since the convention is to make A the least significant digit.

Note that you only need 3 Flip Flops since A is always 0. So A is simply connected to 0 Volt.

Otherwise, what you have done is correct. The next step is to draw the Karnaugh maps for JB, JC & JD.
 

Attachments

  • KD 1.doc
    31.5 KB · Views: 781
Last edited:
I looked at the next state diagram of for the T flipflop case. It looks good to me.

So as before, the next step is to draw the Karnaugh maps.
 
This is the k-map for them

please check them for me
 

Attachments

  • JK K-MAP.png
    JK K-MAP.png
    17.6 KB · Views: 1,025
  • T-MAP.png
    T-MAP.png
    18.1 KB · Views: 850
Since the highest number you're counting to, which is 8, translates to 1000, you would need 4 bits to express your outputs.

Your truth table (aka transition table in this case) will have one column for current state and one column for next state. I would also add another column for the flip flop inputs. For the current state, you would just list your numbers from top to bottom in the order you would like them to be. I.e. 0,4,8,2,6. Then the next state column would just be the numbers that come after each current state. For example, the next state after 6 would be 0 since you want to cycle through; next state after 0 would be 4 etc etc.

From that, you obtain the current state and next state transitions for each bit. For instance, the first entry, transition from 0000 to 0100, if you are looking at the second most significant bit, the transition would be from current state to next state would be 0 to 1. The excitation table of whichever flip flop you're using will tell you what this translates to as far as the flip flop input is concerned. For a D flip flop, that transition would give a D input of 1. You do this for every bit in a row. For instance, the first row, 0000 to 0100, if you're using the D flip flop, the truth table entry for the D column would be 0100 based on the transition of each bit.

Just out of curiosity, have you done state machine design much in your class?
 
You did not take full advantage of the "don't care" states.

Also, sequence the A ~ D in the reverse order & add the decimal equivalents (as in red in my Karnaugh map).

I have done JB, KB, JC & KC. Please check them & then do JD & KD. You don't need a Flip Flop for A since it is always = 0 as all of the numbers are even.

I suggest that you re-do the T tables using this technique.
 

Attachments

  • JK Karnaugh.jpg
    JK Karnaugh.jpg
    270.8 KB · Views: 2,816
If you do it in the D ~ A order as in my Karnaugh maps, then it is easy to write the decimal equivalents in each cell of the map - as I did in red.

Then it is easy to see which states are valid & which are "don't care".

Then you can group as many "don't care" states as possible with the states that require a 1 & therefore minimse the logic.

For example, in my Karnaugh map for JB, I grouped 8 ~ 15 hence JB = D.

If I had only grouped say 8 & 9, then JB = D.C'.B' so you would need a 3 input AND gate to generate JB.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top