Sequential Circuit
Sequential Circuit
Unlike Combinational Logic circuits that change state depending upon the actual signals being applied to their
inputs at that time, Sequential Logic circuits have some form of inherent “Memory” built in.
This means that sequential logic circuits are able to take into account their
previous input state as well as those actually present, a sort of “before” and
“after” effect is involved with sequential circuits.
In other words, the output state of a “sequential logic circuit” is a function of
the following three states, the “present input”, the “past input” and/or the “past
output”. Sequential Logic circuits remember these conditions and stay fixed in
their current state until the next clock signal changes one of the states, giving
sequential logic circuits “Memory”.
Sequential logic circuits are generally termed as two state or Bistable devices
which can have their output or outputs set in one of two basic states, a logic
level “1” or a logic level “0” and will remain “latched” (hence the name latch)
indefinitely in this current state or condition until some other input trigger pulse
or signal is applied which will cause the bistable to change its state once
again.
The two inverters or NOT gates are connected in series with the output
at Q fed back to the input. Unfortunately, this configuration never changes
state because the output will always be the same, either a “1” or a “0”, it is
permanently set. However, we can see how feedback works by examining the
most basic sequential logic components, called the SR flip-flop.
SR Flip-Flop
The SR flip-flop, also known as a SR Latch, can be considered as one of the
most basic sequential logic circuit possible. This simple flip-flop is basically a
one-bit memory bistable device that has two inputs, one which will “SET” the
device (meaning the output = “1”), and is labelled S and another which will
“RESET” the device (meaning the output = “0”), labelled R.
Then the SR description stands for “Set-Reset”. The reset input resets the flip-
flop back to its original state with an output Q that will be either at a logic level
“1” or logic “0” depending upon this set/reset condition.
A basic NAND gate SR flip-flop circuit provides feedback from both of its
outputs back to its opposing inputs and is commonly used in memory circuits
to store a single data bit. Then the SR flip-flop actually has three
inputs, Set, Reset and its current output Q relating to it’s current state or
history. The term “Flip-flop” relates to the actual operation of the device, as it
can be “flipped” into one logic Set state or “flopped” back into the opposing
logic Reset state.
Reset State
In this second stable state, Q is at logic level “0”, (not Q = “0”) its inverse output
at Q is at logic level “1”, (Q = “1”), and is given by R = “1” and S = “0”. As
gate X has one of its inputs at logic “0” its output Q must equal logic level “1”
(again NAND gate principles). Output Q is fed back to input “B”, so both inputs
to NAND gate Y are at logic “1”, therefore, Q = “0”.
If the set input, S now changes state to logic “1” with input R remaining at logic
“1”, output Q still remains LOW at logic level “0” and there is no change of
state. Therefore, the flip-flop circuits “Reset” state has also been latched and
we can define this “set/reset” action in the following truth table.
State S R Q Q Description
1 0 0 1 Set Q » 1
Set
1 1 0 1 no change
Reset 0 1 1 0 Reset Q » 0
1 1 1 0 no change
It can be seen that when both inputs S = “1” and R = “1” the
outputs Q and Q can be at either logic level “1” or “0”, depending upon the
state of the inputs S or R BEFORE this input condition existed. Therefore the
condition of S = R = “1” does not change the state of the outputs Q and Q.
However, the input state of S = “0” and R = “0” is an undesirable or invalid
condition and must be avoided. The condition of S = R = “0” causes both
outputs Q and Q to be HIGH together at logic level “1” when we would
normally want Q to be the inverse of Q. The result is that the flip-flop looses
control of Q and Q, and if the two inputs are now switched “HIGH” again after
this condition to logic “1”, the flip-flop becomes unstable and switches to an
unknown data state based upon the unbalance as shown in the following
switching diagram.
This unbalance can cause one of the outputs to switch faster than the other
resulting in the flip-flop switching to one state or the other which may not be
the required state and data corruption will exist. This unstable condition is
generally known as its Meta-stablestate.
Then, a simple NAND gate SR flip-flop or NAND gate SR latch can be set by
applying a logic “0”, (LOW) condition to its Set input and reset again by then
applying a logic “0” to its Resetinput. The SR flip-flop is said to be in an
“invalid” condition (Meta-stable) if both the set and reset inputs are activated
simultaneously.
As we have seen above, the basic NAND gate SR flip-flop requires logic “0”
inputs to flip or change state from Q to Q and vice versa. We can however,
change this basic flip-flop circuit to one that changes state by the application
of positive going input signals with the addition of two extra NAND gates
connected as inverters to the S and R inputs as shown.
Depending upon the current state of the output, if the set or reset buttons are
depressed the output will change over in the manner described above and
any additional unwanted inputs (bounces) from the mechanical action of the
switch will have no effect on the output at Q.
When the other button is pressed, the very first contact will cause the latch to
change state, but any additional mechanical switch bounces will also have no
effect. The SR flip-flop can then be RESET automatically after a short period
of time, for example 0.5 seconds, so as to register any additional and
intentional repeat inputs from the same switch contacts, such as multiple
inputs from a keyboards “RETURN” key.
Commonly available IC’s specifically made to overcome the problem of switch
bounce are the MAX6816, single input, MAX6817, dual input and
the MAX6818 octal input switch debouncer IC’s. These chips contain the
necessary flip-flop circuitry to provide clean interfacing of mechanical switches
to digital systems.
Set-Reset bistable latches can also be used as Monostable (one-shot) pulse
generators to generate a single output pulse, either high or low, of some
specified width or time period for timing or control purposes. The 74LS279 is a
Quad SR Bistable Latch IC, which contains four individual NAND type
bistable’s within a single chip enabling switch debounce or
monostable/astable clock circuits to be easily constructed.
Gated SR Flip-flop
When the Enable input “EN” is at logic level “0”, the outputs of the
two AND gates are also at logic level “0”, (AND Gate principles) regardless of
the condition of the two inputs S and R, latching the two outputs Q and Q into
their last known state. When the enable input “EN” changes to logic level “1”
the circuit responds as a normal SR bistable flip-flop with the two AND gates
becoming transparent to the Set and Reset signals.
This additional enable input can also be connected to a clock timing signal
(CLK) adding clock synchronisation to the flip-flop creating what is sometimes
called a “Clocked SR Flip-flop“. So a Gated Bistable SR Flip-flop operates as a
standard bistable latch but the outputs are only activated when a logic “1” is
applied to its EN input and deactivated by a logic “0”.
In the next tutorial about Sequential Logic Circuits, we will look at another
type of simple edge-triggered flip-flop which is very similar to the RS flip-
flop called a JK Flip-flopnamed after its inventor, Jack Kilby. The JK flip-flop
is the most widely used of all the flip-flop designs as it is considered to be a
universal device.