--- /dev/null
+/*
+ * Copyright © 2013 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+load "footprint.5c"
+import Footprint;
+
+real land_width = 3.3;
+real land_h_gap = 1.8;
+real land_height = 4.0;
+real land_v_gap = 1.8;
+
+real pad_width = (land_width - land_h_gap) / 2;
+real pad_height = (land_height - land_v_gap) / 2;
+
+real pad_x_off = land_h_gap / 2 + pad_width / 2;
+
+real pad_y_off = land_v_gap / 2 + pad_height / 2;
+
+real package_width = 3.8;
+real package_height = 3.5;
+
+element_start("CR32");
+
+pad_mm(pad_x_off, -pad_y_off, pad_width, pad_height, "1", "1");
+pad_mm(pad_x_off, pad_y_off, pad_width, pad_height, "1", "1");
+pad_mm(-pad_x_off, pad_y_off, pad_width, pad_height, "2", "2");
+pad_mm(-pad_x_off, -pad_y_off, pad_width, pad_height, "2", "2");
+
+rect(-package_width/2, -package_height/2, package_width, package_height);
+
+element_end();
--- /dev/null
+#!/usr/bin/python
+# Copyright 2011 by Bdale Garbee <bdale@gag.com>. GPLv2
+#
+# Program to emit PCB footprint for QFN32 package used by FTDI FT232RQ
+#
+
+# dimensions in mm from the TI cc1111f32.pdf datasheet
+PinWidth = 0.28
+PinResist = PinWidth + (2 * 0.07)
+PinHeight = (5.8 - 4.1) / 2
+PinSpacing = 0.50
+Overall = 5.80
+GndSquare = 3.70
+CoreSquare = 3.30 # resist gaps and paste spots over ground tab
+PinSquare = 4.10
+
+import sys
+
+# we're going to use the 1/100 of a mil fundamental unit form
+def mm2mils100( mm ):
+ return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
+
+print '# author: Bdale Garbee'
+print '# email: bdale@gag.com'
+print '# dist-license: GPL 2'
+print '# use-license: unlimited'
+
+print 'Element[0x0 "QFN32" "" "" 0 0 0 0 0 100 0x0]'
+print "("
+
+# pad under the chip, must be grounded
+print ' Pad[',\
+ mm2mils100(0), \
+ mm2mils100(0), \
+ mm2mils100(0), \
+ mm2mils100(0), \
+ mm2mils100(GndSquare), \
+ 0, \
+ 0, \
+ '"pin33" "33" "square,nopaste"]'
+
+# vias in the ground pad under the chip
+for viarow in range (-1,2):
+ for viacol in range (-1,2):
+ print ' Pin[',\
+ mm2mils100(2 * viacol * CoreSquare / 5), \
+ mm2mils100(2 * viarow * CoreSquare / 5), \
+ 2900, \
+ 2500, \
+ 0, \
+ 1500, \
+ '"pin33" "33" 0x0002]'
+
+# break pad under chip into a grid to control the resist and paste masks
+for viarow in range (-2, 3):
+ for viacol in range (-2, 3):
+ if (viarow in (-2, 0, 2)) and (viacol in (-2, 0, 2)):
+ # copper sub-square with resist over vias
+ print ' Pad[',\
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ mm2mils100((CoreSquare)/5), \
+ 0, \
+ 0, \
+ '"pin33" "33" "square,nopaste"]'
+ else:
+ # copper sub-square without resist
+ print ' Pad[',\
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ mm2mils100((CoreSquare)/5), \
+ 0, \
+ mm2mils100((CoreSquare)/5), \
+ '"pin33" "33" "square,nopaste"]'
+ # copper spot to control paste mask generation
+ print ' Pad[',\
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ mm2mils100(viacol * CoreSquare / 5), \
+ mm2mils100(viarow * CoreSquare / 5), \
+ 1500, \
+ 0, \
+ mm2mils100((CoreSquare)/5), \
+ '"pin33" "33" "square"]'
+
+# pins
+for pin in range (1,9):
+ print ' Pad[',\
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(-Overall/2 + PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
+ mm2mils100(PinWidth), \
+ mm2mils100(PinSpacing - PinWidth), \
+ mm2mils100(PinResist), \
+ '"pin%i"' % (25-pin), '"%i"' % (25-pin), '"square"]'
+
+ print ' Pad[',\
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(+Overall/2 - PinHeight + PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(+Overall/2 - PinWidth/2), \
+ mm2mils100(PinWidth), \
+ mm2mils100(PinSpacing - PinWidth), \
+ mm2mils100(PinResist), \
+ '"pin%i"' % pin, '"%i"' % pin, '"square"]'
+
+ print ' Pad[',\
+ mm2mils100(Overall/2 - PinHeight + PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(Overall/2 - PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(PinWidth), \
+ mm2mils100(PinSpacing - PinWidth), \
+ mm2mils100(PinResist), \
+ '"pin%i"' % (17-pin), '"%i"' % (17-pin), '"square"]'
+
+ print ' Pad[',\
+ mm2mils100(-Overall/2 + PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
+ mm2mils100((-4.5 + pin) * PinSpacing), \
+ mm2mils100(PinWidth), \
+ mm2mils100(PinSpacing - PinWidth), \
+ mm2mils100(PinResist), \
+ '"pin%i"' % (24+pin), '"%i"' % (24+pin), '"square"]'
+
+print ' ElementArc[',\
+ mm2mils100(-2.6), \
+ mm2mils100(2.6), \
+ '500 500 0 360 1000 ]'
+print ")"
--- /dev/null
+ Element["" "Transistor" "" "TO39" 18800 18800 6000 7000 0 100 ""]
+(
+# The JEDEC drawing shows a pin diameter of 16-21 mils
+#
+#
+# -----
+# / 4 /
+# TO39: | 3 1 | <-- bottom view (supposed to be a circle)
+# \ 2 /
+# ----
+#
+# NOTE: some vendors, ST for example, number the pins
+# differently. Here we follow the JEDEC drawing.
+#
+# the pins are arranged along a 200 mil diameter
+# circle. The can outline is 315 to 335 mils (320 nom)
+# for the top of the can and 350 to 370 mils (360 nom)
+# for the bottom edge of thecan
+#
+ Pin[0 -10000 5500 3000 6100 3500 "1" "1" "square"]
+ Pin[-10000 0 5500 3000 6100 3500 "2" "2" ""]
+ Pin[0 10000 5500 3000 6100 3500 "3" "3" ""]
+ Pin[10000 0 5500 3000 6100 3500 "4" "4" ""]
+# tab is 29 to 40 mils long, 28 to 34 wide
+# and comes off at an angle of 45 deg clockwise from
+# pin 1 when looking at the top of the board
+ ElementLine [12700 -13900 14800 -16000 1000]
+ ElementLine [13300 -13300 15400 -15400 1000]
+ ElementLine [13900 -12700 16000 -14800 1000]
+ ElementLine [16000 -14800 14800 -16000 1000]
+# x, y, width, height, start angle, delta angle, thickness
+ ElementArc [0 0 18300 18300 0 360 1000]
+ )