Root/modules/lga.fpd

Source at commit 7f3f9267cb007e13eca0af273f9eedad0c6c5659 created 1 year 6 months ago.
By Werner Almesberger, components/stm32.lib: add STM32L052x6/8 in QFN32 (KxU) package
1/* MACHINE-GENERATED ! */
2
3frame piny {
4    table
5        { ?cw, name }
6        { 0, i*f+a }
7        { 1, pins-a-i*f-nx+1 }
8
9    __0: vec @(dx*(pyy/2+pe), pyx/2)
10    __1: vec @(-dx*pyy/2, -pyx/2)
11    pad "$name" . __0
12}
13
14frame pinsy {
15    set y = e*(i-(ny-1)/2)
16
17    set x = sx/2-pyy/2-b
18
19    table
20        { dx, f, a }
21        { -1, -1, ny }
22        { 1, 1, pins-ny-nx+1 }
23
24    loop i = 0, ny-1
25
26    __0: vec @(x*dx, y)
27    frame piny .
28}
29
30frame pinx {
31    table
32        { ?cw, name }
33        { 0, i*f+a }
34        { 1, a+(nx-i-1)*f }
35
36    __0: vec @(pxx/2, -dy*pxy/2)
37    __1: vec @(-pxx/2, dy*pxy/2)
38    __2: vec .(0mm, dy*pe)
39    pad "$name" . __0
40}
41
42frame outline {
43    set corner = gap*2-(w+0.2mm)/sqrt(2)
44
45    __0: vec @(sx/2, sy/2)
46    __1: vec .(gap, gap)
47    __2: vec @(-sx/2, -sy/2)
48    __3: vec .(-gap, -gap)
49    rect . __1 w
50    __4: vec @((cw*2-1)*sx/2, sy/2)
51    __5: vec .((cw*2-1)*gap, gap)
52    __6: vec .((1-cw*2)*corner, 0mm)
53    __7: vec __5(0mm, -corner)
54    line . __6 w
55}
56
57frame pinsx {
58    set x = e*(i-(nx-1)/2)
59
60    set y = sy/2-pxy/2-b
61
62    table
63        { dy, f, a }
64        { -1, 1, ny+1 }
65        { 1, -1, pins }
66
67    loop i = 0, nx-1
68
69    __0: vec @(x, y*dy)
70    frame pinx .
71}
72
73package "LGA-$pins-${sizex}x${sizey}${variant}"
74unit mm
75allow overlap
76
77table
78    { variant, nx, ny, sx, sy, e, b, pxx, pxy, pyx, pyy, pe, cw }
79    { "", 3, 5, 3mm, 3mm, 0.5mm, 0.1mm, 0.25mm, 0.35mm, pxx, pxy, 0.2mm, 0 }
80    { "-BME280", 0, 4, 2.5mm, 2.5mm, 0.65mm, 0.125mm, 0.35mm, 0.35mm, pxx, pxy, 0.15mm, 1 }
81    { "-BMX055", 3, 7, 3mm, 4.5mm, 0.5mm, 0.1mm, 0.25mm, 0.375mm, pxx, 0.475mm, 0.2mm, 1 }
82    { "-RUT", 1, 5, 1.7mm, 2mm, 0.4mm, -0.1mm, 0.2mm, 0.6mm, pxx, pxy, 0mm, 0 }
83
84set pins = 2*(nx+ny)
85
86set sizex = sx/1mm
87
88set sizey = sy/1mm
89
90set w = 5mil
91
92set gap = 0.2mm+w/2+0.1mm
93
94frame pinsx @
95frame pinsy @
96frame outline @
97measx outline.__2 >> outline.__0 -1.5mm
98measy outline.__2 >> outline.__0 1.5mm
99measx pinsx.__0 -> pinsx.__0 -1.5mm
100measx pinx.__2 -> pinx.__0 pxy+0.5mm
101measy pinx.__1 -> pinx.__0 0.2mm
102measy pinx.__2 -> pinx.__1 0.2mm
103measy outline.__3 >> outline.__5 1.5mm
104measx outline.__3 >> outline.__1 -1.5mm
105measy pinx.__1 >> outline.__2 -0.5mm
106measx piny.__0 -> piny.__1
107measx piny.__1 -> piny.__1 0.8mm
108measx piny.__0 -> piny.__0 1mm
109measy pinsy.__0 -> pinsy.__0 1mm
110measy pinx.__0 -> pinx.__0 2.2mm
111

Archive Download this file

Branches:
master



interactive