Root/modules/qfn.fpd

Source at commit d37268a6ba7dd08f54960a03ca755dc943e3636c created 7 years 1 month ago.
By Werner Almesberger, modules/: add PAD_S_120x120; correct classification of PAD_S_150x150
1/* MACHINE-GENERATED ! */
2
3frame paste_pad {
4    __0: vec @(SX/2, SY/2)
5    __1: vec @(-SX/2, -SY/2)
6    pad " " . __0 paste
7}
8
9frame paste {
10    set x = SE*(xi-SNX/2-0.5)
11
12    set y = SE*(yi-SNY/2-0.5)
13
14    loop xi = 1, SNX
15
16    loop yi = 1, SNY
17
18    __0: vec @(x, y)
19    frame paste_pad .
20}
21
22frame center {
23    set pin = pins+1
24
25    __0: vec @(X2/2, Y2/2)
26    __1: vec @(-X2/2, -Y2/2)
27    pad "$pin" . __0 bare
28    frame paste @
29}
30
31frame pad {
32    set px = (dx*X1+dy*Y1)/2
33
34    set py = (dy*X1+dx*Y1)/2
35
36    set pin = side*pins/4+i+1
37
38    __0: vec @(px, py)
39    __1: vec @(-px, -py)
40    pad "$pin" __0 .
41    __2: vec @(px, -py)
42}
43
44frame side {
45    set pos = i-(pins/4-1)/2
46
47    loop i = 0, pins/4-1
48
49    __0: vec @(E*pos*dx, E*pos*dy)
50    frame pad .
51}
52
53frame pads {
54    table
55        { side, dx, dy }
56        { 0, 0, -1 }
57        { 1, 1, 0 }
58        { 2, 0, 1 }
59        { 3, -1, 0 }
60
61    __0: vec @(dy*C1/2, -dx*C2/2)
62    frame side .
63}
64
65frame index {
66}
67
68frame outline {
69    table
70        { index, dx, _, dy }
71        { 1, -1, 0, 0 }
72        { 0, 0, 0, -1 }
73        { 0, 1, 0, 0 }
74        { 0, 0, 0, 1 }
75
76    set mx = dx*C1/2
77
78    set my = dy*C2/2
79
80    set cx = mx+my
81
82    set cy = my-mx
83
84    set ax = -Y1/2*dx
85
86    set ay = -Y1/2*dy
87
88    set bx = -Y1/2*dy
89
90    set by = Y1/2*dx
91
92    __0: vec @(cx, cy)
93    w: vec .(ax, ay)
94    line __0 . w
95    __2: vec __0(bx, by)
96    line __0 . w
97    __1: vec .(index*(ax-bx), index*(ay-by))
98    line __2 . w
99}
100
101package "QFN$pins-$variant"
102unit auto
103
104table
105    { pins, variant, X1, Y1, X2, Y2, E, C1, C2, SE, SNX, SNY, SX, SY }
106    { 16, "LFCSP_LQ", 0.35mm, 1.2mm, 2.43mm, 2.43mm, 0.65mm, 4.1mm, 4.1mm, 1mm, 2, 2, 0.7mm, 0.7mm }
107    { 28, "Atmel", 0.24mm, 0.7mm, 2.4mm, 2.4mm, 0.45mm, 4.1mm, 4.1mm, 1mm, 2, 2, 0.8mm, 0.8mm }
108    { 28, "MCHP-ML", 0.37mm, 1mm, 4.25mm, 4.25mm, 0.65mm, 5.7mm, 5.7mm, 1mm, 3, 3, 0.65mm, 0.65mm }
109    { 28, "SiLabs", 0.25mm, 0.9mm, 3.3mm, 3.3mm, 0.5mm, 4.8mm, 4.8mm, 1.1mm, 3, 3, 0.9mm, 0.9mm }
110    { 32, "VHHD-2", 0.26mm, 0.69mm, 3.7mm, 3.7mm, 0.5mm, 5.1mm, 5.1mm, 0.8mm, 3, 3, 0.55mm, 0.55mm }
111    { 32, "VHHD-6", 0.26mm, 0.69mm, 3.4mm, 3.4mm, 0.5mm, 5.1mm, 5.1mm, 1.2mm, 2, 2, 0.75mm, 0.75mm }
112
113set w = 5mil
114
115set zone_ratio_35 = ((SNX-1)*SE+SX)*((SNY-1)*SE+SY)/(X2*Y2)
116
117set paste_ratio_20 = SX*SY*SNX*SNY/(X2*Y2)
118
119frame pads @
120frame center @
121frame outline @
122measy side.__0 >> side.__0 3mm
123meas side.__0 -> side.__0 -1mm
124measy center.__1 >> center.__0 2.3mm
125measy pad.__1 >> pad.__1 3.5mm
126measy pad.__1 -> pad.__0 1mm
127meas pad.__1 -> pad.__2 -1mm
128measy paste_pad.__1 -> paste_pad.__0 1.8mm
129measy paste.__0 -> paste.__0 -C1
130measy paste_pad.__1 >> paste_pad.__0 -C1-1mm
131

Archive Download this file

Branches:
master



interactive