Root/modules/dfn.fpd

Source at commit c79a79b6cef055ac7b97af0b815cc8457bcfe791 created 2 years 7 months ago.
By Werner Almesberger, modules/dfn.fpd, HIERARCHY (DFN-6-0.65mm): "WSON", for TI LMV221SD
1/* MACHINE-GENERATED ! */
2
3frame pad {
4    set n = pins+1
5
6    __0: vec @(cx/2, cy/2)
7    __1: vec @(-cx/2, -cy/2)
8    pad "$n" . __0
9}
10
11frame pin {
12    __0: vec @(px/2, py/2)
13    __1: vec @(-px/2, -py/2)
14    pad "$n" . __0
15}
16
17frame pins {
18    set x = e*(i-(pins/2-1)/2)
19
20    set y = (iy+oy)/4*dy
21
22    set n = a+f*i
23
24    table
25        { dy, f, a }
26        { 1, -1, 8 }
27        { -1, 1, 1 }
28
29    loop i = 0, pins/2-1
30
31    __0: vec @(x, y)
32    frame pin .
33}
34
35frame outline {
36    set x = (X+gap)/2
37
38    set y = (Y+gap)/2
39
40    __0: vec @(X/2, Y/2)
41    __6: vec .(gap, gap)
42    __1: vec @(X/2, -Y/2)
43    __2: vec .(gap, -gap)
44    line __6 . w
45    __3: vec @(-X/2, Y/2)
46    __7: vec .(-gap, gap)
47    __8: vec @(-X/2, -Y/2)
48    __9: vec .(-gap, -gap)
49    line __7 . w
50    __4: vec .(-(w+r+0.1mm), r)
51    __5: vec .(0mm, r)
52    circ __4 . w
53}
54
55package "DFN-$pins$variant"
56unit mm
57
58table
59    { pins, variant, X, Y, e, iy, oy, px, cx, cy, gap_base }
60    { 8, "", 2mm, 2mm, 0.5mm, 1.4mm, 2.4mm, 0.28mm, 1.3mm, 0.7mm, 0.2mm }
61    { 8, "-0.4mm", 1.7mm, 1.35mm, 0.4mm, 0.8mm, 1.75mm, 0.2mm, 1mm, 0.4mm, 0.1mm }
62    { 6, "-0.65mm", 2.2mm, 2.3mm, 0.65mm, 1.7mm, 2.9mm, 0.25mm, 1.2mm, 0.75mm, 0mm }
63
64set py = (oy-iy)/2
65
66set w = 5mil
67
68set gap = gap_base+w/2
69
70set r = 0.25mm
71
72frame pins @
73frame pad @
74frame outline @
75measy pin.__1 >> pin.__0 2mm
76measy pin.__0 >> pin.__1 2mm
77measy pad.__1 >> pad.__0 1.5mm
78measx pin.__1 >> pin.__0 -1mm
79measx pin.__1 -> pin.__0 -0.5mm
80measy pin.__1 -> pin.__0 2mm-px
81measx pins.__0 -> pins.__0 oy+0.5mm
82measy outline.__1 >> outline.__0 -1mm
83measx outline.__3 >> outline.__0 1.5mm
84measx pad.__1 >> pad.__0 cy/2
85

Archive Download this file

Branches:
master



interactive