Add HVQFN33 package for LPC11U14
authorKeith Packard <keithp@keithp.com>
Sat, 16 Mar 2013 08:06:22 +0000 (01:06 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 16 Mar 2013 08:06:58 +0000 (01:06 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/Makefile
packages/footprint.5c
packages/hvqfn33.5c [new file with mode: 0644]

index 07514b2425a3a61fa188ca60c4c9dc394b67ba8b..21acde5bd153b534036dfdbdd532c63eebcc1766 100644 (file)
@@ -3,7 +3,8 @@
 FOOTPRINTS= \
        MS5607.fp \
        uson-8.fp \
-       wson6x5.fp
+       wson6x5.fp \
+       hvqfn33.fp
 
 .5c.fp:
        nickle $*.5c > $@
index 885c21a081060430889094610d992693a74fc5f1..0ce87e7e49b0c3f893ab314c1371894a05246e96 100644 (file)
@@ -82,8 +82,8 @@ namespace Footprint {
                        mm2mils100(thickness),
                        mm2mils100(clearance),
                        mm2mils100(mask));
-               printf (" \"%s\" \"%s\" \"square%s%s\"]\n",
-                       name, num, options == "" ? "" : ",", options);
+               printf (" \"%s\" \"%s\" \"%s\"]\n",
+                       name, num, options);
        }
 
        public void pad_mm_clear_options(real center_x,
@@ -127,8 +127,8 @@ namespace Footprint {
                        mm2mils100(thickness),
                        mm2mils100(clearance),
                        mm2mils100(mask));
-               printf (" \"%s\" \"%s\" \"square%s%s\"]\n",
-                       name, num, options == "" ? "" : ",", options);
+               printf (" \"%s\" \"%s\" \"%s\"]\n",
+                       name, num, options);
        }
 
        public void pad_mm_clear(real center_x,
@@ -146,7 +146,7 @@ namespace Footprint {
                                     clearance,
                                     name,
                                     num,
-                                    "");
+                                    "square");
        }
 
        public void pad_mm(real center_x,
@@ -186,6 +186,25 @@ namespace Footprint {
                       
        }
 
+       public void pin_mm_clear_mask_options(real x, real y,
+                                             real drill, real copper, real clearance, real mask,
+                                             string name, string number, string options)
+       {
+               real thickness = drill + copper * 2;
+               printf("    Pin[");
+               printf(" %6d %6d",
+                      mm2mils100(x),
+                      mm2mils100(y));
+               printf(" %6d %6d %6d %6d",
+                      mm2mils100(thickness),
+                      mm2mils100(clearance),
+                      mm2mils100(mask),
+                      mm2mils100(drill));
+               printf (" \"%s\" \"%s\"",
+                       name, number);
+               printf (" \"%s\"]\n", options);
+                      
+       }
        public void pin_mm_clear_mask(real x, real y,
                                      real drill, real copper, real clearance, real mask,
                                      string name, string number)
diff --git a/packages/hvqfn33.5c b/packages/hvqfn33.5c
new file mode 100644 (file)
index 0000000..69da882
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * 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;
+
+process_clearance = 0.25;
+
+real package_width = 5;
+real package_height = 5;
+real pad_spacing = 0.5;                /* P */
+real pad_height = 0.85;                /* C */
+real pad_width = 0.27;         /* D */
+real pad_center_x = 5.25 / 2;  /* Gx/2 */
+real pad_center_y = 5.25 / 2;  /* Gy/2 */
+
+real center_width = 3.75;      /* SLx */
+real center_height = 3.75;     /* SLy */
+
+real center_drill = 0.30;
+real center_mask = 0.60 / 2;
+
+real center_space = 1.1;
+
+int num_pad = 8;       /* per side */
+
+real pad_off(int n) {
+       return pad_spacing * (n - (num_pad - 1) / 2);
+}
+
+element_start("hvqfn33");
+
+for (pad = 0; pad < num_pad; pad++) {
+       /* left side (1-8) */
+
+       pad_mm(-pad_center_x,
+              pad_off(pad),
+              pad_height,
+              pad_width,
+              sprintf("%d", pad + 1),
+              sprintf("%d", pad + 1));
+
+       /* bottom (9-16) */
+
+       pad_mm(pad_off(pad),
+              pad_center_y,
+              pad_width,
+              pad_height,
+              sprintf("%d", pad + 9),
+              sprintf("%d", pad + 9));
+
+       /* right (17-24) */
+
+       pad_mm(pad_center_x,
+              -pad_off(pad),
+              pad_height,
+              pad_width,
+              sprintf("%d", pad + 17),
+              sprintf("%d", pad + 17));
+
+       /* top (25-32) */
+
+       pad_mm(-pad_off(pad),
+              -pad_center_y,
+              pad_width,
+              pad_height,
+              sprintf("%d", pad + 25),
+              sprintf("%d", pad + 25));
+}
+
+/* center */
+
+pad_mm_clear_mask_options(0, 0, center_width, center_height, process_clearance, 0,
+                         "33", "33", "square,nopaste");
+
+
+real clear_top = center_space * 0.5 + center_mask;
+real clear_bottom = center_height / 2;
+real clear_height = clear_bottom - clear_top;
+real clear_y = (clear_top + clear_bottom) / 2;
+
+for (y = -1; y <= 1; y+= 2) {
+       pad_mm_clear_mask_options(0, y * clear_y, center_width, clear_height,
+                                 0, clear_height, "33", "33", "square,nopaste");
+
+       pad_mm_clear_mask_options(y * clear_y, 0, clear_height, center_height,
+                                 0, clear_height, "33", "33", "square,nopaste");
+}
+
+real hole_pos = 0.5 * center_space;
+real strip_top = -hole_pos + center_mask;
+real strip_bot = hole_pos - center_mask;
+real strip_size = strip_bot - strip_top;
+
+pad_mm_clear_mask_options(0, 0, center_width, strip_size,
+                         0, strip_size, "33", "33", "square,nopaste");
+
+pad_mm_clear_mask_options(0, 0, strip_size, center_height,
+                         0, strip_size, "33", "33", "square,nopaste");
+
+/* center solder spots */
+
+for (y = -1; y <= 1; y += 1) {
+       for (x = -1; x <= 1; x += 1) {
+               pad_mm_clear_mask_options(x * center_space, y * center_space,
+                                         center_mask*2, center_mask*2, 0, center_mask * 2, "33", "33", "");
+       }
+}
+
+/* center holes */
+
+for (y = -0.5; y <= 0.5; y += 1) {
+       for (x = -0.5; x <= 0.5; x += 1) {
+               pin_mm_clear_mask_options(x * center_space, y * center_space,
+                                         center_drill, center_mask/2, 0, 0, "33", "33",
+                                         "square,via");
+       }
+}
+
+/* outline */
+
+rect(-package_width/2, -package_height/2, package_width, package_height);
+
+dot_off = 0.3;
+dot_x = -package_width/2 - dot_off;
+dot_y = -package_height/2 - dot_off;
+
+line(dot_x, dot_y, dot_x, dot_y);
+
+element_end();