SEQUENTIAL PROJECT #7 – D FLIP FLOP

CLOCKS IN DIGITAL ELECTRONICS

 

In digital electronics, a clock (or clock signal) is a signal that continuously oscillates between a low state and a high state at a constant frequency.

 

 

Most advanced digital electronics make use of clocks to synchronize the circuit and avoid the impact of race conditions. 

 

For our needs, we can use a 555 timer to generate a clock signal (with mixed results).  We can also use an Arduino.

 

INTRODUCING FLIP FLOPS

 

Latches are said to be level-triggered circuits.  This means that their output can change at any time when their inputs change.  For the purpose of synchronization, we sometimes need latches that can only be changed when a clock signal changes from low to high.  Such circuits are called flip flops and are said to be edge-triggered circuits.

 

There is a gated SR latch, a D latch, a JK latch and a T latch.  There is also a flip flop for each of these.  Below is an example, though a little incomplete, of a D flip flop.

 

 

To convert a latch into a flip flop, we first connect the Enable to a clock.  However, if that was all we did, the flip flop’s output could be changed anytime the clock’s signal was high.  And we want the flip flop’s outputs to only be changeable when the clock changes from low to high (edge-triggered). 

 

To make this happen, we use a small circuit called a pulse detector (which should really be called an edge pulse generator or something like that).  The pulse detector circuit gets the clock as input and outputs a brief pulse whenever the clock’s signal goes from low to high.  The image below shows the impact of the pulse detector on the signal.

 

 

 

 

We can create a pulse detector circuit by simply using AND and NOT gates (see below).  When the input in the pulse detector is zero, the AND get gets zero in the top input and 1 in the bottom input.  However, at the moment that the input switches from 0 to 1, the top input gets a 1 and the bottom input is briefly still 1 until the change propagates through the three NOT gates.

 

 

PROJECT EXPECTATIONS

 

Combine a clock circuit (555 timer or Arduino), a pulse detector and a D-latch to create your own D flip flop.  Note the value of Q should only be changed when the clock edges up.

 



NOTE: We have had challenges with the 555 timer for this task.  It is possible that the timers are bouncing and are also triggering on the down edge.

 

Show Mr. Campeau your work.