0% found this document useful (0 votes)
94 views11 pages

P1.2.6 Random Number Generator

Uploaded by

bogdanbalanoiu1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views11 pages

P1.2.6 Random Number Generator

Uploaded by

bogdanbalanoiu1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Project 1.2.

6 Part 1 - Understanding Analog Design:


The Random Number Generator
Introduction
The field of analog electronics is a unique discipline, distinct from the study of digital
electronics. We have only scratched the surface of what you would learn if you continued
your studies in this area. This project will be the last activity in our brief journey into the
world of analog electronics.

In this activity you will use the Circuit Design Software (CDS) to build and test the
complete analog section of the Random Number Generator design.

Equipment
Circuit Design Software (CDS)

Procedure
Shown below is the analog section of the Random Number Generator.

Analog Section - Random Number Generator

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 1
Unfortunately, there are two issues with simulating this circuit as shown.
First, it is difficult to obtain accurate simulation results using the push button switch (S1).
Additionally, the 100 f capacitor (C1) causes the simulation to run too long.

To fix these issues, we must make two simple changes to the circuit. First, replace the
push button switch with an SPST switch. Second, change the 100 f capacitor to 50 f.
These changes are shown below. Also shown are the oscilloscope connections
(highlighted).

Figure 1: Replace this with your circuit and label.


Modified Analog Section – Random Number Generator

1. Using the Circuit Design Software (CDS), enter the modified analog section of
the Random Number Generator shown. Replace the picture above with your
version once finished. Remember to use different color wires to differentiate
each signal. (power, ground, oscilloscope channels)

2. With the switch closed, start the simulation.

3. Open the oscilloscope tool and adjust the scale of the time base and channels so
that the three signals are easy to see and measure (see below).

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 2
Figure 2: Replace this with your oscilloscope and label
4. Restart the simulation.

5. After the first few square waves are observed on the output signal, open the
switch. Let the simulation run until the output signal stops oscillating. When the
oscillation stops, stop the simulation. This may take a few minutes.

6. Adjust the oscilloscope to display the third or fourth square wave of the output
signal. Using the oscilloscope’s markers, measure the period of this signal. Use
this data to calculate the frequency. Record your result in the table.

Signal Period Frequency

First Square Wave 15.5ms 65Hz

Middle Square Wave 27.5ms 36Hz

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 3
Last Square Wave 51.6ms 19Hz

Conclusion
1. When you press the push button of the Random Number Generator, the 555 Timer
oscillates at approximately 65 Hz. If you want the oscillation to start at 100Hz, what
value would you apply to C2?
T = 1/f = 1/100Hz = .01seconds
T = 0.693(RA + 2RB)C
C = T / .693(RA + 2RB)
C = (.01Seconds)/((.693)(10000 ohms + 36000 ohms)))
C = 313 nF
2. The values of R9 & C1 determine the time from when the push button is released to
when the oscillation stops. If you wanted to lengthen this time period, what changes
would you make to one or both of these components? Explain.
Increase the resistance because the lower the current is, the longer time the capacitor
takes to charge. You could also increase the capacitance because then it also takes longer
to charge.

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 4
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 5
Project 1.2.6 Part 2 - Understanding Digital Design:
The Random Number Generator
Introduction
The Random Number Generator will be your first exposure to a fully developed circuit design
that includes an analog section, a digital combinational logic section, and a digital sequential
logic section. Combinational logic and sequential logic are the basic building blocks of all
digital electronics and the topics of study for the majority of this course.

In this activity you will use the Circuit Design Software (CDS) to build and test the complete
digital logic section of the Random Number Generator design.

Equipment
Circuit Design Software (CDS)

Procedure
Since we learned how the digital electronics of the Random Number Generator worked by
analyzing its sequential and combinational logic sections separately, we will construct and
simulate the device the same way. We will begin with the combinational logic section.

1. Using the Circuit Design Software (CDS), enter the combinational logic section of the
Random Number Generator shown below. For testing purposes connect three
switches for the inputs A, B, and C.

Figure 3: Replace with your circuit and label


Combinational Logic Section – Board Game Counter

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 6
a. Start the simulation.

b. Toggle the switches and complete the truth table shown below.

A B C L1 L2 L3 L4 L5 L6 L7

0 0 0 0 0 1 0 5 0 0

0 0 1 0 0 0 1 0 0 0

0 1 0 0 0 1 0 1 0 0

0 1 1 1 0 0 1 0 0 1

1 0 0 1 0 1 0 1 0 1

1 0 1 1 0 1 1 1 0 1

1 1 0 1 1 1 0 1 1 1

1 1 1 1 1 1 1 1 1 1

c. Did the outputs for the inputs 000 and 111 make sense?
Does it matter?
Yes

2. Now that the combinational logic section is working, let’s construct and simulate the
sequential logic section. Using the Circuit Design Software (CDS), enter the sequential
logic section of the Random Number Generator shown below. For the initial analysis,
we will use a switch to generate the signal CLOCK.

Figure 4: Replace with your circuit and label.


Sequential Logic Section – Random Number Generator

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 7
Start the simulation.
a) Cycle the input CLOCK several times until the initial value is 001. Cycle the
input CLOCK and record the value of the outputs A, B, and C in the table
shown below. (Remember 1 Cycle = 2 Toggles of the switch)

CLOCK A B C
Initial Values 0 0 1
1st Cycle 1 0 1
2nd Cycle 0 1 1
3rd Cycle 1 0 0
4th Cycle 0 1 0
5th Cycle 1 1 0
6st Cycle 0 0 1
7th Cycle 1 0 1

b) Is the counter counting as expected (see below)? If not, check your circuit to
make sure that it was built correctly. Make any necessary corrections and
repeat steps (a) and (b).

c) Modify the circuit by replacing the input switch with a CLOCK_VOLTAGE set to
5 volts, 50% duty cycle @ 50 Hz (see below). The CLOCK_VOLTAGE will
continuously toggle the input, causing the output to repeatedly cycle through the
count 001 to 110.

Figure 5: Replace with your circuit and label.

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 8
Sequential Logic Section – Random Number Generator

d) Start the simulation.

e) Observe the outputs A, B, and C. They should be cycling through the following
pattern:

f) Is the counter counting as expected? If not, check your circuit to make sure that
it was built correctly.
Make any necessary corrections and repeat steps (e) and (f).

3. Finally, let’s connect the combinational and sequential logic sections together to
complete the Random Number Generator.

a) Using the combinational logic and sequential logic sections created in Part 1
and steps (1) and (2) enter the circuit shown below into the Circuit Design
Software (CDS).
b) Link to your multisim file in OneDrive (make sure it is properly shared with
me):
Link: 1.2.6 (3).msjs

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 9
Figure 6: Replace with your circuit and label.
Combinational & Sequential Logic Section – Random Number Generator

b) Start the simulation.

c) Observe the outputs L1, L2, L3, L4, L5, L6, and L7. They should be cycling
through the following pattern:

d) Are the outputs working as expected? If they are not, check your circuit to make
sure that it was built correctly. Make any necessary corrections and repeat
steps (b) and (c).

Yes they are.

Conclusion

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 10
3. The combinational logic used in the Random Number Generator was AOI logic. What
are three gates that are used to implement AOI logic?
AND OR INVERTER

4. On the 74LS74 D flip-flop, the CLK input has a small triangle. The PR (preset) and
CLR (clear) inputs have a circle. What do these symbols mean?
The clock signal triggers when it changes from low to high.

5. What is the primary characteristic that differentiates combinational and sequential


logic?

Combinational logic is basically what do you want to occur and sequential logic is based on
when you want to do something.

© 2014 Project Lead The Way, Inc.


Digital Electronics Project 1.2.6 Understanding Analog Design: The Random Number Generator – Page 11

You might also like