Root/modules/qfn.fpd

Source at commit e8e68137249507b3e8bb480406ba682090b8b25e created 8 years 4 months ago.
By Werner Almesberger, modules/qfn.fpd: add QFN48-Freescale for KL25 chips (draft)
1/* MACHINE-GENERATED ! */
2
3frame pad_via {
4    __0: vec @(hole/2, hole/2)
5    __1: vec @(-hole/2, -hole/2)
6    hole . __0
7}
8
9frame pad_vias {
10    table
11        { ?variant, EV, Vias, hole }
12        { "HVQFN", 1.05mm, 20, 0.3mm }
13
14    table
15        { dx, dy }
16        { 1, 0 }
17        { 0, 1 }
18        { -1, 0 }
19        { 0, -1 }
20
21    set CV = (Vias/4-1)/2*EV
22
23    loop i = 0, Vias/4-1
24
25    __0: vec @((-dy-dx)*CV, (dx-dy)*CV)
26    __1: vec .(dx*i*EV, dy*i*EV)
27    frame pad_via .
28}
29
30frame paste_pad {
31    __0: vec @(SX/2, SY/2)
32    __1: vec @(-SX/2, -SY/2)
33    pad " " . __0 paste
34}
35
36frame paste {
37    set x = SE*(xi-SNX/2-0.5)
38
39    set y = SE*(yi-SNY/2-0.5)
40
41    loop xi = 1, SNX
42
43    loop yi = 1, SNY
44
45    __0: vec @(x, y)
46    frame paste_pad .
47}
48
49frame center {
50    set pin = pins+1
51
52    __0: vec @(X2/2, Y2/2)
53    __1: vec @(-X2/2, -Y2/2)
54    pad "$pin" . __0 bare
55    frame paste @
56}
57
58frame pad {
59    set px = (dx*X1+dy*Y1)/2
60
61    set py = (dy*X1+dx*Y1)/2
62
63    set pin = side*pins/4+i+1
64
65    __0: vec @(px, py)
66    __1: vec @(-px, -py)
67    pad "$pin" __0 .
68    __2: vec @(px, -py)
69}
70
71frame side {
72    set pos = i-(pins/4-1)/2
73
74    loop i = 0, pins/4-1
75
76    __0: vec @(E*pos*dx, E*pos*dy)
77    frame pad .
78}
79
80frame pads {
81    table
82        { side, dx, dy }
83        { 0, 0, -1 }
84        { 1, 1, 0 }
85        { 2, 0, 1 }
86        { 3, -1, 0 }
87
88    __0: vec @(dy*C1/2, -dx*C2/2)
89    frame side .
90}
91
92frame index {
93}
94
95frame outline {
96    table
97        { index, dx, _, dy }
98        { 1, -1, 0, 0 }
99        { 0, 0, 0, -1 }
100        { 0, 1, 0, 0 }
101        { 0, 0, 0, 1 }
102
103    set mx = dx*C1/2
104
105    set my = dy*C2/2
106
107    set cx = mx+my
108
109    set cy = my-mx
110
111    set ax = -Y1/2*dx
112
113    set ay = -Y1/2*dy
114
115    set bx = -Y1/2*dy
116
117    set by = Y1/2*dx
118
119    __0: vec @(cx, cy)
120    w: vec .(ax, ay)
121    line __0 . w
122    __2: vec __0(bx, by)
123    line __0 . w
124    __1: vec .(index*(ax-bx), index*(ay-by))
125    line __2 . w
126}
127
128package "QFN$pins-$variant"
129unit mil
130allow holes
131
132table
133    { pins, variant, X1, Y1, X2, Y2, E, C1, C2, SE, SNX, SNY, SX, SY }
134    { 16, "LFCSP_LQ", 0.35mm, 1.2mm, 2.43mm, 2.43mm, 0.65mm, 4.1mm, 4.1mm, 1mm, 2, 2, 0.7mm, 0.7mm }
135    { 28, "Atmel", 0.24mm, 0.7mm, 2.4mm, 2.4mm, 0.45mm, 4.1mm, 4.1mm, 1mm, 2, 2, 0.8mm, 0.8mm }
136    { 28, "MCHP-ML", 0.37mm, 1mm, 4.25mm, 4.25mm, 0.65mm, 5.7mm, 5.7mm, 1mm, 3, 3, 0.65mm, 0.65mm }
137    { 28, "SiLabs", 0.25mm, 0.9mm, 3.3mm, 3.3mm, 0.5mm, 4.8mm, 4.8mm, 1.1mm, 3, 3, 0.9mm, 0.9mm }
138    { 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 }
139    { 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 }
140    { 32, "HVQFN", 0.3mm, 1.08mm, 4.85mm, 4.85mm, 0.65mm, 6.9mm, 6.9mm, 1.7mm, 2, 2, 1mm, 1mm }
141    { 48, "Freescale", 0.25mm, 0.9mm, 5.1mm, 5.1mm, 0.5mm, 7mm, 7mm, 1.1mm, 3, 3, 0.8mm, 0.8mm }
142
143set w = 5mil
144
145set zone_ratio_35 = ((SNX-1)*SE+SX)*((SNY-1)*SE+SY)/(X2*Y2)
146
147set paste_ratio_20 = SX*SY*SNX*SNY/(X2*Y2)
148
149frame pads @
150frame center @
151frame outline @
152frame pad_vias @
153measy side.__0 >> side.__0 3mm
154meas side.__0 -> side.__0 -1mm
155measy center.__1 >> center.__0 2.3mm
156measy pad.__1 >> pad.__1 3.5mm
157measy pad.__1 -> pad.__0 1mm
158meas pad.__1 -> pad.__2 -1mm
159measy paste_pad.__1 -> paste_pad.__0 1.8mm
160measy paste.__0 -> paste.__0 -C1
161measy paste_pad.__1 >> paste_pad.__0 -C1-1mm
162

Archive Download this file

Branches:
master



interactive