2 # Copyright 2011 by Bdale Garbee <bdale@gag.com>. GPLv2
4 # Program to emit PCB footprint for QFN-16 package used by the RFPA0133
7 # dimensions in mm from the RFPA0133
13 GndSquare = 1.7 # D2 & E2
15 PinClearance = 2 * (PinSpacing - PinWidth)
17 # ATMEL specifies 120-150 microns between pad and solder mask
18 # AT88RF1354 Appplication note
20 PinResist = PinWidth + (2 * 0.07)
24 # we're going to use the 1/100 of a mil fundamental unit form
27 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
29 print '# author: Keith Packard'
30 print '# email: keithp@keithp.com'
31 print '# dist-license: GPL 2'
32 print '# use-license: unlimited'
34 print 'Element[0x0 "qfn-16" "" "" 0 0 0 0 0 100 0x0]'
37 # pad under the chip, must be grounded
43 mm2mils100(GndSquare), \
44 mm2mils100(PinClearance), \
45 mm2mils100(PinResist), \
46 '"pin17" "17" "square,nopaste"]'
48 # vias in the ground pad under the chip
49 for viarow in range (-1,1):
50 for viacol in range (-1,1):
52 mm2mils100(1.8 * viacol * CoreSquare / 3 + .9 * CoreSquare/3), \
53 mm2mils100(1.8 * viarow * CoreSquare / 3 + .9 * CoreSquare/3), \
58 '"pin17" "17" 0x0002]'
60 # break pad under chip into a grid to control the resist and paste masks
64 for viarow in range (-1, 2):
65 for viacol in range (-1, 2):
66 if (viarow in (-1, 1)) and (viacol in (-1, 1)):
67 # copper sub-square with resist over vias
69 mm2mils100(viacol * CoreSquare / blocks), \
70 mm2mils100(viarow * CoreSquare / blocks), \
71 mm2mils100(viacol * CoreSquare / blocks), \
72 mm2mils100(viarow * CoreSquare / blocks), \
73 mm2mils100((CoreSquare)/blocks), \
76 '"pin17" "17" "square,nopaste"]'
78 # copper sub-square without resist
80 mm2mils100(viacol * CoreSquare / blocks), \
81 mm2mils100(viarow * CoreSquare / blocks), \
82 mm2mils100(viacol * CoreSquare / blocks), \
83 mm2mils100(viarow * CoreSquare / blocks), \
84 mm2mils100((CoreSquare)/blocks), \
86 mm2mils100((CoreSquare)/blocks), \
87 '"pin17" "17" "square,nopaste"]'
88 # copper spot to control paste mask generation
90 mm2mils100(viacol * CoreSquare / blocks), \
91 mm2mils100(viarow * CoreSquare / blocks), \
92 mm2mils100(viacol * CoreSquare / blocks), \
93 mm2mils100(viarow * CoreSquare / blocks), \
96 mm2mils100((CoreSquare)/blocks), \
97 '"pin17" "17" "square"]'
100 for pin in range (1,5):
102 mm2mils100((-2.5 + pin) * PinSpacing), \
103 mm2mils100(-Overall/2 + PinWidth/2), \
104 mm2mils100((-2.5 + pin) * PinSpacing), \
105 mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
106 mm2mils100(PinWidth), \
107 mm2mils100(PinClearance), \
108 mm2mils100(PinResist), \
109 '"pin%i"' % (13-pin), '"%i"' % (13-pin), '0x0000]'
112 mm2mils100((-2.5 + pin) * PinSpacing), \
113 mm2mils100(+Overall/2 - PinHeight + PinWidth/2), \
114 mm2mils100((-2.5 + pin) * PinSpacing), \
115 mm2mils100(+Overall/2 - PinWidth/2), \
116 mm2mils100(PinWidth), \
117 mm2mils100(PinClearance), \
118 mm2mils100(PinResist), \
119 '"pin%i"' % pin, '"%i"' % pin, '0x0000]'
122 mm2mils100(Overall/2 - PinHeight + PinWidth/2), \
123 mm2mils100((-2.5 + pin) * PinSpacing), \
124 mm2mils100(Overall/2 - PinWidth/2), \
125 mm2mils100((-2.5 + pin) * PinSpacing), \
126 mm2mils100(PinWidth), \
127 mm2mils100(PinClearance), \
128 mm2mils100(PinResist), \
129 '"pin%i"' % (9-pin), '"%i"' % (9-pin), '0x0000]'
132 mm2mils100(-Overall/2 + PinWidth/2), \
133 mm2mils100((-2.5 + pin) * PinSpacing), \
134 mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
135 mm2mils100((-2.5 + pin) * PinSpacing), \
136 mm2mils100(PinWidth), \
137 mm2mils100(PinClearance), \
138 mm2mils100(PinResist), \
139 '"pin%i"' % (12+pin), '"%i"' % (12+pin), '0x0000]'
141 print ' ElementArc[',\
144 '500 500 0 360 1000 ]'