+ All Categories
Home > Documents > Digital Circuits A key element of electrical engineering sources: .

Digital Circuits A key element of electrical engineering sources: .

Date post: 11-Jan-2016
Category:
Upload: shanna-francis
View: 214 times
Download: 2 times
Share this document with a friend
33
Digital Circuits A key element of electrical engineering sources: http://www.facstaff.bucknell.edu/mastascu/eLessonsHTML/EEIndex.html http://www.jhu.edu/~virtlab/logic/log_cir.htm
Transcript
Page 1: Digital Circuits A key element of electrical engineering sources:  .

Digital Circuits

A key element of electrical engineeringsources:

http://www.facstaff.bucknell.edu/mastascu/eLessonsHTML/EEIndex.htmlhttp://www.jhu.edu/~virtlab/logic/log_cir.htm

Page 2: Digital Circuits A key element of electrical engineering sources:  .

Lecture 12

Foundations of Electrical Engineering

Electrophysics Maxwell's Equations, Circuit theory

Information (Communications) Theory Data rate vs Signal Strength, Error

correction Digital Logic

Using Logic Gates to build up complex ccts

Page 3: Digital Circuits A key element of electrical engineering sources:  .

Lecture 13

EE Subdisciplines

Power Systems Electromagnetics Solid State Communication/Signal

Processing Controls Analog/Digital Design

Page 4: Digital Circuits A key element of electrical engineering sources:  .

4

What is Voltage?

V = “Electrical pressure” - measured in volts.

H2O

High Pressure Low Pressure

Figure 1.1

Page 5: Digital Circuits A key element of electrical engineering sources:  .

5

A battery in an electrical circuit plays the same role as a pump in a water system.

Page 6: Digital Circuits A key element of electrical engineering sources:  .

Where can I find a digital circuit?

• Digital Circuits and Digital Logic are the buiding blocks for– computers– certain control systems (robots, factories)– LED displays

• Digital Circuits are built up from Analog circuits– analog: continuous varying, digital: discrete steps– electricity has many characteristics of logic

(+/-, True/False, etc)

Page 7: Digital Circuits A key element of electrical engineering sources:  .

Digital Logic is based on Binary

• Two possible states– True/False– 1/0– Yes/No– On/Off– Light/Dark

Page 8: Digital Circuits A key element of electrical engineering sources:  .

Logic Signals

• Different systems for representing binary info in the physical world: – A voltage signal:

• Zero (0) corresponding to 0 volts• One (1) corresponding to five volts.

– A sinewave:• Zero corresponding to some frequency• One corresponding to some other frequency.

– Switches: • OPEN for "0" and CLOSED for "1".

– (And there are more ways!)

Page 9: Digital Circuits A key element of electrical engineering sources:  .

Characteristics of Logic Signals

• Change in time– Initially we look at unchanging values

• Voltage signal takes on two values– corresponding to 0 and 1.– for example, 0 Volts and 5 volts

• We can associate a variable with a logic signal– assign a symbol to represent that variable– like the symbol A.

Page 10: Digital Circuits A key element of electrical engineering sources:  .

Think Binary!

• Examples:– Cell phone converts voice into series of ones and zeros– Thermostat: 1 when temp is too low, 0 when too high

• Logic signal, A, takes on values of 0 (FALSE, OFF) or 1 (TRUE, ON). – might be a voltage, a switch closure, etc. – More generally, think in terms of zeros and ones

• not in terms of the values of the voltage or switches.

Page 11: Digital Circuits A key element of electrical engineering sources:  .

Operations on Logic Circuits

• Suppose there are 2 logic signals. A and B

• We often want to derive a 3rd signal C based on the values of A and B– if it is dark outside (A) OR raining (B)

• Turn on lights (C)

OR GATE

Page 12: Digital Circuits A key element of electrical engineering sources:  .

Logic Gates

• Logic Gates are digital circuit packages that perform logic operations on logic signals– AND gate: both must be true for true output– OR gate: only one must be true for true output– NOT gate: true in means false out and vice versa

– NAND gate: the opposite of AND• AND followed by NOT

Page 13: Digital Circuits A key element of electrical engineering sources:  .

Truth Tables and Logic Gates

• Truth tables use 1/0 instead of True/False• OR AND NOT (inverter)

Page 14: Digital Circuits A key element of electrical engineering sources:  .

NAND GATE = NOT AND• An AND gate

– followed by NOT

• Truth Table Usually drawn as:

• • Any logic gate can be built

from 1 or more NAND gates!

A B C

A B C

Page 15: Digital Circuits A key element of electrical engineering sources:  .
Page 16: Digital Circuits A key element of electrical engineering sources:  .

Lab: LS7400 Quad Nand Gate IC• Pinout shows which pins are

connected to what• Vcc = +5 V, -Vcc = 0V• Verify the notch location!!

Page 17: Digital Circuits A key element of electrical engineering sources:  .

Breadboard a NAND gate• a breadboard is a quick way to build circuits

without soldering• 5 pin rows are connected by metal clips• vertical column on sides are

connected.

Page 18: Digital Circuits A key element of electrical engineering sources:  .

Connect Power Supply to Breadboard

Black to GroundRed to +5V

Ground+5V

Page 19: Digital Circuits A key element of electrical engineering sources:  .

Add signal wiresfor A and B

Page 20: Digital Circuits A key element of electrical engineering sources:  .

Add LEDs to show value of A,B(1- 470 Ohm Resistor for each LED)

The shorter Wire on LED goes to GROUND

When both are connected, turn on power (A, B are '1')

Page 21: Digital Circuits A key element of electrical engineering sources:  .

Move brown wire to change B to '0' Add LED to output pin 3

Page 22: Digital Circuits A key element of electrical engineering sources:  .

Are these showing the NAND truth table?

Page 23: Digital Circuits A key element of electrical engineering sources:  .

How about these?

Page 24: Digital Circuits A key element of electrical engineering sources:  .

A NAND Inverter

• Connecting the two inputs – A and B are both at A– Truth table is the same as Inverter

A C

Page 25: Digital Circuits A key element of electrical engineering sources:  .

NAND + NAND = AND

• Taking NOT-NOT AND A B C

Try it! Add wires from Pin 3 to 4, 4 to 5move your output Resistor to pin 6

Page 26: Digital Circuits A key element of electrical engineering sources:  .

FLIP FLOP – another 2 NAND cct

• Output of 1 (P)– feeds back to input of 2

• Output of 2 (Q)– feeds back to input of 1

previous state was X=1, Y=0previous state was X=0, Y=1

MEMORY!!

Page 27: Digital Circuits A key element of electrical engineering sources:  .

Flip Flop Wiring

And each labelled pin A,B,P,Q have resistors and LED to ground for monitoring

Page 28: Digital Circuits A key element of electrical engineering sources:  .

Flip Flop in Action

A=0 B=0 A=0 B=1

Page 29: Digital Circuits A key element of electrical engineering sources:  .

Flip Flop in Action

A=0 B=1 A=1, B=1 A=1 B=0 A=1, B=1

Page 30: Digital Circuits A key element of electrical engineering sources:  .

3 NANDs make an OR

A C B

Use the digital circuit simulator to try out:

http://www.jhu.edu/~virtlab/logic/logic.htm

Page 31: Digital Circuits A key element of electrical engineering sources:  .

Team Challenges (simulate or wire up)

Using only NAND gates: A . Design, construct and test a three input AND.

B. Design, construct and test a three input NAND.

C. Design a four input NAND.

Hint: If wiring, use an LED indicator to show the inputs and/or the outputs in your circuits.

Use a current-limiting resistor for each LED.

Page 32: Digital Circuits A key element of electrical engineering sources:  .

Use the circuit builder http://www.jhu.edu/~virtlab/logic/logic.htm

D. Using only AND, NOT, and OR produce a three-input OR circuit, ie., the output is 1 if any of the inputs is 1.

E. Create a two-input "adder" with two outputs: the one-digit result of the add, and the value of a "carry" bit. In binary arithmetic, 1+1=0 with a carry=1.

Page 33: Digital Circuits A key element of electrical engineering sources:  .

Super Bowl Problem

• At the beginning of halftime during the Superbowl, – 35 million toilets are flushed almost simultaneously. – Resulting loss of water pressure wreaks havoc on many municipal

water systems. • Make a controller to solve the problem for a "three toilet"

system. – Devise a logic circuit whose "1" inputs represent "flushes"– and whose "1" outputs represent opened water valves– If no more than one toilet is flushed, then that toilet's water valve

opens, • the others remaining closed.

– If more than one toilet is flushed, then all the water valves remain closed.


Recommended