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