1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
|
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>Minimum effort GAL programming</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAMME\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY LINK="#0000ff" VLINK="#800080">
<B><P><A NAME="Programming"></A>Minimum effort GAL programming</P>
</B><P>This document describes how to program the GAL chips 16V8/A/B/C/D/Z/ZD, 18V10/B, 20V8/A/B/Z, 20RA10/B, 20XV10/B, 22V10/B/C/Z, 26CV12/B, 6001/B, and 6002B from Lattice, National Semiconductors and STMicrosystems with minimal effort.</P>
<B><I><P>You need</P>
</B></I><BLOCKQUOTE>IC socket matching GAL</BLOCKQUOTE>
<BLOCKQUOTE>some 4k7 resistors 0.25W</BLOCKQUOTE>
<BLOCKQUOTE>100nF ceramic capacitor</BLOCKQUOTE>
<BLOCKQUOTE>SubD 25 pin male connector</BLOCKQUOTE>
<BLOCKQUOTE>some 4" short patch cables</BLOCKQUOTE>
<BLOCKQUOTE>5V/250mA and adjustable 8.5-16.5V/20mA laboratory power supply </BLOCKQUOTE>
<B><I><P>Pin assignment of the different GAL chips during programming</P></B></I>
<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=4 WIDTH=474>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>GAL<BR>
<BR>
Pin</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>16V8</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>18V10</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>20V8</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>22V10<BR>
20XV10<BR>
20RA10</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>6001<BR>
6002 </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>26CV12</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>1(2) </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>2(3)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>EDIT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>EDIT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>EDIT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>EDIT</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>EDIT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>EDIT</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>3(4)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA1</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA3</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA1</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>P/V-</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>P/V-</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>4(5)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA2</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA4</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA2</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA0</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA0</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA0</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>5(6)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA3</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA5</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA3</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA1</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA1</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA1</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>6(7)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA4</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SCLK</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA2</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA2</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA2</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>7(9)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA5</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDIN</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA3</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA3</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VCC</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>8(10)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SCLK</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>STB-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA4</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA4</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA4</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>9(11)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDIN</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDOUT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA5</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA5</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>RA5</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA3</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>10(12)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>GND</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>GND</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SCLK</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SCLK</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>SCLK</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA4</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>11(13)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>STB-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDIN</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDIN</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>SDIN</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA5</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>12(14)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDOUT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>GND</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>GND</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>GND</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SCLK</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>13(16)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>STB-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>STB-</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>STB-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDIN</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>14(17)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDOUT</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>SDOUT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>STB-</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>15(18)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDOUT</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>SDOUT</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>16(19)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA2</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>17(20)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA1</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>18(21)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA0</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA0</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>19(23)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>P/V-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>P/V-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>20(24)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VCC</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VCC</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>21(25)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>RA0</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>GND</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>22(26)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>P/V-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>23(27)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>P/V-</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>24(28)</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VCC</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VCC</TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>VCC</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>25</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>26</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>27</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
<TR><TD WIDTH="5%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P>28</TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="14%" VALIGN="TOP">
<P>VIL</TD>
</TR>
</TABLE>
<P>PLCC28 pin numbers of DIL24 chips in paranthesis</P>
<B><I><P>Wiring</P>
</B></I><P>Use 4k7 resistors to connect all VIL pins to the GND pin (we use 4k7 instead of the 10k mentioned in other documents, because some GALs have internal pull-ups of only 50k and illegal input states would occur using 10k resistors). Use 4k7 resistors to connect all other pins (including GND and EDIT) to the VCC pin to prevent open inputs during programming. Connect a 100nF ceramic capacitor between GND and VCC. If you use a GAL with built-in pull-ups, it is possible to go without the resistors, but I would not spare the 100nF capacitor and the pull-up on STB-. Do not try to program Normal GALs without the pull-ups on SCLK, SDIN, P/V, SDOUT, as the pulse rise time would be too slow without pull-ups to cope with the speed of the GALBlast program handling the LPT port.</P>
<P><IMG SRC="direct.gif" WIDTH=291 HEIGHT=193></P>
<P>Use short (max. length 4") wires to connect all pins mentioned below to the SubD 25 parallel printer port connector.</P>
<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=4 WIDTH=192>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>SubD25 pin</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>GAL</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>1 (/STB):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>STB-</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>2 (D0):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>SDIN</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>3 (D1):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA0</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>4 (D2):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA1</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>5 (D3):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA2</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>6 (D4):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA3</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>7 (D5):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA4</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>8 (D6):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>RA5</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>9 (D7):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>SCLK</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>10 (/ACK):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>SDOUT</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>17 (/SELIN):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>P/V-</TD>
</TR>
<TR><TD WIDTH="13%" VALIGN="TOP">
<P> </TD>
<TD WIDTH="50%" VALIGN="TOP">
<P>25 (GND):</TD>
<TD WIDTH="38%" VALIGN="TOP">
<P>GND</TD>
</TR>
</TABLE>
<P>This arrangement was choosen so that an uninitialized port cannot affect the GAL.</P>
<B><I><P>Programming</P>
</B></I><P>Insert the GAL into the socket. Connect GND and VCC to the +5V output of a laboratory power supply. Connect GND and EDIT to an output of the power supply adjusted to +12V.</P>
<P>Launch the GALBlast program and select the parallel printer port used. Load the JEDEC file, the required GAL type should be automatically selected. Plug the SubD25 connector into the printer port, and issue the 'Write GAL' command. The PES of the GAL is read out and the required programming voltage will be displayed. Adjust the power supply to the required programming voltage (without overshoot, or disconnect first the SubD25, than the programming voltage, while adjusting) and continue with 'Write GAL'. Remove the SubD25 plug, turn off the programming voltage, turn off the power supply and remove the GAL from the socket.</P>
<P>--That's all --</P>
<B><I><P>Alternatives</P>
</B></I><P>If this method appears to risky, you may buffer the signals SCLK,RA0..RA5,STB-,P/V-,SDIN using two hex open collector driver ICs 7417 and 4k7 pull ups to VCC, and buffer SDOUT (4k7 pull up to VCC required) using the same chip before it connects to pin 17 (ACK-) of the parallel connector (4k7 pull up to +5V required). This way all GAL pins are electrically disconnected from the PC parallel port and the GAL may be turned off by removing VCC. Furthermore a D/A converter like the AD7524 can be used to select the programming voltage, if its inputs DB0..DB7 are connected to d0..d7 of the parallel port and WR- connects to pin 16 (FEED-), because the GALBlast program will output the required programming voltage (in 0.09375 volt increments if uncalibrated) to d0..d7 and pulls FEED- for a short time to L before ist starts talking to the GAL. Use an op-amp like the CA3140 to amplify the small output voltage (0 to 2.5V) to the required range (0 to 24V). The VCC power supply of the GAL may be controlled by a 5V SPST reed relay driven by INIT- of the parallel port, because the GALBlast program will take this line to L when it talks to the GAL.</P>
<B><I><P>AD7524</P>
</B></I><P>The AD7524 8 bit D/A converter from Analog Devices has been selected because it is wildely available and second sourced (MX7524 from Maxim, TLC7524 from Texas Instruments). The data sheet is available at <A HREF="http://www.analog.com/">http://www.analog.com/</A>. The required reference voltage is generated using a 2.5V voltage reference like the LM336Z2.5 (data sheet at <A HREF="http://www.nsc.com/">http://www.nsc.com</A>). A 4n7 capacitor is used to filter spikes durings changes in the voltage setup completely to prevent the destruction of the GAL chip. You may use an other 8 bit latched DAC like the ZN428 (data sheet at <A HREF="http://www.mitelsemi.com/">http://www.mitelsemi.com/</A> under obsolete parts) which already contains the required voltage reference.</P>
<B><I><P>Power supply</P>
</B></I><P>The least number of parts are required if you use a regulated power supply delivering 24V at 250mA. The voltage only needs to be filtered using an electrolytic capacitor at the PCB. The op-amp will be powered directly from this voltage, a 7805 will regulate the +5V required for the remaining parts including VCC of the GAL. The 7805 will have to dissipate up to 5 watts and requires a heat sink to prevent overheating.</P>
<P>If you have no regulated power supply, you may supply unregulated +27..+35V, as are generated by using a 18V transformer, a bridge B40C250 (or 4 * 1N4004 diodes) and a filter capacitor of 1000uF/40V, and regulate the voltage at the PCB using a 7824. A 1N4004 series diode to protect the circuit from applying power in wrong polarity is not a bad idea.</P>
<P>If you don't want to dissipate 5 watts at the 7805, you may use a power supply of only 9V..12V, 250mA. The +24V programming voltage than has to be generated using a step up switching regulator.</P>
<B><I><P>LM78S40</P>
</B></I><P>Use a LM78S40 (or uA78S40) switching regulator with a 10nF timing capacitor and a 470uH/300mA storage coil suitable for switch mode converters and a 1R2 current limiting resistor. You will find the circuit and hints on construction in the data sheet available at <A HREF="http://www.nsc.com/">http://www.nsc.com/</A>. The LM78S40 is a good choice, because it already contains the required op-amp, but you may use a TL497 or other switching regulator and a separate op-amp (like the CA3140) instead.</P>
<P>If you want to use my predesigned circuit, look <A HREF="hardware.htm">here</A></P></BODY>
</HTML>
|