Você está na página 1de 7

Simple GAL Programmer

http://elm-chan.org/works/pgal/report_e.html
June 17, '97
Last update: April 29, '99

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

Lattice Semiconductor Corp. GAL


GAL16V8A/B/C/D
GAL20V8A/B/C/D
Supported Device GAL22V10B/C/D
Microchip PICmicro
PIC16C84
PIC16F84
GAL: VEDIT = 15.0V, STR P/W = 40ms
Programming Specs
PIC: Vpp = 13.5V
IBM AT compatibles: Parallel Port
Control Interface
NEC PC9800: Printer Port
DC7.5 to 15V, 100mA(max)
Power Supply
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.

Simple GAL Programmer 1


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
Device A B C D
GAL16V8 OK OK OK OK
GAL20V8 ? OK ? ?
GAL22V10 - OK OK ?
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

Simple GAL Programmer 2


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".

Simple GAL Programmer 3


Simple GAL Programmer 4
Simple GAL Programmer 5
PGAL parts list (excludes pcb, wireing materials and others)

Item Part Name Part Value Maker Qty Part#


---- ------------ ------------------ --------- ---
-------------------
1 IC LM317T NS 1 U5
2 IC TL497ACN TI 1 U6
3 IC TC74HC595AP Toshiba 2 U1,U2
4 IC TC74HC151AP Toshiba 1 U3
5 IC TC4538BP Toshiba 1 U4
---- ------------ ------------------ --------- ---
-------------------
6 TRANSISTOR 2SA1020 Toshiba 2 Q5,Q6
7 TRANSISTOR RN2202 Toshiba 2 Q3,Q4
8 TRANSISTOR RN1202 Toshiba 2 Q1,Q2
9 DIODE 1S1588 Toshiba 1 D1
10 LED TLR124 Toshiba 1 D2
---- ------------ ------------------ --------- ---
-------------------
11 CAPACITOR 100uF 16V CE 2 C1,C2
12 CAPACITOR 47uF 25V CE 1 C4
13 CAPACITOR 47pF(CH) CERAMIC 1 C3
14 CAPACITOR 10nF MYLOR 1 C5
15 CAPACITOR 100nF CHIP-CERAMIC 4
C6,C7,C8,C9,C10
---- ------------ ------------------ --------- ---
-------------------
16 CAPACITOR 2.2nF CERAMIC 1 C11
17 INDUCTOR ELF05221 TDK 1 L1
18 RESISTER 1M 1 R2
19 RESISTER 4.7k 2 R3,R4
20 RESISTER 1k 4 R5,R6,R7,R10
---- ------------ ------------------ --------- ---
-------------------
21 RESISTER 10 1 R13
22 RESISTER 2.7k 1 R11
23 RESISTER 330 1 R12
24 RESISTER 3.3k x8 array 1 RA1
25 RESISTER 47 1 R1
---- ------------ ------------------ --------- ---
-------------------
26 TRIM RES. RJ-6P 1k COPAL 1 VR1
27 TRIM RES. RJ-6P 5k COPAL 1 VR2
28 ZIF SOCKET 24pin Eris 1 U7
29 CONECTOR XG4C-1031 OMRON 1 CN1
30 CONECTOR DC SOCKET(EIAJ-3) 1 CN2
---- ------------ ------------------ --------- ---
-------------------

Simple GAL Programmer 6


PGAL parts compatibility list

---- ------------ ------------------ --------- --- -------------------


1 IC LM317T NS 1 U5

Equivalent parts can be used.


---- ------------ ------------------ --------- --- -------------------
2 IC TL497ACN TI 1 U6
Typical switching regulator. Other ICs that supplies avobe 10mA can also be
used. When you have any power supply that outputs avobe 18 volts, this
regurator can be replaced with a 78L15.

---- ------------ ------------------ --------- --- -------------------


3 IC TC74HC595AP TOSHIBA 2 U1,U2
4 IC TC74HC151AP TOSHIBA 1 U3
5 IC TC4538BP TOSHIBA 1 U4

Standard C-MOS logics.


---- ------------ ------------------ --------- --- -------------------
6 TRANSISTER 2SA1020 TOSHIBA 2 Q5,Q6

High current swiching transister (requires Ic > 1A, Hfe > 100 and
low satulation voltage). This will be replaced with any other power
transister.
---- ------------ ------------------ --------- --- -------------------
7 DIGI-TRA RN2202 TOSHIBA 2 Q3,Q4
8 DIGI-TRA RN1202 TOSHIBA 2 Q1,Q2

Switching transisters with built-in resisters. Their data sheets will


be found at the following page.
http://www.semicon.toshiba.co.jp/seek/us/td/12stran/120014.htm
---- ------------ ------------------ --------- --- -------------------
9 DIODE 1S1588 TOSHIBA 1 D1
Typical switching diode. (Io=100mA, Vr=30V)

---- ------------ ------------------ --------- --- -------------------


10 LED TLG124 TOSHIBA 1 D2

Power indicator. And to keep minimum current limit of the LM317T.


---- ------------ ------------------ --------- --- -------------------
13 CAPACITOR 47pF(CH) CERAMIC 1 C3
14 CAPACITOR 10nF MYLOR 1 C5
---- ------------ ------------------ --------- --- -------------------
16 CAPACITOR 2.2nF CERAMIC 1 C11

---- ------------ ------------------ --------- --- -------------------


17 INDUCTOR ELF05221 TDK 1 L1

An inductor (220uH).

---- ------------ ------------------ --------- --- -------------------


26 TRIM RES. RJ-6P 1k COPAL 1 VR1
27 TRIM RES. RJ-6P 5k COPAL 1 VR2

Typical trimer resisters.

---- ------------ ------------------ --------- --- -------------------


28 ZIF SOCKET 24pin Eris 1 U7
---- ------------ ------------------ --------- --- -------------------
29 CONNECTER XG4C-1031 OMRON 1 CN1

Cable connector.

Simple GAL Programmer 7

Você também pode gostar