Root/modules/lga.fpd

Source at commit 949eb44ec41706f704fff7181dfd79f943fc46f4 created 5 years 4 months ago.
By Werner Almesberger, modules/lga.fpd (LGA-8-2.5x2.5-BME250): first draft (still needs cw)
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 .(gap, gap)
41    __2: vec @(-sx/2, -sy/2)
42    __3: vec .(-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}${variant}"
68unit mm
69
70table
71    { variant, 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    { "-BME280", 0, 4, 2.5mm, 2.5mm, 0.65mm, 0.125mm, 0.35mm, 0.35mm, 0.15mm }
74
75set pins = 2*(nx+ny)
76
77set sizex = sx/1mm
78
79set sizey = sy/1mm
80
81set w = 5mil
82
83set gap = 0.2mm+w/2+0.1mm
84
85frame pinsx @
86frame pinsy @
87frame outline @
88measx outline.__2 >> outline.__0 -1.5mm
89measy outline.__2 >> outline.__0 1.5mm
90measx pinsx.__0 -> pinsx.__0 -1.5mm
91measx pinx.__2 -> pinx.__0 py+0.5mm
92measy pinx.__1 -> pinx.__0 0.2mm
93measy pinx.__2 -> pinx.__1 0.2mm
94measy outline.__3 >> outline.__5 1.5mm
95measx outline.__3 >> outline.__1 -1.5mm
96measy pinx.__1 >> outline.__2 -0.5mm
97measx piny.__0 -> piny.__1
98measx piny.__1 -> piny.__1 0.8mm
99measx piny.__0 -> piny.__0 1mm
100measy pinsy.__0 -> pinsy.__0 1mm
101

Archive Download this file

Branches:
master



interactive