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
30 # we're going to use the 1/100 of a mil fundamental unit form
32 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
34 pins = int(sys.argv[1])
37 sys.stderr.write('Must be at least 4 pins\n')
40 sys.stderr.write('There is no 22 pin version!\n')
43 sys.stderr.write('Must be no more than 24 pins\n')
47 if sys.argv[2] == "latch":
50 sys.stderr.write('There is no 24 pin latching version!\n')
53 print '# author: Bdale Garbee'
54 print '# email: bdale@gag.com'
55 print '# dist-license: GPL 2'
56 print '# use-license: unlimited'
58 print 'Element[0x0 "MicroMatch%i"' % pins,'"" "" 0 0 0 0 0 100 0x0]'
60 for col in range ((pins+1)/2):
66 pinnum = (col * 2) + row + 1
72 mm2mils100((pinnum-1)*PinSpacing), \
73 mm2mils100(spacing), \
74 mm2mils100(PinDiam)+(MinAnnular*2), \
76 mm2mils100(PinDiam)+(MaskDelta*2), \
77 mm2mils100(PinDiam), \
78 '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']'
80 # add a hole for the index pin. plated to save non-plated-hole extra fab cost.
83 mm2mils100(RowSpacing-MntY), \
84 mm2mils100(MntDiam)+(MinAnnular*2), \
86 mm2mils100(MntDiam)+(MaskDelta*2), \
87 mm2mils100(MntDiam), \
88 '"mnt" "0"', '0x0001', ']'
90 BoxX = (pins - 1) * PinSpacing + BoxXbase
93 BoxY1 = -(BoxY - RowSpacing)/2
96 print ' ElementLine[', \
103 print ' ElementLine[', \
110 print ' ElementLine[', \
117 print ' ElementLine[', \