2 # Copyright 2011 by Bdale Garbee <bdale@gag.com>. GPLv2
4 # Program to emit PCB footprint for QFN32 package used by FTDI FT232RQ
7 # dimensions in mm from the TI cc1111f32.pdf datasheet
9 PinResist = PinWidth + (2 * 0.07)
10 PinHeight = (5.8 - 4.1) / 2
14 CoreSquare = 3.30 # resist gaps and paste spots over ground tab
19 # we're going to use the 1/100 of a mil fundamental unit form
21 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
23 print '# author: Bdale Garbee'
24 print '# email: bdale@gag.com'
25 print '# dist-license: GPL 2'
26 print '# use-license: unlimited'
28 print 'Element[0x0 "QFN32" "" "" 0 0 0 0 0 100 0x0]'
31 # pad under the chip, must be grounded
37 mm2mils100(GndSquare), \
40 '"pin33" "33" "square,nopaste"]'
42 # vias in the ground pad under the chip
43 for viarow in range (-1,2):
44 for viacol in range (-1,2):
46 mm2mils100(2 * viacol * CoreSquare / 5), \
47 mm2mils100(2 * viarow * CoreSquare / 5), \
52 '"pin33" "33" 0x0002]'
54 # break pad under chip into a grid to control the resist and paste masks
55 for viarow in range (-2, 3):
56 for viacol in range (-2, 3):
57 if (viarow in (-2, 0, 2)) and (viacol in (-2, 0, 2)):
58 # copper sub-square with resist over vias
60 mm2mils100(viacol * CoreSquare / 5), \
61 mm2mils100(viarow * CoreSquare / 5), \
62 mm2mils100(viacol * CoreSquare / 5), \
63 mm2mils100(viarow * CoreSquare / 5), \
64 mm2mils100((CoreSquare)/5), \
67 '"pin33" "33" "square,nopaste"]'
69 # copper sub-square without resist
71 mm2mils100(viacol * CoreSquare / 5), \
72 mm2mils100(viarow * CoreSquare / 5), \
73 mm2mils100(viacol * CoreSquare / 5), \
74 mm2mils100(viarow * CoreSquare / 5), \
75 mm2mils100((CoreSquare)/5), \
77 mm2mils100((CoreSquare)/5), \
78 '"pin33" "33" "square,nopaste"]'
79 # copper spot to control paste mask generation
81 mm2mils100(viacol * CoreSquare / 5), \
82 mm2mils100(viarow * CoreSquare / 5), \
83 mm2mils100(viacol * CoreSquare / 5), \
84 mm2mils100(viarow * CoreSquare / 5), \
87 mm2mils100((CoreSquare)/5), \
88 '"pin33" "33" "square"]'
91 for pin in range (1,9):
93 mm2mils100((-4.5 + pin) * PinSpacing), \
94 mm2mils100(-Overall/2 + PinWidth/2), \
95 mm2mils100((-4.5 + pin) * PinSpacing), \
96 mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
97 mm2mils100(PinWidth), \
98 mm2mils100(PinSpacing - PinWidth), \
99 mm2mils100(PinResist), \
100 '"pin%i"' % (25-pin), '"%i"' % (25-pin), '"square"]'
103 mm2mils100((-4.5 + pin) * PinSpacing), \
104 mm2mils100(+Overall/2 - PinHeight + PinWidth/2), \
105 mm2mils100((-4.5 + pin) * PinSpacing), \
106 mm2mils100(+Overall/2 - PinWidth/2), \
107 mm2mils100(PinWidth), \
108 mm2mils100(PinSpacing - PinWidth), \
109 mm2mils100(PinResist), \
110 '"pin%i"' % pin, '"%i"' % pin, '"square"]'
113 mm2mils100(Overall/2 - PinHeight + PinWidth/2), \
114 mm2mils100((-4.5 + pin) * PinSpacing), \
115 mm2mils100(Overall/2 - PinWidth/2), \
116 mm2mils100((-4.5 + pin) * PinSpacing), \
117 mm2mils100(PinWidth), \
118 mm2mils100(PinSpacing - PinWidth), \
119 mm2mils100(PinResist), \
120 '"pin%i"' % (17-pin), '"%i"' % (17-pin), '"square"]'
123 mm2mils100(-Overall/2 + PinWidth/2), \
124 mm2mils100((-4.5 + pin) * PinSpacing), \
125 mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
126 mm2mils100((-4.5 + pin) * PinSpacing), \
127 mm2mils100(PinWidth), \
128 mm2mils100(PinSpacing - PinWidth), \
129 mm2mils100(PinResist), \
130 '"pin%i"' % (24+pin), '"%i"' % (24+pin), '"square"]'
132 print ' ElementArc[',\
135 '500 500 0 360 1000 ]'