WISE Investments Electrical Engineering Lab Digital Logic Laboratory Dr. Keith Holbert Electrical Engineering 1 Laboratory Preview • Next we will go to the lab (GWC 273) to see what these circuits look like • First, let’s get a preview of what we expect to see in the lab • The first thing we’ll look at is the trainer boards used to build the prototype of our digital circuits Electrical Engineering 2 Trainer Board • Trainer Board: An electrical device used for rapid prototyping of electrical circuits • Our trainer board has: – – – – – Breadboard for making connections Power supply Switches LED (light emitting diode) for signal display Clock Electrical Engineering 3 Trainer Board Clock Connection and LED Switches & connections Ground 0 volts Breadboard region Power Supply +5 volts Electrical Engineering 4 Breadboard Bus: Terminals Horizontally Connected as Shown Terminals Vertically Connected Together as Shown Electrical Engineering Gutter: Electrical Isolation of Vertical Columns for IC Insertion 5 Integrated Circuit (IC) Chips Pins are numbered Notch provides a reference point Electrical Engineering 74LS21 6 +5V 14 A data book gives the pin correspondence and function schematically 13 12 11 10 9 8 AND AND AND 1 2 AND 3 SN74LS08 Electrical Engineering 4 5 6 7 GND 7 Digital Combination Lock • Using three AND gates, we can build a combination lock that requires a four-digit code, specifically: 1 1 1 1, using the particular 7408 pin connections illustrated below 13 AND 11 4 12 AND 6 10 AND 8 5 9 Electrical Engineering 8 Digital Lock Circuit Construction Procedure 1) Insert the two ICs (7408 and 7404) across the gutter portion of the breadboard with notch to the left. 2) Connect the power supply (+5 V) and pin number 14 of both ICs to a bus at the top of the breadboard area. 3) Connect the ground (0 V) and pin number 7 of both ICs to a middle bus of the breadboard. 4) For the 1111 combination, connect the output from switches 1 thru 4 as inputs to pins 9, 10, 12 and 13 of the 7408. 5) Connect the outputs from pins 8 and 11 as inputs to pins 4 and 5. 6) The output from pin 6 is then connected to an LED. 7) Turn the trainer board ON. 8) Use the 4 switches to control the input values to the digital lock. When the switches are all on,the LED should be on; otherwise, the LED is off. Electrical Engineering 9 Digital Lock: Build a lock with combination 1111 CLK FREQ LOGIC INDICATORS A B C D LOGIC SW X X YY E F G H SW6 SW7 SW8 DATA SWITCHES SW1 SW2 SW3 SW4 SW5 GND -12 74LS04 7408 74LS21 7404 +12 +5 Electrical Engineering 10 To make the lock with a combination of 0110, we’ll use inverter gates from a hex inverter chip +5V 14 13 12 11 10 9 8 1 2 3 4 5 6 7 SN74LS04 Electrical Engineering GND 11 Digital Combination Lock • To build a combination lock whose input (key code) combination is 0 1 1 0, we use two NOT (inverter) gates from the 7404 using the pin connections below 13 12 7408 13 AND 11 4 12 AND 6 10 AND 11 10 8 5 9 7404 • Are there other pin connections that could be utilized? Electrical Engineering 12 Digital Lock: Build a lock with combination 0110 CLK FREQ LOGIC INDICATORS A B C D LOGIC SW X X YY E F G H SW6 SW7 SW8 DATA SWITCHES SW1 SW2 SW3 SW4 SW5 GND -12 74LS04 7408 74LS21 7404 +12 +5 Electrical Engineering 13 For the railroad crossing signal, we will need to use an XOR gate +5V 14 13 12 11 10 9 8 5 6 7 XOR 1 2 3 SN74LS86 Electrical Engineering 4 GND 14 RR Crossing Circuit Construction Procedure 1) Insert the two ICs (SN74LS08 and SN74LS86) across the gutter portion of the breadboard with notch to the left 2) Connect the power supply (+5 V) and pin numbers 14 and 13 of both ICs to the bus next to the top 3) Connect the ground (0 V) and pin number 7 of both ICs to the bottom bus 4) Connect the clock to the pin number 12 of both ICs 5) Connect the output from pin number 11 of each IC to a different LED 6) Make sure the knobs on the top row of the trainer board are all turned to the far left (that is, fully counter clockwise) 7) Turn the trainer board ON. The LEDs should flash back and forth; if not, a loose connection may exist. Electrical Engineering 15 Build the Railroad Crossing Signal CLK FREQ LOGIC INDICATORS A B C D LOGIC SW X X YY E F G H SW6 SW7 SW8 DATA SWITCHES SW1 SW2 SW3 SW4 SW5 GND -12 74LS04 7408 74LS21 7486 +12 +5 Electrical Engineering 16 Hardware Laboratory • Now we are ready to go to the lab (GWC 273) • You will construct – a digital combination lock – a railroad crossing signal Electrical Engineering 17