6 # PCB, interactive printed circuit board design
7 # Copyright (C) 2007 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; version 2 of the License.
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.
22 # The symbols produced by this file may be used and redistributed
23 # without restriction as part of a PCB layout file. Distribution
24 # of footprints produced by this file as part of a footprint
25 # library is governed by the same license as this source file.
28 # C&K Specific Footprints
31 # ES series surface mount switches
37 define(`PKG_CANDK_ES_SMT_SWITCH',
39 # pad 1,2,3 width (1/100 mil)
40 define(`PADW1', `3500')
42 # pad 1,2,3 length (1/100 mil)
43 define(`PADL1', `8200')
45 # x value for pads 1,3 (1/100 mil)
46 define(`PADX1', `10000')
48 # y value for pads 1,2,3 (1/100 mil)
49 define(`PADY1', `17500')
50 define(`PADY1A', `eval(PADY1 - (PADL1 - PADW1)/2)')
51 define(`PADY1B', `eval(PADY1 + (PADL1 - PADW1)/2)')
54 # mounting pad width (1/100 mil)
55 define(`PADW2', `9150')
57 # mounting pad length (1/100 mil)
58 define(`PADL2', `6000')
60 # x value for the mounting pads (1/100 mil)
61 define(`PADX2', `21175')
62 define(`PADX2A', `eval(PADX2 - (PADW2 - PADL2)/2)')
63 define(`PADX2B', `eval(PADX2 + (PADW2 - PADL2)/2)')
65 # y value for the mounting pads (1/100 mil)
66 define(`PADY2', `-17500')
68 # package width (1/100 mil)
69 define(`PACKW', `39500')
71 # package height (1/100 mil)
72 define(`PACKH', `36000')
74 # component veritcal height off board (1/100 mil)
75 define(`COMPH', `eval($9*10000/254)')
77 # pad width and length
78 define(`PADW', `eval(PINW + 2000)')
79 define(`PADL', `eval(PINL + 2000)')
81 # y values for drawing the pad.
82 # The Y center of the pad is 0.5*(PINL + PINS)
83 # we need a line segment of length PADL - PADW so we have end points:
84 # 0.5*(PINL + PINS) +/- 0.5*(PADL - PADW)
85 define(`PY1', `eval((PINL + PINS + PADL - PADW)/2)')
86 define(`PY2', `eval((PINL + PINS - PADL + PADW)/2)')
88 # width of soldermask relief (5 mil on each side)
89 define(`MASKW1', `eval(PADW1 + 1000)')
90 define(`MASKW2', `eval(PADL2 + 1000)')
92 # top edge of switch body (1/100 mil)
93 define(`SWTOP', `eval(PADY2 - 5000)')
95 # bottom edge of switch body (1/100 mil)
96 define(`SWBOT', `eval(SWTOP + PACKH)')
98 # how much the switch extends beyond the body
99 define(`SWEXT', `12100')
101 # y value for the far end of the switch
102 define(`SWYMAX', `eval(SWTOP - SWEXT)')
104 # silkscreen width (1/100 mils)
105 define(`SILKW', `1000')
107 # how much space to leave around the part before the
108 # silk screen (1/100 mils)
109 define(`SILKS', `800')
111 # X values for silk on sides and bottom of switch
112 define(`SX1', `eval( (PACKW + 2*SILKS + SILKW)/2)')
113 define(`SX2', `eval( 10000 + PADW1/2 + SILKS + SILKW/2)')
115 # bottom edge of the switch body
116 define(`SY1', `eval( SWBOT + SILKS + SILKW/2 )')
118 # bottom edge of upper pads
119 define(`SY2', `eval( PADY2 + PADL2/2 + SILKS + SILKW/2)')
121 # bottom edge of the lower pads
122 define(`SY3', `eval( PADY1 + PADL1/2 + SILKS + SILKW/2)')
124 # top edge of the switch body
125 define(`SY4', `eval( PADY2 - PADL2/2 - SILKS - SILKW/2)')
127 # top edge of the switch
128 define(`SY5', `eval( SWTOP - SILKS - SILKW/2)')
131 # Element [SFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TSFlags]
132 Element[ "" "`$1'" "`$2'" "`$3'" 0 0 0 0 0 100 ""]
135 # Pad [rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" SFlags]
138 Pad[ -PADX1 PADY1A -PADX1 PADY1B PADW1 1000 MASKW1 "1" "1" "square"]
139 Pad[ 0 PADY1A 0 PADY1B PADW1 1000 MASKW1 "2" "2" "square"]
140 Pad[ PADX1 PADY1A PADX1 PADY1B PADW1 1000 MASKW1 "3" "3" "square"]
143 Pad[ -PADX2A PADY2 -PADX2B PADY2 PADL2 1000 MASKW2 "4" "4" "square"]
144 Pad[ PADX2A PADY2 PADX2B PADY2 PADL2 1000 MASKW2 "4" "4" "square"]
146 # Silk screen around package
147 # ElementLine[ x1 y1 x2 y2 width]
150 ElementLine[ SX1 SY1 SX2 SY1 SILKW ]
151 ElementLine[-SX1 SY1 -SX2 SY1 SILKW ]
152 ElementLine[-SX2 SY1 -SX2 SY3 SILKW ]
153 ElementLine[ SX2 SY1 SX2 SY3 SILKW ]
154 ElementLine[-SX2 SY3 SX2 SY3 SILKW ]
157 ElementLine[ SX1 SY1 SX1 SY2 SILKW ]
158 ElementLine[-SX1 SY1 -SX1 SY2 SILKW ]
161 ElementLine[-SX1 SWYMAX SX1 SWYMAX SILKW ]
162 ElementLine[-SX1 SY5 SX1 SY5 SILKW ]
163 ElementLine[-SX1 SY4 -SX1 SWYMAX SILKW ]
164 ElementLine[ SX1 SY4 SX1 SWYMAX SILKW ]
166 # cross at top where switch moves
167 ElementLine[-SX1 SWYMAX SX1 SY5 SILKW ]
168 ElementLine[-SX1 SY5 SX1 SWYMAX SILKW ]
172 # -------------------------------------------------------------------
178 ## C&K ES Series Switches
181 # See www.ittcannon.com.
183 define(`PKG_CANDK_ES01MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')')
184 define(`PKG_CANDK_ES02MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')')
185 define(`PKG_CANDK_ES03MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')')