PAL and GAL programmers

Most recent revision dated Nov 3 2019 updated Oct 6 2024. Corrections appreciated. - Herb Johnson

Introduction

PALs and GALs in DIP packages with 16, 18, 20 pins were used in the mid-1970's, 80's and 90's to replace simple random logic. They were used Tilmann Rei's GIDE IDE interface (16V8, 20V8); in Compupro S-100 boards and in other microcomputers and minicomputers. The older PAL devices are bits of logic with fusable links; programming them consists of burning up appropriate fuses. Later PALs were programmed like UV-erasable PROMs but are usually not reprogrammable or erasable (not UV-erasable). The "GAL" devices are modern PALequivalents, but use EEPROMS to set up the internal logic program; the EEPROMs require complicated signaling protocols to either read-program or write-program, and those protocols are kept secret. Major digital parts distributors like Digikey and Jameco stocked such parts until the late 2010's; some GALs are in production in the 2020's. For all these GALs and PALs, there's often old-stock from surplus IC sellers and arcade game parts resellers. This Web page discusses resources for reading and programming them. Details on how they work are not discussed on this Web page.

In 2011, Tilmann Rey told me: "Lattice has just discontinued all GALs. Since these have been so widely used, they have promised shipment up to 2014 - but you need to order /now/ to really get the parts. The fab (or section) with the related process is being closed, I think they will produce a last run based on the LTB demands. Their replacement suggestions are their smaller MACH CPLDs, but all of them are in QFP packages, and many of them even are 3.3V only. So the era of small PLDs really comes to an end now."

As of late 2019, my general impressions are these. What's called by some "simple" PALs and GALs and PLDs, appear to be out of production except by Microchip who purchased Atmel. Many such parts are still available as unused old stock. GALs which are reprogrammable are sometimes available as used pulls. Of course pulled PALs, programmed only once via fusable-links, are useless for reuse. Old stocks seem available and not too expensive.

In Oct 2024, it was pointed out to me that GALs have three modes of operation: in-use, reading its program, and writing its program. They contain EEPROMs which are read and written seperately from the use of the GAL as a circuit logic device. I'll discuss that in a new section on GAL logic programming and program-reading.

Programming the GALs and PAL's for GIDE

PAL's and GAL's are programmed, after determining the "logic" they will implement, by some kind of "assembler" from logic equations to either an Intel HEX format or a JEDEC format file. An early software tool to create these files is called "PALASM". A Web search for "PALASM" readily found this Web site page on PALASM by Eric Smith from 2004 at brouhaha.com. He provides the original FORTRAN sources from MMI to convert logic equations to JEDEC code which can be used by PAL programmers and simulators.

The brouhaha page above says: "There are additional links to MS-DOS executables at these sites as of 2009". Many of them are dead. As of 2018:
PALASM 2.23d for MS-DOS may be found at this link.. It appears to work in DOSBOX under recent Windows OS's. "
Bitsavers.org and mirrors have a PALASM.
bitsavers documentation
The Web Archive has retained a copy of PALASM 4 V1.5 which covers AMD brand MACH logic.
s100computers has some GAL documentation and PALASM
PALASM on bitsavers.org
Thanks to Alexander Voropay for some of these Web links.

Additional Web sites list PAL and GAL programmers and resources, such as Benoit's Web page on PLD's.

For programmers, in 2013 or so I simply Web-searched for "gal programmer" and found the following inexpensive build-yourself designs. They mostly use a PC's parallel port and run under MS-DOS. This is similar to old-style PIC (Microchip controller) programmers.

Elektor magazine published a GAL programmer. They sell CD-ROMs of several years' issues.
"Project: GAL programmer" by Manfred Nosswitz, Elektor Electronics (magazine), May 1992
"Project: GAL Programmer Upgrade" by M. Nosswitz, Elektor Electronics, June 1993

GALBlast designs as described below; ELM programmer as below; and various hobby-class programmers on Ebay and elsewhere, as below.

GALblast

GALBlast Version 1.6 Manfred Winterhoff at freenet-homepage.de is not available. For some time and up to 2018, an updated version is at armory.com
--a a Czech version is at this link

Note in 2015, updated 2018: galblast design and software has been replicated or modified a few times. Look around the Web for variations of it. For instance, Bruce Abbott' site shows two variations of the GALblast hardware he calls ATFblast. There's also a C-sourced program to operate it, runable in Windows 3.1/95/XP. These were updated in 2018. Eagle PCB CAD files are apparently included on site.

In Oct 2018, I was contacted by Kees Schoenmakers, who referred me to his GitHub page for his Perl-Tk software version he calls "perlblast". This version runs on Linux and Win XP (and earlier). The Perl code is based on galblast; Perl requires a Perl interpreter to run Perl programs. He says perlblast works with USB/parallel dongles. There's discussion about Linux USB device features, and in discussion with me he's reported progress on resolving some Windows issues. Details are on his Github pages.

hobby and commercial programmers

One can find GAL programmers as kits or products for $50-$100 (and up of course), from eBay sellers. Buyer beware of course: some of this stuff takes a few weeks to arrive from Asia or thereabouts, and may not be in English! Some of the "chinese" PROM programmers claim to support PALs and GALs, but they may be limited to specific brands (like Lattice on TL866A). I don't believe the so-called "Willem EPROM Programmers" will program PALs or GALs. For older programmers, be sure you can obtain the MS-DOS software to operate them and download to them, that you have a PC with a parallel port or serial port, etc.

In October 2018, Dave Colglazier contacted me and offered a PDF of MMI's own PAL programmer, MMI-535. Here's that PDF, on the classiccmp Web site section supported by Rich Cini. This manual includes a schematic; the circuits don't include a microprocessor, so there's no "code" running in it. Dave worked in the digital electronics field for decades from the 1960's forward, doing technical work as well as running a business. So he's familiar with things ranging from Cray Research and ECL, to faxes and microwave tech, patents, and lots of "tech" of those decades. Elsewhere on Rich's part of classiccmp, there's more of his work on Rockwell AIM 65 microcomputers.

ELM programmer

ELM Home Page, Simple GAL Programmer , note some documentation and code is Japanese. It uses an MS-DOS program running on a PC with a parallel port connection to the ELM programming board.

In 2015, A member of now-defunct N8VEM-S100 group, David Fry, layed out a PC board which used the ELM software & hardware design, and sold several in early 2015. He's out of boards, but he sent me his board design files. Fry responded Sept 2016, in the Google group "S100Computers" which took over the N8VEM group, response subject "Elm simple GAL programmer clone info?" Here's the files he posted there.

In 2015 I looked at the pgatool code and docs from the Japanese Web pages. I was able to Google-translate not only the docs, but the source code and I patched the MS-DOS binary. Here's the resulting files.

WINCUPL

In Nov 2019 I learned that Microchip, who purchased Atmel, continues to produce PAL and GAL devices. They also provide at no charge, an Atmel software tool called WINCUPL; apparently dated 2006. It apparently supports "Microchip SPLDs and CPLDs" and "CUPL design entry, simulation, and the latest Fitter technologies." Instructions at the download Web page say "Serial Number for WinCUPL: 60008009" for installation. Other links on the page (this date) are to user documents, Atmel designs, etc. Be aware that various brands of PALs and GALs may require various programming methods, so the programming side of this package may not work for all PALs and GALs. However this package may produce a data-file compatible with some device programmers. (Thanks to Don North for this reference. - Herb)

PAL vs GAL: GAL programming very different, depends also on brand, model

In discussions in Yahoo group "cosmacelf" (RCA 1802 microprocessor), some members discussed the issues of programming small 22V10 GALs, to build replacment circuits for an unavailable RCA video chip. It was noted that Atmel-brand GALs are not programmable by the same programmers that support only older brands like Lattice. Commercial PAL programmers list brands as well as part numbers. The consensus stated that some PAL producers don't provide programming specifications, except to commercial-class PAL/GAL/PROM programmer manufacturers. The implication is that while the GALs follow the part-number specification for operation, they use non-standardized (proprietary) programming algorithms.

Why not distribute the algorithms? It's speculated that it's an issue of quality; if mis-programmed the GAL manufacturer would be blaimed rather than the programmer. It was also speculated that some GAL manufacturers don't want to spend time with "hobbyists" or individual techs over programming methods.

Bottom line: when considering PALs and GALs, look for both part models and brands that you know your programming technology can program. You may be disappointed when buying various "import" (non USA) hobby class programmers, which list devices but not brands. Or they simply don't program the parts you have, say because some specification changed or your parts are some later revision.

GAL logic programming and logic reading

PALs are older programmed logic devices, which generally were programmed by blowing internal fuses or charging up internal memory cells (like old UV EPROMs but without UV optical windows). GAL devices are more like 21st century microcontrollers, with internal EEPROM memory that controls the operation of the GAL's logic program. In addition, some GALs have a "security fuse" which stops reading or rewriting the EEPROM memory. These differences was made apparent in an Oct 2024 discussion I had about use of undocumented GALs in a microprocessor project. I followed up by reading some Atmel 22V10 documentation.

Background: In the (groups.io group) cosmacelf in Oct 2024, there was a discussion about how to read the logic of, and replicate by programming, some 22V10 GALs in use in someone's 8-bit microcomputer project. The fear about reading out the GAL was, if the wrong brand and model of GAL was selected in the GAL programmer that reading the GALs' programming might damage it. Of course, another issue is the capability of programming another GAL with the information read. Here's an informative response I got from David Madole, when I posted to ask the general question. Text in []'s are my edits I made to the response, for clarity. - Herb

Quote: You need to bear in mind these [22V10 GAL] parts [for this product] have three modes, not two. [The three modes are: in-use in the intended circuit; program reading; and program writing.]

The "circuit in use" does not read the program in the part, it executes the program in the part [which performs the logical functions as programmed]. For execution mode, these parts are 5 volts only. Access to the program itself, whether for reading or writing, requires an additional 12 volt supply [and a complex signaling protocol].

Lattice [brand] GALs are programed though a parallel protocol and most pins have a dual function during programming or reading. Atmel [brand] GALs are programed though a serial protocol and only a few pins are used during programming or reading. While one of these [brands] is most likely what the parts in question are, they might not be. They might be ICT GALs (yet another protocol), or they might even be PALs (yet another protocol).

With protocols and pin usages so different, is it possible that what could be mistaken as a program read for one part could be by chance interpreted as a write or erase operation by the wrong part?

If someone cared enough to know, they could try to compare the [documented] programming algorithms and pin usages. But the right and easiest answer is to know what the [brand and model are, of the GAL] part you put in the programmer [by removing the indentifying paper label on the part].

So the question [of avoiding damage by comparing documentation of the features of different GALs] is potentially much more complex. - David Madole

From earlier in the discussion: For [programming] Atmel parts at least, you need to use the right part number including that there are some special suffix characters for Atmel parts beyond those on the chips that specify PAL or GAL mode and whether the shutdown pin works.- end quote

As far as reading the GAL data sheet about programming. I discovered GAL documentation deliberately does not include program read and write. Instead the designer is referred to manufacturers of GAL programming products - period. As far as documenting a "security fuse", here's a guote from an Atmel 22V10 data sheet. - Herb

Security Fuse Usage: A single fuse is provided to prevent unauthorized copying of the ATF22LV10C fuse patterns. Once programmed, fuse verify [program read] and preload [program write] are inhibited. However, the 64-bit User Signature remains accessible. The security fuse should be programmed last, as its effect is immediate.

Home-built PAL programmers or programming software: David Madole shared these links in Oct 2024 as "informative".

ATF22V10C Programming Algorithm
CUPL, galette, TL866II+ programmer
simple ELM, GAL programmer from PC parallel port for 1999

GAL operation too complex to figure out

Another suggestion in the cosmacelf discussion, was to operate the GAL just as intended, in a circuit. By exercising all the inputs manually and documenting the outputs; and by interpreting the use of the GAL in the circuit; maybe someone could reverse-engineer the logical operations of the GAL. Seems to me, GALs incorporate both gate logic and clocked (flipflop) logic. So trying to second-guess all those operations just from the data, is just impractically complicated. It may be only less complicated, to reverse engineer the operations from reviewing the schematics and design. The whole point of programmed logic devices is to simplify production, save board space, reduce parts - the cost is to bury the operation of the logic inside a GAL. - Herb

Fuse-link PROMs

Before the PAL devices like the 16V and 16L series, there were smaller fusible-link PROM devices to provide for programmable logic. These devices include the Signetic 82S23 and 82S123 and many others, from the early 1970's. They are programmed by providing current surges to open fusible links which disable parts of their internal "logic". They are small enough that one can do them "by hand", bit by bit.

For more information about bipolar fusable PROMS in vintage computers, check this linked Web page where I show several examples and how-to-read and program them.


Contact information:

Herb Johnson
New Jersey, USA
To email @ me, see see my ordering Web page.

Copyright © 2024 Herb Johnson