ELM Home Page

Simple GAL Programmer

June 17, '97
Last update: April 29, '99


GAL LOGIC

It's very easy! This is a simple GAL programmer that hobbyists will able to use the GAL very easy. Building costs are less than 1/10 of cheaper GAL programmers. This is good for parsonal use. And added an optional function to program to the Microchip's PIC with using a socket converter.

Programer Specifications

Supported Device Lattice Semiconductor Corp. GAL
GAL16V8A/B/C/D
GAL20V8A/B/C/D
GAL22V10B/C/D
Microchip PICmicro
PIC16C84
PIC16F84
Programming Specs GAL: VEDIT = 15.0V, STR P/W = 40ms
PIC: Vpp = 13.5V
Control Interface IBM AT compatibles: Parallel Port
NEC PC9800: Printer Port
Power Supply DC7.5 to 15V, 100mA(max)
or a 6LR61(9V) battery
Cost$40 (parts)

Control Method

This GAL programmer is controlled via a parallel port, so that any exclusive interface is not requires for the programmer. It is easy to use on the notebook PCs. When program a PIC, a socket converter is needed.

Build and Adjustment

After assembly is finished, check if the wiring is correct and then power on. If all right, adjust VR1 to Vcc is 5.25 volts, and VR2 to Vpp is 15.0 volts.

PGALCHK.COM is a function check program which checks if programmer works completely or not. The checker program can manipulate each socket pin voltage. Timer test is complete if finished in ten seconds.

If not stabled (other pins changed, etc..), I think it is due to ground bounce. Long cable increases this effect. This programmer reducing ground bounce by add C/R to BUSY line. But longer cable can occures any errors. In this case, change to shorter cable or increase resister value R1.

Some notebook PCs cannot program the PIC. It is due to output 'high' voltage does not reach minimum required 'high' level of the PIC. PIC rquires input 'high' level of 4 volts or above. In this case, add a 74HCT541 to convert TTL level to CMOS level.

Using Control Programs

Control programs are DOS based applcations that running on the IBM AT compatibles and NEC PC9800 series. I recommend to run them on the true DOS. But it seems that stable running on the Windows (in DOS window), I think that because it has a timer on the programmer for get control timings.

Programming a GAL

Confirmed Devices
DeviceABCD
GAL16V8OKOKOKOK
GAL20V8?OK??
GAL22V10-OKOK?
PGAL <jedec file>

Run pgal.com with a JEDEC file, then a message that request to put a GAL device will displayed. Put a GAL on the socket and type any key, start to program. When the programming was finished with successful, remove the GAL from socket. A 20-pin GAL is put on the socket with adjust GND pin. RIght list shows the devices that confirmed to program.

Reading a GAL

PGAL /R
PGAL /R > <file>

Run pgal.com with /R switch and dislpays a GAL type selection menu. Select a required device, display a message that request to put a GAL. Put a GAL on the socket and then type any key, starts to reading, output fuse data and terminates program. Fuse map is output to console, so that please redirect to a file.

Erasing a GAL

PGAL /E

To erase a GAL, run pgal.com with /E switch. But GAL is erased before program so that this command is not used normaly.

Read and Write PIC

PICW84.COM is a control program for program to the PIC. Its usage is same as GAL programming. Hex-file format must be INHX8, and it must includes a configuration word.

Special Attentions

GAL programmer is unknown state when after power is on. At the time, GAL can damaged if put on the socket. At first, don't put a GAL on the socket untill request to put. And put mistake, GAL can also damaged, confirm device type and direction before put on the socket.

If operate with a 6LR61(9V) battery, I recommend to use an alkaline or a NiMH. If operate with a wall adapter, confirm that the output voltage is not exceed 15 volts. When programming the security bit, edit JEDEC file and change "G0" to "G1".

Technical Data

Programmer circuit diagram | PIC ISP adapter | Cable connection diagram | Control programs (Apr. 29, 1999) | Parts collecton list | Parts compatibility list | GAL assembler (16V8, 20V8 and 22V10)

Sign