Root/modules/lga.fpd

Source at commit 83fc1ab657c62255bc9e3ffac88d0f160f4a71ba created 6 years 8 months ago.
By Werner Almesberger, modules/qfn.fpd (QFN32-CC2543): experimental footprint with large center hole (for DIY)
1/* MACHINE-GENERATED ! */
2
3frame piny {
4    set name = i*f+a
5
6    __0: vec @(dx*(py/2+pe), px/2)
7    __1: vec @(-dx*py/2, -px/2)
8    pad "$name" . __0
9}
10
11frame pinsy {
12    set y = e*(i-(ny-1)/2)
13
14    set x = sx/2-py/2-b
15
16    table
17        { dx, f, a }
18        { -1, -1, ny }
19        { 1, 1, pins-ny-nx+1 }
20
21    loop i = 0, ny-1
22
23    __0: vec @(x*dx, y)
24    frame piny .
25}
26
27frame pinx {
28    set name = i*f+a
29
30    __0: vec @(px/2, -dy*py/2)
31    __1: vec @(-px/2, dy*py/2)
32    __2: vec .(0mm, dy*pe)
33    pad "$name" . __0
34}
35
36frame outline {
37    set corner = gap*2-(w+0.2mm)/sqrt(2)
38
39    __0: vec @(sx/2, sy/2)
40    __1: vec __0(gap, gap)
41    __2: vec @(-sx/2, -sy/2)
42    __3: vec __2(-gap, -gap)
43    rect . __1 w
44    __4: vec @(-sx/2, sy/2)
45    __5: vec .(-gap, gap)
46    __6: vec .(corner, 0mm)
47    __7: vec __5(0mm, -corner)
48    line . __6 w
49}
50
51frame pinsx {
52    set x = e*(i-(nx-1)/2)
53
54    set y = sy/2-py/2-b
55
56    table
57        { dy, f, a }
58        { -1, 1, ny+1 }
59        { 1, -1, pins }
60
61    loop i = 0, nx-1
62
63    __0: vec @(x, y*dy)
64    frame pinx .
65}
66
67package "LGA-$pins-${sizex}x${sizey}"
68unit mm
69
70table
71    { nx, ny, sx, sy, e, b, px, py, pe }
72    { 3, 5, 3mm, 3mm, 0.5mm, 0.1mm, 0.25mm, 0.35mm, 0.2mm }
73
74set pins = 2*(nx+ny)
75
76set sizex = sx/1mm
77
78set sizey = sy/1mm
79
80set w = 5mil
81
82set gap = 0.2mm+w/2+0.1mm
83
84frame pinsx @
85frame pinsy @
86frame outline @
87measx outline.__2 >> outline.__0 -1.5mm
88measy outline.__2 >> outline.__0 1.5mm
89measx pinsx.__0 -> pinsx.__0 -1.5mm
90measx pinx.__2 -> pinx.__0 py+0.5mm
91measy pinx.__1 -> pinx.__0 0.2mm
92measy pinx.__2 -> pinx.__1 0.2mm
93measy outline.__3 >> outline.__5 1.5mm
94measx outline.__3 >> outline.__1 -1.5mm
95measy pinx.__1 >> outline.__2 -0.5mm
96

Archive Download this file

Branches:
master



interactive