Chapter 6. - Flip Flop Simulations

Take the Quiz

In this section we will be looking at some LabView simulations of the four flip-flops discussed on the previous page. If you are unfamiliar with LabView then please goto the LabView Tutorial Page.
The idea of these simulations is to help guide you to a better understanding of how each flip-flop actually works. Instead of blindly opening up the simulations and clicking buttons, you should have a really quick read of some of the instructions and tasks.

Simulations to run are as follows:


SR Flip-flop - (Set / Reset)

Getting started:

  1. Open the simulation in LabVIEW
  2. In the front panel view, click on the button indicated in the LabVIEW tutorial to start the simulation.
  3. To resolve any simulation startup issues, click the LabView button labelled clock a few times.
  4. In front of you there will be a representation of a SR flip-flop with three buttons (S, R and Clock) and two indicators (Q and Q'). The clock button is there so you can work through the simulation at your own pace.

A little task to do:

Try to reproduce (part or whole its your choice) the state change table and operating characteristics by methodically choosing initial values and clocking the flip-flop a few times. Write down on a scrap of paper what you think the answers are then either check back on the previous page or see the bottom of this page to see if you are right. Its better for you not to look at the answers while you run the simulation as you will not learn anything this way.

 

To download the example, "right click" the link below and click "save target as". You can then run LabView and open the downloaded file.

SR Flip Flop Simulation (you may need this file to run some simulations).

The answer to this task can be found at the bottom of this page.


T flip-flop (Triggered / Toggle)

Getting started:

  1. Open the simulation in LabVIEW
  2. In the front panel view, click on the button indicated in the LabVIEW tutorial to start the simulation.
  3. To resolve any simulation startup issues, click the LabView button labelled clock a few times.
  4. In front of you there will be a representation of a T flip-flop with two buttons (T and Clock) and two indicators (Q and Q'). The clock button is there so you can work through the simulation at your own pace.

A little task to do:

Despite this being a relativly trivial flip-flop, can you go back to the previous page and figure out which other flip-flop might be able to function soley as a T type flip-flop.

To download the example, "right click" the link below and click "save target as". You can then run LabView and open the downloaded file.

T Flip Flop Simulation (you may need this file to run some simulations).

The answer to this task can be found at the bottom of this page.


D type flip-flop (Delay)

Getting started:

  1. Open the simulation in LabVIEW
  2. In the front panel view, click on the button indicated in the LabVIEW tutorial to start the simulation.
  3. To resolve any simulation startup issues, click the LabView button labelled clock a few times.
  4. In front of you there will be a representation of a D type flip-flop with two buttons (D and Clock) and two indicators (Q and Q'). The clock button is there so you can work through the simulation at your own pace.

A little task to do:

There is really no practical task to be done within LabView, the simulation is really to help you learn how this flip-flop works. However because this is a simple circuit, you should try to think of how this flip-flop could be used as a register, then how you could use eight D type flip-flops to store a byte of information.

To download the example, "right click" the link below and click "save target as". You can then run LabView and open the downloaded file.

D Flip Flop Simulation (you may need this file to run some simulations).

The answer to this task can be found at the bottom of this page.


JK flip-flop

Getting started:

  1. Open the simulation in LabVIEW
  2. In the front panel view, click on the button indicated in the LabVIEW tutorial to start the simulation.
  3. To resolve any simulation startup issues, click the LabView button labelled clock a few times.
  4. In front of you there will be a representation of a JK type flip-flop with three buttons (J, K and Clock) and two indicators (Q and Q'). The clock button is there so you can work through the simulation at your own pace.

A little task to do:

There are many tasks that you can do with a JK type flip-flop as it is one of the most versatile and widely used flip-flop. The first task is to attempt to re-draw the operating characteristics and attempt the state change table. This should be straight forward if you understood the SR flip-flop task as these flip-flops are much the same.

A slightly tougher task now. Using your knowledge of the JK flip-flop, design a circuit that takes a clock signal and divides the frequency of the clock signal by two. You are given a logic 1 (and 0) source, a clock signal, and one JK flip-flop.
Hint: Compare the operating characteristics to other flip-flops.

To download the example, "right click" the link below and click "save target as". You can then run LabView and open the downloaded file.

JK Flip Flop Simulation (you may need this file to run some simulations).

The answer to this task can be found at the bottom of this page.


Answers to the tasks

SR Flip-Flop:

Your piece of paper should have the state change table looking something like this:

T Flip-Flop:

If you compare the operating characteristics of a JK flip-flop to a T type flip-flop, then you will be able to see that if J=K then the operating characteristics of a JK flip-flop equal that of a T flip-flop. If J=K=0 then the output at Q(t+1) goes to Q(t), the same as if T=0. The same scenerio is true when J=K=1 as T=1 and this has the property that Q(t+1) goes to Q'(t). Compare the information for yourself:

D Flip-Flop

One D type flip-flop can store one bit of information for one clock cycle. To have eight bits of information, simply arrange eight flip-flops in parallel with a common clock. Your diagram should look like this:

JK Flip-Flop

The first task is relativly straight forward. By manually clocking the flip-flop, and systematically setting the different inputs, you can see the output that each different input provides. By leaving J=K=0, the output will remain at its previous state. If J=1 and K=0, then the output on the next clock cycle will goto logic 1. The output will goto logic 0 if J=0 and K=1. If both J and K equal 1, then the next output will be the inverse of the current output. Your readings should look like this:

The second task is quite easy once you have identified that a T type flip-flop has the property of frequency division as mentioned here. To turn the JK flip-flop into a T type flip-flop, compare the two operating characteristics diagrams. From this observation, it can be seen that if we tie inputs J and K to logic 1, our JK flip-flop will now function like a T type flip-flop in one state only (remember you are given logic levels 0 and 1 in the task specification).
Let me clarify the above point; If J=K=1, then the next output will always be the inverse of the current output. This is the same property as a T type flip-flop when T=1. Remember we only want to invert the clock signal so J and K must always be set to logic 1.

Have a look at this LabVIEW simulation of a JK type flip-flop operating like a T type flip-flop.
To download the example, "right click" the link below and click "save target as". You can then run LabView and open the downloaded file.

JK Flip Flop as a freqency divider (you may need this file to run some simulations).

Take the Quiz