Anda di halaman 1dari 8

# Project 1.2.

## 7 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.

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 1

VCC
5V

S1

Key = A
S2

LED8

U14A

Key = B

LED12
R8

U12A
S3

LED9

U13B

LED11

74LS08N

GND

180
GND

74LS08N
Key = C

R12

180

74LS32N

LED13

R9

R11

R13

180

180

180

GND

GND

LED14

74LS32N

74LS04N

GND

LED10

U16A

U15A

GND

R10

R14

180

180
GND

GND

## a. Start the simulation.

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

L1

L2

L3

L4

L5

L6

L7

c. Did the outputs for the inputs 001 thru 110 display what was expected? If they
didnt, check your circuit to make sure that it was built correctly. Make any
necessary corrections and repeat steps (a) and (b).
d. Did the outputs for the inputs 000 and 111 make sense?
Does it matter?
Yes

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 2

2. Now that the combinational logic section is working, lets 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.

VCC

5V
2.5 V

U1A

VCC
2

5V
S1

12

1CLK

~1Q

11

~1CLR

Key = C

2CLK

~1PR
2Q

~2Q

2D

13

1Q

~1Q

1D

1CLK

~2CLR

74LS74N

2.5 V

U3A

~2PR
1Q

1D

U2B

10

~1PR

2.5 V

~1CLR

74LS74N

74LS74N

GND
U4A

U5A

74LS04N

74LS08N

U6A
74LS08N

## Sequential Logic Section Random Number Generator

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

Initial Values

st

1 Cycle

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 3

2nd Cycle

3rd Cycle

th

th

5 Cycle

6st Cycle

7th Cycle

4 Cycle

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.

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 4

VCC

5V
2.5 V

U1A

V1
50 Hz
5V

12

1CLK

~1Q

11

~1CLR
1

2CLK

~1PR
2Q

~2Q

2D

~2CLR

74LS74N

13

2.5 V

U3A

~2PR
1Q

1D

U2B

10

~1PR

2.5 V

1Q

~1Q

1D

1CLK

~1CLR

74LS74N

74LS74N

GND
U4A

U5A

74LS04N

74LS08N

U6A
74LS08N

## 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, lets 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 steps (1)
and (2) enter the circuit shown below into the Circuit Design Software (CDS).

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 5

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 6

VCC

5V
2.5 V

U1A

V1

12

1CLK

~1Q

11

~1CLR

50 Hz
5V

2CLK

~1PR
2Q

~2Q

2D

~2CLR

74LS74N

13

2.5 V

U3A

~2PR
1Q

1D

U2B

10

~1PR
2

2.5 V

1D

1Q

1CLK

~1Q

~1CLR

74LS74N

74LS74N

GND
U4A

U5A

74LS04N

74LS08N

U6A
74LS08N

U9A

LED1

U7A
74LS32N

LED5
R1

R5

180

180
GND

74LS08N
LED2

U8B
74LS08N

U10A
74LS04N

LED4

U11A
74LS32N

LED6

R2

R4

R6

180

180

180

GND

LED3

GND

GND

GND

LED7
R3

R7

180

180
GND

GND

## 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).

Conclusion
1. The combinational logic used in the Random Number Generator was AOI logic. What
are three gates that are used to implement AOI logic?
OR, AND, and Inverter
2014 Project Lead The Way, Inc.
Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 7

2. 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?
Small triangle output
Circle NOT

## 3. What is the primary characteristic that differentiates combinational and sequential

logic?
Sequential depends on previous inputs. Combinational does not.

## 2014 Project Lead The Way, Inc.

Digital Electronics Project 1.2.7 Understanding Digital Design: Random Number Generator Page 8