Root/modules/he-shrouded.fpd

Source at commit 7f3f9267cb007e13eca0af273f9eedad0c6c5659 created 1 year 7 months ago.
By Werner Almesberger, components/stm32.lib: add STM32L052x6/8 in QFN32 (KxU) package
1/* MACHINE-GENERATED ! */
2
3frame pin {
4    __0: vec @(px/2, py/2)
5    __1: vec @(-px/2, -py/2)
6    pad "$n" . __0
7}
8
9frame pins_top {
10    set n = i*2+2
11
12    __0: vec @(x, 0mm)
13    frame pin .
14}
15
16frame pins_bottom {
17    set n = i*2+1
18
19    __0: vec @(x, 0mm)
20    frame pin .
21}
22
23frame npth {
24    set r = 1mm
25
26    __0: vec @(r/2, r/2)
27    __1: vec @(-r/2, -r/2)
28    hole . __0
29}
30
31frame pins {
32    set y = (gap+py)/2
33
34    set x = (i-(N/2-1)/2)*pitch
35
36    loop i = 0, N/2-1
37
38    __0: vec @(0mm, y)
39    frame pins_top .
40    __1: vec @(0mm, -y)
41    frame pins_bottom .
42    __2: vec @(-(N/2-1)/2*pitch+0.5*pitch, 0mm)
43    frame npth .
44    __3: vec @((N/2-1)/2*pitch-0.5*pitch, 0mm)
45    frame npth .
46}
47
48frame outline {
49    set r = 0.3mm
50
51    __0: vec @(W/2, py+gap/2+w)
52    __1: vec @(-W/2, -(gap/2+py+w))
53    rect . __0 w
54    __2: vec @(-(W/2+2*r), -H/2)
55    __3: vec .(r, 0mm)
56    circ __2 . w
57}
58
59package "he-shrouded-${n}x2pins-${pitch}"
60unit auto
61
62table
63    { N, n }
64    { 4, N/2 }
65    { 6, N/2 }
66    { 14, N/2 }
67
68set w = 5mil
69
70set px = 1mm
71
72set py = 2.75mm
73
74set pitch = 2mm
75
76set gap = 1.5mm
77
78set H = 6.3mm
79
80set base = 6.65mm
81
82set W = base+(N-4)*1mm
83
84frame outline @
85frame pins @
86measy outline.__1 >> outline.__0 -(W+px)
87measx outline.__1 >> outline.__0 H+py/2+6*w
88measy pin.__1 -> pin.__0 px/2
89measy pin.__1 >> pin.__0 -(W/2+pitch)
90measy pin.__0 >> pin.__1 -(pitch+px/2)
91measx pins_top.__0 -> pins_top.__0 px/2
92measy pins.__0 << pins_bottom.__0 -3*px/2
93measx pin.__1 -> pin.__0 -4*w
94meas pins_top.__0 >> pins_top.__0 py/2+7*w
95measy npth.__1 -> npth.__0 0.5mm
96meas pins.__2 >> pins.__3 gap/2+py+4*w
97

Archive Download this file

Branches:
master



interactive