5Spice version 1.xx FAQ
Banner2

Frequently Asked Questions
   for 5Spice Analysis, versions 1.xx

Upgrading to Windows 7
5Spice v1.30 or newer should work but we are only supporting v1.61 and newer. Please install 5Spice v1.61 or newer. It's free.

AVAST users
If 5Spice always displays error about not receiving data from the simulation engine, tell AVAST not to put 5Spice in its “sandbox”.

If you run  into a "singular matrix" error
with an Analog Devices subcircuit, install 5Spice v1.61 or newer.

I added the big Diodes Inc model file to the Library - now it locks up
The Diodes Inc all-models-in-one file (August 2009) has errors that cause the Library Rebuild to freeze in 5Spice v1.60 and earlier. Download 5Spice v1.67. This also fixes missing models in the 5Spice model selection lists due to errors in other Diodes Inc model files.

Diodes Inc  2015-2016
The company continues to release model files with ever more .Subckts missing the critical .Ends statement. Upgrade to version 2.60 to avoid many missing models in the 5Spice model selection lists. Even with 2.60, still recommend avoiding the All-In-One file.
 

General

1. Who has to register the program?

2. What are the benefits/changes when I register the program?

3. I installed a new operating system and my registration code no longer works. How do I transfer the registration to the new system?  (note: upgrading the existing operating system will not cause a problem)

4. Why a separate Spice program? (my PC board layout program includes Spice)

5. Can I use 5Spice in countries where numbers are written differently than in English?

6. Does 5Spice support users new to circuit simulation?

7. After running DC Bias analysis, I don't see the node voltage pop up when I position the mouse over wires in the schematic?

8. How do I select an analysis other than DC Bias, AC and Transient?

9. What type of processor (CPU) will give the fastest simulation?

Install / Uninstall

10. I uninstalled the program (version 1.11 and earlier) and did not re-install it or installed a version newer than 1.11. After re-booting, the Tahoma font is missing?

Schematic

11. When I load one of my schematics, the mouse cursor doesn't work and it says "Block Enabled" below the schematic? (version 1.22 or earlier)

12. When I export the schematic to an image file, part of it is cut off?

Exporting  data / Printing

How do I get the schematic and plots in PDF format?

    Here is a solution submitted by a 5Spice user.
    http://www.win2pdf.com/products/win2pdf.htm

How do I import simulation data into MATLAB?

Subcircuits / Library

13. I can't find the right schematic symbol for my Subcircuit?

14. Why doesn't the Subcircuit symbol have the same pin numbers as my favorite device package?

15. How do I add models and subcircuits to the Library?

16. I added files to the Library but do not see the models/subcircuits when I edit the symbol in the schematic.

17. I added MOSFETs to the Library but do not see them when I edit the symbol in the schematic? (or if I uncheck the "only show  matching subcircuits" box and select the MOSFET, I get a "too many parameters" error from WinSpice when I run the simulation.)

18. How do I make a 5Spice schematic into a subcircuit?

100. How do I write my own Spice subcircuit?

Technical

19. What important parts of my circuit are not modeled by Spice?

20. DC Bias fails with my feedback circuit no matter what I do?

21. How do I graph power, log() or some other calculated quantity?

22. Transient Analysis gives wrong results for my switching power supply circuit. Why?

23. NonLinear source - Why is the source's output zero (or crazy) in AC analysis only? (this is the B source in netlist based Spice)

24. How do I fix the Transient analysis "time step too small" error?

25. How do I set the initial current for an inductor or transformer winding in Transient analysis?  How do I limit the current?

26a. How do I create a custom input signal in Transient analysis?

26b. How do I model the staircase waveform of a D/A convertor?

27. How do I create a time varying resistor in Transient analysis?

28. How to plot I versus V curves for diodes, transistors, etc.?

29. How do I model a transformer with center taps on each winding? Or add another winding?

 

 

1. Who has to register the program?

5Spice may be used for learning, teaching, academic research or for non-profit  personal use without registering the program. This is considered  "non-commercial" use. If you use the program to make money (personal business, consulting, etc.) or use it to do work in business or government, this is considered "commercial"  use. You must register to use the program for commercial use after the initial 30 day evaluation period.

All users must register if they want to unlock the full features of the program. This includes the larger schematic sizes.

 

2. What are  the benefits/changes when I register the program?

Registering the program licenses the program to be used in money making situations such as your job in business or government (see FAQ1). It adds larger schematic sizes (standard A,B,C drawing sizes) and displays numerical results in Noise, Distortion, FFT and Sensitivity analyses. It allows saving schematics containing logic gates, the parameter TestPoint or the transformer with saturating core. It removes promotional text in the schematic and allows  the user to add company information to the schematic title box. And it allows exporting tabular data from a graph/table to a file for import into another program

Registering also allows passing parameter values from the subcircuit schematic symbol to its Spice subcircuit and other advanced features as they are added to the program.

Registering gives a user priority in obtaining program support and adds limited application support. Registered users may also purchase additional application support.

 

3. I  installed a new operating system and my registration code no longer works. How do I transfer the registration to the new system?

See the menu item "transfer the registration" under the program's main menu Help.

Note: upgrading the existing operating system will not cause a problem.

 

4. Why a separate Spice program? (my PC board layout program includes Spice)

Many PC board layout programs come with some sort of Spice simulator. To use the  simulator, you often must replace the parts in your PC board schematic with parts from a separate library of simulation parts. And remove connectors, digital parts, etc. you don't want to model. And add parts to model component imperfections (resistance of inductors,  etc.) plus special parts like Spice signal sources and so forth. Then run simulations using a user interface that was designed for easy PCB layout, not for simulation.

5Spice is totally aimed at Spice simulation, including its schematic features (see the White Paper for details). Since experienced circuit designers normally simulate only a small portion of a large circuit, it is often quicker to draw just that portion in 5Spice and start simulating. Plus it is much easier to document your simulation work in 5Spice. Download it and see.

 

5. Can I  use 5Spice in countries where numbers are written differently than in English?

The data entry fields accept numbers in the national style that Windows is set for. But there are limitations. The program will not work where Windows displays a negative number as 12- or (12). Non-English alphabet characters may not be used in component reference  designators, node names, numbers or anything else that is part of a netlist (circuit description). Model and Subcircuit files you add to the Library must conform to Spice standards: non-English characters allowed only in comment lines, numbers written as 1.23 (never as 1,23).

 

6. Does 5Spice support users new to circuit simulation?

If you have never used circuit simulation before, you can still create a schematic and run a simulation. But you probably need to know what is covered in a circuit analysis course to understand what is going on in the various types of analyses. And read at least some introductory articles on Spice circuit simulation. 5Spice has a brief description of each analysis type - see the Help index. Also be sure to read Introduction and Simulation and Circuit Design in the Help section of the main menu.

 

7. After running DC Bias analysis, I don't see the node voltage pop up when I position the mouse over wires in the schematic?

Information should always pop up when the mouse is positioned over wires and components. For wires, the node voltage should pop up after running  DC Bias. A user with a Logitek mouse reported a problem where the pop ups were mostly missing. Installing the latest mouse driver fixed the problem.

Also remember that editing the schematic causes the node voltages to stop displaying (their value may have changed). Look on the DC Bias page for the results or run the analysis again.

 

8. How do I select an analysis other than DC Bias, AC and Transient?

In the form where you select which analysis will run (Analysis Dialog), press the “New Analysis” button.

 

9. What type of processor(CPU) will give the fastest simulation?

See topic in version 2.0 FAQ.

 

 

10. I uninstalled the program (version 1.11 and earlier) and did not re-install it or then installed a version newer than 1.11. After re-booting, the Tahoma font is missing?

This is a bug in the uninstall program used with 5Spice versions up to v1.11. The bug is repaired if the old install program is run. Newer versions of 5Spice use a different install/uninstall program.

The font files are still on the computer. To fix, go to Windows Control Panel. Open the FONTS folder.

WIN2000, XP: Close the FONTS folder.

You may need to restart Windows.

 

11. When I  load one of my schematics, the mouse cursor doesn't work and it says "Block Enabled" below the schematic? (the schematic was saved with a block selected)

Install 5Spice v1.30 or later. Or add a part to the schematic to enable the mouse  cursor. Delete the part and save the schematic.

 

12. When I export the schematic to an image file, part of it is cut off?

The image file captures what you see of the schematic. Zoom out until you can see the entire schematic before exporting. However only part of the largest schematic size will show with full detail. You can copy a section in 5Spice, create a new, smaller sized schematic, then paste and export.

 

13. I can't find the right schematic symbol for my subcircuit?

5Spice does not have a way for the user to create new schematic symbols. However you can use the generic subcircuit symbol for any subcircuit whose .Subckt definition line lists between 2 and 100 nodes. This symbol looks like a rectangle with pins along its sides. It is located in the parts toolbar next to the OpAmp symbol (5-9 nodes). You link either symbol with your subcircuit by editing the symbol. The symbol will then adjust its number of pins to match the number of nodes in the subcircuit's .Subckt definition line. You can also add names to the symbol's pins.

 

14. Why doesn't the subcircuit symbol have the same pin numbers as my favorite device package?

Spice knows nothing about pins, packages or schematics. What you see on a Spice .Subckt definition line is a list of circuit nodes that connect externally. This is a universal way of connecting a circuit.

  .SUBCKT  subckt_Name nodeA nodeB nodeC .....

The circuit nodes are identified by a name or a number. If numbers, the subcircuit's author may or may not have assigned numbers matching the pin numbers of some particular physical package (Spice has no standard).

In 5Spice we work directly with the node numbers/names since that is the only thing that is consistent across all Spice subcircuits. This allows you to add any subcircuit to the Library.

The program connects the nodes to pins of the schematic's subcircuit symbol in the order the nodes appear on the .Subckt line. The first node (nodeA in example) always connects to the symbol's pin s1, no matter what the node's number/name is. The second node (nodeB in example) always connects to pin s2. And so on.

You can add your own descriptions to the subcircuit symbol's pins to eliminate confusion. Usually the author has added comments near the .Subckt line describing the circuit function of each node. Add descriptions to pins while editing the schematic symbol (descriptions are saved in the Library).

So just ignore physical package pin numbers when working with 5Spice.

 

15. How do I add models and subcircuits to the Library?

You may add text files containing Spice .Model's and/or .Subckt's to the program's Library. Any file extension except .BAK, .DOC, .EXE, .HTM,  .HTML, .SAV, .TXT or .ZIP will be recognized. Change model files with a .TXT extension to .MOD or some other extension.

Put files of models and subcircuits that should be linked to the Diode, Transistor, FET, IGBT, SCR and TRIAC schematic symbols under directory

   "Library\Diode_BJT_FET"   and it's subdirectories.

Put all other subcircuits under directory 

   "Library\SubCircuits"   and its subdirectories.

You may add new subdirectories under these directories. Whenever you add, delete or update these files and subdirectories, the program needs to rebuild the Library index. Note that changes within these files only affect the index if the name of a model or subcircuit is  added/deleted or changed. If you change a file, subdirectory or model/subcircuit name, you will also need to re-edit schematic parts that reference it.

Library location

Windows 2000
same directory as program files

Windows XP
drive:\Documents and Settings\All Users\Application Data\5Spice Analysis

Vista, Windows7
drive:\Program Data\5Spice Analysis

If you don’t see the Library in Windows Explorer
go to Control Panel, Appearance and Personalization (Windows7, Vista), Folder Options, and
1. enable "show hidden files"
2. disable "hide extensions for known file types"

Note on Creating/Editing 5Spice subcircuit files

If a subcircuit calls a model or another subcircuit, then all must be in the same file. If a subcircuit or model name appears in more than one file, the program will index each occurrence separately.

 

16. I added files to the Library but do not see the models/subcircuits when I edit the symbol in the schematic.

The Library was traditionally in a subdirectory of the program directory. Installing 5Spice v1.30 or higher changes the location in Windows XP, Vista and Windows 7. Do not put files in the old Library folder which is marked with "_obs" or "_obsolete". See the previous FAQ for the new Library location.

Check that the files are in the correct part of the library. Models and subcircuits that link to schematic symbols of diodes, transistors, FETs (all types), IGBT, SCR and TRIAC go under the DIODE_BJT_FET section. All others go under the SUBCIRCUITS section.

Windows Explorer in Windows 7 shows the contents of ZIP files as if they are extracted when they are not. You must extract the files manually.

After adding files or changing subcircuit names, you must rebuild the Library index. Go to main menu TOOLS and select Rebuild Library.

If a subcircuit contains model types not normally used to model the symbol, 5Spice will not display that subcircuit in the list when editing the symbol. To show the subcircuit in the list, edit the symbol and uncheck the box that says "only show matching subcircuits".

5Spice does not recognize files ending in .TXT (as in  "readme.txt"), .BAK, .DOC, .EXE, .HTM, .HTML, .SAV or .ZIP  as library files. If a Spice file has a .TXT extension, change it to .MOD or some other extension.

5Spice can't  recognize a model or subcircuit if the period is missing from the start of the .Model or .Subckt line. It may not recognize a model if there is a major syntax error before the first parameter in the .Model line.

If you open a file in a word processor or browser and then save it, hidden formating characters are often inserted into the file which can confuse any Spice program. Either use Windows NotePad for editing or use SaveAs and save the file in text format.

 

17. I added MOSFETs to the Library but do not see them when I edit the symbol in the schematic? (or if I uncheck the "only show  matching subcircuits" box and select the MOSFET, I get a "too many parameters" error from WinSpice when I run the simulation.)

There are two classes of MOSFETs and thus two classes of MOSFET schematic symbols.  Spice handles each differently.

If you are not designing an integrated circuit, it is almost certain that you are using power MOSFETs, not simple MOSFET transistors. IRF, On Semi, ST,  Zetex, and most others make power MOSFETs. Unlike simple MOSFETS, power MOSFETs contain a body diode and are modeled using a SUBCKT statement in Spice. Use the power MOSFET symbol in the schematic - it shows the body diode.

If you are designing an integrated circuit, then use the simple MOSFET symbols in the schematic. Also use these symbols for small signal MOSFETs like those used in RF receiver amplifiers, charge amplifiers or with the sensor in a smoke detector. These symbols work with MOSFETs that are modeled using the Spice MODEL statement. The 4 terminal symbol will also work with a 4 terminal subcircuit that contains a simple MOSFET.

 

18. How do I make a 5Spice schematic into a subcircuit?

Instructions are available to registered users of 5Spice. Registered users please email us for this information.

 

19. What important parts of my circuit are not modeled by Spice?

Two important parts are the power supply impedance and the ground layout and impedance.

Spice voltage sources are often used as power supplies when simulating. These have either zero impedance or, in 5Spice, a 1E-3 ohm resistance. Therefore you will not see the dc drop or the power supply noise that will be present in the physical circuit. (noise due to changing supply currents).

You can model the power supply impedance for more accuracy. But subcircuits that model op amps and other devices almost never model the device’s power supply rejection over frequency. Only a physical circuit will give this information.

Ground impedance issues are more complicated and can determine the success or failure of a design. Spice’s ground symbol provides the perfect, zero impedance connection between all points. No real circuit or ground plane is like this. For an in depth discussion of ground currents and grounding, see this excellent EDN article.

 

20. DC Bias fails with my feedback circuit no matter what I do?

Spice computes the dc operating point before running any analysis. A circuit that has digital output levels and feedback to make it oscillate may not have a stable dc operating point. This will cause 5Spice to fail in DC Bias.

To run a Transient Analysis on the circuit:
If the circuit uses resistor-capacitor feedback or an RC charging circuit, you force the dc operating point during Transient analysis by adding an Initial Condition symbol connected to the capacitor. Otherwise you must modify the circuit so it is dc stable during DC Bias but not during Transient Analysis.

Example: A 5Spice digital logic invertor is an ideal logic gate. Its output is defined by an IF-THEN statement and can only be high or low. If its output is connected to its input with a resistor and capacitor to ground, there is no stable dc operating point. DC Bias and all other  analyses will fail.

1. Add an Initial Condition to the schematic, wire to the IC to the capacitor. Set the IC for any voltage and enable Initial Conditions on the Transient Analysis setup page.

OR

2. Modify the circuit by adding a voltage controlled switch that is controlled by a separate Signal Source. Set the Signal Source to the STEP waveform. Then the switch will be in one state for DC Bias and TIME=0 of Transient Analysis and in the other state during the rest of  Transient Analysis. Connect the switch to the circuit as necessary. In this example one could short the capacitor.

 (Note: this is not a practical circuit since there is no hysteresis at the input of the invertor. The simulated circuit may or may not oscillate when the voltage on the cap reaches the invertor's input threshold - depends on the values used to set up the analysis and on numerical round-off in Spice.)

 

21. How do  I graph power, log() or some other calculated quantity?

NonLinear Source method

You can use the NonLinear Source to implement an arbitrary math equation in all types of analyses. The schematic symbol is a rectangle saying Fxy. In AC and Noise Analysis, the NonLinear Source method works with linear equations but does not work correctly when using a nonlinear equation.

Add a copy of the program's NonLinear Source to the schematic (use the version with  voltage output). Then edit it to enter the formula you want. Connect the source's inputs to your circuit. Connect a TestPoint to the  source's output and graph the TestPoint.

POWER (does  not work in AC or Noise analysis): Connect the desired circuit voltage to one input, say X. To calculate power you also need a current. Add a current controlled voltage source to the schematic and  use it to convert the desired current to a voltage. Connect this  voltage to the Y input of the NonLinear Source. Use both inputs in the power formula:  X*Y

Calculated Plot method

You can calculate a graph Plot from the data of two TestPoints. The two sets of data may be combined with the math operators + - * / or the power function PWR. In AC analysis the relative phase function <PH>  is also available - look up "Phase operator" in program Help.

POWER: Place a Voltage and a Current TestPoint in the schematic. Then setup a calculated Plot to use the power function PWR with the data from the two TestPoints. PWR multiplies the voltage and current to compute power in all types of analysis. In AC analysis it takes the  relative phase angle between the voltage and current into account. Its AC power output is always positive to allow display of power in dB. If you want the V*I product instead of power in AC analysis, use the multiplication operator.

 

22.  Transient Analysis gives wrong results for my switching power supply circuit. Why?

Working with switchers is one of the trickiest things to do with Spice. A good book may help (see link to Basso's website on the Links page for one  possibility). Here are three common problems.

the rise time surprise (sooner or later it will bite you. 5Spice prevents most cases.)

People often use Spice's Pulse waveform generator to get the switching  waveform/clock for their circuit (in 5Spice this is in the Signal  Source component). For the Pulse, Square Wave and Exponential waveform  generators, Spice uses the TimeStep value for rise or fall times if  you don't enter a value for them or enter zero. In this case, a large TimeStep relative to the pulse's width will give dramatically slow rise or fall times, affecting the turn on/off times or duty cycle in your circuit.

A further surprise occurs if you also don't specify the TimeStep value. Spice defaults to TimeStep = simulation run time / 50. Now when you change the simulation run time, the TimeStep varies and therefore the rise times also vary.

ALWAYS specify your rise times. NOTE: 5Spice requires users to enter rise times for pulse and exponential waveforms. For square wave with no rise time specified, 1/100 of the square wave period is used.

A reasonably fast rise time also helps Spice synchronize its computation points with your switching clock edges which is important for accuracy. See next paragraph.

the Spice TimeStep gremlin

Spice computes a solution at least once per TimeStep. Look at the TimeStep you  specified for the Transient Analysis and compare it to the switching  frequency you are using. As an example, say you switch at 100KHz and set the TimeStep to 5usec. At a 50% duty cycle, the switch is both ON and OFF for 5usec. If Spice had only one computation point during the  switch ON (or OFF) interval, it couldn't tell how the current in the  inductor is changing over the interval. So Spice adds a few more computation points automatically. But the algorithm it uses is not directly aware of your constant switching frequency - so you may not end up with a consistent number or spacing of data points in each switching cycle. Which can lead to wandering or uneven graph plots.

To prevent this, use a reasonably fast clock rise time somewhere in the schematic. This helps Spice synchronize its computation points with your clock edges. Clock the circuit synchronously with the pulse waveform (5Spice's Signal Source component) rather than using a self generated clock. Spice pays special attention to circuit transitions that occur just after pulse waveform transitions.

ALWAYS use 5Spice's "fine" setting for the dynamic TimeStep (set TRTOL=1 in other simulators). This increases the number of automatically added computation points in areas where the waveform is changing. It may sometimes also be necessary to set the TimeStep to force 5-10 or more computation points during the shorter of the switch ON and OFF intervals.

These settings can result in very long simulation times. So people often look at the small signal behavior (step response) with a formula (based on the switcher circuit topology) which simulates much faster - see link to C. Basso's models. This would be done in a separate schematic. Then in the original schematic you add an initial condition on the output  capacitor to set it to its final voltage (Initial Condition symbol for schematic) to shorten the startup time of the full switcher circuit. And study steady state switching waveforms with the full circuit and a very small TimeStep.

numerical oscillation of the Integration method

After you have followed the guidelines above, note that Spice's standard integration method is not always numerically stable. This can show up when there is a time constant shorter than the TimeStep (often true in switcher  semiconductors as junctions turn on and off). The math can oscillate numerically. This is normally visible in the graph but in a switcher it may be confused with switching noise. This numerical oscillation can possibly beat with your circuit's switching frequency, causing low frequency effects. Try selecting the GEAR integration method which is numerically stable and see if results change. Gear can have overshoot spikes on fast rise time edges so you can also try the Backward Euler integration method. Of the three methods, Backward Euler is the slowest and has the most error buildup over long simulations.

 

23.  NonLinear source - Why is the source's output zero (or crazy) in AC analysis only?

In AC  analysis, Spice linearizes all the nonlinear circuit equations including your formula. It does this by taking partial derivatives at the circuit's DC OPERATING POINT. Spice uses the derivative it computes from the formula as the proportionality constant or "gain" of the NonLinear source during AC analysis.

When calculating the derivative, the source’s X and Y inputs (X and Y in the formula) are set to the dc voltage determined by the dc operating point of the circuit.

This can lead to surprises when X or Y are used in the formula and one or both of their dc operating points is zero!

Formula Examples:

1. Fxy =   1.0, the derivative of a constant is always zero. So the output is always zero in AC analysis.

2. Fxy =   1.0*X, the derivative = 1.0 as expected. No surprise here.

3.  Fxy  =  X*X and the dc voltage of X is zero. The derivative is zero:  in the limit as X goes to zero, for a very small change in X around  zero, the output is zero. Note the output is going to zero much faster than the input: 1E-100*1E-100 = 1E-200.

4. Fxy =   X * Y and both X and Y dc operating points are zero, then the derivative with respect to X,  d(Fxy)/dx, is zero since Y is set to zero! And the same for d(Fxy)/dy since X is set to zero. So

    Vout = X * d(Fxy)/dx  +  Y * d(Fxy)/dy  =  0 

for all values of X and Y.

The same AC behavior occurs during Noise analysis.

 

More: If the circuit's dc voltage across X is zero AND you add a 1.0v DC source in series with the X+ input to the nonlinear source, you will get the derivatives we tend to expect from math class. This happens since the partial derivatives are now evaluated numerically around X=1v instead  of X=0v. But if X does not have a dc value of 1v, you have to think carefully to know what the derivative will be.

 

24. How do I fix the Transient analysis "time step too small" error?

See the "Simulation Failure" topic under Help in the Main Menu and look for the error name.

 

25. How do  I set the initial current for an inductor or transformer winding in Transient analysis? How do I limit the current?

Spice does not allow setting initial current unless you also set the initial voltages for all the circuit nodes. This is not practical and 5Spice does not support this option. But you can often set the initial current indirectly.

First, remember that Spice performs a DC operating point (DC Bias) analysis using the TIME=0 value of the SignalSource waveform before doing Transient Analysis. So the circuit is 'live" in the DC sense at TIME=0 when Transient Analysis starts.

Reducing Initial Current
You can add a voltage controlled switch in series with a inductor/winding and use its resistance to reduce the current through the inductor/winding.

Set the switch’s OFF resistance to limit the current to the desired value. Connect the switch's control inputs to a Signal Source and set it to generate a voltage step at TIME=0. The STEP waveform's amplitude is zero at TIME=0 and non-zero for TIME > 0. Set the switch's threshold so it will be open (off) at TIME=0, then close (on) when TIME > 0. Use a low enough value of switch ON resistance to not disturb normal circuit operation, but not lower than 1E-3 ohms unless you run the Project Wizard.

Setting Initial Current to Zero
Add a SignalSource in series with the inductor/winding. Set it to generate the STEP waveform. Adjust the polarity and amplitude of the STEP waveform to cancel the TIME=0 voltage across the inductor/winding.

 

26. How do I create a custom input signal in Transient analysis? How do I model the staircase waveform of a D/A convertor?

The Signal  Source component (voltage source in traditional Spice) offers a piece-wise linear waveform (PWL).

You define a PWL waveform by a series of (Time, Value) data points. The first data point must be at TIME=0. Spice linearly interpolates the waveform's value between data points. See program help for details.

How do I simulate the output waveform of a D/A convertor?

Use the PWL waveform. You can model the staircase output of a D/A convertor by defining data points at the beginning and end of each step. The time between steps is the inverse of the D/A clock rate. The time between the end of one step and the start of the next step corresponds to the risetime of the D/A convertor. Spice has trouble with very abrupt  transitions so make this time a realistic value.

How do I make the waveform repeat?

Create the data points in Windows Notepad. After you have entered one cycle of the waveform, use the copy/paste feature. If you use a word processor, save the file in text format. Edit the Signal Source to load the waveform file.

 

27. How do I create a time varying resistor in Transient analysis?

Use the current output NonLinear Source to implement a time dependent resistor. Connect the source's X differential input to sense voltage at the source's output terminals. Get the polarity right or you have a negative resistor.

 Then the source's formula is based on I = V/R

 I = X /  (Rt_value * TIME + R_constant)

where X is a variable that is the voltage at the source's X differential input. TIME is a predefined variable = the elapsed simulation time in seconds during Transient analysis.

Note: you do not enter the "I =" part of the formula in the source's formula box.

 

28. How to plot I versus V curves for diodes, transistors, etc.?

Use DC analysis. Load the demo schematic “DeviceCurves” to see how.

Registered users could also auto-export the data from Transient or DC analysis, then load the data into a spreadsheet and plot the data there in XY format.

[Home] [Features] [Download] [Register/Buy] [Links/Tutorials] [FAQ] [Contact] [Legal] [Privacy] [White Paper]