1# -*- m4 -*- 2# 3# COPYRIGHT 4# 5# PCB, interactive printed circuit board design 6# Copyright (C) 2007 Dan McMahill 7# 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; version 2 of the License. 11# 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. 16# 17# You should have received a copy of the GNU General Public License along 18# with this program; if not, write to the Free Software Foundation, Inc., 19# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20# 21# The symbols produced by this file may be used and redistributed 22# without restriction as part of a PCB layout file. Distribution 23# of footprints produced by this file as part of a footprint 24# library is governed by the same license as this source file. 25# 26 27# C&K Specific Footprints 28 29 30# ES series surface mount switches 31 32# $1: canonical name 33# $2: name on PCB 34# $3: value 35 36define(`PKG_CANDK_ES_SMT_SWITCH', 37 ` 38 # pad 1,2,3 width (1/100 mil) 39 define(`PADW1', `3500') 40 41 # pad 1,2,3 length (1/100 mil) 42 define(`PADL1', `8200') 43 44 # x value for pads 1,3 (1/100 mil) 45 define(`PADX1', `10000') 46 47 # y value for pads 1,2,3 (1/100 mil) 48 define(`PADY1', `17500') 49 define(`PADY1A', `eval(PADY1 - (PADL1 - PADW1)/2)') 50 define(`PADY1B', `eval(PADY1 + (PADL1 - PADW1)/2)') 51 52 53 # mounting pad width (1/100 mil) 54 define(`PADW2', `9150') 55 56 # mounting pad length (1/100 mil) 57 define(`PADL2', `6000') 58 59 # x value for the mounting pads (1/100 mil) 60 define(`PADX2', `21175') 61 define(`PADX2A', `eval(PADX2 - (PADW2 - PADL2)/2)') 62 define(`PADX2B', `eval(PADX2 + (PADW2 - PADL2)/2)') 63 64 # y value for the mounting pads (1/100 mil) 65 define(`PADY2', `-17500') 66 67 # package width (1/100 mil) 68 define(`PACKW', `39500') 69 70 # package height (1/100 mil) 71 define(`PACKH', `36000') 72 73 # component veritcal height off board (1/100 mil) 74 define(`COMPH', `eval($9*10000/254)') 75 76 # pad width and length 77 define(`PADW', `eval(PINW + 2000)') 78 define(`PADL', `eval(PINL + 2000)') 79 80 # y values for drawing the pad. 81 # The Y center of the pad is 0.5*(PINL + PINS) 82 # we need a line segment of length PADL - PADW so we have end points: 83 # 0.5*(PINL + PINS) +/- 0.5*(PADL - PADW) 84 define(`PY1', `eval((PINL + PINS + PADL - PADW)/2)') 85 define(`PY2', `eval((PINL + PINS - PADL + PADW)/2)') 86 87 # width of soldermask relief (5 mil on each side) 88 define(`MASKW1', `eval(PADW1 + 1000)') 89 define(`MASKW2', `eval(PADL2 + 1000)') 90 91 # top edge of switch body (1/100 mil) 92 define(`SWTOP', `eval(PADY2 - 5000)') 93 94 # bottom edge of switch body (1/100 mil) 95 define(`SWBOT', `eval(SWTOP + PACKH)') 96 97 # how much the switch extends beyond the body 98 define(`SWEXT', `12100') 99 100 # y value for the far end of the switch 101 define(`SWYMAX', `eval(SWTOP - SWEXT)') 102 103 # silkscreen width (1/100 mils) 104 define(`SILKW', `1000') 105 106 # how much space to leave around the part before the 107 # silk screen (1/100 mils) 108 define(`SILKS', `800') 109 110 # X values for silk on sides and bottom of switch 111 define(`SX1', `eval( (PACKW + 2*SILKS + SILKW)/2)') 112 define(`SX2', `eval( 10000 + PADW1/2 + SILKS + SILKW/2)') 113 114 # bottom edge of the switch body 115 define(`SY1', `eval( SWBOT + SILKS + SILKW/2 )') 116 117 # bottom edge of upper pads 118 define(`SY2', `eval( PADY2 + PADL2/2 + SILKS + SILKW/2)') 119 120 # bottom edge of the lower pads 121 define(`SY3', `eval( PADY1 + PADL1/2 + SILKS + SILKW/2)') 122 123 # top edge of the switch body 124 define(`SY4', `eval( PADY2 - PADL2/2 - SILKS - SILKW/2)') 125 126 # top edge of the switch 127 define(`SY5', `eval( SWTOP - SILKS - SILKW/2)') 128 129 130# Element [SFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TSFlags] 131Element[ "" "`$1'" "`$2'" "`$3'" 0 0 0 0 0 100 ""] 132( 133 134# Pad [rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" SFlags] 135 136# the signal pads 137Pad[ -PADX1 PADY1A -PADX1 PADY1B PADW1 1000 MASKW1 "1" "1" "square"] 138Pad[ 0 PADY1A 0 PADY1B PADW1 1000 MASKW1 "2" "2" "square"] 139Pad[ PADX1 PADY1A PADX1 PADY1B PADW1 1000 MASKW1 "3" "3" "square"] 140 141# the mounting pads 142Pad[ -PADX2A PADY2 -PADX2B PADY2 PADL2 1000 MASKW2 "4" "4" "square"] 143Pad[ PADX2A PADY2 PADX2B PADY2 PADL2 1000 MASKW2 "4" "4" "square"] 144 145# Silk screen around package 146# ElementLine[ x1 y1 x2 y2 width] 147 148# bottom edge 149ElementLine[ SX1 SY1 SX2 SY1 SILKW ] 150ElementLine[-SX1 SY1 -SX2 SY1 SILKW ] 151ElementLine[-SX2 SY1 -SX2 SY3 SILKW ] 152ElementLine[ SX2 SY1 SX2 SY3 SILKW ] 153ElementLine[-SX2 SY3 SX2 SY3 SILKW ] 154 155# left/right 156ElementLine[ SX1 SY1 SX1 SY2 SILKW ] 157ElementLine[-SX1 SY1 -SX1 SY2 SILKW ] 158 159# top edge 160ElementLine[-SX1 SWYMAX SX1 SWYMAX SILKW ] 161ElementLine[-SX1 SY5 SX1 SY5 SILKW ] 162ElementLine[-SX1 SY4 -SX1 SWYMAX SILKW ] 163ElementLine[ SX1 SY4 SX1 SWYMAX SILKW ] 164 165# cross at top where switch moves 166ElementLine[-SX1 SWYMAX SX1 SY5 SILKW ] 167ElementLine[-SX1 SY5 SX1 SWYMAX SILKW ] 168 169)') 170 171# ------------------------------------------------------------------- 172 173# EXTRACT_BEGIN 174 175 176# 177## C&K ES Series Switches 178# 179 180# See www.ittcannon.com. 181 182define(`PKG_CANDK_ES01MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')') 183define(`PKG_CANDK_ES02MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')') 184define(`PKG_CANDK_ES03MSABE', `PKG_CANDK_ES_SMT_SWITCH(`$1', `$2', `$3')') 185 186 187 188# EXTRACT_END 189 190