Docsity

Preface, Custom Remote Control - Digital Logic Design Lab | ECE 272, Lab Reports of Electrical and Electronics Engineering

Partial preview of the text

Download Preface, Custom Remote Control - Digital Logic Design Lab | ECE 272 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

E

EC

CE

E

D

D

I

IG

GI

IT

TA

AL

L

L

L

O

OG

GI

IC

C

D

D

E

ES

SI

IG

GN

N

A TekBots Course

Copyright Information Copyright © 2008Oregon State UniversitySchool of Electrical Engineering & Computer Science (EECS)This document is the property of Oregon State University and the School of EECS. Limited use of this document is allowed,according to the following criteria:Materials are free to use, except for the cost of reproduction, and must always bear this statement in any reproduction.Materials created using this information may not be labeled as TekBots’ materials, without the prior written consent of bothOregon State University and the School of EECS. Disclaimer of Liability Oregon State University, Platforms for Learning, TekBots and other partner schools are not responsible for special,consequential, or incidental damages resulting from any breach of warranty, or under any legal theory, including lost profits,downtime, goodwill, damage to, or replacement of equipment or property, or any costs of recovering, reprogramming, orreproducing any data stored in or used with our products. The aforementioned parties are also not responsible for any personaldamage, including that to life and health, resulting from use of any of our products. You take full responsibility for yourproduct/ application, no matter how life-threatening it may be. Internet Access We maintain Internet systems for your use. They can be used to obtain free TekBots’ software and documentation and also topurchase TekBots’ products. These systems may also be used to communicate with members of TekBots and other customers.Access information is shown below: E-mail:

[email protected]

Web:

http://eecs.oregonstate.edu/education/tekbots.html

Contents

Page ii

ECE 272 Manual

© 2008 Oregon State University

Schematic Design Entry ........................................................................................................................... 29

Add a 2-input AND gate ....................................................................................................................................... 30

Verifying the Design Files ........................................................................................................................ 34 Design Adaptation to the Target Device (Digital Logic Board)

............................................................ 35

Synthesize the design into a JEDEC file.

.............................................................................................................. 37

Study Questions/ Turn-In ...................................................................................................................... 39 Challenge ................................................................................................................................................. 40

S

S

EEC

CT

TI

IO

ON

N

T

T

H HR

RE

EE

E

D

D

I IG

GI

IT

TA

AL

L

AA

PPP

PL

LI

IC

CA

AT

TI

IO

ON

NS

S

((C

C

U US

ST

TO

OM

M

R

R

EEM

MO

OT

TE

E

C

C

O ON

NT

TR

RO

OL

L

Section Overview

..................................................................................................................................... 48

Objectives .................................................................................................................................................. 48 Materials .................................................................................................................................................... 48

Procedure

................................................................................................................................................. 49

The Design Process ................................................................................................................................... 49

Step One – Understand the problem ..................................................................................................................... 51 Step Two - Identify Constraints ............................................................................................................................ 52 Step Three - Incorporate Constraints .................................................................................................................... 53 Step Four - Refining the Design............................................................................................................................ 53

Building the Design

................................................................................................................................... 54

Study Questions/ Turn in ....................................................................................................................... 57 Challenges

................................................................................................................................................ 58

S

S

EEC

CT

TI

IO

ON

N

F

F

O OU

UR

R

C

C

O OM

MB

BI

IN

NA

AT

TI

IO

ON

NA

AL

L

SS

YYS

ST

TE

EM

MS

S

(B

B

I IN

NA

AR

RY

Y T

TO

O

S

S

EEV

VE

EN

N

S

S

EEG

GM

ME

EN

NT

T

D

D

IIS

SP

PL

LA

AY

Y

EE

NNC

CO

OD

DE

ER

R

Section Overview

..................................................................................................................................... 68

Objectives .................................................................................................................................................. 68 Materials .................................................................................................................................................... 68

Procedure

................................................................................................................................................. 69

Part One – Encoder Logic

........................................................................................................................ 69

Part Two – Build the system .................................................................................................................... 74

Study Questions/ Turn-In ...................................................................................................................... 78 Challenges

................................................................................................................................................ 78

S

S

EEC

CT

TI

IO

ON

N

F

F

I IV

VE

E

C

C

O OM

MB

BI

IN

NA

AT

TI

IO

ON

NA

AL

L

SS

YYS

ST

TE

EM

MS

S

S

S

EEM

MI

I

IIN

NT

TE

EL

LL

LI

IG

GE

EN

NT

T

R

R

E EM

MO

OT

TE

E

C

C

O ON

NT

TR

RO

OL

L

RR

OOB

BO

OT

T

Section Overview

..................................................................................................................................... 86

Contents

© 2008 Oregon State University

ECE 272 Manual

Page iii

Objectives .................................................................................................................................................. 86 Materials

.................................................................................................................................................... 86

Procedure

................................................................................................................................................. 87

Step One - Understand the Problem ....................................................................................................... 87 Step Two – Identify Constraints, Incorporate Constraints and Refine the Design ............................ 88 Step Three – Build the Design ................................................................................................................. 89

Study Questions/ Turn-In ...................................................................................................................... 93 Challenge ................................................................................................................................................. 93

S

S

EEC

CT

TI

IO

ON

N

S

S

IIX

X

S

S

TTA

AT

TE

E

M

M

AAC

CH

HI

IN

NE

ES

S

Section Overview

................................................................................................................................... 102

Objectives ................................................................................................................................................ 102 Materials

.................................................................................................................................................. 102

Procedure

............................................................................................................................................... 103

Study Questions/ Turn-In .................................................................................................................... 106 Challenge ............................................................................................................................................... 106

S

S

ECE

CT

TI

IO

ON

N

S

S

EVE

VE

EN

N

D

D

E ES

SI

IG

GN

N

P

P

RRO

OJ

JE

EC

CT

T

I

I.

Section Overview

................................................................................................................................... 114

The Design Project

................................................................................................................................ 114

Study Questions/ turn-in ...................................................................................................................... 116

S

S

EEC

CT

TI

IO

ON

N

E

E

I IG

GH

HT

T

D

D

E ES

SI

IG

GN

N

P

P

ROR

OJ

JE

EC

CT

T

I

II

I.

Section Overview

................................................................................................................................... 124

Procedure

............................................................................................................................................... 125

Designing the Transmitter ..................................................................................................................... 125

Establish start-and-stop bits ................................................................................................................................ 126

Designing the Receiver ........................................................................................................................... 131

Design a state diagram and describe a state machine

.......................................................................................... 132

Study Questions/ Turn-in ..................................................................................................................... 136

A

A

P PP

PE

EN

ND

DI

IX

X

A .A

Contents

© 2008 Oregon State University

ECE 272 Manual

Page v

S

S

TAT

AT

TE

E

M

M

ACA

CH

HI

IN

NE

ES

S

Getting Started with State Diagrams .................................................................................................... 170

Creating a State Diagram in StateCAD ............................................................................................................... 170

A

A

P PP

PE

EN

ND

DI

IX

X H

H

S

S

UPU

PP

PL

LI

IE

ER

RS

S

Preface

Page viii

ECE 272 Manual

© 2008 Oregon State University

H

HO

OW

W T

TO

O U

US

SE

E T

TH

HI

IS

S M

MA

AN

NU

UA

AL

L

During this course, various tasks will be performed from the assembly of electronic devices, and through the developmentprocess of digital logic controllers and systems. These tasks are divided into individual lab documents that correspond to whatis being taught in the Digital Logic Design lecture.Everything learned in lecture is relevant and useful in later (related) courses and in your future career. As various tasks areperformed in these labs, try to pay attention to how the lecture material relates to these tasks. Understanding how the lecturematerial is used and applied will greatly improve your understanding of the topics as well.

I

IM

MP

PO

OR

RT

TA

AN

NT

T S

SY

YM

MB

BO

OL

LS

S

During this lab and other TekBots labs, you will encounter the following symbols. So, review or acquaint yourself with thesesymbols, as they are widely used in this lab manual.

This symbol indicates an

important note

that should be remembered/ memorized.

Paying attention to notes like these will make tasks easier and more efficient.This symbol designates

caution

, and the information in this caution-table should be

read thoroughly, and adhered to, before moving ahead.If the caution warning is ignored, the task may appear impossible and/ or can lead todamaged TekBots and systems.This symbol represents something that helps you make your task easier by remindingyou to perform a particular task before the next step. These

reminder

symbols are

not normally critical things to complete, but can make things easier.The

innovation

symbol will give information to enrich your experience. These

sections will give more insight into the what, why, and how of the task being done.Use these to learn more, or to get ideas for cool innovations.

Preface

© 2008 Oregon State University

ECE 272 Manual

Page ix

L

LA

AB

B S

ST

TR

RU

UC

CT

TU

UR

RE

E

The entire lab is divided into various sections, in order to break up the tasks. Typically, each section will have the SectionOverview as the introductory paragraphs and information detailing the task in the Procedure paragraphs. Towards the end,weave Study Questions/ Turn-Ins (which will be your homework from this lab), and/ or Challenges.

L

LA

AB

B S

SA

AF

FE

ET

TY

Y

Safety is always important when working with electricity and electronics. This includes both the safety for you as well assafety for the circuit components you are working with. Concerns such as high voltage or currents can affect the human body,while static safety and proper component use can affect the life of your circuits. Personal Safety When working with high voltage s and currents, it is important that you remember that you can be hurt, if your body becomesthe 'circuit', since the human body is a conductor of electricity. This issue has long been combated by using the 'one hand rule.'Whenever you are working with a potentially dangerous circuit, turn it off, but if it cannot be turned off, use only one handwhen working on it. This will prevent a circuit from being made through your heart, which could be potentially fatal. Component Safety Many electrical components are likely to be damaged by static electricity. Static charge can build up to many thousands ofvolts, but with little energy. This cannot harm humans, but it can easily damage electronic components. To ensure static-safehandling, the best practice is to wear an anti-static strap and connect it to an earth ground such as a computer case or a waterpipe. If you do not have an anti-static wristband, you can instead touch a ground every few minutes to discharge your staticbuild up.

SectionOverview

The section overview briefly describes what will be learned in the section, and what will be done.

Procedure

The procedure portion of each section contains all of the tasks to be completed. All of these tasks arerelated to the corresponding lecture. Keeping this in mind will help in better understanding the lecture aswell as the lab material.

StudyQuestions

The study questions are intended to give more practice and insight into what has been learned in lab andlecture. Some of the study questions will be due in lab.

Challenges

The challenge sections of labs are for extra credit. Performing the tasks in the challenge sections willimprove understanding of what is being learned and will result in some cool TekBots and innovations.

Page 1 of 185

ECE 272 Manual

© 2008 Oregon State University

S

S

E

EC

CT

TI

IO

ON

N

O

O

NNE

E

Logic with 7400-Series Chips

Section One: Logic with 7400-Series Chips

Page 2 of 185

ECE 272 Manual

© 2008 Oregon State University

S

SE

EC

CT

TI

IO

ON

N O

OV

VE

ER

RV

VI

IE

EW

W

This lab uses discrete logic chips to construct circuits. Not too many years ago, this was the only method available. In laterlabs, you will be using a “complex programmable logic device” or CPLD to perform logic design.Following are the objectives and materials to get you prepared for this Lab: Objectives

Understand how logic gates work.

Learn to make truth tables for logic gates.

Learn to use data sheets for logic gate pin-outs, and to build a voltage regulator.

Remember how to use Ohm’s Law, and apply it to circuits.

Build logic circuits using discrete logic gates.

Materials

Three 7400-series chips: one 7408, one 7486, one 7432

One voltage regulator chip (LM78L05)

One 0.1uF capacitor, labeled “104”

One 0.33uF capacitor, labeled “334”

One Light-Emitting Diode (LED)

Resistors

Three switches

One breadboard

The power supply from your charged TekBot, or the power supplies in the lab

Your multi-meter

Section One: Logic with 7400-Series Chips

Page 4 of 185

ECE 272 Manual

© 2008 Oregon State University

E E

N NT

TE

ER

R

V V

AAL

LU

UE

ES

S F

FO

OR

R

:

Input Voltage

►

_________

Output Voltage

►

_________

Using the Voltage Regulator

Go to the class Web-site to find the datasheet for the voltage regulator (part number LM78L05).

Following are the steps for using the voltage regulator:

Read the

Features

and

Description

sections. (Don’t worry if you don’t understand some terms in these sections.

Often, the words and terms used will be explained in other places in the datasheet.)

Find the

Typical Applications

section. (Note that you have to scroll down a few pages.) This section of a datasheet

normally has circuits for the most common uses of the device. Note that for this lab, we want to build a circuit thatregulates voltage at only a single voltage.

Sketch the circuit from the

Typical Applications

section of the datasheet. Now that you have the schematic of the

circuit you want to build, you need to know the pin numbers of the physical device. Typically, the section of thedatasheet that describes the pinout is called

Connect Diagrams or Pinouts

. However, in this datasheet, the pinout of

the device is in the

Description

section.

Sketch the pinout for the device from the

Description

section.

On your breadboard, use the voltage regulator and the two capacitors to construct a voltage regulator that uses thepower from your charged TekBot as input. (If you have not charged your TekBot, then use the power supply in the labas input.) Make sure that there is a

common ground

between your TekBot and the voltage regulator circuit that you are

building.

With your multimeter, measure the input voltage and the output voltage. Record these values in the table below.Confirm that the output voltage is around 5V.

If you connect an inappropriate voltage to your circuit, you very well may damage yourcomponents.

Section One: Logic with 7400-Series Chips

© 2008 Oregon State University

ECE 272 Manual

Page 5 of 185

E E

N NT

TE

ER

R

V V

ALA

LU

UE

ES

S F

FO

OR

R

:

LED color

►

_______

Part Number

►

_________

E E

N NT

TE

ER

R

V V

AAL

LU

UE

ES

S F

FO

OR

R

:

Peak forward current through the LED

►


Continuous forward current through the LED

►

_________

P

PA

AR

RT

T 2

- M

MA

AK

KE

E T

TH

HE

E L

LE

ED

D L

LI

IG

GH

HT

T U

UP

P

The Light-Emitting Diode (LED) allows current to flow only in one direction. In this way, an LED is similar to other diodesyou have used. When sufficient current flows through the LED, it will produce light. In this lab, we use LEDs to indicate theflow of current.Before building the circuit, as shown in Figure 2, we need to calculate the value of R1. In this circuit, R1 is called a

current

limiting resistor

. It prevents too much current from flowing through the LED.

Figure 2: Simple LED circuit

Find the section in the LED datasheet called

Absolute Maximum Ratings

. From this, note down the maximum current

value to use with this LED. Write this maximum current value below:

Following are the steps to make the LED light up:

Find the datasheet for the LED. There should be either a red,yellow, or a green LED in your kit. Note that for this datasheet,the red LED is called “HER”. The datasheet for these parts islocated on the class website. Record the color and part numberof the LED you are using, in the table below:

Section One: Logic with 7400-Series Chips

© 2008 Oregon State University

ECE 272 Manual

Page 7 of 185

E E

N NT

TE

ER

R

V V

ALA

LU

UE

ES

S F

FO

OR

R

:

Calculated value for R

►

_______

Ω

Actual value used for R

►

_______

Ω

Part 2: Make the LED Light Up (Contd.)

Show your calculations to your TA, and ask for a resistor with the calculated value for R1. A resistor with the exactvalue you calculate may not be available, because resistors only come in standard values. Use the resistor with theclosest R1 value available. You may need to use a combination of resistors, in series or in parallel, to arrive at the R1value.

Build the circuit on your breadboard. Note that Vcc is the additional 5V from the output of the voltage regulator. Testthis circuit. Does the LED light up?

____________.

If it does not light up, check your work or consult the TA to fix it before moving on to Part 3.

If you do not remember the resistor color code, you may find some good Web-sites that providethis information. Be careful not to use a resistor that allows excess current to flow through the LED.

Section One: Logic with 7400-Series Chips

Page 8 of 185

ECE 272 Manual

© 2008 Oregon State University

E E

N NT

TE

ER

R

V V

ALA

LU

UE

ES

S F

FO

OR

R

:

Voltage at A when the switch is open(when the button is NOT pushed)

►


V

Voltage at A when the switch is closed(when the button is pushed)

►


V

P

PA

AR

RT

T 3

- M

MA

AK

KE

E T

TH

HE

E S

SW

WI

IT

TC

CH

H W

WO

OR

RK

K

Figure 3: Simple Active High Switch

Switch Pinout

In order to implement the above, follow these steps:

Find a 10K

Ω

resistor in your kit: it is used to control the amount of

current flowing toward the part we connect at point A.

In this lab, we use “normally open” switches. This means that theswitch is only closed when you push the button.You need to find out which pins of the switch are connected when thebutton

is not

pushed

,

and alternatively, which pins of the switch are

connected when the button

is

pushed.

Your multimeter can be set to

beep when the two probes are connected. This is the

connectivity test.

To perform this

connectivity test

, set the dial of your multimeter to

the correct setting and also verify the pins of the switch.

Draw a sketch of your switch, in the adjacent pinout, showingwhich pins are connected when the button is not pushed.

Build the circuit, as shown in Figure 3. Again, the +5V comes fromthe output of the voltage regulator.

Using the multimeter, measure the voltage at point A (when theswitch is open). Then, measure the voltage again at point A (whenthe switch is closed). Record the values in the table below.