EET 1131 banner

Programming a GAL22V10

Below are instructions on how to use WinCUPL software and a Needham EMP-11 Device Programmer to program a GAL22V10 chip.

First, some background on the GAL22V10 chip:

Next, some background on the WinCUPL software:

Next, some background on the Needham EMP-11 Device Programmer:

  • It was manufactured by Needham Electronics, Inc. (now out of business).
  • It can be used to "burn" designs into many different PLDs, including the GAL22V10.
  • It connects to a computer's parallel port, and you use software running on the computer to download a chip design to the EMP-11.
  • For more info, or to purchase one, visit Microprocessor Engineering LTD's website.
Needham EMP-11 Universal Device Programmer

Now here is how to program a GAL22V10 chip:

  1. Using WinCUPL, create a file describing your design:
    1. On your computer, start the WinCUPL program.
    2. Click File > New > Design File.
    3. You'll see the Design Properties dialog box shown below.
      In the Name box, type the name of your design. Keep the name short, with no spaces or special characters.

      In the Designer box, type your name.

      In the Device box, type g22v10.

      Click OK.
      WinCUPL Design Properties dialog box
    4. An INPUT PINS dialog box will appear. Type the number of input pins that your design requires, and click OK.
    5. An OUTPUT PINS dialog box will appear. Type the number of output pins that your design requires, and click OK.
    6. A PINNODES dialog box will appear. Type 0, and click OK.
    7. WinCUPL opens a window containing a design template, similar to the one shown below.
      WinCUPL design window
      • Notice that the first nine lines in this window contain the information that you entered earlier in the Design Properties dialog box. (You can edit these lines if you need to make changes.)
      • Notice also that WinCUPL has inserted the correct number of Input Pin and Output Pin lines in response to the earlier questions. (In this example, I answered the questions by saying that my design has three input pins and four output pins.)
      • Finally, notice from the title bar of this window that WinCUPL will save the design to the computer's C: drive in a file whose name is the same as the design name followed by the extension .PLD. When you save the file later, you'll have a chance to save it instead to another location, such as onto your thumb-drive instead of the computer's C: drive.
    8. Assign pin numbers and names by typing a pin number to the left of each equals sign and a pin name to the right of each equals sign. (Remember, pins 1 through 12 and pin 13 can be used as inputs, and pins 14 through 23 can be used as inputs or outputs.) In the example shown below, I've chosen to use pins 2 through 4 as input pins named A, B, and C. And I've chosen to use pins 20 through 23 as output pins named W, X, Y, and Z.
      WinCUPL design window with input and output pins
    9. Below the output pins, type the Boolean expression for each output, using & for AND, # for OR, and ! (in front of a variable or expression) for NOT. Each line must end with a semicolon. In the example shown below:
      • W is set equal to AB.
      • X is set equal to A+B.
      • Y is set equal to AB + C.
      • Z is set equal to ABC + ABC + ABC.
      Completed WinCUPL design window
    10. Save your design to your thumb-drive or the computer's desktop by clicking File > Save As.
  2. Using WinCUPL, compile your design to create a JEDEC file:
    1. First, make sure that WinCUPL is configured to produce a JEDEC file. To do this, click Options > Compiler, and in the area called Output Files, make sure that there is a checkmark in the box next to JEDEC. Then click OK.
    2. Click Run > Device Dependent Compile.
    3. After a moment you should see a dialog box telling you that compilation was successful. Otherwise you'll be told that your design has errors, and the Message window will tell you what the errors are.
    4. After you have fixed any errors and successfully compiled your design, look in the same folder where you saved your .PLD file, and you should find a new JEDEC file, whose name ends in .JED. Continuing the example from above, successful compilation will result in the creation of a JEDEC file named LAB5GATES.JED.
  3. Use the EMP-11 to "burn" your design onto a GAL22V10 chip:
    1. Using e-mail or a thumb-drive, transfer your JEDEC file to the instructor's computer.
    2. Place a GAL22V10 chip into the EMP-11 device programmer connected to the instructor's computer. The diagram on the EMP-11's label shows you how to position the chip. Lower the EMP-11's lever to lock the chip in place.
    3. On the instructor's computer, click Start > Programs > EMP Device Programming > EMP Device Programming Software to start the program that controls the EMP-11.
    4. A dialog box named Device programmer search will appear. In the Search for box, select EMP11 and click OK.
    5. A dialog box named Device selection will appear. For Manufacturer, select Lattice. For Device, select GAL22V10. Then click OK.
    6. Click File > Open. Then navigate to the folder containing your JEDEC file, and open this file. Then you'll need to click Yes or OK a few times.
    7. Click the Erase button, which will erase any information on the GAL22V10 chip.
    8. Click the Blank Check button, which will verify that the chip was successfully erased.
    9. Click the Program button, which will "burn" your design into the GAL22V10 chip.
    10. Click the Verify button, which will verify that your design was successfully "burned" into the chip.
    11. Raise the EMP-11's lever to release the GAL22V10 chip, and remove the chip.
  4. Test your design:
    1. On the breadboard, wire the GAL22V10 chip's power and ground pins.
    2. Connect the chip's input pins to switches and its output pins to LEDs.
    3. Test your design by making sure that all input combinations produce the correct outputs.