Sei sulla pagina 1di 8

EGR 278

Digital Logic Lab


File: N278L9A
Lab # 9
Multivibrators
A. Objective
The objective of this laboratory is to introduce the student to the use of bistable multivibrators
(flip-flops), monostable multivibrators (one-shots), and astable multivibrators (clock generators).
Switch debouncing is also investigated.

B. Materials
Breadboard
5V Power Supply
Oscilloscope
555 Timer IC
7476 Dual JK Flip-flop
Assorted AND, OR, NAND, NOR, XOR, and INVERTER ICs
Assorted resistors and capacitors available in lab

C. Introduction

Multivibrators
A multivibrator is a circuit whose output oscillates between logic HIGH and LOW states, either
automatically or due to some input. There are three types of multivibrators:
1) Bistable multivibrators (flip-flops) - These devices have two stable states (Q = 0 and Q =
1). They can easily be switch from one stable state to the other.
2) Monostable multivibrators (one-shots) - These devices have one stable state, but they may
enter another unstable state for a certain period of time.
3) Astable multivibrator (clock generator) - These devices oscillate between two unstable
states, forming a clock (square wave generator).

Flip-Flops
A flip-flop is the simplest type of memory cell. Its output, Q, does not depend solely upon its
inputs, but also depends on the order in which they are applied. Thus, the flip-flop is not a
combinational circuit, but is a sequential circuit. The flip-flop is the key building block of most
synchronous sequential circuits. There are four common types of flip-flops. The symbol and
truth table for each is shown below.

SR flip-flop: JK flip-flop: D flip-flop: T flip-flop:

S Q J Q D Q T Q
CK CK CK CK
R Q K Q Q Q

S R Q(t+1) J K Q(t+1) D Q(t+1) T Q(t+1)


0 0 Q(t) (no change) 0 0 Q(t) (no change) 0 0 0 Q(t) (no toggle)
0 1 0 (reset) 0 1 0 (reset) 1 1 1 Q(t) (toggle)
1 0 1 (set) 1 0 1 (set)
1 1 -- (illegal) 1 1 Q(t) (toggle) [or Q(t+1) = D]

Figure 1: Four common types of flip-flops


Page 2

Flip-flops are synchronous devices meaning that the output responds to the synchronous inputs
(S, R, J, K, D, or T) only on certain clock edges. There are three main types of triggering:
1) positive-edge triggering - the output Q can only change on the positive (rising) edge of the
clock (due to the values of the synchronous inputs).
2) negative-edge triggering - the output Q can only change on the negative (falling) edge of the
clock (due to the values of the synchronous inputs).
3) master-slave triggering - the synchronous inputs are read on the positive edge of the clock,
but the output Q does not respond until the negative edge of the clock.

The type of triggering is sometimes indicated by the symbol. Shown below in Figure 2 are JK
flip-flops with all three types of triggering.
Positive-edge triggered: Negative-edge triggered: Master-slave triggered:

J Q J Q J Q

CK CK CK C
K Q K Q K Q

Figure 2: JK Flip-flops with different types of triggering

Flip-flops often have asynchronous inputs available also. These inputs are not synchronized with
the clock, therefore, the output may respond immediately to changes in these inputs. There are
two types of asynchronous inputs commonly used:
1) PRESET (also called SET) - used to preset the output Q to 1
2) CLEAR (also called RESET) - used to clear the output (set Q to 0)

Asynchronous inputs are often active-LOW. Therefore, they are typically tied HIGH for normal
flip-flop operation. The PRESET or CLEAR may be momentarily set LOW to initialize the flip-
flop to some desired initial value. The symbol for a flip-flop often show the asynchronous inputs
as indicated below in Figure 3.

PR
J Q
CK
K Q
CL

Figure 3: JK Flip-flops with asynchronous PRESET and CLEAR inpu


Page 3

Debounced Switches
If the input to a flip-flop or sequential circuit is applied with a switch, it is important that the
switch is debounced so that only a single transition occurs when the switch is thrown such as is
shown in Figure 4A. The contacts in a simple switch will bounce for several milliseconds before
settling down allowing several transitions to occur such as is shown in Figure 4B. Since a
negative-edge triggered flip-flop reacts to each falling edge of the input clock, the input in Figure
4A would clock the flip-flop only once, whereas the input in Figure 4B would clock the flip-
flop three times.
switch switch
thrown thrown

HIGH HIGH HIGH HIGH

LOW LOW LOW LOW


t t
Figure 4A - Debounced switch Figure 4B - Switch with contact bounce

Figure 5 shows three circuits that can be used to debounce switches.

7400 output
PR
J Q output

CK
K Q output 7400 output
CL

Figure 5A: Debounced switch using a JK flip-flop Figure 5B: Debounced switch using NAND gates

output

output

Figure 5C: Debounced switch using inverters


Page 4

555 Timer
The 555 timer circuit is a popular IC that can be used to implement astable and monostable
multivibrator circuits as well as other circuits. The 555 is a linear IC (like an operational
amplifier or a voltage regulator) rather than a digital IC, thus it does not necessarily use TTL
voltage levels. In fact, the supply voltage for the 555 can range from 4.5V to 18V. If a 5V supply
if used, it can easily interface with TTL circuits. A simplified equivalent circuit for the 555 timer
is shown below in Figure 6.
Vcc Reset
8 4

6 Threshold
Upper
Comparator
_
2V
Control 3 cc +
5
Voltage 7 Discharge
Q
flip-
flop
1V _
3 cc

+ Output 3 Output
Driver
Lower
Comparator
Trigger 2

1
Ground

Figure 6: 555 Timer Simplified Block Diagram

555 Timer configured as an astable multivibrator


The 555 timer configured as an astable multivibrator (clock generator) is shown below in Figure
7. The device operates essentially as follows:
1) The capacitor C charges until it reaches (2/3)Vcc causing the upper comparator to CLEAR the
flip-flop (which sets the output LOW).
2) The capacitor C discharges until it reaches (1/3)Vcc causing the lower comparator to PRESET
the flip-flop (which sets the output HIGH).

Vcc

8 4
R
A Vcc Reset
7 Discharge
Output 3
R
B
Control
6 Threshold Voltage 5

C Trigger Ground 0.01 uF


2 1

Figure 7: 555 Timer connected as an astable multivibrator (clock generator)


Page 5

Shown in Figure 8 are the capacitor and output waveforms for the astable multivibrator (clock
generator).
Capacitor
Voltage
2 -t/[(R + R )C] 1
Vcc [1 - e A B ] + Vcc
Vcc 3 3
2 -t/( R BC)
Vcc e
2 V 3
cc
3
1 V
cc
3

0 time

Output
Voltage
T
Vcc

T
H
T
L
time
0
Figure 8: Capacitor and output waveforms for an astable multivibrator (clock generator)

The charge time is given by: TH = 0.693(R A + R B )C

The discharge time is given by: TL = 0.693(R B )C

The total period is given by: T = TH + TL = 0.693(R A + 2R B )C

1.44
The frequency of oscillation is given by: f =
(R A + 2R B )C

TH RA + RB
And the duty cycle is given by: D = = x 100%
T R A + 2R B

Note that a 50% duty cycle can be almost achieved by picking RB >> RA .

Example: If C = 0.1 F, RA = 5 k, and RB = 4.4 k,


then TH = 651.4 s, TL = 304.9 s, T = 956.3 s, f = 1046 Hz, and D = 68.1 %

555 Timer configured as a monostable multivibrator


A monostable multivibrator (one-shot) is a device that will output a HIGH pulse for a specified
duration of time each time that the input is triggered. The 555 timer configured as a one-shot is
shown below in Figure 9. The device operates essentially as follows:
1) An input trigger causes the lower comparator to SET the flip-flop which makes the output
HIGH and turns OFF the transistor which allows the capacitor to begin charging.
2) The capacitor C charges until it reaches (2/3)Vcc causing the upper comparator to CLEAR the
flip-flop which shorts out the capacitor and forces the output LOW.
Page 6
Vcc

8 4
R
Vcc Reset
7 Discharge
Output 3 output

C
Control
6 Threshold Voltage 5
input Trigger Ground 0.01 uF
trigger 2 1
pulse

Figure 9: 555 Timer connected as a monostable multivibrator (one-shot)

Shown in Figure 10 are the input trigger, capacitor, and output waveforms for the monostable
multivibrator (one-shot).
Input
Trigger
Voltage
falling edge triggers the one-shot
Vcc

0 time

Capacitor
Voltage
-t/(RC)
Vcc [1 - e ]
Vcc

2 V
cc
3

0 time

Output
Voltage
Vcc

0 time

Figure 10: Input trigger, capacitor, and output waveforms for a monostable multivibrator (one-shot)

The width of the pulse is given by : T = 1.1RC (solve for t when Vcc[1 - e -t/RC] =
(2/3)Vcc )

Example: If C = 0.1 F and R = 47 k, then T = 1.1(47 k)(0.1 F) = 5.17 ms.


So, each time the one-shot is triggered, an output pulse with a duration of 5.17 ms is produced.
Page 7

D. Preliminary Work
1. Design a one-shot using a 555 timer that will generate an output pulse that is HIGH for
A.BC seconds, where A, B, and C are the last 3 non-zero unique digits of your SSN in Hz.
For example, if your SSN is 144-86-8443, then the output pulse should last for 8.43
seconds. Pick a capacitor value that is available in lab (see the list of available capacitor
values in the Pinouts handout) or use a capacitor value that you have and use resistance
values between 1k and 1 M. Generate full circuit documentation for the circuit.
Include a debounced switch at the input and an LED at the output.
2. Design a clock generator using a 555 timer that will generate a clock with a frequency equal
to the last 3 non-zero digits of your SSN in Hz. For example, if your SSN is 144-86-8443,
then the frequency is 843 Hz.. Use a duty cycle that is somewhat close to 50% (calculate its
exact value). Pick a capacitor value that is available in lab (or one that you have) and use
resistance values between 1k and 1 M. Generate full circuit documentation for the
circuit.

E. Laboratory Work
1. Construct a debounced switch using 2 NAND gates as shown in Figure 5B. Test its
operation (simply to see if it produces HIGH and LOW outputs as the switch is moved).
2. Connect a JK flip-flop using a 7476 and test it to complete the truth table shown below.
Use a debounced switch to clock the flip-flop. Were the results as expected?
Q(t) J K Q(t+1)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
3. Connect the one-shot designed in step 1 of the Preliminary Work according to the wire
table generated. Measure the exact value of all resistors and capacitors used. Record
the designed values and the measured values in a table. Test the one-shot and record the
duration of the output pulse and compare it to the designed value. Demonstrate proper
operation of the circuit to the instructor. In your report, recalculate the expected time for
the output using the measured component values and compare the time to measured using
a stop watch in lab.
4. Connect the clock generator designed in step 2 of the Preliminary Work according to the
wire table generated. Measure the exact value of all resistors and capacitors used.
Record the designed values and the measured values in a table. View and accurately
sketch the output clock pulse and the capacitor voltage. Measure values for TH, TL, T, D,
and f from the oscilloscope. Compare these to calculated values using measured
component values. Demonstrate proper operation of the circuit to the instructor.
Page 8

5. Connect the output of the clock generator in the previous step to the clock input of a JK
flip-flop in the toggle mode as shown in Figure 11. View the output of the clock
generator and the output of the flip-flop simultaneously (the clock output near the top of
the screen and the flip-flop output near the bottom) and accurately sketch the results.
From the sketch can you tell if the flip-flop is positive or negative edge triggered?
Discuss how the frequency of the flip-flop output compares with the frequency of the
clock output. A JK flip-flop in the toggle mode is sometimes called a divide-by-2 circuit.
Why?

555 output 1 J Q
timer
clock 1 K Q
generator

Figure 11: 555 clock generator and JK flip-flop in the toggle mode (J = K = 1)

Potrebbero piacerti anche