CSE467: Advanced Logic Design

Carl Ebeling, Autumn 1997


Lab 3

Design Kits: Constructing Circuits on a Breadboard

Distributed: Oct. 14 - Due: Oct. 24, 4:30 PM


Objectives

After completing this lab you will know how to: You will be doing this lab in teams of two. Remember that you both of you will be responsible for knowing how to do everything even if you don't do everything.

Part 1 -

The DesignKits contain everything that you need to construct and test medium size circuits. They include: You will be provided with other devices throughout the quarter and will add these to the list provided in your Design Kit. Accidents do happen, so we will replace a certain number of damaged chips (if there is a reasonable explanation for the damage). However, you will be held responsible for the cost of the chips if there is repeated and/or careless damage.

Your DesignKit contains a pair of long nose pliers. Please be very careful with these to avoid damaging the tip. You will find these invaluable for inserting and removing wires in crowded protoboards. They are also useful for straightening hook-up wire and bent pins on the chips. You may want to buy a small screwdriver. The screwdriver is an acceptable tool for carefully removing chips from the protoboard. (There is also a less effective chip puller in the DesignKit.)

Breadboarding Techniques

The protoboard in the DesignKit is comprised of several sections as shown in the figure on the next page. Power and ground have been pre-wired into the boards from the power supply connector and assigned to the vertical busses marked in Black/Green (GND) and Red (+5v.) Terminals in the protoboard are connected internally as shown in the figure. The kit includes some wire that has been pre-stripped and bent so that it can be easily inserted in the protoboard. If you need wire of a different length, use the wire stripper to cut and strip the wire. But first adjust the stripper so that it cuts the insulation without nicking the wire itself. The protoboard terminals are designed for wire of size #22-26. Inserting anything larger than size #22 wire will damage the terminal. Always straighten out bent wires and pins before inserting them into the board. You will also notice that new IC chips have pins splayed out for use in automatic insertion machines. You will have to carefully bend them together a bit before inserting the chips into the board (use pliers or the table top).

Before doing any work on the protoboard such as wiring and inserting/removing chips, be sure the power is OFF. That it, unplug the power connector while you are constructing the circuit. After you have finished wiring up your design and before you turn on the power, double-check the power and ground connections. To be sure, you should measure the resistance between power and ground to check for a short circuit.

Wiring Guidelines

Using the Logic Probe

The logic probe provides a very convenient way to check the value of any signal in your circuit. The probe has two lights, HI and LO, which indicate the value of the signal. The logic probe responds to the input voltage in two ways depending on whether CMOS or TTL is selected. We will use the TTL setting which lights the LO light for voltages <0.8v. and lights the HI light for voltages >2.4v. If neither light is lit, then the signal is floating (i.e., not being driven) or has an illegal value somewhere between 0.8v and 2.4v.

The logic probe is also used to "catch pulses". If the PULSE MEMORY switch is placed in the MEM position, the PULSE indicator will turn on as soon as a transition, high or low, occurs on the input. This convenient for determining if a signal changes when the change happens too fast to be visible. This is useful for detecting glitches and whether a wire is stuck at a fixed value or is, in fact, changing on occasion.

Using the Switch Paks

You will be using switches to generate inputs for the circuits you test and LEDs to display the outputs. You may want to reserve part of your protoboard for a set of switches and lights which you can use for the rest of the quarter. The simplest switch is the the single-pole, single- throw switch shown in the figure below. To use the switch to generate a 1 or 0, we must connect it as shown. Note that this configuration generates a 0 when the switch is connected.

We will be using switches that come in packs of 8 and resistors that come in packs of 8. These can be easily connected as shown in the following picture to give 8 separate switches. First measure the resistance of the resistors in the resistor PAK to figure out which is pin 1 (common) and then connect the switches as shown. Choose an place like the first strip where you can leave these switches for the entire quarter.

Light-Emitting Diodes (LED)

LEDs convert electrical current to light. They can be used as simple optical output devices. The circuit below shows one of many ways that a TTL gate can drive an LED. The resistor is used to limit the current flowing through the LED. An unprotected LED connected between ground and +5V will burn out. The resistor also protects the output circuitry of the TTL gate.

The LED is a diode, and thus its two connections are electrically different. How can you tell them apart? Here are some hints; they do not always work, though. The longer lead of the LED is the cathode, i.e., the wire that goes to the lower voltage. If the plastic housing is not circular, the flat part corresponds to the cathode (the flat part in the symbol). You can prepare a simple "LED test station" on your superstrip, using a 330 ohm resistor connected to +5V and a grounded pin next to it. In this set-up, you can easily test any LED both ways and determine which lead is the cathode.

We also have LED's in paks of 8 or 12. The next figure shows how they look internally and how to connect them up conveniently on your protoboard. First measure the resistance of the resistors in the resistor PAK, then construct the LED circuit shown in figure using the LED Pak. Choose an place like the first strip where you can leave these switches for the entire quarter. You will want to install a 74LS05 or 74LS04 inverter chip (or perhaps a 74LS240 buffer chip) in order to have active high inputs to the LEDs. (For clarity, the connections between the inverter outputs and the LEDs are not shown in the figure.)

Part 2: Programming your PLD

Programming PLDs using the Pilot U-84 Universal Programmer

  1. Open your Synario project.
  2. Double click on virtual device. This will bring up a dialog box asking what kind of device you want to switch too. Choose 'Standard PLDs' and then '22V10'. This tells Synario to create a JED file for the PLD programmer that programs the 24 pin PLD provided in your lab kit.
  3. Now click on '22V10' and then double click on 'JEDEC file'.
  4. If it compiles successfully, then you should get a JEDEC- format file with .jed suffix. Copy this .jed file to an MSDOS floppy disk.
  5. Take your PLD and floppy over to the Pilot U-84 programmer. When handling your PLD be aware that static discharge can cause damage to your chip. Do not hold-on to your chip by the pins. Instead hold-on to your chip by the two ends without pins.
  6. Turn on the programmer if the red power LED is not already on. Raise the silver lever arm on the ZIF (zero insertion force) socket and insert your chip according to the diagram painted on the programmer. For the 22V10 your chip should line up with the diagram labeled 24. Once the chip is properly inserted, lower the silver arm to secure the pins.
  7. Boot up the PC computer connected to the Pilot U-84 programmer. Note that the computer may have some boot problems regarding the EISA bus. Simply hit ESC to bypass such warnings.
  8. From the C:\ prompt change into the C:\PILOT directory and run the SPV.EXE program by executing the following two commands:
     cd pilot
     spv
    
    The Pilot U-84 programmer interface screen should now be displayed on the screen. The current menu of options is located on the top line of the interface screen. The Configure option should be currently highlighted. Note that the sub-menu items for the Configure option are located on the line directly below.
     Configure  File  Buffer  PAL(device)  Macro  Extended  Quit
     Device  Port  Security  Color  Others  saVe Reset
    
    To move from one menu option to the next use the left and right arrow keys. As you move from one menu option to the next the sub-menu items will also change. To access the sub-menu items of a given menu option use the down arrow key or press the hot-key for that menu option. The hot-key for a given menu option is the capital letter in its name. For example, pressing "C" in the above situation will take you to the sub-menu for Configure. To return to the parent menu use the up arrow key or the ESC key.

    Here is a general outline for programming your PLD on the Pilot:
    1. Select your device manufacturer and type
    2. Load your Jedec file from your floppy disk in drive A:\
    3. Erase your PLD
    4. Program your device
  9. To select the device manufacturer and type, choose the Configure menu option by pressing "C". Next select Device from the list of sub-menu options by pressing "D". Finally select Lattice from the list of manufacturer names by pressing "L". You will see a list of Lattice PLDs that the Pilot programmer supports:
    Description:      Pins: Fuses:
     GAL18V10           20   3540
     GAL20RA10          24   3210
     GAL20RA10-UES      24   3274
     GAL20XV10          24   1671
     GAL20XV10-AS-20L10 24   1600
     GAL20XV10-AS-20X10 24   1600
     GAL20XV10-AS-20X4  24   1600
     GAL20XV10-AS-20XB  24   1600
     GAL22V10           24   5828
     GAL22V10-UES       24   5892
     GAL26CV12          28   6432
     GAL6001            24   8294
     GAL6002            24   8330
    
    We are using the Lattice GAL22V10 so select GAL22V10 from the list using the arrow keys and press enter to continue. Note that the device type listed in the status window at the bottom of the screen should now say Lattice GAL22V10.
  10. Next load the Jedec file from the floppy disk. Hit the ESC key to get back to the main menu shown above. Type "F" to choose the File menu option. Then type "D" to choose the Directory sub-menu item. You will now be prompted to enter a directory to look for files. Enter the following and press enter:
     File directory mask: A:\*.jed
    
    This will bring up a listing of all Jedec files on the floppy disk in drive A:\. Use the arrow keys to select the appropriate file name and press enter to continue. Note that the file name listed in the status window at the bottom of the screen should now display the file name that you selected. Now that you have told the software which file to use you must load it into its buffer. Type "L" to choose Load from the file sub-menu.
  11. Now you need to erase your PLD. Hit ESC to get back to the main menu shown above. Type "P" to select the PAL(device) menu option. You should see a list of operations that you can perform on your device:
     Blank  eRase  Program  Verify  Checksum  Examine  Test
    
    Type "R" to choose the eRase option from the list. This operation will electronically reset all of the fuses inside your PLD so that you can install your new fuse map in the following step. Once the erase operation is complete, the software automatically performs the Blank operation to verify that it was successful. You should see a "Blank-check OK" on the screen.
  12. Finally you need to program your device. From the PAL(device) sub-menu shown in the previous step type "P" to choose the Program option. This operation will use the current contents of the buffer to program the device in the Pilot U-84 programmer. Once the operation is complete, the software automatically performs the Verify operation to make sure that the correct fuses were blown on the PLD. You should see the following on the screen (of course your checksum will be different):
     Device programmed
     Device verified
     Device checksum = 6DC9
    
     (No test vectors present)
    

    Part 3: Construct an 8-bit carry-lookahead adder from Lab 2

    Program two 4-bit carry-lookahead adder PLDs, which you designed for Lab 2. Use these to construct an 8-bit carry-lookahead adder. Do not use the carry-lookahead adder PLD you designed for Lab 2 - instead use discrete gates. (You should need only one extra chip.) You should draw a schematic of this circuit, put in pin numbers (by hand) and use it as a reference to wire up your breadboard.

    To test your circuit, wire one of the 8-bit inputs to the constant value 0x56 (remember 0v is 0 and 5v is 1). Wire the other 8-bit input value to one of your switch paks. Use one of the push-button switches for the carry in input of your adder. Wire the outputs to the LED pak. To test your circuit, use the switches to count through the values 0xa5 through 0xb0 and check the resulting output. Use the push-button for each value to show that the carry in works correctly.


    Turn In:

    1. Demonstrate your circuit to one of the TAs who will sign your schematic.
    2. Signed schematic of your circuit.

    ebeling@cs.washington.edu