2 # Copyright 2009 by Bdale Garbee <bdale@gag.com>. GPLv2
4 # Program to emit PCB footprint for
5 # Tyco/AMP Micro-MaTch vertical through-hole female connectors
7 # Needs pin count on command line, in range of 4..20 even numbers only
10 # dimensions in mm from C_215079_v.pdf datasheet
24 # freedfm.com round-off error bites us if we make this 700...
31 # we're going to use the 1/100 of a mil fundamental unit form
33 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
35 pins = int(sys.argv[1])
38 sys.stderr.write('Must be at least 4 pins\n')
41 sys.stderr.write('There is no 22 pin version!\n')
44 sys.stderr.write('Must be no more than 24 pins\n')
48 if sys.argv[2] == "latch":
51 sys.stderr.write('There is no 24 pin latching version!\n')
54 print '# author: Bdale Garbee'
55 print '# email: bdale@gag.com'
56 print '# dist-license: GPL 2'
57 print '# use-license: unlimited'
59 print 'Element[0x0 "MicroMatch%i"' % pins,'"" "" 0 0 0 0 0 100 0x0]'
61 for col in range ((pins+1)/2):
67 pinnum = (col * 2) + row + 1
73 mm2mils100((pinnum-1)*PinSpacing), \
74 mm2mils100(spacing), \
75 mm2mils100(PinDiam)+(MinAnnular*2), \
77 mm2mils100(PinDiam)+(MinAnnular*2)+(MaskDelta*2), \
78 mm2mils100(PinDiam), \
79 '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']'
81 # add a hole for the index pin. plated to save non-plated-hole extra fab cost.
84 mm2mils100(RowSpacing-MntY), \
85 mm2mils100(MntDiam)+(MinAnnular*2), \
87 mm2mils100(MntDiam)+(MinAnnular*2)+(MaskDelta*2), \
88 mm2mils100(MntDiam), \
89 '"mnt" "0"', '0x0001', ']'
91 BoxX = (pins - 1) * PinSpacing + BoxXbase
94 BoxY1 = -(BoxY - RowSpacing)/2
97 print ' ElementLine[', \
104 print ' ElementLine[', \
111 print ' ElementLine[', \
118 print ' ElementLine[', \