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.

a sequential synchronous circuit which counts 040080398, the student id

Status
Not open for further replies.

jigsaw55

New Member
hi folks
how can i do this circuit . I will use 4 digit bcd code ..and i think i must use flip flops ..But i need the anaylsis method ..the output will be like this as 0->4->0->0->8->0->3->9->8->0->4->0->0->8....... and this mean thatthe circuit may need to stay at some values more than one period of clock ..

help please
 
Use JK Flip Flops & the sequential synchronous design techniques to make it count in that sequence.

However, note that you will need a Flip Flop that is set after the 040 sequence so that the counter will remain in the 0 state for one clock pulse & then go to 8 not 4 at the next pulse.

Similar logic will be necessary each time the count = 0.

Alternatively, you could use a simple binary counter with decoding to give you the required BCD output states.
 
0 0000
4 0100
0 0000
0 0000
8 1000
3 0011
9 1001
8 1000
0 0000
4 0100
0 0000
0 0000
8 1000

This is actually an interesting little assignment. And you're lucky enough to have a number which is interesting to work with.

Break it down into the largest blocks you can. In your case
04008 reoccurs with 398. So there's your first flip flop. RUN logic 1 then logic 0 and then logic 1 again STOP

I'd use a simple shift register to give you the 04008 pattern.

The 398 pattern is almost symetrical. If it was 393 you would have be able to make a very simple circuit.
This one isn't too hard either, you just need to get a little creative with some bit shifting.

Think one level above your flip flops and think in terms of shift registers (using flip flops)
 
0 0000
4 0100
0 0000
0 0000
8 1000
3 0011
9 1001
8 1000
0 0000
4 0100
0 0000
0 0000
8 1000

This is actually an interesting little assignment. And you're lucky enough to have a number which is interesting to work with.

Break it down into the largest blocks you can. In your case
04008 reoccurs with 398. So there's your first flip flop. RUN logic 1 then logic 0 and then logic 1 again STOP

I'd use a simple shift register to give you the 04008 pattern.

The 398 pattern is almost symetrical. If it was 393 you would have be able to make a very simple circuit.
This one isn't too hard either, you just need to get a little creative with some bit shifting.

Think one level above your flip flops and think in terms of shift registers (using flip flops)
thanks for your time..
well i ve no idea about shifting register...i think it works a like counter ..always gives us digits of student number as a circular.
 
thanks for your time..
well i ve no idea about shifting register...i think it works a like counter ..always gives us digits of student number as a circular.
I have attached a Twisted Ring Counter that uses a Shift Register.

However, I would use a Modulo 8 counter with gating to provide the required outputs.

The sequence you need is

0 0 0000
1 4 0100
2 0 0000
3 0 0000
4 8 1000
5 3 0011
6 9 1001
7 8 1000

0 0 0000
1 4 0100
2 0 0000
3 0 0000
4 8 1000
Etc.
I modified your table of figures to add the counter state numbers, ie. the numbers at the left hand side.
 

Attachments

  • Counter-Twisted Ring.gif
    Counter-Twisted Ring.gif
    19.1 KB · Views: 284
Last edited:
Sorry, I posted earlier but lost the post.

Using shift registers is just one method. In this case all you require is a switching flip flop to switch registers and eac shift register run with it's bits swapped around.
The first register goes like this. Only lines A & D are used.
Register
ABCD - DA**
0000 = 0000 = 0
1000 = 0100 = 4
0100 = 0000 = 0
0010 = 0000 = 0
0001 = 1000 = 8

This only requires one wire to be swapped and the other two grounded.

the 398 is the next tricky part.
There's no counter pattern that we can use for a shortcut. But there is a shift register pattern we can use.
The pattern follows a 2,2,1 high bits. But some trickery is required here too to make it work

ABCD - C*AB
1100 = 0011 = 3
0110 = 1001 = 9
0011 = 1000 = 8

Now if your "REALLY" clever you can use one four bit shift register constructed of flip flops.
This register can be controlled by another flip flop which runs the 04008 and 398 sequences and terminates.
The overflow flip flop loads the bits (one or two) for the next run.

Being able to construct this circuit using six or seven flip flops should get you some top marks.

I'm guessing that your teacher is trying to get you to understand how flip flops work and more importantly how they are applied.
The family of flip flops starts with SR (set-reset) flip flops.
These then extend to JK flip flops or Master-slave flip flops.
Then D type flip flops (Data flip flops) or "latches"
The extension of the D type flip flop is the T type (Toggle).

Each is basically constructed of combinations of other flip flops. T type flip flops are the building blocks of the shift registers.
SR flip flops are the building blocks of T type F/Fs
logic gates are the building blocks of flip flops
transistors are the building blocks of logic gates.

If a student built this circuit consisting of 6 flip flops using combinations of SR's which he constructed using transistors.
His marks would reflect a high distinction and his complete understanding of everything from the task down to the discrete components.
 
Last edited:
Clever design is not necessarily good design.

I would define good design as follows:-
1. it meets the required design criteria, ie. it does what it is required to do.
2. it is largely immune to noise, temperature changes and to component & supply voltage tolerances.
3. it uses the minimum number of components - subject to the criteria above.
4. its operation is easy to understand.
5. it is easy to maintain, ie. can be maintained (ideally) without special equipment.
etc.
 
Use JK Flip Flops & the sequential synchronous design techniques to make it count in that sequence.

However, note that you will need a Flip Flop that is set after the 040 sequence so that the counter will remain in the 0 state for one clock pulse & then go to 8 not 4 at the next pulse.

Similar logic will be necessary each time the count = 0.

Alternatively, you could use a simple binary counter with decoding to give you the required BCD output states.
so in this case should i assign 4 different state to 0 in the transition table? ...
 
I have thought a little more about your design.

There are several options, I'll mention only 3 as I feel these are the simplest.

Here is an amended repeat of what I posted in an earlier post.

X Y DCBA
0 0 0000
1 4 0100
2 0 0000 Zero 1
3 0 0000 Zero 2
4 8 1000
5 3 0011
6 9 1001
7 8 1000 Eight 1

Option 1. Use a modulo 8 counter (ie. 3 Flip Flops) with gates to generate the required D, C, B & A outputs.

Option 2. Use 4 Flip Flops and use 2 states (chosen to make the logic as simple as possible) for Zero1 & Zero 2 and use gates to make the outputs zero when in these states and 8 when in the "Eight 1" state.

Option 3. Use a 4 stage Twisted Ring Counter with gates to generate the required D, C, B & A outputs.
 
I liked this little puzzle so much I thought I'd chuck it out to my local radio club and see what kind of answers I would get.
I didn't specify any limitations at first so that the foundation licence guys could have a go at it.

First suggestion was of course to use a PIC, which I removed the MCU possibility.
Then a ROM. Which is what most of the members said they would do since they don't program MCU's.

Then it was down to a simple counter like a 4017 with a diode array.
Then a binary (mod8) counter with logic gates.

Finally I suggested that they could only do it with flip flops. (not logic gates allowed)
It stumped most people because they couldn't work around the exclusion of any logic gates at all.

Nobody made the jump to twisted ring or scrambled bit counters.

I have also considered a Pseudo Noise shift register, but I'm not able to find a 4 bit winning combination to generate this sequence.
One comes close with a nand function to correct the "9" digit.
 
I liked this little puzzle so much I thought I'd chuck it out to my local radio club and see what kind of answers I would get.
I didn't specify any limitations at first so that the foundation licence guys could have a go at it.

First suggestion was of course to use a PIC, which I removed the MCU possibility.
Then a ROM. Which is what most of the members said they would do since they don't program MCU's.

Then it was down to a simple counter like a 4017 with a diode array.
Then a binary (mod8) counter with logic gates.

Finally I suggested that they could only do it with flip flops. (not logic gates allowed)
It stumped most people because they couldn't work around the exclusion of any logic gates at all.

Nobody made the jump to twisted ring or scrambled bit counters. I did, see the previous post (#9).

I have also considered a Pseudo Noise shift register, but I'm not able to find a 4 bit winning combination to generate this sequence.
One comes close with a nand function to correct the "9" digit.
A microprocessor is the obvious way to do this, but it is excluded.

The whole point of the exercise is for him to learn sequential design.

I think the ultimate decision is based upon which option (including the ones you suggested) leads to the minimum number of components - hence minimum cost & (if done properly) maximum reliability.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top