5 # PCB, interactive printed circuit board design
6 # Copyright (C) 2003 Dan McMahill
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 # Amp (www.amp.com) Specific Footprints
26 # -------------------------------------------------------------------
27 # the definition of a MICTOR connector
32 # $5: pad width (1/1000 mil)
33 # $6: pad length (1/1000 mil)
34 # $7: pad pitch (1/1000 mil)
35 # $8: pad seperation center to center for pads on opposite sides of
36 # the package (1/1000 mil)
37 # $9: define to make the pins get numbered starting with the highest pin
38 # instead of pin 1. Needed for certain brain damaged packages like
39 # the Mini-Circuits KK81
40 # pin 1 will be upper left, pin N/2 will be lower left,
41 # pin N will be upper right as defined here
42 define(`COMMON_AMP_MICTOR_MIL',
47 # number of segments of 38 pins each
48 define(`NSEG', eval(NPADS/38))
50 # pad width in 1/1000 mil
51 define(`PADWIDTH', `$5')
52 # pad length in 1/1000 mil
53 define(`PADLENGTH',`$6')
54 # pad pitch 1/1000 mil
56 # seperation between pads on opposite sides 1/1000 mil
59 # X coordinates for the right hand column of pads (mils)
60 define(`X1', `eval( (PADSEP/2 + PADLENGTH - PADWIDTH/2)/1000)')
61 define(`X2', `eval( (PADSEP/2 + PADWIDTH/2)/1000)')
63 # silk screen width (mils)
65 define(`SILKSEP', `5')
68 # figure out if we have an even or odd number of pins per side
69 define(`TMP1', eval(NPADS/4))
70 define(`TMP2', eval((4*TMP1 - NPADS) == 0))
71 ifelse(TMP2, 1, `define(`EVEN',"yes")', `define(`EVEN',"no")')
73 # silk bounding box is -XMAX,-YMAX, XMAX,YMAX (mils)
75 define(`YMAX', `eval(250 + NSEG*250 + 125)')
80 `define(`CURPIN', NPADS)'
82 `define(`CURPIN', `1')'
84 Element(0x00 "$1" "`$2'" "$3" -20 -60 0 100 0x00)
87 define(`YOFS', eval((1-NSEG)*25000/2))
88 forloop(`i', 1, eval(NPADS / 2),
90 ifelse(eval(i > SEG*19), 1,
91 `define(`SEG', incr(SEG))
92 define(`YOFS', eval((1-NSEG)*25000/2 + (SEG-1)*25000))',)
94 `Pad( -X1 eval( (-(NPADS/4)*PITCH - PITCH/2 + i*PITCH + YOFS)/1000)
95 -X2 eval( (-(NPADS/4)*PITCH - PITCH/2 + i*PITCH + YOFS)/1000)
96 eval(PADWIDTH/1000) "CURPIN" "CURPIN" 0x0)',
97 `Pad( -X1 eval( (-(NPADS/4)*PITCH - PITCH + i*PITCH + YOFS)/1000)
98 -X2 eval( (-(NPADS/4)*PITCH - PITCH + i*PITCH + YOFS)/1000)
99 eval(PADWIDTH/1000) "CURPIN" "CURPIN" 0x0)')
101 ifelse(REV,"reverse",
102 `define(`CURPIN', decr(CURPIN))
103 define(`CURPIN', decr(CURPIN))',
104 `define(`CURPIN', incr(CURPIN))
105 define(`CURPIN', incr(CURPIN))'
108 ifelse(REV,"reverse",
109 `define(`CURPIN', `2')'
111 `define(`CURPIN', `NPADS')'
115 define(`YOFS', eval((NSEG-1)*25000/2))
116 forloop(`i', eval((NPADS / 2) + 1), NPADS,
118 ifelse(eval(i - NPADS/2 > SEG*19), 1,
119 `define(`SEG', incr(SEG))
120 define(`YOFS', eval((NSEG-1)*25000/2 - (SEG-1)*25000))',)
122 `Pad( X1 eval( ((NPADS/4)*PITCH + PITCH/2 - (i-NPADS/2)*PITCH + YOFS)/1000)
123 X2 eval( ((NPADS/4)*PITCH + PITCH/2 - (i-NPADS/2)*PITCH + YOFS)/1000)
124 eval(PADWIDTH/1000) "CURPIN" "CURPIN" 0x0)',
125 `Pad( X1 eval( ((NPADS/4)*PITCH + PITCH - (i-NPADS/2)*PITCH + YOFS)/1000)
126 X2 eval( ((NPADS/4)*PITCH + PITCH - (i-NPADS/2)*PITCH + YOFS)/1000)
127 eval(PADWIDTH/1000) "CURPIN" "CURPIN" 0x0)')
128 ifelse(REV,"reverse",
129 `define(`CURPIN', incr(CURPIN))
130 define(`CURPIN', incr(CURPIN))',
131 `define(`CURPIN', decr(CURPIN))
132 define(`CURPIN', decr(CURPIN))'
136 define(`GNDpad', `60')
137 define(`GNDdrl', `32')
138 # now add the center row of grounding pins
139 define(`CURPIN', incr(NPADS))
140 define(`YOFS', `eval(250-NSEG*250)')
141 forloop(`j', 1, NSEG,
143 `Pin(0 eval(i*100 + YOFS) GNDpad GNDdrl "GND" "CURPIN" 0x01)
144 define(`CURPIN', incr(CURPIN))'
146 define(`YOFS', eval(YOFS + 500))'
149 Pin(0 eval(-YOFS - 55) 80 53 "LATCH" "CURPIN" 0x01)
150 define(`CURPIN', incr(CURPIN))
151 Pin(0 eval(YOFS + 55) 80 53 "LATCH" "CURPIN" 0x01)
152 define(`CURPIN', incr(CURPIN))
153 # and the orientation pin
154 Pin(0 eval(-YOFS+50) 84 84 "ORIENT" "CURPIN" 0x09)
156 # and finally the silk screen
157 ElementLine(-XMAX -YMAX -XMAX YMAX SILKW)
158 ElementLine(-XMAX YMAX XMAX YMAX SILKW)
159 ElementLine( XMAX YMAX XMAX -YMAX SILKW)
160 ElementLine(-XMAX -YMAX -25 -YMAX SILKW)
161 ElementLine( XMAX -YMAX 25 -YMAX SILKW)
163 # punt on the arc on small parts as it can cover the pads
164 ifelse(eval((PADSEP-PADLENGTH)/1000 > 50), 1, `ElementArc(0 -YMAX 25 25 0 180 SILKW)', )
166 # Mark at the common centroid
170 # dimensions are given in 1/100 mm.
171 # $5-$8 are pad width, length, pitch, and sep
172 define(`COMMON_AMP_MICTOR_MM', `COMMON_AMP_MICTOR_MIL(`$1',`$2',`$3',`$4',
173 eval($5*100000/254),eval($6*100000/254),eval($7*100000/254),eval($8*100000/254), `$9')')
176 define(`COMMON_AMP_MICTOR_767054', `COMMON_AMP_MICTOR_MIL(`$1',`$2',`$3',`$4',17000,50000,25000,278000)')
181 ## Amp Mictor Connectors
183 define(`PKG_AMP_MICTOR_767054_1', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',38)')
184 define(`PKG_AMP_MICTOR_767054_2', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',76)')
185 define(`PKG_AMP_MICTOR_767054_3', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',114)')
186 define(`PKG_AMP_MICTOR_767054_4', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',152)')
187 define(`PKG_AMP_MICTOR_767054_5', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',190)')
188 define(`PKG_AMP_MICTOR_767054_6', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',228)')
189 define(`PKG_AMP_MICTOR_767054_7', `COMMON_AMP_MICTOR_767054(`$1',`$2',`$3',266)')