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
29 # -------------------------------------------------------------------
30 # ThanX to Johan Andersson (johan@homemail.com), modified by Thomas Nau
31 # the definition of a plcc package for base code to make qfp package.
32 # modified for correct pad numbering by Holm Tiffe
34 # Code from plcc.inc modified by Thomas Olson to make this qfp.inc definition.
35 # Although in retrospec quad flat packs are more diverse than this algorithm will do.
36 # Many qfp are the same physical size but have more thus narrower pads.
41 # $5: additional border (will be ignored)
44 `define(`QUARTER', `eval($4 /4)')
45 define(`OFFSET', `eval((QUARTER +1) /2)')
46 define(`WIDTH', `eval((QUARTER-1) *25 +2*50)')
47 define(`CENTER', `eval(WIDTH / 2)')
48 define(`NUMPINS', `$4')
49 Element(0x00 "$1" "`$2'" "$3" 100 CENTER 0 100 0x00)
55 #define(`count', `eval(OFFSET+1)')
57 forloop(`i', 1, QUARTER,
58 `PAD(eval(X-65), Y, eval(X+5), Y, 15, count)' `define(`count', incr(count))'
59 `define(`Y', eval(Y+25))'
65 forloop(`i', 1, QUARTER,
66 `PAD(X, eval(Y+65), X, eval(Y-5), 15, count)' `define(`count', incr(count))'
67 `define(`X', eval(X+25))'
72 define(`Y', eval(WIDTH-50))
73 forloop(`i', 1, QUARTER,
74 `PAD(eval(X+65), Y, eval(X-5), Y, 15, count)' `define(`count', incr(count))'
75 `define(`Y', eval(Y-25))'
79 define(`X', eval(WIDTH-50))
81 forloop(`i', 1, QUARTER,
82 `PAD(X, eval(Y-65), X, eval(Y+5), 15, count)' `define(`count', incr(count))'
83 `ifelse(eval(count > NUMPINS), 1, `define(`count', 1)')'
84 `define(`X', eval(X-25))'
87 ElementLine(28 0 WIDTH 0 10)
88 ElementLine(WIDTH 0 WIDTH WIDTH 10)
89 ElementLine(WIDTH WIDTH 0 WIDTH 10)
90 ElementLine(0 WIDTH 0 28 10)
91 ElementLine(0 28 28 0 10)
93 ElementArc(80 80 20 20 0 360 10)
98 # -------------------------------------------------------------------