Add MiniSO8 footprint
authorKeith Packard <keithp@keithp.com>
Fri, 5 Aug 2022 22:15:51 +0000 (15:15 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 5 Aug 2022 22:15:51 +0000 (15:15 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/Makefile
packages/miniso8.5c [new file with mode: 0644]

index 9f1e1ba85af3582bb74e9a6f5b8dc21f32db8aa5..f1f96b32c1fe8a1c7ad6745ac6a11ff6477139a4 100644 (file)
@@ -159,7 +159,8 @@ FOOTPRINTS= \
        711AT.fp \
        PG-TSDSO-14.fp \
        dualbeeper.fp \
-       vqfn-48.fp
+       vqfn-48.fp \
+       miniso8.fp
 
 .5c.fp:
        nickle $*.5c -o $@
diff --git a/packages/miniso8.5c b/packages/miniso8.5c
new file mode 100644 (file)
index 0000000..743016b
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright © 2019 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, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+load "footprint.5c"
+import Footprint;
+
+element_args();
+
+/* from the datasheet */
+real pad_x_space = 0.65;       /* C */
+real pad_width = 0.48;         /* X */
+real footprint_width = 2.43;   /* X2 */
+real pad_height = 1.13;                /* Y */
+real footprint_height = 5.67;  /* Y2 */
+
+real package_width = 3.00;
+real package_height = 3.00;
+
+/* computed */
+
+int x_pads = 4;
+
+real pad_y_space = footprint_height - pad_height;
+real pad_y_off = pad_y_space / 2.0;
+real pad_x_off = (x_pads - 1) / 2 * pad_x_space;
+
+element_start("miniso8");
+
+for (int i = 0; i < x_pads; i++) {
+       int pad_low = i + 1;
+       int pad_high = x_pads * 2 - i;
+       string pad_low_name = sprintf("%d", pad_low);
+       string pad_high_name = sprintf("%d", pad_high);
+       pad_mm(-pad_x_off + i * pad_x_space, pad_y_off, pad_width, pad_height, pad_low_name, pad_low_name);
+       pad_mm(-pad_x_off + i * pad_x_space, -pad_y_off, pad_width, pad_height, pad_high_name, pad_high_name);
+}
+
+rect(-package_width/2, -package_height/2, package_width, package_height);
+
+element_end();