1 / 120

ECE 209 – Logic and computing devices

ECE 209 – Logic and computing devices. Pre-labs for ECE 209 Created: 9/4/12 by Madhabi Manandhar Last Updated: 12/20/2012. Laboratory 0 – Lab introduction . Outline. Syllabus highlights Good lab procedures for ECE 201 Hardware used in lab ECE 209 lab kit NI-ELVIS –II

barr
Télécharger la présentation

ECE 209 – Logic and computing devices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 209 – Logic and computing devices Pre-labs for ECE 209 Created: 9/4/12 by MadhabiManandhar Last Updated: 12/20/2012

  2. Laboratory 0 – Lab introduction

  3. Outline • Syllabus highlights • Good lab procedures for ECE 201 • Hardware used in lab • ECE 209 lab kit • NI-ELVIS –II • Software used in the lab • Digital Works • Safety video

  4. Syllabus Highlights Grade Composition: 25 % Pre-lab preparation and design 25% Class performance and demonstration of functional circuits 30% Full lab reports 20% Final project and presentation Grading Scale: A: 90-100% B: 75-89% C:60-74% D:50-59% F: <50%

  5. Syllabus Highlights (cont.) Pre-lab Preparation and Design (25% of grade): • Thoroughly read the experiment in the manual before coming to the lab. • Pre-lab reports are to be turned in before each lab and may consist of simulation(s), diagrams, truth tables, K-maps, etc. • Wiring you circuits prior to coming to lab will make the lab quicker and easier for both the student and instructor. Pre-wiring circuits will also reduce the chance of students not having enough time to complete the lab.

  6. Syllabus Highlights (cont.) Class Performance/Functional Circuits (25% of grade): • Attend each lab and participate • Correctly wire the circuits required in the lab manual and demonstrate that the circuit functions correctly to the instructor Attendance is mandatory for every lab; however, if the instructor is not in the classroom within 15 minutes after the class is scheduled to start, then the students are free to leave (unless they have been told otherwise in advance).

  7. Syllabus Highlights (cont.) Full Lab Reports (30% of grade): Throughout the semester there will be 3 full lab reports assigned, each will count as 10% of your overall grade. These reports must be typed using a word processor. Grades will be based on organization, content, neatness, accuracy, conclusions, and format. A standard format is as follows (format may vary with different instructors): • Title Page (Title, date, due date, author, lab partner(s)) • Objectives (Succinctly state the purpose of the lab) • Procedure (State what you did (circuit diagrams) and present results) • Conclusion • College of Engineering Honor Code and Signature

  8. Syllabus Highlights (cont.) Final Project and Presentation (20% of grade): There is NOT A FINAL EXAM for this lab course. Instead there will be a project involving design, simulation, and analysis of a digital-circuit related to a concept of your choice. • You may work individually or in groups of 2 • One report will be required for each group • Your group will give a presentation about your project during the last lab session You will receive more information regarding this project in the second half of the semester.

  9. Good lab procedures • Be very careful while wiring circuits • Don’t leave wire dangling about • Make sure all the connections are made correctly (reverse power leads can destroy your IC chips) • Before wiring always draw a circuit diagram with pin numbers and chips labeled • While wiring and rewiring turn off the power • Avoid messy wiring • Handle equipment carefully • Before leaving lab check to make sure your bench position is neat and orderly

  10. Hardware – ECE 209 Lab Kit Protoboard: • Inserting IC chips on a protoboard

  11. Hardware – ECE 209 Lab Kit (cont.) Integrated Circuits (ICs): IC pin numbers: The position of pin 1 is determined by a dot or notch on the IC. The numbers typically increase in the counterclockwise direction (but there are exceptions). Once we know the pin numbers, we can use the chip pin-out to create our circuit. Notch Actual Chip Chip Pin-out Diagram

  12. Hardware – ECE 209 Lab Kit (cont.) Each IC chip has a number stamped on it, identifying what type of logic chip it is. For example the chip below is a 7486 logic chip which contains 4, 2-input XOR gates. Once we know the IC number, we can find the chip pin-out in pages 16-18 in the lab manual.

  13. Hardware – ECE 209 Lab Kit (cont.) IC Handling: Before using the ICs we must first straighten out the legs by gently flattening the IC on a table top as shown below. Be careful, the legs/pins are very fragile.

  14. Hardware – ECE 209 Lab Kit (cont.) Removing ICs: Ideally we would use an IC extractor, but we will usually just use a pencil to gently remove ICs from the protoboard. First loosen the IC on one end, and then loosen as shown below. This is to prevent the legs/pins from bending. Loosen One End of the IC Loosen Second End and Remove

  15. Examples of Basic Gates – AND gate • An AND gate can be depicted by 2 switches in series Ref: http://www.technologystudent.com/pdfs/logic1.pdf

  16. Examples of Basic Gates – OR gate • An OR gate can be depicted by 2 switches in parallel Ref: http://www.technologystudent.com/pdfs/logic1.pdf

  17. Hardware – NI ELVIS II • 1: On-Off switch • 2: PWR SEL Jumper • 3: Power Supply • 4: Logic Inputs • 5: Lamp Monitors (LEDs) • 6: Function Generator • 7: Analog Inputs

  18. Hardware – NI ELVIS II (cont.) Powering the Circuits: • For our circuits to operate the NI-ELVIS board must be turned on (there are two switches which need to be “on”, the one pictured in the previous diagram and one on the back right side of the board). • The ICs in our circuits will require Vcc (+5 V) and GND (ground) according to the pin-outs. The pins for Vcc and GND are in the “Power Supply” area of the board; area 3 in the previous slide.

  19. Hardware – NI ELVIS II (cont.) Digital Inputs: • Most, if not all of our circuits will require digital inputs. i.e. inputs that are either logic 1 (+5 V) or logic 0 (GND). We could manually move a wire between the +5 V and GND pins, but it is easier to use a specialized pin that we can change between +5 V and GND with software. • The specialized pins that we will use as digital inputs to our circuits are shown in area 4 of the NI-ELVIS diagram (DI0 – DI7).

  20. Hardware – NI ELVIS II (cont.) Controlling Digital Inputs: • Open the “NI ELVISmx Instrument Launcher” on the computer and the following GUI will appear. • Select “DigOut” and the GUI to the right will appear. • Hit the “Run” button • Click the oval corresponding to the desired input to toggle it between +5 V and GND • DI0=oval 0, DI1=oval 1, etc. “Ovals”

  21. Software – Digital Works Simulations using Digital Works: • There is a link on the lab homepage (for 32 bit machines) as well as a link in the syllabus (for 64 bit machines) where you can download Digital Works (DW). • Using DW we can simulate circuits and determine if they are functioning how they should before actually building a circuit on our protoboard. Labeling chips and pin numbers in the simulation will also make it much easier to wire circuits in the lab. • For a basic introduction to using DW go the the “Digital Works Introduction” link on the lab homepage.

  22. Software – Digital Works (cont.) Run button Object Interaction Interactive Input Annotation (labeling) Wiring Tool LED (output) Basic Logic Gates

  23. Software – Digital Works (cont.) The following is an example of simulating a OR gate in Digital Works Z = X + Y

  24. Contact Information • Instructor: Name: Email: Office: Phone: Office Hours: As needed (email for appointment) • Lab Coordinator: Name: Dr. Timothy Burg Email: tburg@clemson.edu Office: 307 Fluor Daniel (EIB) Phone: (864)-656-1368

  25. Safety Video

  26. Laboratory 1 – Logic gates: A smart lighting system

  27. Introduction to Laboratory 1 • Objective: Explore notion of combinational circuits and basic combinational design • Requirements • Digital works simulation for all 3 circuits • Verbal description of the function of final circuit • Truth table for first function (the light controller)

  28. Lab overview • Design a circuit that controls a light with 5 input • The light is turned on when • Burglar Alarm (B) detects an intruder • Master Light Switch (M) is on • An Auxiliary Switching system (A1, A2) is on and a Person (P) is present in the room (person detector is on)

  29. Logic equation • : XOR function for auxiliary switching system • : : Person detected AND auxiliary switching system on • : Master Switch is on OR Person is detected AND Auxiliary switching system is on • Desired lighting function is

  30. Building a digital light control

  31. Implementing a Function with different gates • Implement the XOR function using only AND and OR gates • Simulate the circuit in digital works • Wiring the circuit is optional.

  32. Realizing an Arbitrary Boolean Function • Design a circuit using only truth tables and logic function • Logic function is • Simulate and wire the circuit using AND, OR and NOT gates

  33. Preparations for Next Week • Next week’s lab Encoding/Decoding: The Seven-Segment Display • Requirements: • Simulation of functional seven-segment display circuit • Truth table for all seven segments and all seven functions in MSOP

  34. Laboratory 2 – Encoding/Decoding: The Seven-segment display

  35. Introduction to Laboratory 2 • Objective: Become familiar with the seven-segment LED display, encoding/decoding, and BCD (binary coded decimal) • Requirements: • Simulation of functional seven-segment display circuit • Truth table for all seven segments and all seven functions in MSOP

  36. Decoding/Encoding Decoding: Decoding is the conversion of a n-bit input code to a m-bit output code with n ≤ m ≤ 2n. As an example, the inputs (Ai) and the outputs (Di) for a 2-to-4 line decoder are shown below: Encoding: Encoding is the inverse operation of decoding. An encoder converts a m-bit input to a n-bit output with n ≤ m ≤ 2n. The above table would represent an encoder if the D’s were inputs and the A’s were outputs. M. M. Mano and C. R. Kime, Logic and Computer Design Fundamentals

  37. Binary Coded Decimal (BCD) When converting from decimal to BCD we convert each decimal digit individually using the following table: A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9 (inclusive). A BCD number greater than 10 has a representation different from its equivalent binary number. This can be seen below for the conversion of decimal 185: (185)10 = (0001 1000 0101)BCD = (10111001)2 1 8 5 M. M. Mano and C. R. Kime, Logic and Computer Design Fundamentals

  38. Seven-Segment Display • Decimal numbers are displayed by a seven-segment display as shown in the figure • The truth table and logic function for segment A are

  39. Seven-Segment Display (cont.) There are two types of seven segment displays • Common Anode (what we have) • Common connection tied to +5v • Logic low inputs used to light LED • Common Cathode • Common connections tied to ground • Logic high input lights up LED • 220 Ω resisters critical to limit current through LEDs

  40. 7447 BCD to Seven-Segment Display • A truth table can be made for all of the segments, but because this function is very common, a single chip has been standardized to perform this conversion. The chip is the 7447. • The chip can be connected as follows

  41. Preparation for next week • Next week’s lab - Combinational Circuits: Parity Generation and Detection • Requirements • K-map for parity generator and detector • Truth table for parity detector • Simulation of functional parity generator/detector

  42. Laboratory 3 – Combinational Circuits: Parity generation and detection

  43. Introduction to Laboratory 3 • Objective: Familiarize students with combination circuits • Requirements • K-map for parity generator and detector • Truth table for parity detector • Simulation of functional parity generator/detector

  44. Combinational Circuit • Circuit implemented using Boolean circuits • Uses gates exclusively, so that it deals with boolean functions • Cannot store memory – Has no provision to store past inputs and outputs • Used for doing boolean algebra in computer circuits

  45. Karnaugh Map • Becomes difficult to implement larger boolean expressions - More expressions -> More gates -> Complex circuit -> Difficult to connect and implement • Expressions can be reduced mathematically, but a tough nut to crack • Karnaugh Maps makes expression as simple as possible, as well as its solving process • Useful for combinational circuit – reduces the boolean expression substantially

  46. Section 1 Parity generators

  47. Parity Generator • Used to detect whether the number of 1s in the input is even or odd, indicated by a parity bit • Used for detecting errors in the received data • Two types: • Even parity – Parity bit -> high, when 1s -> odd. Makes total number of 1s even in the set • Odd Parity – Parity bit -> high, when 1s ->even. Makes total number of 1s odd in the set

  48. Parity Generator contd… • By your knowledge so far, along with new information, what do you think is the basic parity generator? And what type? • How parity bits are used (Even Parity): PARITY BIT PARITY BIT PARITY BIT

  49. Parity generator contd… • For an odd parity generator with three inputs and one output, the truth table is

  50. Parity generator contd.. • K-Map for Odd Parity Generator Y’Z YZ Y’Z’ YZ’ X’ X P = X’Y’Z’ + XY’Z + X’YZ +XYZ’

More Related