4 # PCB, interactive printed circuit board design
5 # Copyright (C) 1994,1995,1996 Thomas Nau
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 # Contact addresses for paper mail and Email:
22 # Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 # Thomas.Nau@rz.uni-ulm.de
28 # -------------------------------------------------------------------
29 # the definition of a single connector
34 # $5: number of columns
36 define(`PKG_CONNECTOR',
37 `define(`MAXY', `eval(`$4' * 100)')
38 define(`MAXX', `eval(`$5' * 100)')
39 Element(0x00 "$1" "`$2'" "$3" eval(MAXX + 60) 0 3 100 0x00)
41 forloop(`row', 1, $4, `forloop(`col', 1, $5,
42 `PIN(eval(col * 100 -50), eval(row * 100 -50), 60, 38, eval((row-1)*$5+col))
44 ElementLine(0 0 0 MAXY 10)
45 ElementLine(0 MAXY MAXX MAXY 10)
46 ElementLine(MAXX MAXY MAXX 0 10)
47 ElementLine(MAXX 0 0 0 10)
48 ElementLine(0 100 100 100 10)
49 ElementLine(100 100 100 0 10)
53 # -------------------------------------------------------------------
54 # the definition of a 2 column header connector with DIP
55 # pin numbering. Use PKG_CONNECTOR for ribbon cable numbering
62 define(`PKG_CONNECTOR_DIL',
63 `define(`MAXY', `eval(`$4' * 100)')
65 Element(0x00 "$1" "`$2'" "$3" eval(MAXX + 60) 0 3 100 0x00)
67 forloop(`row', 1, eval(`$4'),
68 `PIN(50, eval(row * 100 -50), 60, 38, eval(row))
70 forloop(`row', 1, eval(`$4'),
71 `PIN(150, eval(($4 + 1 - row) * 100 -50), 60, 38, eval($4 + row))
73 ElementLine(0 0 0 MAXY 10)
74 ElementLine(0 MAXY MAXX MAXY 10)
75 ElementLine(MAXX MAXY MAXX 0 10)
76 ElementLine(MAXX 0 0 0 10)
77 ElementLine(0 100 100 100 10)
78 ElementLine(100 100 100 0 10)
84 # ---------------------------------------------------------------
85 # base definition (housing) for connector DIN 41.612
86 # 11/95 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
87 # female package added 05/96 also by Volker Bosch
89 # derived from above for 48 - Pin Connectors from the same series
95 # $4: requested rows a,b,c
97 define(`PKG_DIN41_612MALE_SMALL',
98 `define(`XPOS', `eval(300 + 100 * i)')
100 Element(0x00 "$1" "`$2'" "$3" 520 550 0 200 0x00)
103 ifelse(index(`$4', `a'), `-1', ,
104 forloop(`i', 1, 16, `PIN(eval(2000 - 100 *i), 300, 60, 30, i)
108 ifelse(index(`$4', `b'), `-1', , `define(`MINY', 200)'
109 forloop(`i', 1, 16, `PIN(eval(2000 - 100 *i), 200, 60, 30, eval(16 + i))
113 ifelse(index(`$4', `c'), `-1', , `define(`MINY', 100)'
114 forloop(`i', 1, 16, `PIN(eval(2000 - 100 *i), 100, 60, 30, eval(32 + i))
116 # Rueckseite Kontaktstifte
117 forloop(`i', 1, 16, `ElementLine(XPOS MINY XPOS 375 40)
120 # Befestigungsbohrung
121 Pin( 200 400 120 80 "M1" 0x01)
122 Pin(2100 400 120 80 "M2" 0x01)
125 ElementLine( 100 300 320 300 20)
126 ElementLine( 320 300 320 395 20)
127 ElementLine( 320 395 320 620 10)
128 ElementLine( 320 620 200 620 10)
129 ElementLine( 200 620 100 620 20)
130 ElementLine( 100 620 100 300 20)
133 ElementLine(1980 300 2200 300 20)
134 ElementLine(2200 300 2200 620 20)
135 ElementLine(2200 620 2100 620 20)
136 ElementLine(2100 620 1980 620 10)
137 ElementLine(1980 620 1980 395 10)
138 ElementLine(1980 395 1980 300 20)
141 ElementLine( 320 395 1980 395 20)
144 ElementLine( 200 620 200 800 20)
145 ElementLine( 200 800 2100 800 20)
146 ElementLine(2100 800 2100 620 20)
151 define(`PKG_DIN41_612FEMALE_SMALL',
153 define(`MAXX1', `eval(MAXX -170)')
154 define(`MAXX2', `eval(MAXX -40)')
155 Element(0x00 "$1" "`$2'" "$3" 50 100 3 200 0x00)
158 ifelse(index(`$4', `a'), `-1', ,
159 forloop(`i', 1, 16, `PIN(200, eval(300 + 100 *i), 60, 30, i)
163 ifelse(index(`$4', `b'), `-1', ,
164 forloop(`i', 1, 16, `PIN(300, eval(300 + 100 *i), 60, 30, eval(16 + i))
168 ifelse(index(`$4', `c'), `-1', , `define(`MAXX', 520)'
169 forloop(`i', 1, 16, `PIN(400, eval(300 + 100 *i), 60, 30, eval(32 + i))
172 # Befestigungsbohrung
173 Pin(290 180 120 80 "M1" 0x01)
174 Pin(290 2120 120 80 "M2" 0x01)
176 # Aeussere Begrenzung
177 ElementLine( 80 80 MAXX 80 20)
178 ElementLine(MAXX 80 MAXX 2220 20)
179 ElementLine(MAXX 2220 80 2220 20)
180 ElementLine( 80 2220 80 80 20)
183 ElementLine(120 320 MAXX1 320 10)
184 ElementLine(MAXX1 320 MAXX1 360 10)
185 ElementLine(MAXX1 360 MAXX2 360 10)
186 ElementLine(MAXX2 360 MAXX2 1940 10)
187 ElementLine(MAXX2 1940 MAXX1 1940 10)
188 ElementLine(MAXX1 1940 MAXX1 1980 10)
189 ElementLine(MAXX1 1980 120 1980 10)
190 ElementLine(120 1980 120 320 10)
197 # ---------------------------------------------------------------
198 # base definition (housing) for connector DIN 41.612
199 # 11/95 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
200 # female package added 05/96 also by Volker Bosch
205 # $4: requested rows a,b,c
207 define(`PKG_DIN41_612MALE',
208 `define(`XPOS', `eval(300 + 100 * i)')
210 Element(0x00 "$1" "`$2'" "$3" 520 550 0 200 0x00)
213 ifelse(index(`$4', `a'), `-1', ,
214 forloop(`i', 1, 32, `PIN(eval(3600 - 100 *i), 300, 60, 30, i)
218 ifelse(index(`$4', `b'), `-1', , `define(`MINY', 200)'
219 forloop(`i', 1, 32, `PIN(eval(3600 - 100 *i), 200, 60, 30, eval(32 + i))
223 ifelse(index(`$4', `c'), `-1', , `define(`MINY', 100)'
224 forloop(`i', 1, 32, `PIN(eval(3600 - 100 *i), 100, 60, 30, eval(64 + i))
226 # Rueckseite Kontaktstifte
227 forloop(`i', 1, 32, `ElementLine(XPOS MINY XPOS 375 40)
230 # Befestigungsbohrung
231 Pin( 200 400 120 80 "M1" 0x01)
232 Pin(3700 400 120 80 "M2" 0x01)
235 ElementLine( 100 300 320 300 20)
236 ElementLine( 320 300 320 395 20)
237 ElementLine( 320 395 320 620 10)
238 ElementLine( 320 620 200 620 10)
239 ElementLine( 200 620 100 620 20)
240 ElementLine( 100 620 100 300 20)
243 ElementLine(3580 300 3800 300 20)
244 ElementLine(3800 300 3800 620 20)
245 ElementLine(3800 620 3700 620 20)
246 ElementLine(3700 620 3580 620 10)
247 ElementLine(3580 620 3580 395 10)
248 ElementLine(3580 395 3580 300 20)
251 ElementLine( 320 395 3580 395 20)
254 ElementLine( 200 620 200 800 20)
255 ElementLine( 200 800 3700 800 20)
256 ElementLine(3700 800 3700 620 20)
261 define(`PKG_DIN41_612FEMALE',
263 define(`MAXX1', `eval(MAXX -170)')
264 define(`MAXX2', `eval(MAXX -40)')
265 Element(0x00 "$1" "`$2'" "$3" 50 100 3 200 0x00)
268 ifelse(index(`$4', `a'), `-1', ,
269 forloop(`i', 1, 32, `PIN(200, eval(300 + 100 *i), 60, 30, i)
273 ifelse(index(`$4', `b'), `-1', ,
274 forloop(`i', 1, 32, `PIN(300, eval(300 + 100 *i), 60, 30, eval(32 + i))
278 ifelse(index(`$4', `c'), `-1', , `define(`MAXX', 520)'
279 forloop(`i', 1, 32, `PIN(400, eval(300 + 100 *i), 60, 30, eval(64 + i))
282 # Befestigungsbohrung
283 Pin(290 180 120 80 "M1" 0x01)
284 Pin(290 3720 120 80 "M2" 0x01)
286 # Aeussere Begrenzung
287 ElementLine( 80 80 MAXX 80 20)
288 ElementLine(MAXX 80 MAXX 3820 20)
289 ElementLine(MAXX 3820 80 3820 20)
290 ElementLine( 80 3820 80 80 20)
293 ElementLine(120 320 MAXX1 320 10)
294 ElementLine(MAXX1 320 MAXX1 360 10)
295 ElementLine(MAXX1 360 MAXX2 360 10)
296 ElementLine(MAXX2 360 MAXX2 3540 10)
297 ElementLine(MAXX2 3540 MAXX1 3540 10)
298 ElementLine(MAXX1 3540 MAXX1 3580 10)
299 ElementLine(MAXX1 3580 120 3580 10)
300 ElementLine(120 3580 120 320 10)
306 # ---------------------------------------------------------------
307 # base definition (housing) for connector DIN 41.651 laying and standing
308 # 05/96 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
310 # Changed hole size from 20 mils to 28 mils; 07/00 LRDoolittle@lbl.gov
317 define(`PKG_DIN41_651LAY',
318 `define(`MAXY', `eval($4/2 *100 +400)')
319 define(`CENTERY', `eval($4/2 *50 +425)')
320 Element(0x00 "$1" "`$2'" "$3" 400 250 3 200 0x00)
322 forloop(`i', 1, eval($4 / 2),
323 `PIN(100, eval(100*i +400), 60, 40, eval(2*i-1))
324 PIN(200, eval(100*i +400), 60, 40, eval(2*i))
327 # Befestigungsbohrung
328 Pin(180 270 100 80 "M1" 0x01)
329 Pin(180 eval(MAXY+230) 100 80 "M2" 0x01)
332 ElementLine(80 70 335 70 20)
333 ElementLine(335 70 770 200 20)
334 ElementLine(770 200 770 300 20)
335 ElementLine(770 300 610 390 20)
336 ElementLine(610 390 610 eval(MAXY+150) 20)
337 ElementLine(610 eval(MAXY+150) 770 eval(MAXY+200) 20)
338 ElementLine(770 eval(MAXY+200) 770 eval(MAXY+300) 20)
339 ElementLine(770 eval(MAXY+300) 335 eval(MAXY+430) 20)
340 ElementLine(335 eval(MAXY+430) 80 eval(MAXY+430) 20)
341 ElementLine( 80 eval(MAXY+430) 80 70 20)
344 ElementLine(610 eval(CENTERY -50) 435 eval(CENTERY -50) 5)
345 ElementLine(435 eval(CENTERY -50) 435 eval(CENTERY +100) 5)
346 ElementLine(435 eval(CENTERY +100) 610 eval(CENTERY +100) 5)
349 ElementLine(610 450 500 500 5)
350 ElementLine(500 500 610 550 5)
352 # Plazierungsmarkierung == Pin 1
356 define(`PKG_DIN41_651STAND',
357 `define(`MAXY', `eval($4/2 *100 +400)')
358 define(`CENTERY', `eval($4/2 *50 +425)')
359 Element(0x00 "$1" "`$2'" "$3" 50 100 3 200 0x00)
361 forloop(`i', 1, eval($4 / 2),
362 `PIN(200, eval(100*i +400), 60, 40, eval(2*i-1))
363 PIN(300, eval(100*i +400), 60, 40, eval(2*i))
366 ElementLine(90 70 410 70 20)
367 ElementLine(410 70 410 eval(MAXY +430) 20)
368 ElementLine(410 eval(MAXY +430) 90 eval(MAXY +430) 20)
369 ElementLine(90 eval(MAXY +430) 90 70 20)
371 # innerer Rahmen mit Codieraussparung
372 ElementLine(110 350 390 350 5)
373 ElementLine(390 350 390 eval(MAXY +150) 5)
374 ElementLine(390 eval(MAXY +150) 110 eval(MAXY +150) 5)
375 ElementLine(110 eval(MAXY +150) 110 eval(CENTERY +100) 5)
376 ElementLine(110 eval(CENTERY +100) 90 eval(CENTERY +100) 5)
377 ElementLine(90 eval(CENTERY -50) 110 eval(CENTERY -50) 5)
378 ElementLine(110 eval(CENTERY -50) 110 350 5)
381 ElementLine(110 390 150 350 5)
384 ElementLine(200 70 200 350 5)
385 ElementLine(300 70 300 350 5)
388 ElementLine(200 eval(MAXY+150) 200 eval(MAXY+430) 5)
389 ElementLine(300 eval(MAXY+150) 300 eval(MAXY+430) 5)
391 # Plazierungsmarkierung == Pin 1
395 # ---------------------------------------------------------------
396 # base definition (housing) for SUB-D connectors, laying
397 # 11/95 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
398 # female package added 05/96 also by Volker Bosch
399 # Pins reordered, 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
401 # Connector dimensions changed! No, these stupid things don't
402 # line up neatly on a 50 mil grid. Now corresponds to AMP's
403 # Application Specification 114-40013 03-APR-97 Rev B, for
404 # AMPLIMITE[TM] HD-20 Series 454 and 545.
405 # Also pulled silkscreen lines away from pins by NOSMUDGE.
406 # 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
408 # Parameterized silkscreen in terms of PANEL_DISTANCE, the distance
409 # from the drilling holes to the intended edge of the board.
410 # According to the drawing listed above, that should be 398 or 489
411 # plus some unknown flange thickness. For the part I have in my hand
412 # (AMP 747846-4), it's about 365 mils. The original version of this
413 # macro had it hard coded at 460. I also reduced size of pads and holes
414 # to 60/35. The drawing listed above recommends 47 mil holes, the part
415 # in my hand has 28 mil pins.
417 # Status: Female tested, works great, 07-Jan-2000.
424 # base is upper drilling hole
426 define(`PKG_SUBD_LAY_BASE',
427 `define(`BASEX', 1000)
428 define(`BASEY', 1000)
429 define(`PY1', `eval(BASEY +270)')
430 define(`PY2', `eval(PY1 +($4-1)/2*108)')
431 define(`OFFSET', `eval(($4+1)/2)')
432 define(`PANEL_DISTANCE', 365)
433 Element(0x00 "$1" "`$2'" "$3" eval(BASEX-0) eval(PY2-0) 1 150 0x00)
435 # Gehaeuse (schmaler Kasten incl. Bohrungen)
436 define(`X1', `eval(BASEX-PANEL_DISTANCE)')
437 define(`Y1', `eval(PY1-390)')
438 define(`X2', `eval(BASEX-PANEL_DISTANCE+30)')
439 define(`Y2', `eval(PY2+390)')
440 ElementLine(X1 Y1 X2 Y1 10)
441 ElementLine(X2 Y1 X2 Y2 10)
442 ElementLine(X2 Y2 X1 Y2 10)
443 ElementLine(X1 Y2 X1 Y1 10)
444 ElementLine(X1 eval(Y1+60) X2 eval(Y1+60) 10)
445 ElementLine(X1 eval(Y1+180) X2 eval(Y1+180) 10)
446 ElementLine(X1 eval(Y2-60) X2 eval(Y2-60) 10)
447 ElementLine(X1 eval(Y2-180) X2 eval(Y2-180) 10)
449 # Gehaeuse (aeusserer Kasten)
450 # This part of the connector normally hangs off the circuit board,
451 # so it is confusing to actually mark it on the silkscreen
452 # define(`X1', `eval(BASEX-PANEL_DISTANCE-260)')
453 # define(`Y1', `eval(PY1-100)')
454 # define(`X2', `eval(BASEX-PANEL_DISTANCE)')
455 # define(`Y2', `eval(PY2+100)')
456 # ElementLine(X1 Y1 X2 Y1 20)
457 # ElementLine(X2 Y1 X2 Y2 10)
458 # ElementLine(X2 Y2 X1 Y2 20)
459 # ElementLine(X1 Y2 X1 Y1 20)
461 # Gehaeuse (innerer Kasten)
462 define(`X1', `eval(BASEX-PANEL_DISTANCE+30)')
463 define(`Y1', `eval(PY1-160)')
464 define(`X2', `eval(BASEX-230)')
465 define(`Y2', `eval(PY2+160)')
466 ElementLine(X1 Y1 X2 Y1 20)
467 ElementLine(X2 Y1 X2 Y2 20)
468 ElementLine(X2 Y2 X1 Y2 20)
469 ElementLine(X1 Y2 X1 Y1 10)
474 # Befestigungsbohrung
475 Pin(BASEX BASEY 250 125 "C1" 0x01)
476 Pin(BASEX eval(PY2+270) 250 125 "C2" 0x01)
480 define(`PKG_SUBD_MALE_LAY',
481 `define(`SUBD_SUBFUNCTION',
483 define(`NOSMUDGE', 40)
485 forloop(`i', 1, eval($4/2),
486 `define(`Y', eval(PY1 +(i-1)*108))
487 PIN(eval(BASEX+56), Y, 60, 35, i)
488 ElementLine(eval(BASEX+56-NOSMUDGE) Y X2 Y 20)
491 # Last pin in first row
492 PIN(eval(BASEX+56), PY2, 60, 35, OFFSET)
493 ElementLine(eval(BASEX+56-NOSMUDGE) PY2 X2 PY2 20)
496 forloop(`i', 1, eval($4/2),
497 `define(`Y', eval(PY1 +(i-1)*108+54))
498 PIN(eval(BASEX-56), Y, 60, 35, eval(i+OFFSET))
499 ElementLine(eval(BASEX-56-NOSMUDGE) Y X2 Y 20)
501 # Plazierungsmarkierung == PIN 1
502 Mark(eval(BASEX +50) PY1)
504 `PKG_SUBD_LAY_BASE(`$1', `$2', `$3', `$4')'
507 define(`PKG_SUBD_FEMALE_LAY',
508 `define(`SUBD_SUBFUNCTION',
510 define(`NOSMUDGE', 40)
512 PIN(eval(BASEX+56), PY2, 60, 35, 1)
513 ElementLine(eval(BASEX+56-NOSMUDGE) PY2 X2 PY2 20)
515 # Plazierungsmarkierung == PIN 1
516 # Changed PY1 to PY2 13-Dec-1999 LRD
517 Mark(eval(BASEX +56) PY2)
519 # Remainder of the first row
520 forloop(`i', 1, eval($4/2),
521 `define(`Y', eval(PY1 +($4/2-i)*108))
522 PIN(eval(BASEX+56), Y, 60, 35, eval($4/2+i+2-OFFSET))
523 ElementLine(eval(BASEX+56-NOSMUDGE) Y X2 Y 20)
527 forloop(`i', 1, eval($4/2),
528 `define(`Y', eval(PY1 +($4/2-i)*108+54))
529 PIN(eval(BASEX-56), Y, 60, 35, eval($4/2+i+1))
530 ElementLine(eval(BASEX-56-NOSMUDGE) Y X2 Y 20)
533 `PKG_SUBD_LAY_BASE(`$1', `$2', `$3', `$4')'
536 # ---------------------------------------------------------------
537 # definition for a right angle BNC connector,
538 # such as Amphenol 31-5640-1010 or OUPIIN 8928
539 # 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
546 # base is one of the pegs
548 define(`PKG_BNC_LAY',
549 `define(`BASEX', 200)
550 define(`BASEY', -200)
551 Element(0x00 "$1" "`$2'" "$3" BASEX eval(BASEY+200) 3 100 0x00)
553 define(`X1', `eval(BASEX-260)')
554 define(`Y1', `eval(BASEY-90)')
555 define(`X2', `eval(BASEX+290)')
556 define(`Y2', `eval(BASEY+490)')
557 ElementLine(X1 Y1 X2 Y1 10)
558 ElementLine(X2 Y1 X2 Y2 10)
559 ElementLine(X2 Y2 X1 Y2 10)
560 ElementLine(X1 Y2 X1 Y1 10)
561 PIN(eval(BASEX-200), eval(BASEY+200), 60, 35, 1)
562 PIN(eval(BASEX-200), eval(BASEY+100), 60, 35, 2)
563 PIN(eval(BASEX), eval(BASEY), 100, 81, m1)
564 PIN(eval(BASEX), eval(BASEY+400), 100, 81, m2)
568 # ---------------------------------------------------------------
569 # definition for MTA-100 header,
570 # such as AMP 640456-x
578 # 0.038" drill diameter
579 # 0.060" pad diameter
580 # Available with 2 through 15 pins
582 define(`PKG_MTA_100',
584 define(`PITCH', `100')
585 define(`NPINS', `eval($4)')
586 define(`SILKW', `10')
587 define(`SILKXOFS', `75')
588 define(`SILKYOFS', `115')
589 define(`SILKX1', `-SILKXOFS')
590 define(`SILKX2', `eval((NPINS-1)*PITCH + SILKXOFS)')
591 define(`SILKY1', `-SILKYOFS')
592 define(`SILKY2', `SILKYOFS')
593 define(`SILKY3', `eval(SILKYOFS+2*SILKW)')
595 Element(0x00 "$1" "`$2'" "$3" 0 140 0 150 0x00)
597 forloop(`i', 1, `$4',
598 `PIN(eval((i-1)*100), 0, 60, 38, `i')
601 define(`X2', `eval(`$4'*100-78)')
602 ElementLine(SILKX1 SILKY1 SILKX2 SILKY1 SILKW)
603 ElementLine(SILKX2 SILKY1 SILKX2 SILKY3 SILKW)
604 ElementLine(SILKX2 SILKY2 SILKX1 SILKY2 SILKW)
605 ElementLine(SILKX1 SILKY3 SILKX1 SILKY1 SILKW)
607 ElementLine(SILKX2 SILKY3 SILKX1 SILKY3 SILKW)
612 # ---------------------------------------------------------------
613 # definition for MTA-156 header,
614 # such as AMP 640445-x
615 # 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
622 # base is pin 1 (although I don't claim to know which end is
623 # conventionally pin 1)
626 # 0.078 end clearance
627 # 0.180 and 0.120 side clearance
628 # Available with 2 through 24 pins
630 define(`PKG_MTA_156',
632 Element(0x00 "$1" "`$2'" "$3" 0 140 0 150 0x00)
634 forloop(`i', 1, `$4',
635 `PIN(eval((i-1)*156), 0, 100, 70, `i')
638 define(`X2', `eval(`$4'*156-78)')
639 ElementLine(X1 120 X2 120 10)
640 ElementLine(X2 120 X2 -180 10)
641 ElementLine(X2 -180 X1 -180 10)
642 ElementLine(X2 -80 X1 -80 10)
643 ElementLine(X1 -180 X1 120 10)
646 # ---------------------------------------------------------------
647 # definition for a vertical SMA connector,
648 # 6/00 Larry Doolittle <LRDoolittle@lbl.gov>
655 # base is the center pin
657 define(`PKG_SMA_VERT',
660 Element(0x00 "$1" "`$2'" "$3" BASEX eval(BASEY+150) 3 100 0x00)
662 define(`X1', `eval(BASEX-160)')
663 define(`Y1', `eval(BASEY-160)')
664 define(`X2', `eval(BASEX+160)')
665 define(`Y2', `eval(BASEY+160)')
666 ElementLine(X1 Y1 X2 Y1 10)
667 ElementLine(X2 Y1 X2 Y2 10)
668 ElementLine(X2 Y2 X1 Y2 10)
669 ElementLine(X1 Y2 X1 Y1 10)
670 PIN( BASEX , BASEY , 80, 30, 1)
671 PIN(eval(BASEX-100), eval(BASEY+100), 80, 30, 2)
672 PIN(eval(BASEX-100), eval(BASEY-100), 80, 30, 3)
673 PIN(eval(BASEX+100), eval(BASEY+100), 80, 30, 4)
674 PIN(eval(BASEX+100), eval(BASEY-100), 80, 30, 5)
677 # ---------------------------------------------------------------
678 # definition for a Molex high density connector, 53467/53645
679 # Board-to-Board 0.635mm (0.25") Ptich Plug - SMT Dual Row, Vertical Stacking
680 # Reference: http://www.molex.com/product/micro/53467.html
681 # 4/01 Larry Doolittle <LRDoolittle@lbl.gov>
688 # base is on the symmetry line, between pins 1 and 2
690 define(`PKG_MOLEX_025',
691 `define(`PINPAIRS',`eval($4/2)')
692 Element(0x00 "$1" "`$2'" "$3" 0 0 3 100 0x00)
694 forloop(`i', 1, PINPAIRS,
695 `define(`Y', eval(25*(i-1)) )'
696 `PAD( 54, Y, 111, Y, 14, eval(i*2-1))'
697 `PAD(-111, Y, -54, Y, 14, eval(i*2))'
699 define(`ENDY',eval(25*(PINPAIRS-1)))
701 # Keying is done with two sizes of alignment pins: 35 and 28 mils
702 Pin(0 -50 50 35 "M1" 0x01)
703 Pin(0 eval(ENDY+50) 43 28 "M2" 0x01)
705 # ends of mounting pads are 71 and 169 mils from end pad centers
706 PAD(0, -110, 0, -130, 79, M3)
707 PAD(0, eval(ENDY+110), 0, eval(ENDY+130), 79, M4)
709 define(`BOXY',eval(ENDY+150))
710 ElementLine(-100 -150 50 -150 10)
711 ElementLine( 50 -150 100 -100 10)
712 ElementLine( 100 -100 100 BOXY 10)
713 ElementLine( 100 BOXY -100 BOXY 10)
714 ElementLine(-100 BOXY -100 -150 10)
716 # Support for aggregate parts built from this base, like
717 # the nanoEngine below.
718 ifdef(`MOLEX_EXTRA', `MOLEX_EXTRA', )
721 # ---------------------------------------------------------------
722 # definition for a Bright Star nanoEngine, StrongARM single board computer
723 # Reference: http://www.brightstar.com/arm/nanoman.pdf
724 # 4/01 Larry Doolittle <LRDoolittle@lbl.gov>
730 # base borrowed from the Molex connector
732 define(`PKG_NANOENGINE',
733 `define(`MOLEX_EXTRA', `
734 ElementLine(-175 -215 -175 2185 15)
735 ElementLine(-175 2185 1225 2185 15)
736 ElementLine(1225 2185 1225 -215 15)
737 ElementLine(1225 -215 -175 -215 15)
738 Pin(525 -115 125 70 "M5" 0x01)
739 Pin(525 2085 125 70 "M6" 0x01)
741 `PKG_MOLEX_025($1, $2, $3, 160)'
744 # -------------------------------------------------------------------
745 # the definition of a through hole test point
749 # $4: drill diameter (mils)
750 # $5: silk diameter (mils)
754 define(`DRILL', `$4')
755 define(`SILK', `eval($5/2)')
756 define(`PADDIA', `eval(DRILL + 20)')
757 define(`SILKW', `10')
758 Element(0x00 "$1" "`$2'" "$3" -20 eval(-SILK - 60) 0 100 0x00)
760 Pin( 0 0 PADDIA DRILL "1" "1" 0x0)
761 ElementArc(0 0 SILK SILK 0 360 SILKW)
763 # Mark at the common centroid