Sequential Logic Basics
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 to them and they are able to take into account their previous input state as well as those actually present, a sort of "before" and "after" is involved. They are generally termed as Two State or Bistable devices which can have their output set in either of two basic states, a logic level "1" or a logic level "0" and will remain "Latched" indefinitely in this current state or condition until some other input trigger pulse or signal is applied which will change its state once again.
Sequential Logic Circuit
The word "Sequential" means that things happen in a "sequence", one after another and in Sequential Logic circuits, the actual clock signal determines when things will happen next. Simple sequential logic circuits can be constructed from standard Bistable circuits such as Flip-flops, Latches or Counters and which themselves can be made by simply connecting together NAND Gates and/or NOR Gates in a particular combinational way to produce the required sequential circuit.
Sequential Logic circuits can be divided into 3 main categories:
- 1. Clock Driven - Synchronous Circuits that are Synchronised to a specific clock signal.
- 2. Event Driven - Asynchronous Circuits that react or change state when an external event occurs.
- 3. Pulse Driven - Which is a Combination of Synchronous and Asynchronous.
Classification of Sequential Logic
As well as the two logic states mentioned above logic level "1" and logic level "0", a third element is introduced that separates Sequential Logic circuits from their Combinational LogicTIME. Sequential logic circuits that return back to their original state once reset, i.e. circuits with loops or feedback paths are said to be "Cyclic" in nature. counterparts, namely
SR Flip-Flop
An SR Flip-Flop can be considered as a basic one-bit memory device that has two inputs, one which will "SET" the device and another which will "RESET" the device back to its original state and 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 its outputs to its inputs and is commonly used in memory circuits to store data bits. The term "Flip-flop" relates to the actual operation of the device, as it can be "Flipped" into one logic state or "Flopped" back into another.
The simplest way to make any basic one-bit Set/Reset SR flip-flop is to connect together a pair of cross-coupled 2-input NAND Gates to form a Set-Reset Bistable or a SR NAND Gate Latch, so that there is feedback from each output to one of the other NAND Gate inputs. This device consists of two inputs, one called the Reset, R and the other called the Set, S with two corresponding outputs Q and its inverse or complement Q as shown below.
The SR NAND Gate Latch
The Set State
Consider the circuit shown above. If the input R is at logic level "0" (R = 0) and input S is at logic level "1" (S = 1), the NAND Gate Y has at least one of its inputs at logic "0" therefore, its output Q must be at a logic level "1" (NAND Gate principles). Output Q is also fed back to input A and so both inputs to the NAND Gate X are at logic level "1", and therefore its output Q must be at logic level "0". Again NAND gate principals. If the Reset input R changes state, and now becomes logic "1" with S remaining HIGH at logic level "1", NAND Gate Y inputs are now R = "1" and B = "0" and since one of its inputs is still at logic level "0" the output at Q remains at logic level "1" and the circuit is said to be "Latched" or "Set" with Q = "1" and Q = "0".
Reset State
In this second stable state, Q is at logic level "0", Q = "0" its inverse output Q is at logic level "1", not 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 R remaining at logic "1", output Q still remains LOW at logic level "0" and the circuit's "Reset" state has been latched.
Truth Table for this Set-Reset Function
State | S | R | Q | Q |
Set | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | |
Reset | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 1 | |
Invalid | 0 | 0 | 1 | 1 |
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 inputs S or R BEFORE this input condition existed. However, input state R = "0" and S = "0" is an undesirable or invalid condition and must be avoided because this will give both outputs Q and Q to be at logic level "1" at the same time and we would normally want Q to be the inverse of Q. However, if the two inputs are now switched HIGH again after this condition to logic "1", both the outputs will go LOW resulting in the flip-flop becoming unstable and switch to an unknown data state based upon the unbalance. 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 known as its Meta-stable state.
Then, a bistable latch is activated or Set by a logic "1" applied to its S input and deactivated or Reset by a logic "1" applied to its R. The SR Latch is said to be in an "invalid" condition (Meta-stable) if both the Set and Reset inputs are activated simultaneously.
As well as using NAND Gates, it is also possible to construct simple 1-bit SR Flip-flops using two NOR Gates connected the same configuration. The circuit will work in a similar way to the NAND gate circuit above, except that the invalid condition exists when both its inputs are at logic level "1" and this is shown below.
The NOR Gate SR Flip-flop
Switch Debounce Circuits
One practical use of this type of Set-Reset circuit is as a latch used to help eliminate mechanical switch "Bounce". As its name implies, switch bounce occurs when the contacts of any mechanically operated Switch, Push-button or Keypad is operated and the internal switch contacts do not fully close cleanly, but bounce together first before closing (or opening) when the switch is pressed. This gives rise to a series of pulses as long as tens of milliseconds that an electronic system or circuit such as a digital counter may see as a series of logic pulses instead of one long single pulse and behave incorrectly, for example, it may register multiple counts instead of a single count. Then Set-Reset SR Flip-flops or Bistable Latch circuits can be used to eliminate this problem and this is shown below.
SR Bistable Switch Debounce Circuit
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. When the other button is pressed, the very first contact will cause the latch to change state, but any additional 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, for example multiple inputs from the 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 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 4 individual NAND type bistable's within a single chip enabling switch debounce or monostable/astable clock circuits to be easily constructed.
Gated or Clocked SR Flip-Flop
It is sometimes desirable in sequential logic circuits to have a bistable SR flip-flop that only change state when certain conditions are met regardless of the condition of either the Set or the Reset inputs. By connecting a 2-input NAND gate in series with each input terminal of the SR Flip-flop a Gated SR Flip-flop can be created. This extra conditional input is called an "Enable" input and is given the prefix of "EN" as shown below.
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 enable input can also be connected to a clock timing signal 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".
The JK Flip-Flop
From the previous tutorial we now know that the basic gated SR NAND Flip-flop suffers from two basic problems: Number 1, the S = 0 and R = 0 condition or S = R = 0 must always be avoided, and number 2, if S or R change state while the enable input is high the correct latching action will not occur. Then to overcome these two problems the JK Flip-Flop was developed.
The JK Flip-Flop is basically a Gated SR Flip-Flop with the addition of clock input circuitry that prevents the illegal or invalid output that can occur when both input S equals logic level "1" and input R equals logic level "1". The symbol for a JK Flip-flop is similar to that of an SR Bistable as seen in the previous tutorial except for the addition of a clock input.
The JK Flip-flop
Both the S and the R inputs of the previous SR bistable have now been replaced by two inputs called the J and K inputs, respectively. The two 2-input NAND gates of the gated SR bistable have now been replaced by two 3-input AND gates with the third input of each gate connected to the outputs Q and Q. This cross coupling of the SR Flip-flop allows the previously invalid condition of S = "1" and R = "1" state to be usefully used to turn it into a "Toggle action" as the two inputs are now interlocked. If the circuit is "Set" the J input is inhibited by the "0" status of the Q through the lower AND gate. If the circuit is "Reset" the K input is inhibited by the "0" status of Q through the upper AND gate. When both inputs J and K are equal to logic "1", the JK flip-flop changes state and the truth table for this is given below.
The Truth Table for the JK Function
J | K | Q | Q | same as for the SR Latch |
0 | 0 | 0 | 0 | |
0 | 0 | 1 | 1 | |
0 | 1 | 0 | 0 | |
0 | 1 | 1 | 0 | |
1 | 0 | 0 | 1 | |
1 | 0 | 1 | 1 | |
1 | 1 | 0 | 1 | toggle action |
1 | 1 | 1 | 0 |
Then the JK Flip-flop is basically an SR Flip-flop with feedback and which enables only one of its two input terminals, either Set or Reset at any one time thereby eliminating the invalid condition seen previously in the SR Flip-flop circuit. Also when both the J and the K inputs are at logic level "1" at the same time, and the clock input is pulsed either "HIGH" or "LOW" the circuit will "Toggle" from a Set state to a Reset state, or visa-versa. This results in the JK Flip-flop acting more like a T-type Flip-flop when both terminals are "HIGH".
Although this circuit is an improvement on the clocked SR flip-flop it still suffers from timing problems called "race" if the output Q changes state before the timing pulse of the clock input has time to go "OFF". To avoid this the timing pulse period (T) must be kept as short as possible (high frequency). As this is sometimes is not possible with modern TTL IC's the much improved Master-Slave JK Flip-flop was developed. This eliminates all the timing problems by using two SR flip-flops connected together in series, one for the "Master" circuit, which triggers on the leading edge of the clock pulse and the other, the "Slave" circuit, which triggers on the falling edge of the clock pulse.
Master-Slave JK Flip-flop
The Master-Slave Flip-Flop is basically two JK bistable flip-flops connected together in a series configuration with the outputs from Q and Q from the "Slave" flip-flop being fed back to the inputs of the "Master" with the outputs of the "Master" flip-flop being connected to the two inputs of the "Slave" flip-flop as shown below.
Master-Slave JK Flip-Flops
The input signals J and K are connected to the "Master" flip-flop which "locks" the input while the clock (Clk) input is high at logic level "1". As the clock input of the "Slave" flip-flop is the inverse (complement) of the "Master" clock input, the outputs from the "Master" flip-flop are only "seen" by the "Slave" flip-flop when the clock input goes "LOW" to logic level "0". Therefore on the "High-to-Low" transition of the clock pulse the locked outputs of the "Master" flip-flop are fed through to the JK inputs of the "Slave" flip-flop making this type of flip-flop edge or pulse-triggered.
Then, the circuit accepts input data when the clock signal is "HIGH", and passes the data to the output on the falling-edge of the clock signal. In other words, the Master-Slave JK Flip-flop is a "Synchronous" device as it only passes data with the timing of the clock signal.
Data Latch
One of the main disadvantages of the basic SR NAND Gate Bistable circuit is that the indeterminate input condition of "SET" = logic "0" and "RESET" = logic "0" is forbidden. That state will force both outputs to be at logic "1", overriding the feedback latching action and whichever input goes to logic level "1" first will lose control, while the other input still at logic "0" controls the resulting state of the latch. In order to prevent this from happening an inverter can be connected between the "SET" and the "RESET" inputs to produce a D-Type Data Latch or simply Data Latch as it is generally called.
Data Latch Circuit
We remember that the simple SR flip-flop requires two inputs, one to "SET" the output and one to "RESET" the output. By connecting an inverter (NOT gate) to the SR flip-flop we can "SET" and "RESET" the flip-flop using just one input as now the two latch inputs are complements of each other. This single input is called the "DATA" input. If this data input is HIGH the flip-flop would be "SET" and when it is LOW the flip-flop would be "RESET". However, this would be rather pointless since the flip-flop's output would always change on every data input. To avoid this an additional input called the "CLOCK" or "ENABLE" input is used to isolate the data input from the flip-flop after the desired data has been stored. This then forms the basis of a Data Latch or "D-Type latch".
The D-Type Latch will store and output whatever logic level is applied to its data terminal so long as the clock input is high. Once the clock input goes low the SET and RESET inputs of the flip-flop are both held at logic level "1" so it will not change state and store whatever data was present on its output before the clock transition occurred. In other words the output is "latched" at either logic "0" or logic "1".
Truth Table for the D-type Flip-flop
Clk | D | Q | Q | OUTPUT |
0 | x | Q | Q | HOLD |
1 | 0 | 0 | 1 | RESET |
1 | 1 | 1 | 0 | SET |
Frequency Division
One main use of a Data Latch is as a Frequency Divider. In the Counters tutorials we saw how the Data Latch can be used as a "Binary Divider", or a "Frequency Divider" to produce a "divide-by-2" counter. Here the inverted output terminal Q (NOT-Q) is connected directly back to the Data input terminal D giving the device "feedback" as shown below.
Divide-by-2 Counter
It can be seen from the frequency waveforms above, that by "feeding back" the output from Q to the input terminal D, the output pulses at Q have a frequency that are exactly one half (f/2) that of the input clock frequency, (Fin). In other words the circuit produces Frequency Division as it now divides the input frequency by a factor of two (an octave).
Another use of a Data Latch is to hold or remember its data, thereby acting as a single bit memory cell and IC's such as the TTL 74LS74 or the CMOS 4042 are available in Quad format for this purpose. By connecting together four, 1-bit latches so that all their clock terminals are connected at the same time a simple "4-bit" Data latch can be made as shown below.
4-bit Data Latch
Transparent Data Latch
The Data Latch is a very useful devices in electronic and computer circuits. They can be designed to have very high output impedance at both outputs Q and its inverse Q to reduce the impedance effect on the connecting circuit when used as buffers, I/O ports, bi-directional bus drivers or even display drivers. But a single "1-bit" data latch is not very practical to use on its own and instead commercially available IC's incorporate 4, 8, 10, 16 or even 32 individual data latches into one single IC package, and one such IC device is the 74LS373 Octal D-type transparent latch.
The eight individual Data Latches of the 74LS373 are "transparent" D-type latches, meaning that when the clock (CLK) input is HIGH at logic level "1", the Q outputs follow the data D inputs and the latch appears "transparent" as the data flows through it. When the clock signal is LOW at logic level "0", the output is latched at the level of the data that was present before the clock input changed.
8-bit Data Latch
Functional diagram of the 74LS373 Octal Transparent Latch
Shift Registers
Shift Registers consists of a number of single bit "D-Type Data Latches" connected together in a chain arrangement so that the output from one data latch becomes the input of the next latch and so on, thereby moving the stored data serially from either the left or the right direction. The number of individual Data Latches used to make up Shift Registers are determined by the number of bits to be stored with the most common being 8-bits wide. Shift Registers are mainly used to store data and to convert data from either a serial to parallel or parallel to serial format with all the latches being driven by a common clock (Clk) signal making them Synchronous devices. They are generally provided with a Clear or Reset connection so that they can be "SET" or "RESET" as required.
Generally, Shift Registers operate in one of four different modes:
- Serial-in to Parallel-out (SIPO)
- Serial-in to Serial-out (SISO)
- Parallel-in to Parallel-out (PIPO)
- Parallel-in to Serial-out (PISO)
Serial-in to Parallel-out.
4-bit Serial-in to Parallel-out (SIPO) Shift Register
Lets assume that all the flip-flops (FFA to FFD) have just been RESET (CLEAR input) and that all the outputs QA to QD are at logic level "0" ie, no parallel data output. If a logic "1" is connected to the DATA input pin of FFA then on the first clock pulse the output of FFA and the resulting QA will be set HIGH to logic "1" with all the other outputs remaining LOW at logic "0". Assume now that the DATA input pin of FFA has returned LOW to logic "0". The next clock pulse will change the output of FFA to logic "0" and the output of FFB and QB HIGH to logic "1". The logic "1" has now moved or been "Shifted" one place along the register to the right. When the third clock pulse arrives this logic "1" value moves to the output of FFC (QC) and so on until the arrival of the fifth clock pulse which sets all the outputs QA to QD back again to logic level "0" because the input has remained at a constant logic level "0".
The effect of each clock pulse is to shift the DATA contents of each stage one place to the right, and this is shown in the following table until the complete DATA is stored, which can now be read directly from the outputs of QA to QD. Then the DATA has been converted from a Serial Data signal to a Parallel Data word.
Clock Pulse No | QA | QB | QC | QD |
0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 | 0 |
2 | 0 | 1 | 0 | 0 |
3 | 0 | 0 | 1 | 0 |
4 | 0 | 0 | 0 | 1 |
5 | 0 | 0 | 0 | 0 |
Serial-in to Serial-out
This Shift Register is very similar to the one above except where as the data was read directly in a parallel form from the outputs QA to QD, this time the DATA is allowed to flow straight through the register. Since there is only one output the DATA leaves the shift register one bit at a time in a serial pattern and hence the name Serial-in to Serial-Out Shift Register.
4-bit Serial-in to Serial-out (SISO) Shift Register
This type of Shift Register also acts as a temporary storage device or as a time delay device, with the amount of time delay being controlled by the number of stages in the register, 4, 8, 16 etc or by varying the application of the clock pulses. Commonly available IC's include the 74HC595 8-bit Serial-in/Serial-out Shift Register with 3-state outputs.
Parallel-in to Serial-out
Parallel-in to Serial-out Shift Registers act in the opposite way to the Serial-in to Parallel-out one above. The DATA is applied in parallel form to the parallel input pins PA to PD of the register and is then read out sequentially from the register one bit at a time from PA to PD on each clock cycle in a serial format.
4-bit Parallel-in to Serial-out (PISO) Shift Register
As this type of Shift Register converts parallel data, such as an 8-bit data word into serial data it can be used to multiplex many different input lines into a single serial DATA stream which can be sent directly to a computer or transmitted over a communications line. Commonly available IC's include the 74HC165 8-bit Parallel-in/Serial-out Shift Registers.
Parallel-in to Parallel-out
Parallel-in to Parallel-out Shift Registers also act as a temporary storage device or as a time delay device. The DATA is presented in a parallel format to the parallel input pins PA to PD and then shifts it to the corresponding output pins QA to QD when the registers are clocked.
4-bit Parallel-in/Parallel-out (PIPO) Shift Register
As with the Serial-in to Serial-out shift register, this type of register also acts as a temporary storage device or as a time delay device, with the amount of time delay being varied by the frequency of the clock pulses.
Today, high speed bi-directional universal type Shift Registers such as the TTL 74LS194, 74LS195 or the CMOS 4035 are available as a 4-bit multi-function devices that can be used in serial-serial, shift left, shift right, serial-parallel, parallel-serial, and as a parallel-parallel Data Registers, hence the name "Universal".
Multivibrators
Individual Sequential Logic circuits can be used to build more complex circuits such as Counters, Shift Registers, Latches or Memories etc, but for these types of circuits to operate in a "Sequential" way, they require the addition of a clock pulse or timing signal to cause them to change their state. Clock pulses are generally square shaped waves that are produced by a single pulse generator circuit such as a Multivibrator which oscillates between a "HIGH" and a "LOW" state and generally has an even 50% duty cycle, that is it has a 50% "ON" time and a 50% "OFF" time. Sequential logic circuits that use the clock signal for synchronization may also change their state on either the rising or falling edge, or both of the actual clock signal. There are basically three types of pulse generation circuits,
- Astable - has NO stable states but switches continuously between two states this action produces a train of square wave pulses at a fixed frequency.
- Monostable - has only ONE stable state and is triggered externally with it returning back to its first stable state.
- Bistable - has TWO stable states that produces a single pulse either positive or negative in value.
One way of producing a very simple clock signal is by the interconnection of logic gates. As a NAND gate contains amplification, it can also be used to provide a clock signal or pulse with the aid of a single Capacitor, C and Resistor, R which provides the feedback network. This simple type of RC Oscillator network is sometimes called a "Relaxation Oscillator".
Monostable Circuits.
Monostable Multivibrators or "One-Shot" pulse generators are used to generate a single output pulse, either "High" or "Low", when a suitable external trigger signal or pulse T is applied. This trigger signal initiates a timing cycle which causes the output of the monostable to change state at the start of the timing cycle and remain in this second state, which is determined by the time constant of the Capacitor, C and the Resistor, R until it automatically resets or returns itself back to its original (stable) state. Then, a monostable circuit has only one stable state. A more common name for this type of circuit is the "Flip-Flop".
NAND Gate Monostable Circuit.
Suppose that initially the trigger input T is High at a logic level "1" so that the output from the NAND gate U1 is Low at logic level "0". The resistor, R is connected to a voltage level equal to logic level "0", which will cause the capacitor, C to charge or discharge so that junction V1 is equal to this voltage, and the output from NAND gate U2 which is connected as an inverting NOT gate is also fed back to one input of U1 is at logic level "1". Since both junction V1 and the output of U1 are both at logic "0" no current flows in the capacitor C and this results in the circuit being Stable and will remain in this state until the trigger input T changes.
If a logic level "0" pulse is now applied to the trigger input of NAND gate U1 the output of U1 will go High to logic "1" (NAND gate principles). Since the voltage across the capacitor cannot change instantaneously (capacitor charging principals) this will cause the junction at V1 and also the inputs to U2 to go High, which inturn will make the output of the NAND gate U2 go Low to logic "0" The circuit will remain in this state even if the trigger input pulse T is removed. This is known as the Meta-stable state.
The voltage across the capacitor will now increase as the capacitor C charges up from the output of U1 at a time constant determined by the resistor/capacitor combination, until the junction at V1 reaches a logic "0" (less than the 2.0v threshold) level causing the output of U2 to switch High again, logic "1", which inturn causes the output of U1 to go Low and the capacitor discharges under the influence of resistor R. The circuit is now back to its original stable state.
The length of the output time period is determined by the capacitor/resistor combination (RC Network) and is given as the Time Constant T = 0.7RC of the circuit in seconds.
As well as the NAND gate monostable type circuit above, it is also possible to build simple Monostable timing circuits that start their timing sequence from the Rising-edge of the trigger pulse using NOT gates, NAND gates and NOR gates connected as inverters as shown below.
NOT Gate Monostable Circuit.
As with the NAND gate circuit above, initially the trigger input T is High at a logic level "1" so that the output from the first NOT gate U1 is Low at logic level "0". The resistor, R and the capacitor, C are connected together in parallel and also to the input of the second NOT gate U2. As the input to U2 is Low at logic "0" its output at Q is High at logic "1".
When a logic level "0" pulse is applied to the trigger input T of the first NOT gate it changes and produces a logic level "1" output. The diode D1 passes this logic "1" voltage level to the RC network and the voltage across the capacitor, C increases rapidly to this new voltage level, which is also connected to the input of the second NOT gate. This inturn outputs a logic "0" at Q and the circuit stays in this Meta-stable state as long as the trigger input T applied to the circuit remains Low.
When the trigger signal goes High, the output from the first NOT gate goes Low to logic "0" (NOT gate principals) and the Capacitor, C starts to discharge itself through the Resistor, R connected across it. When the voltage across the capacitor drops below the lower threshold value of the input to the second NOT gate, its output switches back again producing a logic level "1" at Q. The diode D1 prevents the capacitor from discharging itself back through the first NOT gates output.
Then, the Time Constant for a NOT gate Monostable Multivibrator is given as T = 0.8RC + Trigger in seconds.
One main disadvantage of Monostable Multivibrators is that the time between the application of the next trigger pulse T has to be greater than the RC time constant of the circuit.
Astable Circuits.
Astable Multivibrators are a type of "free running oscillator" that have no permanent "Meta" or "Steady" state but are continually changing there output from one state ("LOW") to the other state ("HIGH") and then back again to its original state. This continual switching action from "HIGH" to "LOW" and "LOW" to "HIGH" produces a continuous square wave output whose timing cycle is determined by the time constant of the Resistor-Capacitor, (RC Network) connected to it.
NAND Gate Astable Multivibrators
The two NAND gates are connected as inverting NOT gates. Suppose that initially the output from the NAND gate U2 is High at logic level "1", then the input must therefore be Low at logic level "0" (NAND gate principles) as will be the output from the first NAND gate U1. Capacitor, C is connected between the output of the second NAND gate U2 and the other side to logic level "0" via the Resistor, R. The capacitor now charges up at a rate determined by the time constant of R and C.
As the Capacitor, C charges up, the junction between the Resistor R and the Capacitor, C, which is also connected to the input of the NAND gate U1 decreases until the lower threshold value of U1 is reached at which point U1 changes state and the output of U1 now becomes High. This causes NAND gate U2 to also change state as its input has now changed from logic "0" to logic "1" resulting in the output of NAND gate U2 becoming Low, logic level "0". Capacitor C is now reverse biased and discharges itself through the input of NAND gate U1. Capacitor, C charges up again in the opposite direction determined by the time constant of both R and C until it reaches the upper threshold value of NAND gate U1. This causes U1 to change state again and the cycle repeats itself.
Then, the Time Constant for a NAND gate Astable Multivibrator is given as T = 2.2RC in seconds with the output frequency given as f = 1/T.
For example: If the Resistor R = 10kΩ and the Capacitor C = 45nF the oscillation frequency will be,
then the output frequency is calculated as being 1kHz, which equates to a time constant of 1mS so the output waveform would look like: |
Bistable Circuits.
In a Bistable Multivibrators circuit, both states are stable, and the circuit will remain in either state indefinitely. This type of Multivibrator circuit passes from one state to the other "Only" when a suitable external trigger pulse T is applied and to go through a full "SET-RESET" cycle two triggering pulses are required. This type of circuit is also known as a "Bistable Latch", "Toggle Latch" or simply "T-latch".
NAND Gate Bistable Multivibrator.
The simplest way to make a Bistable Latch is to connect together a pair of Schmitt NAND Gates as shown above. The two NAND Gates, U2 and U3 form a SET-RESET (SR) Bistable which is triggered by the input NAND Gate, U1. This U1 NAND Gate can be omitted and replaced by a single toggle switch to make a switch debounce circuit as seen previously in the SR Flip-flop tutorial. When the input pulse goes "LOW" the Bistable latches into its "SET" state, with its output at logic level "1", until the input goes "HIGH" causing the Bistable to latch into its "RESET" state, with its output at logic level "0". The output of the Bistable will stay in this "RESET" state until another input pulse is applied and the whole sequence will start again.
Then a Bistable Latch or "Toggle Latch" is a two-state device in which both states either positive or negative, (logic "1" or logic "0") are stable.
Bistable Multivibrators have many applications such as frequency dividers, counters or as a storage device in computer memories but they are best used in circuits such as Latches and Counters.
555 Timer Circuit.
Simple Monostable or Astable timing circuits can now be easily made using standard waveform generator IC's in the form of relaxation oscillators by connecting a few passive components to their inputs with the most commonly used waveform generator type IC being the classic 555 timer.
The 555 Timer is a very versatile low cost timing IC that can produce a very accurate timing periods with good stability of around 1% and which has a variable timing period from between a few micro-seconds to many hours with the timing period being controlled by a single RC network connected to a single positive supply of between 4.5 and 16 volts. The NE555 timer and its successors, ICM7555, CMOS LM1455, DUAL NE556 etc, are covered in the 555 Oscillator tutorial and other good electronics based websites, so are only included here for reference purposes. The 555 connected as an Astable oscillator is given below.
NE555 Astable Multivibrator.
Here the 555 timer is connected as a basic Astable Multivibrator circuit. Pins 2 and 6 are connected together so that it will retrigger itself on each timing cycle, thereby functioning as an Astable oscillator. Capacitor, C1 charges up through Resistor, R1 and Resistor, R2 but discharges only through Resistor, R2 as the other side of R2 is connected to the Discharge terminal, pin 7. Then the timing period of t1 and t2 is given as:
- t1 = 0.693 (R1 + R2) C1
- t2 = 0.693 (R2) C1
- T = t1 + t2
The voltage across the Capacitor, C1 ranges from between 1/3 Vcc to 2/3 Vcc depending upon the RC timing period. This type of circuit is very stable as it operates from a single supply rail resulting in an oscillation frequency which is independent of the supply voltage Vcc.
This comment has been removed by the author.
ReplyDeleteThis article is a blatant plagiarised copy of my own website at: http://www.electronics-tutorials.ws/sequential/seq_1.html. Pursuant to the DMCA Online Copyright Agreement,17 USC 512, this communication serves as a statement that the use of this material in such a fashion as to appear to be your own work was not authorized by me, the copyright holder and makes no reference to the original article by name or hyperlink. I hereby request that you remove this material and any other articles as they appear on your website as soon as possible or you will be reported to Google and your site WILL be removed from Blogger and banned from the search results. YOU HAVE BEEN WARNED!
ReplyDelete