Electronics Simulations #17| Construction of ring counter by using "Digital" (step-by-step explanation)

in utopian-io •  7 years ago  (edited)

What Will I Learn?

In this tutorial readers:

  • will learn basics of the ring counters
  • will learn construction of ring counter on "Digital"

icon64.png

Requirements

In order to complete the tutorial, readers would have:

  • basic idea about logic gates
  • a working PC
  • "Digital" software

Difficulty

  • Intermediate

Tutorial Contents

In this tutorial, I am going to show the construction of ring counters on the digital circuit simulator, which is named as "Digital". I will start my tutorial with explaining D flip-flops and general working principle of the ring counter circuit. Then I will move into construction steps, and as a last part. I will show the simulation results.

  • Episode 1: What is D flip-flop ?

D flip-flop is a type of flip flop, whose output is only depends on the given input. This flip-flop gives the output according to its input at every clock tick. This flip-flop is widely used and reader should know the basic operation of it before moving into digital circuit environment.

When D is 1 Q is 1, and when D is 0 Q is 0. This is the basic principle of the D flip-flop.

In order to put a D flip-flop in the software, reader should click Components from top sections, then FlipFlops ---> D-FlipFlop as shown below:

1.png

Notice that the software gives the description of D flip-flop itself on the figure. It states that :

A component used to store a value. The value on pin D is stored on a rising edge of the clock pin C.

As we put a D flip-flop to a software, we can investigate its properties.

2.png

From here, we are able to change the rotation, we can give a Label to it and we can invert the inputs.

  • Episode 2: What is ring counter ?

Ring counter is a type of shift register, that is able to store and transfer a given data. In the ring counters, the given data is transferring through each output of D-flip flops, and the pattern that the data follows is the same as clock pulses. For example if we are going to design 4-bit ring counter, the data pattern will repeat itself each 4 clock pulses. This kind of counters are extremely important for data registration and transfer operations. For the reader who wants to know further information about the digital circuit enviroment, this topic must be covered in all aspects.

In this tutorial, I am going to construct 4-bit ring counter circuit by using D flip-flops. Expected result should look like:

3.png

As I have explained above, only 1 output should be high, whereas others are 0.

  • Episode 3: Construction of 4-bit ring counter using software

In order to have 4-bit ring counter, we need 4 outputs, which corresponds to 4 D-flip flop as shown below:

4.png

Then we need to add clock from, components ---> IO ---> Clock Input

5.png

As a next step, we need to wire clock to each flip-flops as shown below:

6.png

(Note that I have labeled each flip-flop from Q1 to Q4.)

We need to connect each flip-flops by considering the numbers.

8.png

Then we need to connect output of Q4 to Q1, and also add a reference data by using INPUT.

Ring counters are working AFTER REFERENCE DATA INSERTED, that is why we are using a refence data, and also we need to control the connection of Q4 to Q1 and reference data in order to prevent any corruption in the circuit. To do this operation, I have used switches. To insert a switch, we need to :

Components ---> Switches ---> Switch as shown below:

7.png

We need to add 2 switches, one to control the connection between Q4 and Q1, and the second one is to control reference data

Finalized version of the circuit should look like:

9.png

We have completed construction.

To visualize the circuit, I also added 4 LEDs for each input. To add a LED;

Components --> IO ---> LED as shown below:

10.png

After adding LEDs, circuit should look like:

11.png

We have managed to construct ring counter circuit.,

  • Episode 4: Simulation 4-bit ring counter using software

In order to begin simulation, all we need to do is click Simulation button. The results are shown below:

gif.gif

PLEASE NOTE THAT I HAVE CLOSED THE FIRST SWITCH TO INSERT THE DATA TO THE CIRCUIT AND THEN CLOSED IT. AS A SECOND STEP I HAVE CLOSED THE CONNECTION BETWEEN Q4 AND Q1 TO CLOSE THE LOOP

So we have managed to construct our desired circuit.

I have provided the files for this tutorial here. I highly recommend that the reader should work on the files that I have provided and try to understand the basics of the circuit & software. It will be benefical for he/she.

This is the end for this tutorial.Hope that you like it.

Digital is a really effective and easy to learn software, I highly recommend this software for the one who wants to make simulation in digital circuits especially. If you have any questions, please feel free to ask me on Discord (Escorn#4114)

Curriculum

I have provided the previous tutorials that I have prepared for the community:

SimulIDECaneda
Part 1Part 1
Part 2Part 2
Part 3Part 3
Part 4Part 4
-Part 5
-Part 6
-Part 7



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @creon, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

so much informatic..good one dude

Hey @escorn I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x