#usage "Perform substitutions in a DEC schematic to bring it into the 21st century.\n" "

" "Changes part numbers (values) to modern equivalents." "

" "Usage: RUN xversion" "

" "

You can also run this ULP from the command line:

" "RUN xversion
" "


" "Author: vrs@msn.com
" // THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED string Version = "4.1.1"; string fPinPad[] = { "", "PIN", "PAD" }; string old[], new[]; int count = 0; int subst; string cmd; int i; old[count] = "D664"; new[count] = "1N4154"; count++; old[count] = "1N3606"; new[count] = "1N4154"; count++; old[count] = "D662"; new[count] = "1N914"; count++; old[count] = "1N645"; new[count] = "1N914"; count++; old[count] = "DEC3639"; new[count] = "PN3640"; // Hmm...PN4355 are actually cheaper. count++; old[count] = "2N3639"; new[count] = "PN3640"; count++; old[count] = "DEC3009"; new[count] = "PN3569"; count++; old[count] = "DEC3009B"; new[count] = "PN3569"; count++; old[count] = "DEC3009C"; new[count] = "PN3569"; count++; old[count] = "2N3009"; new[count] = "PN3569"; count++; old[count] = "16J1"; new[count] = "2N2222"; count++; old[count] = "2N3605"; new[count] = "2N2222"; count++; old[count] = "DEC1008"; new[count] = "BC639"; // or 2N3444 per Anders count++; old[count] = "MM1008"; new[count] = "BC639"; // or 2N3444 per Anders count++; old[count] = "DEC2894"; new[count] = "PN4355"; // or select (fast) PN3640. count++; old[count] = "2N2894"; new[count] = "PN4355"; // or select (fast) PN3640. count++; old[count] = "DEC2219"; new[count] = "2N2219"; count++; old[count] = "DEC4258"; new[count] = "PN4250A"; count++; old[count] = "2N4258"; new[count] = "PN4250A"; count++; old[count] = "DEC6534"; new[count] = "MPS6534"; count++; old[count] = "MPS6534"; new[count] = "MPS6534"; count++; old[count] = "2N3568"; new[count] = "PN3567"; count++; old[count] = "PN3568"; new[count] = "PN3567"; count++; old[count] = "2N3790"; new[count] = "2N3792"; count++; old[count] = "1N823"; new[count] = "1N4735"; count++; old[count] = "1N825 6.2V"; new[count] = "1N825 6.2V"; count++; old[count] = "1N758"; new[count] = "1N758"; count++; old[count] = "DEC3638"; new[count] = "PN3645"; count++; old[count] = "2N3638"; new[count] = "PN3645"; count++; old[count] = "2N2646"; new[count] = "2N4870"; count++; old[count] = "1N4001"; new[count] = "1N4001"; count++; old[count] = "2N4443"; new[count] = "TYN612"; count++; old[count] = "1N5395"; new[count] = "1N5395"; count++; old[count] = "DEC3500"; new[count] = "2N5551"; count++; old[count] = "2N3500"; new[count] = "2N5551"; count++; old[count] = "1N756A"; new[count] = "1N756A"; count++; old[count] = "1N748"; new[count] = "1N748"; count++; old[count] = "1N4744"; new[count] = "1N4744A"; count++; old[count] = "1N4744 (15V)"; new[count] = "1N4744A"; count++; old[count] = "1N3020A 10V 1W"; new[count] = "1N3020B 10V 1W"; count++; old[count] = "1N3653"; // Vishay 914 for 100PrV, still new[count] = "1N914V"; // 300mA instead of desired 400mA count++; old[count] = "D670"; // Vishay 914 for 100PrV, still new[count] = "1N914V"; // 300mA instead of desired 400mA count++; old[count] = "1/4M6.8AZ"; // 6.8V Zener new[count] = "1N5235"; // also 1N4736, 1N754 count++; old[count] = "1/4M 6.8AZ"; // 6.8V Zener new[count] = "1N5235"; // also 1N4736, 1N754 count++; old[count] = "MR2066"; new[count] = "1N4003"; count++; old[count] = "DEC3494"; new[count] = "2N5401"; count++; old[count] = "2N3494"; new[count] = "2N5401"; count++; old[count] = "PAD-0465"; new[count] = "PAD-0465"; count++; old[count] = "MPS3568"; new[count] = "2N2907"; count++; old[count] = "MPS6531"; new[count] = "MPS6531"; count++; old[count] = "DEC999"; // 15-01836 No data sheet, but crosses to NTE159 (nteinc.com) new[count] = "2N3906"; // vetcosurplus.com sells 2N3906/NTE159 as replacement for MM999. count++; old[count] = "MM999"; // 15-01836 No data sheet, but crosses to NTE159 (nteinc.com) new[count] = "2N3906"; // vetcosurplus.com sells 2N3906/NTE159 as replacement for MM999. count++; old[count] = "DEC6"; // 15-09090 No data sheet, but crosses to NTE159 (nteinc.com) new[count] = "2N3906"; // vetcosurplus.com sells 2N3906/NTE159 as replacement for 15-09090. count++; old[count] = "DEC6B"; // 15-09090-01 No data sheet, but crosses to NTE159 (nteinc.com) new[count] = "2N3906"; // vetcosurplus.com sells 2N3906/NTE159 as replacement for 15-09090-01. count++; old[count] = "DEC-6B"; // 15-09090-01 No data sheet, but crosses to NTE159 (nteinc.com) new[count] = "2N3906"; // vetcosurplus.com sells 2N3906/NTE159 as replacement for 15-09090-01. count++; old[count] = "MR2064"; // Needs 1.25V-1.3V forward drop, 1.5A new[count] = "FR154"; count++; old[count] = "SDA-4"; new[count] = "2N2060"; count++; old[count] = "SDA-5"; new[count] = "2N2060"; count++; old[count] = "SDA-6"; new[count] = "2N2060"; count++; old[count] = "SDA6"; new[count] = "2N2060"; count++; old[count] = "SDA7"; // Pretty much the only thing available in TO78. new[count] = "MAT03"; count++; //old[count] = "SDA-8"; // SDA-8 is basically a matched pair of 2N3563 (G007, G005) //new[count] = "2N2060"; // Replacement for 2N3563 is basically PN3569. //count++; // Like 2N2060, but 600MHz instead of 60MHz old[count] = "2N1305"; // Sigh. There just aren't many choices for germanium. new[count] = "NTE102"; count++; old[count] = "1N994"; // Sigh. There just aren't many choices for germanium. new[count] = "NTE109"; count++; old[count] = "2N1132"; new[count] = "2N2904"; count++; old[count] = "DEC2904"; new[count] = "2N2904"; count++; old[count] = "1N746A"; // 3.3V 5% new[count] = "1N746A 3.3V"; count++; old[count] = "1N748"; // 3.9V 5% new[count] = "1N748A 3.9V"; count++; old[count] = "1N750"; // 3.9V 5% new[count] = "1N750A 4.7V"; count++; old[count] = "1N752"; // 5.6V 5% new[count] = "1N752A 5.6V"; count++; old[count] = "1N752A"; // 5.6V 5% new[count] = "1N752A 5.6V"; count++; old[count] = "1N762"; // 5.5V 5% new[count] = "NZX5V6C"; count++; old[count] = "1N429"; // 6.2V 5% new[count] = "1N753A"; count++; old[count] = "1N753"; // 6.2V 5% new[count] = "1N753A"; count++; old[count] = "1N753 (6.2V)"; // 6.2V 5% new[count] = "1N753A"; count++; old[count] = "2N4912"; // Newark/Farnell new[count] = "NTE274"; count++; old[count] = "2N4235"; new[count] = "2N4235"; count++; old[count] = "2N4274"; new[count] = "PN3569"; count++; old[count] = "DEC4250"; new[count] = "BC557"; count++; old[count] = "2N4250"; new[count] = "BC557"; count++; old[count] = "7400N"; new[count] = "7400N"; count++; old[count] = "7401N"; new[count] = "7401N"; count++; old[count] = "7402N"; new[count] = "7402N"; count++; old[count] = "7404N"; new[count] = "7404N"; count++; old[count] = "7410N"; new[count] = "7410N"; count++; //old[count] = "N8881N"; // Not easier to find //new[count] = "7439N"; //count++; old[count] = "7438N"; // Manual substitute for N8881N new[count] = "7438N"; count++; old[count] = "7420N"; new[count] = "7420N"; count++; //old[count] = "7440N"; // 7440 is totally obsoleted //new[count] = "7440N"; //count++; old[count] = "7442N"; // Manual replacement for DEC8251 -- available? new[count] = "7442N"; count++; old[count] = "7474N"; new[count] = "7474N"; count++; //old[count] = "9601"; // Not pin compatible //new[count] = "74122N"; //count++; old[count] = "74121N"; // Manual replacement for 9601 new[count] = "74121N"; count++; old[count] = "7486N"; new[count] = "7486N"; count++; //old[count] = "DEC8271"; // Not pin compatible?, and not easier to find. //new[count] = "74179"; //count++; //old[count] = "MC1709"; // aka LM709 or UA709 //new[count] = "LM301AH"; // Too expensive (10X) //count++; //old[count] = "MC1709H"; // aka LM709 or UA709 //new[count] = "LM301AH"; //count++; old[count] = "MC1709N"; // aka LM709 or UA709 new[count] = "LM301AN"; count++; // *** Board coord. *** if (board) { cmd = ""; board(B) { B.elements(E) { subst = 0; for (i = 0; i < count; i++) { if (E.value == old[i] && E.value != new[i]) { cmd += "VALUE " + E.name + " " + new[i] + ";\n"; subst = 1; } else if (E.value == new[i]) { // Already using a modern part subst = 1; } } if (!subst) { // Better be from rcl or dec-con. if (E.package.library != "rcl" && E.package.library != "frames" && E.package.library != "jumper" && E.package.library != "resistor-power" && E.package.library != "supply1" && E.package.library != "supply2" && E.package.library != "wirepad" && E.package.library != "dec-con") { dlgMessageBox("Unknown part: " + E.package.library+ "/" + E.value , "OK"); } } } } exit (cmd); } // *** Schematic coord. *** if (schematic) { cmd = ""; schematic(S) { // Iterate over all sheets S.sheets(SH) { // Iterate over all parts SH.parts(PA) { subst = 0; for (i = 0; i < count; i++) { if (PA.value == old[i] && PA.value != new[i]) { cmd += "VALUE " + PA.name + " " + new[i] + ";\n"; subst = 1; } else if (PA.value == new[i]) { // Already using a modern part subst = 1; } } if (!subst) { // Better be from rcl, dec-con, frames, or supply2. if (PA.device.library != "rcl" && PA.device.library != "frames" && PA.device.library != "jumper" && PA.device.library != "resistor-power" && PA.device.library != "supply1" && PA.device.library != "supply2" && PA.device.library != "wirepad" && PA.device.library != "dec-con") { dlgMessageBox("Unknown part: " + PA.device.library+ "/" + PA.value , "OK"); } } } } } exit(cmd); } else { dlgMessageBox("Start this ULP from schematic or board!", "OK"); exit (0); }