Index: pcblib/parametric/tqfp =================================================================== --- pcblib/parametric/tqfp (nonexistent) +++ pcblib/parametric/tqfp (revision 745) @@ -0,0 +1,21 @@ +#!/bin/sh + +#@@example tqfp(32,7x7,0.8) + +#@@purpose Generate TQFP packages +#@@desc Generate TQFP packages - a simplified frontend to qf() - +#@@desc look up 3..4 data in the datasheet and get a regular TQFP footprint! +#@@desc NOTE: some of the qf() parameters can be also used. + +#@@params:pins,size,pitch,cpad_size + +#@@param:pin total number of pins (leads); must be divisible by 4 +#@@param:size a single integer N or NxN or NxNxH; body dimension (width or height of the plastic body) in mm +#@@param:pitch lead pitch (distance between the centerline of two adjacent leads), in mm; must be one of 0.4, 0.5, 0.65 + +#@@param:cpad_size width (and height) of the central pad, in mm +#@@optional:cpad_size +#@@default:cpad_size empty, there's no central pad + +awk -f `dirname $0`/common.awk -f `dirname $0`/tqfp.awk -f `dirname $0`/qf.awk -v "args=$*" -v gen=`basename $0` + Property changes on: pcblib/parametric/tqfp ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: pcblib/parametric/tqfp.awk =================================================================== --- pcblib/parametric/tqfp.awk (nonexistent) +++ pcblib/parametric/tqfp.awk (revision 745) @@ -0,0 +1,50 @@ +function parri(A ,s,i) +{ + for(i in A) + s = s " " i + return s +} + +BEGIN { + + PT["0.8"] = "0.55mm" + PT["0.65"] = "0.35mm" + PT["0.5"] = "0.3mm" + PT["0.4"] = "0.2mm" + + proc_args(P, "pins,size,pitch,cpad_size,pad_thickness", "pins,size,pitch") + + pitch = P["pitch"] + sub("0*$", "", pitch) + + if (!(args ~ "pad_thickness=")) { + if (!(pitch in PT)) + error("Unkown pitch, should be one of:" parri(PT)) + pt = PT[pitch] + } + else + pt = rev_mm(DEFAULT["pad_thickness"]) + + split(P["size"], S, "x") + if (S[2] == "") + S[2] = S[1] + if (S[1] != S[2]) + error("need n*n size") + + pins = int(P["pins"]) + if (pins / 4 != int(pins / 4)) + error("number of pins must be divisible by 4") + + pins=pins/4 + + + S[1] += 1.45 + S[2] += 1.45 + args = args ",nx=" pins ",ny=" pins ",x_spacing=" S[1] "mm,y_spacing=" S[2] "mm,pad_spacing=" pitch "mm,pad_thickness=" pt "mm" + + + if (P["cpad_size"] != "") + args = args ",cpad_width=" P["cpad_size"] "mm,cpad_height=" P["cpad_size"] "mm" + + args = args ",int_bloat=0.5mm,ext_bloat=1.1mm" +}