What does this script do?
It is very neat to draw circuits using circuit-macros:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=circuit-macros
However, this process is quite difficult and not so very visual.
This script will read in schematic file generated by
PSpice 9.x and convert it to m4 file so that the circuit-macros can
convert it further.
Usage:
./sch2m4.pl [input sch file]
This script will print its output to stdout so you need to
redirect the output like this:
./sch2m4.pl [input sch file] > [output m4 file]
Current Features:
As of rev7,
- Wires are converted.
- 1N4500 is converted to diode.
- R is converted to resistance.
- Text notations are converted, although its position is not very
accacurate and should be repositioned manually in m4 file.
- NodeMarker will generate small dot that is not filled.
This is frequently used as device terminals.
- MN, MP will generate MOSFETs.
You need to download bjmos.zip from this article:
http://forcecore.tistory.com/121
- PN2222 and PN2907 is converted to BJTs.
- LM741 is converted to OP-Amps
- VDC, VSIN is converted to what is should be.
- C is converted to Capacitors.
- R_VAR is converted to variable resistors.
- +5v's are converted to VCCs, VDDs, as it is notated in
Razavi's Fundamentals of Microelectronics.
- GND_EARTH is converted to Earth ground. (not signal gnd, chassis gnd)
- Junctions are converted and notated as black filled dot.
There are some weird conventions:
- RBREAK is converted to AMMETER. PSpice Schematics does NOT
have ammeters, so I chose RBREAK for ammeters.
Known Problems:
- PSTricks and Tikz treats dot macro differently, taking fill parameter
the opposite way to another. This script is favoring Tikz.
Author:
ForceCore
http://forcecore.tistory.com/
License:
http://creativecommons.org/licenses/by/3.0/deed.en_GB