You are on page 1of 1

604

Part 5 SPICE circuit applications

it quite clear what you want. Check by counting to ensure there are equal
numbers of left and right brackets. When typing in an expression it is almost
reex to type things like 2(. . .) rather than 2*(. . .) so read the expression over
with a rather pedantic eye. Examine carefully the outcome to ensure you are
getting what you expect and test with some numerical values.
(r) Time: When using time as a parameter in function denitions, e.g. in a statement for an ABM, it must be written explicitly in full as time and not as say
t. Similarly frequency must be used for the variable frequency.
(s) Net names: For signals in which you are particularly interested it is convenient to give the net a name rather than relying on the numerical assignments
of SPICE. The names should be descriptive so that they are readily identied
but kept short especially if you are going to display many waveforms together.
Using names beginning with the same letter means that they appear close
together in the list and are therefore easier to locate.
(t) Parametrized variables (PARAM ): It is often useful to run a simulation with
some component having a number of dierent values with the results available for plotting on the same graph. This can be carried out with a PARAM
arrangement. Place a PARAM symbol on the schematic and double click to
see its attributes. Select NAME1 and type RVAL (e.g. for a resistor R) and for
VALUE1 type in a value that you wish it to have if you were not varying the
value, i.e. as a record of what it was. For the component in question alter its
value attribute to {RVAL} with curly brackets. Under ANALYSIS/SETUP
choose PARAMETRIC, select GLOBAL PARAMETER and LINEAR, type
in RVAL in the NAME box and the start, end and increment values if a xed
increment is appropriate. An alternative is to select VALUE LIST and type in
a series of values separated by commas or spaces.
(u) Power supplies and amplier symbols: Power supplies for ampliers or other
devices may be placed away from the main part of the circuit and the connections indicated by means of a GLOBAL symbol attached to the voltage source
and the appropriate device pin and given an appropriate name. It is helpful to
enable the polarity and value of the voltage supply to be displayed on the
schematic, and it is safer to connect the negative terminals of both positive
and negative supplies to common and then to set the negative supply explicitly to V rather than connecting the positive terminal to common. In
naming global power supplies you should be careful to avoid the system
names reserved for digital devices such as VCC, VEE, VDD, VSS. Be warned
that, for example, op-amp symbols from libraries are not universally oriented
in the same sense, and you may ip a symbol to get the input terminals a more
convenient way round. Always check carefully which is the positive and the
negative supply pin and make sure they are connected to the correct supply.
SPICE will not ag an error if you get it wrong and you can spend a lot of
time getting peculiar results.

You might also like