5 # PCB, interactive printed circuit board design
6 # Copyright (C) 2017 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; version 2 of the License
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 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.
23 # Toko Specific Footprints
25 # -------------------------------------------------------------------
26 # the definition of a more general axial package
30 # $4: signal pin diameter max [1/100 mm]
31 # $5: case pin diameter max [1/100 mm]
32 # $6: signal pin grid size [1/100 mm]
33 # $7: case size (assumed square) [1/100 mm]
34 define(`PKG_TOKO_INDV_SQ',
35 # grab the input values and convert to 1/100 mil
37 define(`PIND_MM100', `eval( `$4')')
38 define(`GNDD_MM100', `eval( `$5')')
39 define(`PINXY', `eval( (`$6' * 10000) / 254)')
40 define(`SILKW', `800')
41 define(`SILKXY', `eval( ($7 * 10000) / 254 / 2 )')
42 # add to the pin size to get the drill size and round
43 # to the nearest .05mm to get a standard drill. The
44 # +3 causes us to round up
45 define(`PINDRILL_MM100', `eval(5*( (PIND_MM100 + 20 + 3) / 5 ) )')
46 define(`PINDRILL', `eval((PINDRILL_MM100 * 10000) / 254 )')
48 define(`PINPAD_MM100', `eval(PINDRILL_MM100 + 70)')
49 define(`PINPAD', `eval((PINPAD_MM100 * 10000) / 254 )')
50 define(`PINCLEAR', `2000')
51 define(`PINMASK', `eval(PINPAD + 500)')
53 define(`GNDDRILL_MM100', `eval(5*( (GNDD_MM100 + 20 + 3)/5 ) )')
54 define(`GNDDRILL', `eval((GNDDRILL_MM100 * 10000) / 254 )')
56 define(`GNDPAD_MM100', `eval(GNDDRILL_MM100 + 70)')
57 define(`GNDPAD', `eval((GNDPAD_MM100 * 10000) / 254 )')
58 define(`GNDCLEAR', `2000')
59 define(`GNDMASK', `eval(GNDPAD + 500)')
61 # element_flags, description, pcb-name, value, mark_x, mark_y,
62 # text_x, text_y, text_direction, text_scale, text_flags
63 Element[0x00000000 "$1" "`$2'" "$3" 0 0 -SILKXY SILKXY 0 100 ""]
65 # Pin[x, y, thickness, clearance, mask, drilling hole, name,
67 # Pad[x1, y1, x2, y2, thickness, clearance, mask, name , pad number, flags]
69 dnl the craziness here is because these inductors in a can have a metal
70 dnl case thar runs around the edge of the package and typically gets pretty
71 dnl close to the holes to where you will cause a short if you try
72 dnl to wire on the same side as the actual device.
74 dnl unfortunately pcb just is not so happy about connecting to these sort of
75 dnl hacked together pads. In particular complains about clearance to
76 dnl a hole. Until then do not add the "hole" flag to the pins and keep
77 dnl the bottom side pads commented out
79 dnl Pad[ PINXY PINXY PINXY PINXY PINPAD PINCLEAR PINMASK "1" "1" "onsolder"]
80 dnl Pad[ 0 PINXY 0 PINXY PINPAD PINCLEAR PINMASK "2" "2" "onsolder"]
81 dnl Pad[ -PINXY PINXY -PINXY PINXY PINPAD PINCLEAR PINMASK "3" "3" "onsolder"]
82 dnl Pad[ -PINXY -PINXY -PINXY -PINXY PINPAD PINCLEAR PINMASK "4" "4" "onsolder"]
83 dnl Pad[ PINXY -PINXY PINXY -PINXY PINPAD PINCLEAR PINMASK "6" "6" "onsolder"]
84 Pin[ PINXY PINXY PINPAD PINCLEAR PINMASK PINDRILL "1" "1" ""]
85 Pin[ 0 PINXY PINPAD PINCLEAR PINMASK PINDRILL "2" "2" ""]
86 Pin[ -PINXY PINXY PINPAD PINCLEAR PINMASK PINDRILL "3" "3" ""]
87 Pin[ -PINXY -PINXY PINPAD PINCLEAR PINMASK PINDRILL "4" "4" ""]
88 Pin[ PINXY -PINXY PINPAD PINCLEAR PINMASK PINDRILL "6" "6" ""]
90 Pin[ SILKXY 0 GNDPAD GNDCLEAR GNDMASK GNDDRILL "CASE1" "7" 0x0]
91 Pin[ -SILKXY 0 GNDPAD GNDCLEAR GNDMASK GNDDRILL "CASE2" "8" 0x0]
93 # Silk screen around package
94 ElementLine[ SILKXY SILKXY SILKXY -SILKXY SILKW]
95 ElementLine[ SILKXY -SILKXY -SILKXY -SILKXY SILKW]
96 ElementLine[-SILKXY -SILKXY -SILKXY SILKXY SILKW]
97 ElementLine[-SILKXY SILKXY SILKXY SILKXY SILKW]
105 ## Toko 7P Variable Coils
108 define(`PKG_TOKO_7P', `PKG_TOKO_INDV_SQ( `$1', `$2', `$3', 50, 100, 225, 700)');