Below are instructions on how to use WinCUPL software
and a Needham EMP-11 Device Programmer to program a GAL22V10
First, some background on the GAL22V10 chip:
- It is manufactured by the Lattice Semiconductor Corporation.
- The DIP version of the chip has 24 pins:
- Pin 12 is ground.
- Pin 24 is VCC (+5 V).
- Pins 1 through 11 and pin 13 are inputs.
- Pins 14 through 23 can be configured as inputs or as outputs.
- For more info, see the data
Next, some background on the WinCUPL software:
- It is produced by the Atmel Corporation.
- It can be used to program many different programmable logic devices
(PLDs), including the GAL22V10.
- For more info, or to download the software for free, visit Atmel's
Next, some background on the Needham EMP-11 Device Programmer:
- It was manufactured by Needham Electronics, Inc. (now out of
- 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
Now here is how to program a GAL22V10 chip:
- Using WinCUPL, create a file describing your design:
- On your computer, start the WinCUPL program.
- Click File > New > Design
- 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
In the Designer box, type your name.
In the Device box, type g22v10.
- An INPUT PINS dialog box will appear. Type
the number of input pins that your design requires, and click OK.
- An OUTPUT PINS dialog box will appear. Type
the number of output pins that your design requires, and click OK.
- A PINNODES dialog box will appear. Type 0,
and click OK.
- WinCUPL opens a window containing a design template, similar
to the one shown below.
- 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.
- 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,
- 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
- W is set equal to AB.
- X is set equal to A+B.
- Y is set equal to AB
- Z is set equal to ABC + ABC
- Save your design to your thumb-drive or the computer's desktop
by clicking File > Save
- Using WinCUPL, compile your design to create a JEDEC file:
- First, make sure that WinCUPL is configured
to produce a JEDEC file. To do this, click Options >
and in the area called Output Files, make sure
that there is a checkmark in the box next to JEDEC.
Then click OK.
- Click Run > Device Dependent Compile.
- 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.
- 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.
- Use the EMP-11 to "burn" your design onto a GAL22V10 chip:
- Using e-mail or a thumb-drive, transfer your JEDEC file to the
- 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.
- On the instructor's computer, click Start > Programs > EMP
Device Programming > EMP Device Programming
Software to start the program that controls the EMP-11.
- A dialog box named Device programmer search will
appear. In the Search for box, select EMP11 and
- A dialog box named Device selection will appear.
For Manufacturer, select Lattice. For Device,
Then click OK.
- 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
- Click the Erase button, which will erase any
information on the GAL22V10 chip.
- Click the Blank Check button, which will verify
that the chip was successfully erased.
- Click the Program button, which will "burn" your
design into the GAL22V10 chip.
- Click the Verify button, which will verify
that your design was successfully "burned" into the chip.
- Raise the EMP-11's lever to release the GAL22V10 chip, and remove
- Test your design:
- On the breadboard, wire the GAL22V10 chip's power and ground
- Connect the chip's input pins to switches and its output pins
- Test your design by making sure that all input combinations
produce the correct outputs.
Send comments to email@example.com