Add 4mmx3mm MLP8 package (for smaller flash parts)
authorKeith Packard <keithp@keithp.com>
Fri, 7 Jun 2013 18:02:30 +0000 (11:02 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 7 Jun 2013 18:02:30 +0000 (11:02 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/Makefile
packages/mlp8-4x3.5c [new file with mode: 0644]

index 82052384b9643bb97ee7eb17002b65f5dafb90c8..46eabd185f0afe61772996e4b8e882841e4744b0 100644 (file)
@@ -40,7 +40,8 @@ FOOTPRINTS= \
        NHD-C0216.fp \
        KSCJ.fp \
        ADXL78.fp \
-       MOT1317.fp
+       MOT1317.fp \
+       mlp8-4x3.fp
 
 .5c.fp:
        nickle $*.5c > $@
diff --git a/packages/mlp8-4x3.5c b/packages/mlp8-4x3.5c
new file mode 100644 (file)
index 0000000..a00f536
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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;
+
+/*
+ * These values come from the Carsem MLP spec */
+real pad_outside = 0.20;
+real pad_inside = 0.05;
+real pad_side = 0.025; /* for pad pitch > 0.65mm */
+
+real pad_width = 0.30;
+real pad_height = 0.60;
+real pad_spacing = 0.80;
+
+real package_width = 4;
+real package_height = 3;
+
+real pad_y_off = package_height / 2;
+
+real num_pad = 4;      /* per side */
+
+element_start("mlp8");
+
+real pad_off_x(int n) {
+       return pad_spacing * (n - (num_pad - 1) / 2);
+}
+
+real corner(int dx, int dy) {
+       real    x = dx * package_width / 2;
+       real    y = dy * package_height / 2;
+       real    len = 0.4;
+
+       line(x, y, x - dx * len, y);
+       line(x, y, x, y - dy * len);
+}
+
+real pad_top(real x, real y, int n) {
+       real    w_pad = pad_width + pad_side * 2;
+       real    h_pad = pad_height + pad_outside + pad_inside;
+       real    x_pad = x;
+       real    y_pad = y - pad_outside + h_pad/2;
+
+       pad_mm(x_pad, y_pad, w_pad, h_pad, sprintf("%d", n), sprintf("%d", n));
+}
+
+real pad_bottom(real x, real y, int n) {
+       real    w_pad = pad_width + pad_side * 2;
+       real    h_pad = pad_height + pad_outside + pad_inside;
+       real    x_pad = x;
+       real    y_pad = y - pad_height - pad_inside + h_pad/2;
+
+       pad_mm(x_pad, y_pad, w_pad, h_pad, sprintf("%d", n), sprintf("%d", n));
+}
+
+corner(-1, -1);
+corner(1, -1);
+corner(-1, 1);
+corner(1, 1);
+
+real dot_off = -.3;
+
+line(-package_width/2 + dot_off, -package_height/2 + dot_off,
+     -package_width/2 + dot_off, -package_height/2 + dot_off);
+
+for (pad = 0; pad < num_pad; pad++) {
+       /* top (1-4) */
+
+       pad_top (pad_off_x(pad), -package_height / 2, pad + 1);
+
+       /* bottom (8-5) */
+
+       pad_bottom (pad_off_x(pad), package_height / 2, 8 - pad);
+}
+
+
+element_end();