Presentation is loading. Please wait.

Presentation is loading. Please wait.

Engineering Digital Design Professor Nick Reeder

Similar presentations


Presentation on theme: "Engineering Digital Design Professor Nick Reeder"— Presentation transcript:

1 Engineering Digital Design Professor Nick Reeder
EGR 2131 Engineering Digital Design Professor Nick Reeder Handouts: syllabus, pre-test, grade sheet, lab checkout sheet, Unit 1 practice sheet, logic probe

2 Reminders Please turn off cell phones. No food or soft drinks in the classroom. Stow water bottles at floor level.

3 Our Textbook The 6th edition came out Summer 2017.
Main changes from the 5th edition: Fixed many typos, but added some new ones. Changed and added many end-of-chapter problems. Now covers three hardware description languages instead of one, but in a confusing manner. I’ll refer you to some less confusing online material. So you can use the 5th edition, except for some end-of-chapter problems.

4 EGR 2131 Unit 1 Number Systems and Codes
Read Mano & Ciletti, Chapter 1 (but you can skip Sections 1.5 and 1.6). Homework #1 and Lab #1 due next week. Quiz next week. -Go over syllabus -Have them log on to website

5 Analog versus Digital Analog = continuous Digital = discrete Example:
An analog clock, whose hands move smoothly and continuously. A digital clock, whose digits jump from one value to the next.

6 Analog Quantities Most natural quantities (such as temperature, pressure, light intensity, …) are analog quantities that vary continuously. Digital systems can process, store, and transmit data more efficiently but can only assign discrete values to each point.

7 The Digital Revolution
Recently, many types of devices have been converted from analog to digital. Examples: In all of these digital devices, info is stored and transmitted as long strings of 1s and 0s. Analog Digital Record albums CDs VHS tapes DVDs Analog television Digital TV

8 Analog and Digital Systems
Many systems use a mix of analog and digital electronics to take advantage of each technology. A typical CD player accepts digital data from the CD drive and converts it to an analog signal for amplification. -The human ear is an analog device, so we need to convert from digital to analog. -In opposite direction, many real-world phenomena (such as human voice) are analog, so they must go through an analog-to-digital converter before being digitally stored or processed.

9 Voltage Voltage is a basic electrical quantity that is important in all circuits (analog or digital). You can think of a circuit as being like a plumbing system, with water flowing through pipes. On this analogy, voltage is like the water pressure in the pipes. Its value will vary at different points in the circuit.

10 A Simple Circuit A wire is like a water pipe. The amount of
electricity per second flowing through a wire is called current, which is measured in amperes. The voltage (pressure) at this point is greater than the voltage at this point. A voltage source is like a water pump. Its voltage rating (in volts) tells you how strong it is. Resistors are like partial blockages in the pipe. They restrict the amount of current that flows through the circuit.

11 Examples of Voltage Sources
Voltage is measured in volts (V). Flashlight battery ____ V Wall outlet ____ V

12 Trainer Power Supplies
Fixed +5 V supply: In this course we’ll always use this one. No matter which one of these you use, you must also use the GROUND connection. Variable supplies, controlled by the knobs at left. You’ll use these in other courses.

13 Measuring Exact Voltage
In other courses you’ll use a voltmeter or digital multimeter, like the one shown, to measure the exact voltage at a point in a circuit. Have them use DMM to measure voltages from trainer’s power supply.

14 Measuring Digital HIGHS or LOWS
In this course we usually don’t care about exact voltage values. We just care whether the voltage at a point is “high” or “low.” Have them use probe to measure LOW and HIGH from a trainer switch. To measure this, we use a logic probe, such as the one shown.

15 Binary Digits and Logic Levels
Digital electronics uses circuits that have two states, which are represented by two voltage ranges called HIGH and LOW. We often represent a HIGH state by the number 1, and a LOW state by the number 0. The voltages on the upper and lower edges of these ranges vary for different technologies. The values shown are for the TTL technology. VH(max) 5.0 V HIGH VH(min) 2.0 V -The voltages vary by technology; in TTL, VL(min) = 0 V, VL(max) = 0.8 V, VH(min) = 2.0 V, VH(max) = 5.0 V. -In digital circuits, we only whether a particular voltage is in the hi range or the low range. We don’t care whether the actual voltage is 2.5 V or 3 V or 4 V or 4.5 V. -Logic probes are designed to light up a “Hi” indicator for voltages in the hi range, and a “Lo” indicator for voltages in the low range. Invalid VL(max) 0.8 V LOW VL(min) 0 V

16 Breadboarding Guidelines
When you build circuits in lab, I expect you to follow the breadboarding guidelines on the course website.

17 Ones and Zeros Digital devices (computers, iPods, cell phones, …) store information (numbers, text, images, music, …) as strings of 1s and 0s. Each 1 or 0 in such a string is called a bit (short for binary digit). Example of an 8-bit string: A typical song in an MP3 file might contain 40 million bits.

18 Number Systems and Codes
This week we’ll look mainly at how to represent numbers using 1s and 0s, and also (briefly) how to represent text using 1s and 0s.

19 Binary Number System When we represent numbers using 1s and 0s, we’re using the binary number system. This system is fundamental to everything in digital electronics, so you must learn it thoroughly. First, we’ll briefly review the decimal number system that you’ve used for most of your life. Fill in Decimal column of practice question 1, noting what happens after 9 and 19.

20 Decimal Numbers The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The base of decimal numbers is ten, because only ten symbols (0 through 9) are used to represent any number. The column weights of decimal numbers are powers of ten that increase from right to left beginning with 100 =1: Mention that we’ll also look at base-2 (binary) and base-16 (hex) systems.

21 Example Solution Decimal Numbers
Decimal numbers can be expressed as the sum of the products of each digit times the column value for that digit. Thus, the number 9240 can be expressed as      (9 x 103) + (2 x 102) + (4 x 101) + (0 x 100) or 9 x 1, x x  x 1 Example Express the number 480 as the sum of values of each digit. Solution 480 = (4 x 102) + (8 x 101) + (0 x 100)

22 Binary Numbers For digital systems, the binary number system is used. Binary has a base of two and uses the digits 0 and 1 to represent quantities. The column weights of binary numbers are powers of two that increase from right to left beginning with 20 =1: Fill in Binary column of practice question 1.

23 Engineering Humor! Here’s a good joke for your next party: There are 10 kinds of people in this world—those who know understand binary numbers and those who don’t.

24 A binary counting sequence for numbers from zero to fifteen is shown.
Decimal Number Binary Number Binary Numbers A binary counting sequence for numbers from zero to fifteen is shown. Notice the pattern of zeros and ones in each column.

25 Example Solution Binary-to-Decimal Conversions
The decimal equivalent of a binary number can be determined by adding the column values of all of the bits that are 1 and discarding all of the bits that are 0. Example Convert the binary number to decimal. Solution Start by writing the column weights; then add the weights that correspond to each 1 in the number. Do practice question 2. = 37

26 Example Solution Decimal-to-Binary Conversions (First Method)
You can convert a decimal whole number to binary by reversing the procedure. Write the decimal weight of each column and place 1’s in the columns that sum to the decimal number. Example Convert the decimal number 49 to binary. Solution The column weights double in each position to the right. Write down column weights until the last number is larger than the one you want to convert. Do practice question 3.

27 Example Solution Decimal-to-Binary Conversions (Second Method)
You can convert decimal to any other base by repeatedly dividing by the base. For binary, repeatedly divide by 2: Convert the decimal number 49 to binary by repeatedly dividing by 2. Example Solution You can do this by “reverse division” and the answer will read from left to right. Put quotients to the left and remainders on top. Have them do 92. Answer: 1 1 remainder Quotient 1 49 2 1 3 6 12 24 Decimal number base Continue until the last quotient is 0

28 The Hexadecimal and Octal Systems
We’ve looked at the decimal and binary systems. Hexadecimal (often called “hex”) and octal are useful as shorthand systems for writing large binary numbers. Hex is a base-16 system. Octal is a base-8 system. Hex is very widely used. Octal was popular 40 years ago, but is not used much today. It’s not convenient to write (or speak) a long binary number such as Much more convenient to express it in hex as 32B57. Fill in Hexadecimal column of practice question 1.

29 Example Solution Hexadecimal Numbers
Binary Hexadecimal Numbers A B C D E F Hexadecimal uses sixteen characters to represent numbers: the digits 0 through 9 and the letters A through F. Large binary numbers can easily be converted to hexadecimal by grouping bits 4 at a time and writing the equivalent hex character. -They must memorize this table. Do practice questions 4, and 5. Express in hexadecimal: Example Solution Group the binary number by 4-bits starting from the right. Thus, 960E

30 { Example Solution Hexadecimal Numbers
Hexadecimal is a weighted number system. The column weights are powers of 16, which increase from right to left. { Column weights Example Express 1A2F16 in decimal. Do practice question 6. Start by writing the column weights: Solution A F16 1(4096) + 10(256) +2(16) +15(1) = 670310

31 Binary and Hex Conversion Games
You must memorize the binary and hex codes for the numbers from 1 through 15. To practice, play the Binary-Decimal and Binary-Hex matching games on my Games page.

32 Example Solution Octal Numbers
Decimal Octal Binary Octal Numbers Octal uses eight characters to represent numbers: the digits 0 through 7. Large binary numbers can easily be converted to octal by grouping bits 3 at a time and writing the equivalent octal character. Fill in octal column of practice question 1. Then do this slide’s as practice question 7. Express in octal: Example Solution Group the binary number by 3-bits starting from the right:

33 Octal Numbers Octal is a weighted number system. The column weights are powers of 8, which increase from right to left. { Column weights

34 Other Base-n Systems As discussed in the book, we could also consider number systems based on other integers such as base-5, base-12, and so on. While this may be interesting from a mathematical or theoretical perspective, in practice the systems we care about are base-10, base-2, and base-16 (and occasionally base-8).

35 Skipping the Sections on Arithmetic For Now
For now we’ll skip Sections 1.5, 1.6, which deal with arithmetic (addition, subtraction, and so on). We’ll come back to this material in a few weeks.

36 Decimal Binary BCD BCD Binary coded decimal (BCD) is a weighted code that is commonly used in digital systems when it is necessary to show decimal numbers such as in clock displays. The table illustrates the difference between straight binary and BCD. BCD represents each decimal digit with a 4-bit code. Notice that the codes 1010 through 1111 are not used in BCD. -BCD is a “compromise” between binary (which is most convenient for computers) and decimal (most convenient for humans). -Point out that seven-segment displays on red trainer are labeled “BCD.” Fill in BCD column of practice question 1. Then do practice question 8.

37 BCD You can think of BCD in terms of column weights in groups of four bits. For an 8-bit BCD number, the column weights are: Question: What are the column weights for the BCD number ? Answer: Note that you could add the column weights where there is a 1 to obtain the decimal number. For this case: =

38 Other Decimal Codes As discussed in the book and summarized in Table 1.5 (next slide), other 1-0 codes for decimal numbers are used in certain situations. BCD is by far the most common of these.

39 Table 1.5 Four Different Binary Codes for the Decimal Digits.

40 The ASCII Code ASCII (American Standard Code for Information Interchange) is a binary code for alphanumeric characters. ASCII encodes 128 characters using 7-bits. See Table 1.7 on page 29 (next slide) for the list of ASCII codes. To write the ASCII code for any character in the table, write the 3 bits at the top of the character’s column followed by the 4 bits at the left end of the character’s row. -So far we’ve been talking about using 1s and 0s to represent numbers. Let’s look at the most widely used system for using 1s and 0s to represent text.

41 Table 1.7 American Standard Code for Information Interchange (ASCII).

42 The ASCII Code From this table we can see that the ASCII code for the letter N is (Expressed in hex, this is 4E.)

43 The ASCII Code -Have them spell out a four-or-five letter word, pass it to their neighbor, and see if neighbor can decode it. As explained in the lower half of Table 1.7, the first 32 entries are control characters based on teletype requirements. Some of these are obsolete, but some (such as Backspace, Line Feed, Form Feed), are still widely used.

44 New Slides Here on Sections 1.8, 1.9

45 Digital Signal In digital circuits, the logic level at any point usually changes as time passes. This changing level is called a digital signal (or digital waveform).

46 Graph of a Digital Signal
We can describe a digital signal by graphing the voltage (or logic level) versus time.

47 Oscilloscope For slow-changing signals, you could graph a digital signal by hand, using a logic probe and a wristwatch. But usually we use an oscilloscope to do this work for us.

48 Periodic Digital Signal
A periodic digital signal is one that repeats itself at regular intervals. Which one of these signals is periodic?

49 Cycle In a periodic signal, each repetition is called a cycle.
How many cycles are shown in the diagram below?

50 Period The time required for one cycle is called the signal’s period.
The symbol for period is T. Period is measured in seconds, abbreviated s. Example: If a signal repeats itself every 3 seconds, we’d write T = 3 s

51 Frequency A signal’s frequency is the number of cycles that occur in one second. The symbol for frequency is f. Frequency is measured in hertz, abbreviated Hz. Some old-timers say “cycles per second” instead of “hertz.” Example: If a signal repeats itself 20 times every second, we’d write f = 20 Hz

52 Period and Frequency Period and frequency are the reciprocal of each other: f = 1 / T T = 1 / f What are the period and frequency of this signal? Do practice questions 9-11.

53 Large and Small Numbers
Engineers often deal with very large or very small numbers. Example: a system’s clock signal might have a frequency of 750,000 Hz and a period of s. It’s not convenient to write or discuss numbers using so many zeroes. Instead we use engineering prefixes, which are abbreviations for certain powers of 10. See next slide.

54 Common Engineering Prefixes

55 Engineering Prefix Games
You must memorize these prefixes. To practice, play the Metric Prefix matching game on my Games page. You must also be able to convert between numbers written with engineering prefixes and numbers written in everyday (floating-point) notation. To practice, play my Engineering- Notation game.

56 Using Engineering Prefixes
Whenever you have a number that’s greater than 1000 or less than 1, you should use these prefixes. Examples: Instead of writing 750,000 Hz, write 750 kHz (pronounced “750 kilohertz”). Instead of writing s, write 1.33 s (pronounced “1.33 microseconds”).

57 Calculator’s Exponent Key
Scientific calculators have an exponent key (usually labeled EE, EXP, or E) that lets you easily enter numbers with engineering prefixes. Examples: To enter 750 k, press 750 EE 3. To enter 1.33 , press 1.33 EE −6.

58 Calculator Modes Most scientific calculators also have an engineering mode, which forces the answer always to be displayed with one of the engineering powers of 10. Learn how to use this feature of your calculator. It will save you from making mistakes. Do practice question 12.

59 Function Generator To produce a periodic digital signal, you could use a switch that you flip up and down by hand at regular intervals. But usually we use a function generator to do this work for us.

60 Trainer Function Generator
Regular Output, controlled by all four knobs. You’ll use this in other courses. No matter which one of these you use, you must also use the GROUND connection. Demo measuring a waveform on the scope, explaining how the RANGE switch and FREQUENCY knob determine the frequency. Also demo Fluke 45 as freq counter. TTL Mode Output, controlled by the FREQUENCY and RANGE knobs. In this course we’ll always use this one.

61 The Function Generator Does Not Replace the Power Supply
Recall that when we build circuits on the breadboard, we must power each DIP by providing +5 V to the DIP’s power pin. We never connect a DIP’s power pin to the function generator. We connect every DIP’s power pin to the trainer’s power supply instead.

62 Digital Waveforms Digital waveforms change between the LOW and HIGH levels. A positive going pulse is one that goes from a normally LOW logic level to a HIGH level and then back again. Digital waveforms are made up of a series of pulses.

63 Timing Diagrams A timing diagram (or waveform diagram) is used to show the relationship between two or more digital waveforms. -Number the clock cycles, and ask them whether A, B, C are high or low during particular cycles.


Download ppt "Engineering Digital Design Professor Nick Reeder"

Similar presentations


Ads by Google