Root/modules/qfp.fpd

1/* MACHINE-GENERATED ! */
2
3frame pad {
4    set px = (dx*X1+dy*Y1)/2
5
6    set py = (dy*X1+dx*Y1)/2
7
8    set pin = side*pins/4+i+1
9
10    __0: vec @(px, py)
11    __1: vec @(-px, -py)
12    pad "$pin" . __0
13    __2: vec @(px, -py)
14    __3: vec @(-px, py)
15}
16
17frame side {
18    set pos = i-(pins/4-1)/2
19
20    loop i = 0, pins/4-1
21
22    __0: vec @(e*pos*dx, e*pos*dy)
23    frame pad .
24}
25
26frame pads {
27    table
28        { side, dx, dy }
29        { 0, 0, -1 }
30        { 1, 1, 0 }
31        { 2, 0, 1 }
32        { 3, -1, 0 }
33
34    __0: vec @(dy*C1/2, -dx*C2/2)
35    frame side .
36}
37
38frame outline {
39    table
40        { index, dx, dy }
41        { 1, -1, 0 }
42        { 0, 0, -1 }
43        { 0, 1, 0 }
44        { 0, 0, 1 }
45
46    set cx = (dx*C1+dy*C2)/2
47
48    set cy = (dy*C2-dx*C1)/2
49
50    set ax = -Y1/2*dx
51
52    set ay = -Y1/2*dy
53
54    set bx = -Y1/2*dy
55
56    set by = Y1/2*dx
57
58    __0: vec @(cx, cy)
59    w: vec .(ax, ay)
60    line __0 . w
61    __2: vec __0(bx, by)
62    line __0 . w
63    __1: vec .(index*(ax-bx), index*(ay-by))
64    line __2 . w
65}
66
67package "$name"
68unit mm
69
70table
71    { name, pins, X1, Y1, e, C1, C2, D1, E1 }
72    { "QFP32", 32, 0.45mm, 1.3mm, 0.8mm, 8.45mm, 8.45mm, 7mm, 7mm }
73    { "QFP48", 48, 0.27mm, 1.45mm, 0.5mm, 8.2mm, 8.2mm, 7mm, 7mm }
74    { "QFP64", 64, 0.27mm, 1.45mm, 0.5mm, 11.25mm, 11.25mm, 10mm, 10mm }
75
76set w = 5mil
77
78frame pads @
79frame outline @
80measy pad.__1 -> pad.__0 2.5mm
81meas side.__0 -> side.__0 -1.6mm
82meas pad.__2 -> pad.__1 -0.5mm
83meas pad.__1 -> pad.__2 -1.5mm
84measy side.__0 >> side.__0 3.5mm
85measy pad.__1 >> pad.__1 4mm
86measx pads.__0 >> side.__0 -7.5mm
87measx pad.__0 >> pad.__2 -5mm
88measy pad.__0 >> pad.__3 3mm
89measx pad.__3 >> pad.__1 -4mm
90

Archive Download this file

Branches:
master



interactive