Well, you can’t hahahah. just kidding.
This is a quick guide and I am assuming you can understand some basic boolean logic.
First you need 3 things:
1- A GAL16V8 of course. From EBAY? Sure.
2- A GAL programmer, from our chinese friends. This is the one I bought and seems to work fine so far and is kind of cheap.
3- winCUPL, you can get it from here
Fine, you installed all and got all the items. so what are we going to create? Well in this example we will create a pass thru and an inverter. basically a circuit like the following.
This is a circuit that have one Input, in leg 2 and two outputs, which is passthru in leg 12 and the negation operation in leg 13.
those follow the next boolean table
We are going to program this configuration with CUPL language using WinCUPL as follows.
Now Lets compile it using the Device Dependent Compile button, which will use the device specified in the Device tag, in this case g16v8 to create a jed file.
Success, now we will use the software that should have been included with your G540 Programmer as follows.
The next window will open and as long as it looks like this it should be good. just click ok.
Next step is to select your device, which if you bought the lattice gal GAL16V8D should be like this. First click the Select button and look for the device.
Finally, the programming window appear, place your gal in the programmer, (check that your programmer is conected to the pc) . Ensure the notch is in the correct direction and that the gal is placed at the base like this.
Then click Prog button and hopefully it will work.
Now Prepare a breadboard like this.
And test :3
the schematic is like this.
- Resistor is 220 ohms
- voltage is 5v, from an arduino :), bt any 5v source will do.
- I didn’t put resistors in my LEDs but they may be needed ?
So this is the basic guide, I skip how to install the software, but hope it helps you to jumpstart into gals, I will explain more in detail in future post about this old and forgotten world of PLA (Programable logic Arrays) which GAL is part of :).