Micro-Cap 12: Electronic Circuit Analysis Program Reference Manual
Micro-Cap 12: Electronic Circuit Analysis Program Reference Manual
Micro-Cap 12: Electronic Circuit Analysis Program Reference Manual
Copyright
© Spectrum Software. 1982-2018. This manual and the software described
in it are copyrighted, with all rights reserved. No part of this publication,
or the software, may be reproduced, transmitted, transcribed, stored in a
retrieval system, or translated into any language in any form without the
written permission of Spectrum Software.
Contents
Chapter 1 - Windows Basics 17
Introduction 18
Parts of a window 18
Basic mouse and keyboard techniques 21
Menus 22
The File menu 81
The Edit menu 87
The Component menu 95
The Component panel 97
The Windows menu 98
The Options menu 100
The Analysis menu 123
The Design menu 125
The Model menu 126
The Model editor 127
Build Command 129
The Title Block editor 131
Title Block mode 137
The Help system 140
The Transient menu 195
Initialization 197
The State Variables editor 199
Using the P key 200
Numeric output 201
Operating Point Methods 203
Chapter 13 - Distortion Analysis 257
Harmonic Distortion 258
The Harmonic Distortion Analysis Limits dialog box 259
Harmonic Distortion analysis example 262
Harmonic Distortion Properties dialog box 264
Plotting other variables 267
Intermodulation Distortion 268
The Intermodulation Distortion Analysis Limits dialog box 269
Intermodulation Distortion analysis examples 272
Intermodulation Distortion Properties dialog box 275
Harmonic Calculation Notes 280
Intermodulation Calculation Notes 281
Probing a SPICE file 339
Editing the schematic in Probe 340
Probing macros and subcircuits 340
Chapter 21 - Smoke Analysis 403
What happens in Smoke analysis? 404
The Smoke Properties dialog box 407
The Smoke right-click menu 409
Smoke derating libraries 411
Smoke parameter libraries 412
Smoke parameters 413
Smoke notes and guidelines 416
CENTAP 469
CLIP 470
Comb Filter 471
COMP 472
COMPARATOR 473
Constant Power 474
CPFSK 475
DC Motor 476
DELAY 477
DIAC 478
DIF 479
DIGPOT 480
DIV 481
F 482
FSK 483
FWeighting 484
GYRATOR 485
IDEAL_TRANS2 486
IDEAL_TRANS3 487
INT 488
INT_RESET 489
Memristor 490
MONOSTABLE 491
MONOSTABLE_RT 492
MUL 493
NOISE 494
Peak Detector 495
PHOTODIODE 496
PHOTODIODE_R 497
PID Controller 498
POT 499
PSK 500
PUT 501
PWM 502
PWM_T and PWM_NT 503
RELAY1 504
RELAY2 505
RESONANT 506
RTD 507
SCHMITT 508
SCR 509
SLIP 510
SNUBBER 511
SPARKGAP 512
SUB 513
SUM 514
SUM3 515
TRIAC 516
TRIGGER6 517
TRIODE 518
VCO 519
WIDEBAND 520
XTAL 521
555 522
10
Inductor 604
Isource 609
JFET 610
K (Mutual inductance / Nonlinear magnetics model) 615
Laplace sources 620
Macro 624
MOSFET 626
MOSFET (EKV) 655
MOSFET Philips Model 12 672
MOSFET Philips Model 20 688
MOSFET Philips Model 31 695
MOSFET Philips Model 40 698
MOSFET PSP Model 701
N_Port 725
OPAMP 727
Pulse source 734
Resistor 736
S (Voltage-controlled switch) 740
Sample and hold source 743
Sine source 745
Subcircuit call 747
Switch 750
Timer 752
Transformer 755
Transmission line 756
User file source 759
W (Current-controlled switch) 761
WAV file source 764
Z transform source 766
11
The analog/digital interface 781
General digital primitive format 785
Primitives 788
Gates 791
Standard gates 792
Tri-state gates 796
Flip-flops and latches 800
Edge-triggered flip-flops 801
Gated latch 806
Pullup and pulldown 811
Delay line 813
Programmable logic arrays 815
Multi-bit A/D converter 821
Multi-bit D/A converter 825
Behavioral primitives 828
Logic expression 829
Pin-to-pin delay 834
Constraint checker 843
Stimulus devices 851
Stimulus generator 851
Stimulus generator examples 855
The File Stimulus device 861
File Stimulus input file format 861
I/O model 867
Digital / analog interface devices 870
Digital input device (N device) 870
Digital output device (O device) 874
Changing the power supplies of a digital library part 877
12
Array variables 891
Constants and analysis variables 893
Power and Energy 894
Variables 895
Wildcard device and node names 896
Component variables 899
Subcircuit and macro variables 901
Model parameter variables 902
Branch selection operators 903
Sample variables 904
Mathematical operators and functions 905
Sample expressions 913
Rules for using operators and variables 916
14
Chapter 33 - Filter Design 995
How the active filter designer works 996
The Active Filter dialog box 997
Component lists 1008
Filter support files 1010
Filter specification: mode 1 1011
Filter specification: mode 2 1017
How the passive filter designer works 1019
The Passive Filter dialog box 1020
15
Typographic conventions
Certain typographic conventions are employed to simplify reading and using the
manuals. Here are the guidelines:
1. Named keys are denoted by the key name alone. For example:
2. Text that is to be typed by the user is denoted by the text enclosed in double
quotes. For example:
3. Combinations of two keys are shown with the key symbols separated by a plus
sign. For example:
ALT + R
means the Sound item from the General section of the Options group in the
Preferences dialog box, accessed from the Options menu.
[Low]
6. The characters "<" and ">" bracket required entries. For example:
<emitter_lead>
emitter_lead
16
Chapter 1 Windows Basics
17
Introduction
Micro-Cap is a Windows program. To use the program, it is necessary to un-
derstand how Windows itself operates. Even though it is assumed that you are
familiar with the Windows system, this chapter provides a brief introduction and
review of the basic Windows features.
Parts of a window
Most Micro-Cap operations are performed from within overlapping rectangular
regions called windows. In this section we describe the parts common to most of
these windows, and defer for later the more specialized Micro-Cap functions.
Minimize button
Menu bar Maximize / Restore
Title bar
button
Tool bar
Close button
Control menu box
Circuit control menu box
Vertical
scroll bar
Windows border
Component Panel
Window corner
Menu bar
This bar shows the available menus. A menu is a list of commands or options that
lets you access various program features. Some items on a menu have an imme-
diate effect. For example, when you choose Save from the File menu, the current
circuit is saved to disk immediately. Other menu items control deferred actions or
behavior. For example, when you choose Wire from the Mode item of the Op-
tions menu, nothing happens immediately. When you later drag the mouse in the
circuit window, it draws a wire, instead of drawing a component or text.
Title bar
The title bar shows the name of the window. If the window is a circuit window,
the title shows the circuit name and directory path. If the window is a dialog or
text box the title shows the name of the dialog or text box. If the window is an
analysis output window, such as numeric output, the title shows the file name and
path of the file where the numeric output has been saved to disk.
Tool bar
The tool bar shows the tool buttons. These are graphical equivalents of the menu
items. Clicking on a tool bar button is the same as clicking on its equivalent
menu item. Tool bar buttons provide convenient, quick access to frequently used
menu items. Immediate action buttons temporarily depress when clicked, then
spring back. Modal buttons stay depressed until another mode is chosen. A de-
pressed modal button means that the mode is enabled. This is the same as its cor-
responding menu item having a check mark.
19
Close button
The Close button closes the window.
Minimize button
The Minimize button reduces the window to an icon.
Scroll bars
The scroll bars are used to pan the window document. If the window is a circuit,
the scroll bars are one of several ways to view different parts of the circuit. If the
scroll bars are part of a list box, they let you browse the list.
Window border
The window border is a control object on the outside edge of the window. When
the mouse passes over the edge, the cursor changes to a vertical or horizontal
double arrow. A mouse drag then moves the underlying border, changing the win-
dow size and proportions.
Component panel
The optional Component Panel is used to select components for placement in the
schematic window. It can be placed in a variety of locations within the window.
Window corner
The window corner is a control object on the corner of the window. When the
mouse passes over the corner, the cursor changes to a diagonal double arrow. A
Mouse button means the left mouse button, unless otherwise specified. The right
mouse button is reserved for specialized functions.
The terms choose and select have two distinct meanings. To select something
means to mark it, usually as a prelude to choosing it. To choose means to use the
mouse or keyboard to pick or activate the selected item, option, or action.
Selecting is done by clicking the item with the cursor or dragging the cursor over
a region containing the object. Selected text in a text field or in the text area ap-
pears in reversed video. Selected schematic objects, including text objects, are
shown in the user-specified select color. Selected items from a window or dialog
box may be shown as a highlight, or a dotted rectangle.
To choose a selected item in a dialog box, you click it with the mouse or press the
SPACEBAR key. Highlighted buttons are chosen by pressing ENTER.
Accelerator keys are provided for some of the more frequently used menu items.
Like tool bar buttons, they provide a quick and ready way to choose or activate
common menu items. The keys are shown on the menus, adjacent to the items
they activate. The keys can also be changed by the user.
Accelerator keys are well worth learning. For frequently used features, they can
save a lot of time. Appendix D has a list of the accelerator keys.
21
Menus
Menus provide the basic commands and options that let you use Micro-Cap fea-
tures.
To select a menu:
Mouse
Using the mouse pointer, point to the name of the menu on the menu bar, and
click the left mouse button. This opens the menu and displays its contents.
You can also drag the mouse from the menu name directly to the item name
and release the button to choose it.
Keyboard
Press ALT+first letter in the menu name. If the item name contains an
underlined letter, press the letter, otherwise, use the UP and DOWN arrow
cursor keys to select the desired menu item. Then press ENTER to open it.
To close a menu:
Click anywhere outside the menu or press the ESC key.
To choose an item from a menu:
Click the mouse on the item name or use UP ARROW or DOWN ARROW
keys to select the item, and then press ENTER to choose the item.
Menu conventions:
Convention Meaning
Dimmed or missing item The item is not available or inappropriate.
For example, the Copy command is dimmed
when nothing is selected.
• Pin Recent Files: An editor for the Recent Circuit files list allows pinning
some file names so they stay at the top of the list.
• Graphics Objects: Open and closed polygons, star, and triangle were
added to the graphics objects of the circuit editor.
• Pan mode: A Pan mode was added. In this mode dragging the left mouse
button pans the schematic. This is in addition to the older, direct pan
available from the right mouse button drag.
• Three region enable modes: These enable modes make it easy to switch in
or out different circuit regions to test different implementations.
23
Circuit structure
Micro-Cap analyzes circuits. A circuit is an interconnection of electrical compo-
nents. There are two basic types of circuit description that Micro-Cap uses:
Drawing area
The drawing area contains one or more pages of analog and/or digital
components interconnected by wires. It may also contain graphical objects
(which contain no electrical information) and grid text (which may contain
electrical information). Grid text can be moved from the drawing area to the
text area and vice-versa by selecting it and pressing CTRL + B. This is called
the shuttle command. Pages can be added or deleted from the Edit menu or
with a right click on any page tab in the page selector at the bottom of the
schematic window. Page display is controlled by the page scroll bar located
at the lower left part of the circuit window.
Text area
The text area contains only text. It typically holds local command statements,
subcircuit descriptions, model statements, and digital stimulus statements that
may be too bulky for convenient display in the drawing area. There can be
one or more text pages. The text editor is capable of handling multi-megabyte
text files.
The display can be toggled between the current text or schematic page and the
last used text or schematic page by pressing CTRL + G. The text area can be
selected by clicking on the one of text page tabs in the page scroll bar area. To
return to the schematic, click on one of the desired page tabs or press CTRL + G.
You can also translate schematics into SPICE netlists of various flavors, in case
you want to check the accuracy of an external SPICE simulator against MC12.
MC12 will, of course, accept such files for analysis.
.SPICE
L1 IN OUT 1U
C1 OUT 0 1N
R1 OUT 0 50
.ENDSPICE
Adding this text to a text page creates a piece of circuitry which connects to the
schematic nodes labeled IN and OUT. The circuitry need not be a subcircuit.
Any SPICE circuitry from the text pages contained within the lines between the
.SPICE and .ENDSPICE commands is available for use in the schematic and may
be connected by using identical schematic and SPICE node names.
You can even encapsulate an entire SPICE netlist within .SPICE and .ENDSPICE
statements and because the circuit is a schematic, MC12 remembers all of the
analysis settings, whereas the conventional SPICE netlist does not.
25
Schematic objects
A schematic object is anything that can be placed in a schematic. There are sev-
eral types of objects:
• Components: This includes all analog and digital sources, active and passive
parts, and connectors. In short, it includes any object chosen from the Component
menu.
• Wires: Wires are used to interconnect components. There are two varieties of
wires: orthogonal and diagonal. Orthogonal wires are restricted to the vertical or
horizontal direction. They may contain both a vertical and a horizontal segment.
Diagonal wires are drawn at any angle and only contain one segment.
• Text: Text, sometimes referred to as grid text because its origin is restricted to a
grid, is used for naming nodes, creating command statements, and general docu-
mentation.
Schematics may contain picture files in any of the following formats: WMF, ICO,
EMF, JPG, BMP, GIF, TIFF, and PNG. The most common use of this feature is
to place a picture of an analysis plot in a schematic. Picture files of graphics win-
dows may be captured by the Copy the Entire Window to a Picture File com-
mand on the Edit menu. Once the picture file has been created, it can be included
in a schematic as a graphic object.
• Flags: Flags mark locations in a schematic that you are likely to want to view
many times. They facilitate rapid switching of the display between multiple cir-
cuit locations. They are most useful in very large circuits, where the display re-
draw time may be too long for convenient use of the scroll bars.
Text can be moved between a drawing page and any text page.
• Behavioral modes
• Circuit altering modes
• Select mode
• Pan mode
• Component mode
• Text mode
• Wire mode
• Bus mode
• Diagonal wire mode
• Graphics / Picture File mode
• Flag mode
• Spreadsheet mode
• Region Enable mode
• Circuit querying modes
• Info mode
• File Link mode
• Help mode
• Point to end paths mode
• Point to point paths mode
• View modes
• Attribute Text
• Grid Text
• Node Numbers
• Node Voltages / States
• Current
• Power
• Condition
• Pin Connections
• Grid
• Cross-hair Cursor
• Border
• Title
27
The behavioral modes are mutually exclusive. At any given moment, only one
mode is active. You can tell which mode is active by looking at the mode buttons.
An active mode button is pushed in. An inactive mode button is pushed out.
To select a mode, click its button. This deselects the prior mode button.
Behavioral modes:
Select mode: This selects an object, region, or location for one of several actions:
To select a contiguous group of objects, drag the mouse over the region con-
taining the objects. To select a non-contiguous group of objects, hold down the
SHIFT button and click the mouse on each object.
Pan Mode: This mode lets you move the schematic view with a left-click drag.
Right-click drag also works in any mode.
Text mode: This mode lets you add grid text to the schematic. Grid text is used
for node naming, defining electrical characteristics, and documentation.
Wire mode: This mode lets you add orthogonal wires to the schematic. Orthogo-
nal wires can have one or two segments and be vertical or horizontal or both.
Bus mode: This mode lets you add bus connectors to the circuit. Buses are drawn
while in Wire mode if one end is a Bus connector or a bus.
Diagonal wire mode: This mode lets you add diagonal wires to the schematic.
Graphics/Picture File mode: This mode lets you add a graphical object (line,
rectangle, ellipse, pie, arc, diamond, brackets, or picture file) to a circuit. Such
files are typically created with the Edit / Copy the Entire Window to a Picture
File command.
Flag mode: This mode lets you add flag markers for rapid navigation of large
schematics with many pages.
Spreadsheet mode: This mode lets you add a spreadsheet to the schematic.
Info mode: This mode provides model information about a part when you click
on it. The information is usually a model, subckt, or define command statement
for the part. If the part is a macro, the macro circuit which it represents is dis-
played. If it is a subckt, the subcircuit description is displayed. If it is a device
that uses a model statement, the model statement is displayed. Double-clicking
on the part also displays model information in the Attribute dialog box.
File Link mode: In this mode, you click on a part to display its file link. A link
can be an internet URL, a local pdf file, an executable program, or any other file.
You can also use a piece of grid text as a file link. See the sample circuit LINKS.
CIR.
Help mode: In this mode, you click on a component to display its parameter or
attribute syntax. ALT + F1 gives syntax help on selected SPICE part names.
Point to End Paths: In this mode, you click on a digital component and Micro-
Cap traces all of the digital paths that originate at the component and end when
they drive no other combinatorial component.
29
Point to Point Paths: In this mode, you click on two successive digital compo-
nents and have Micro-Cap trace all of the digital paths between the two compo-
nents.
Region Enable: In this mode, you drag select a region and assign to it a boolean
expression that typically depends upon values of symbolic (.define or .param)
variables within the circuit.
View modes:
Attribute text mode: This mode controls the display of all attribute text. Attribute
text will be displayed only if the individual attribute display check boxes are en-
abled and the Attribute text mode is enabled.
Grid text mode: This mode controls the display of all grid text. If disabled, all
grid text is invisible. If enabled, all grid text is visible.
Node numbers: This mode displays the numbers assigned by Micro-Cap and used
to identify circuit nodes.
Node Voltages / States: This shows time-domain node voltages or digital states. It
shows AC node voltages in Dynamic AC mode. The VIP button selects last,
RMS, average, or peak, if enabled from Properties (F10) / View / Display.
Current: This shows time-domain currents for each part. It shows AC branch
currents in Dynamic AC mode. Currents are shown with an arrow indicating the
direction of positive current. The VIP button selects last, RMS, average, or peak.
Power: This shows time-domain values of stored, generated, and dissipated pow-
er for each component. It shows AC power terms in Dynamic AC mode. The VIP
button selects last, RMS, average, or peak.
Condition: This mode displays the last time-domain condition for each compo-
nent which has conditions. Typical conditions for a BJT are LIN (linear), SAT
(saturated), OFF (both junctions off), and HOT (excessive power dissipation).
Pin connections: This mode marks pin locations with a dot. These are the places
where connections are made to wires or other component pins.
Grid: This mode displays a selection of schematic grids. All wires, components,
and other objects are anchored to a grid point.
Border: This mode adds a border around each printed sheet of the schematic.
Title: This mode adds a title block to the corner of each schematic sheet. There is
an option to have only one title block per page. This option is accessible from the
Title Block panel of the Properties (F10) dialog box.
31
Circuit editor
The Circuit editor creates and edits circuits. When the circuit is a schematic, it
becomes the Schematic editor and its display looks like the figure below:
Vertical scroll
Mouse info box bar control
Component panel
Menus: Located beneath the title bar, menus select major functional groups.
Title bar: Located in the top center of the window, the title bar displays the name
of the window. The mouse can be used to move the window by dragging the title
bar.
Main tool bar: Shown below the title bar, the main tool bar contains buttons that
represent the most frequently used options, such as file operations and access to
the various editors. The tool bar provides a quick way to access those options.
Clicking on a button will activate the desired option.
Circuit tool bar: Shown below the main tool bar, the circuit tool bar contains but-
tons that represent the most frequently used menu options that apply specifically
Mouse info box: When the mouse is over a part, the status bar center pane and
the mouse info box both show its Component library memo field if it has any
descriptive text. It also shows the part type and information about its last time-
domain voltage, current and power values. If the part is a digital primitive gate,
it will print the logic expression. This feature is enabled from Preferences / Op-
tions / Circuit / Element Info. The box may also show expanded device info
such as transconductance, beta, and other terms from the internal device struc-
ture. The expanded feature is enabled from Preferences / Options / Circuit /
Element Info / Expanded Element Info.
Component Panel: This panel lets you select a part from its display of the Com-
ponent library, or search for a part by typing in part of its name. Its dynamic,
as-you-type, display makes finding a part easy. Its location, content, and other
display options are controlled from Preferences / Panel/Window Tabs / Panel.
Page selector tabs: Located in the lower left of the window, the page selector
tabs let you select a particular page for viewing. The text page is selected by
clicking on the Text tab. CTRL + G may also be used.
Page scroll bar controls: These control scrolling between schematic pages.
Horizontal and vertical scroll bar controls: These controls, located to the right
and the bottom of the window, let you pan the schematic vertically or horizon-
tally. Clicking on the scroll arrows pans the display roughly 10% of the window
width per mouse click. Moving the scroll box, either by dragging it or by clicking
in the scroll bar area, moves the view to a location proportionate to the new scroll
box position relative to the scroll bar end points.
Window tabs: These select from among the open circuit or analysis windows.
Horizontal and vertical splitter bars: Dragging these bars splits the window
into two parts, with a vertical or horizontal bar between. Each part can be sized,
scrolled, and toggled between text and drawing areas. Each split section can be
scrolled or panned to view different parts of the schematic.
Status bar: This bar describes the items the mouse pointer is currently passing
over. It is also used to print informative messages.
33
Selecting and deselecting objects
To manipulate an object after it has been placed in the schematic, it must first be
selected. Selection or de-selection requires the use of the mouse and follows the
general Windows rules.
First step: If not already in Select mode, click on the Select mode button in
the Tool bar or press CTRL + E. You can also toggle between Select mode and
the current mode using the SPACEBAR key.
Second step:
To select a single object:
Click on the object. The object is selected.
If you click on a component's attribute text, the text will be selected, not the com-
ponent. Be careful to click within the component where there is no attribute text.
Single-clicking on attribute text selects it and lets you move it. Double-clicking
To select all objects in the window, press CTRL + A. To deselect all objects, click
on any empty space in the window.
• To suspend the current mode and switch to Select mode, press the
SPACEBAR key. It is not necessary to hold the key down. The mode
will change to Select. You can use the Select mode as needed, then press
the Spacebar when you're finished and the former mode will be restored.
35
Creating a new circuit
To create a new circuit, select the New item from the File menu. This presents
the New dialog box which looks like this:
This dialog box lets you create one of several file types:
• Text Library(.lib) These are text files containing subcircuit and model
statements for the Digital Library, Analog Library, and
Spectrum supplied model libraries.
• Binary Library(.lbr) These are binary files that store the model parameters
for some of the Analog Library. This type of file is
rarely used for new files. It is made available for
legacy purposes.
• Model File(.mdl) These are binary files that store the data sheet or
measured values from which the Model routines create
model parameters for use in the Analog Library.
• Script File(.bat) These are text files used for performing various
specialized functions.
• Derating Library(*.dlib)
These are text library files specify derating values for |
the Smoke parameters.
If the Annotations box is checked the files will be created with text explanations
for usage.
To create a particular type of file, click on the item and then click on the OK but-
ton. This opens an empty window of the appropriate type and gives it a generic
file name.
37
Adding and editing components
To add a component to a schematic:
First step: Select a component from the Component panel or menu, from one of
the component buttons in the Tool bar, from one of the Component palettes, or
from the Find Component dialog box (SHIFT + CTRL + F). You can skip this
step if the component you want has already been selected by a prior step. The
main part of the Component menu is divided into these categories:
• Analog Primitives
• Analog Library
• Digital Primitives
• Digital Library
• Animation
• Import (Holds parts imported from a circuit file)
• Filters (Visible after creating a filter macro from the Filter Designer)
• Macros (Visible after creating a macro with the Make Macro command)
The Analog Primitives section contains each of the basic analog components like
resistor, capacitor, or NPN transistor. These parts all require the user to provide
the defining electrical attributes such as resistance, capacitance, or a suitable
model statement. Model parameters can be entered directly from the Attribute
dialog box, or you can select a pre-modeled part from the Analog Library by
picking its name from the Model list box. Editing a model statement localizes
the information by saving a copy of the edited model statement in the circuit text
area. The same applies to subcircuits. Editing a subckt from the Attribute dialog
box causes a copy to be placed in the text area of the circuit.
The Digital Primitives section contains one each of the basic digital components
like AND gates, OR gates, flip-flops, PLAs, and stimulus sources. These parts
also require the user to provide a suitable model statement, or to rely on .LIB
statements to access modeling information.
The Animation section holds behavioral animation parts, including LEDs, seven
segment displays, relays, analog and digital current and voltage meters, DC mo-
tors, and analog and digital switches. The Import section holds parts imported
from circuits. The Filters section contains filter macros created by the filter de-
sign function, accessed from the Design menu. The Macros section holds macros
created with the Make Macros command.
Second step: Make sure Micro-Cap is in Component mode. Selecting a part from
the Component menu will automatically switch to Component mode. If Micro-
Cap is in the Component mode, its Tool bar button will be depressed. If you
are not sure, click on the button in the Tool bar, or press CTRL + D.
Third step: Click the mouse in the schematic and drag the component to the de-
sired location. Click the right mouse button until the part is oriented the way you
want. Release the left button when the part is where you want it.
Fourth step: Enter the appropriate attributes into the Attribute dialog box. If the
part is from the Filters, Analog Library, or Digital Library sections, this step is
unnecessary and the Attribute dialog box will not even appear. If the part is from
the Analog Primitives or the Digital Primitives sections, this step lets you enter
important information like the part name and value or model name.
Subcircuits and model parameters can be edited from within the dialog box. Any
edits localize the information by placing a copy of the model statement or subckt
within the models page of the circuit.
You can change an attribute's font by first selecting the attribute and then clicking
on the Font button and choosing a new font, style, size, or effect. You can also
change the display flag for attribute text and pin names. Choose OK to put your
changes into effect.
39
The Attribute dialog box
When you add a component that has not been modeled, the Attribute dialog box
is presented to let you enter certain component information. The exact informa-
tion required varies with the component but generally a part name and a value are
the minimum required for the simpler parts like resistors, capacitors, and induc-
tors. More complex parts usually require a part name and a model name. Digital
parts sometimes require logic expressions, block names, or stimulus table names.
The number of attributes is determined by the type of component. Here is the
dialog box as it appears for a typical inductor.
Change button
Navigate buttons
Color buttons
Display controls
Plot selector
Attribute list box
Command buttons
Enabled box
Columns
selector
Source of displayed File Link
model information
Edit area
Help bar
The first attribute is the part name. The optional second attribute is a text string
describing the value, tolerances and initial conditions, if any. All parts have at
least these two attributes. Some have many more.
In this example:
MODEL specifies the model name which in turn specifies a set of model parame-
ters which may be located locally within the circuit in the text, model, or drawing
pages of the schematic, or may be located globally in the libraries.
SMOKE functions like a MODEL attribute and specifies the smoke parameters.
The COST and POWER attributes specify the unit cost and power budget for
the Bill of Materials (BOM) report. This is a type of netlist report that shows the
parts count, cost, and power budget of the circuit. POWER is also used for the
Conditions display. If the power dissipation exceeds this amount the part will be
shown as HOT.
PACKAGE specifies the physical package used by the part. Package information
is used to create netlists for external PCB (Printed Circuit Board) programs.
41
SHAPEGROUP specifies the shape group to which the shape belongs.
You can add other attributes. These have no effect on the electrical behavior of
the device. To add an attribute, click on the Add button. This adds a new attribute
and places the name 'USER' in the Name field. The Value field is left blank. You
can then edit the attribute Name and Value fields.
To delete an attribute, select it by clicking on its name in the Attribute list box.
Then click on the Delete button. Only user-added attributes may be deleted.
To change an attribute font, size, style, color, or effects, click on the Font button.
This displays the Font dialog box. The Font dialog box lets you edit text features.
Pin Markers: This controls the display of pin markers on the device, which
show where connections to the device are made
Pin Names: This controls the display of pin names. Sometimes this is helpful
for vendor-supplied subcircuit models where node numbers are used instead
of more meaningful names. Normally this option is turned off.
Pin Numbers: This controls the display of package pin numbers used in PCB
work. Normally this option is off.
Current: This controls the display of the last time domain or AC current val-
ue for the part, if the Current display button is enabled.
Power: This controls the display of the last time domain or AC power value
for the part, if the Power display button is enabled.
Condition: This controls the display of the last condition (ON, OFF, etc.) for
the part, if the Condition display button is enabled.
Attribute list box: This lists the attributes. Attributes can be edited by selecting
one and then editing its value in the VALUE edit box.
Cancel: This cancels any edits that have been made and exits the dialog box.
Font: This lets you alter the font and style of the selected attribute.
Delete: This deletes the selected attribute. Only user-added attributes may be
deleted.
Browse: This button allows file browsing when the part uses the FILE at-
tribute, as for example, with user and fstim sources, macros, subcircuits, and
PLAs. It is only enabled when the FILE attribute is selected.
This means that the closest value is achieved by placing a 1.2MEG resistor in
series with a parallel combination of a 133K and a 47.5K resistor. The result-
ing value is 1.235MEG, which is within .0035% of the requested value. Pref-
erences are set at Options / Preferences / Combinations.
New: If the MODEL attribute is currently selected, this creates a new model
name local to the circuit. You can also create a new model simply by typing
in a model name not already in the library.
Find: This invokes the Find dialog box which locates parameter names and/
or descriptions. Modern bipolar and MOSFET models have a great many
model parameters. The Find command helps you locate them for editing or
review.
Plot: This produces plots for each primitive part type. Plots are created on
from mini-simulations of test circuits. Some parts, like the Pulse source, have
a simple simulation and a single plot (two cycles of its waveform). Others,
like the NPN, have several plots that can be chosen from the plot selector.
43
Some parts, like macros and subckts, have no plots. Once the plot is shown,
it responds dynamically to parameter edits.
Syntax: This displays the syntax for the primitive from the help file.
IBIS: This button accesses the IBIS Translator when the part is an IBIS com-
ponent, allowing editing or selection of IBIS I/O models.
Help: This accesses the help topic for the Attribute dialog box.
Single: This finds the closest single standard part value that approximates the
RESISTANCE, CAPACITANCE, or INDUCTANCE value. Preferences are
set at Options / Preferences / Combinations.
Enabled field: You can enable or disable a part with this field using TRUE,
FALSE, or a Boolean expression (e.g. V(2)>.5). You can also enable or disable a
part from the Edit menu, or by using the Enable or Disable tool bar but-
tons. A disabled part stays in the schematic but is not included in analyses, Bill of
Materials reports, or SPICE netlist translations. Any object, including parts, text,
and wires, can be enabled or disabled. To enable or disable a group of objects,
drag select them with the mouse, then click on the Enable or Disable tool bar
button.
Columns: This lets you specify the number of columns in the model and smoke
parameter edit and display areas.
Help Bar check box: This adds a help bar with descriptions of the various parts of
the dialog box and model parameters.
Source of displayed model information: This shows the source of the displayed
model information. It is usually either the model or text area of the circuit if
localized, or a model folder and path if globally accessed. Editing model param-
eters always localizes them to a circuit model or text page.
Edit area: These fields lets you edit model parameters, subcircuits, digital stimu-
lus statements, or other model information.
File link: Click on this link and the program executes the link. You can set the
link to a local file, like an Adobe PDF data sheet, or to a URL link to the vendor's
web site. The default URL link is http://www.google.com/search?q="%s"+"data
sheet" which basically looks for a data sheet using the model name. The %s sub-
stitutes the model name.
Navigate buttons: These scroll through other parts in the circuit. Each click on
the left or right navigate button will display another part of the same type. Each
click on the up or down navigate button will display a different part type.
Model list box: This displays a list of available model names from the libraries.
You can scroll through the list and choose a model by clicking on it.
Plot Selector: A plot is created by clicking the Plot button. This field lets you
select from a list of characteristic plots for the device. Some devices have as
many as three plots, while some have none.
Color buttons: These let you change the part's border and fill colors. Border
controls the outline color. Fill controls the interior color. The interior can only
be filled if the shape already has a fill color. If the Fill button is disabled, it is
because the shape has no fill color specified. You can change this by specifying a
fill color for the shape using the Shape Editor.
Change button: This lets you copy the displayed attribute value to the attribute
fields of parts selected from a list. For example, you could use this command to
change all 2N2222 model attributes to 2N3903.
Show check boxes: Adjacent to the Name and Value fields, these boxes control
whether the selected attributes name and value are displayed on the schematic.
Normally the attribute name is not displayed and only some of the attribute val-
ues are. Typically, only the part attribute value (in this case 'J2') is displayed, al-
though occasionally the model attribute value (in this case '2N3071') is also.
45
Adding Wires to a schematic
Wires are added to a schematic by dragging the mouse from one point to an-
other. If the mouse moves horizontally or vertically a straight wire is created. If it
moves diagonally a corner is created.
First step: Click on the Wire mode button in the Tool bar.
Second step: Point the mouse at the desired starting position and press and hold
the left mouse button down.
Third step: Drag the mouse to the desired end point of the wire and release the
left mouse button.
• If two wires are connected at their end points the wires fuse together and
become one wire. The connection dot then disappears.
• If either end point of a wire touches another wire, the wires are connected.
• Wires that cross at interior points do not connect. An end point of a wire
can connect only to another end point, a component lead, or an interior point
of another wire.
• If the Node Snap option is enabled, wires will snap to the nearest node
within a one grid distance. Although this is usually helpful with analog parts,
it is sometimes a problem with dense digital connections on a one grid pitch.
You may want to temporarily disable this option if you notice a wire end
point jumping to an undesired location. The Node Snap option is enabled or
disabled from Options / Preferences / Options / Circuit / Node Snap.
• Holding the Shift key down after starting a wire forces the wire to stay hori-
zontal or vertical, depending upon its principal direction prior to pressing the
Shift key. It is necessary to press the Shift key after starting the wire, since
pressing it before starting the wire would temporarily exit Wire mode and
enter Select mode.
• While drawing a two-segment wire, clicking the right mouse button causes
the junction between the segments to flip between the two possible corner
positions.
47
Using the Bus
Bus mode lets you place bus connectors in the schematic. These are conve-
nient for drawing many wires at once, especially wires that are logically related
as for example, data and memory sets in a CPU or RAM function. A typical bus
connector looks like this:
Connected bus
Wire port
Connected wires
Bus port
The connector has two ports, the wire port and the bus port. Pins are electrically
connected to similar pins of other connectors attached to the bus.
To draw a bus, select Wire mode, then drag the mouse from another bus or from
the bus port of a connector. Buses connect and rubberband just like wires.
A bus and its connectors may transport analog or digital signals, depending upon
the type of component attached to their wires.
Placing a bus connector invokes the Bus dialog box, which look like this:
Part: This field contains the bus connector name. A check box alongside lets
you show or hide the name.
Enter Pin Names: This field contains the pin names, implicitly defining the
number of separate wires / nodes for the bus connector. The names can be
listed separately or using the indicated forms. For example:
Grids Between Pins: This specifies the number of grids between pins.
Bus Node Placement: This specifies where to place the bus connector
name. There are three options; top, middle, and bottom.
Wire Node Alignment: This specifies how the wires will emerge from the
connector. There are three options:
Pin Markers: This check box controls the display of pin markers.
Pin Names: This check box controls the display of pin names.
OK: This accepts the changes and exits the dialog box.
Cancel: This ignores the changes and exits the dialog box.
49
Adding and editing grid text
There are several kinds of text visible in a schematic. First, there is the attribute
text of individual components. This type of text is created and edited from within
the Attribute dialog box. The second kind of text is called grid text. Although grid
text can be used for any purpose, one important use is for naming nodes.
Second step: Click the mouse in the schematic where you want to add the text. A
Text dialog box will appear. It offers the following options:
Command buttons
OK: This accepts user text entry or edits and places the new or edited
text at the mouse site.
Cancel: This ignores any user edits and exits the dialog box.
Border: This lets you control the color and weight of the border.
Stepping: These options are present only when adding text. They let you
add multiple rows and/or columns of incremented text.
The stepping tab is present only when you place text. Later,
when you edit a piece of grid text, it is absent since it not needed
for editing.
Options
51
For RTF, selects superscript font.
For RTF, this selects the background color for selected characters. In
normal text this selects the background color for all characters.
For RTF, this selects the background color for all characters.
Copy to clipboard list. This copies the text to the clipboard list using
an assigned name.
• .HELP
• .DEFINE
• .PARAMETERS
• .WARNING
• .MEASURE
• .RELTOL
• .TR
• .WARNING
It is invocable only when starting a piece of text or when editing an
existing command.
Check boxes
Enabled: This lets you enable or disable the text. Enabling is important
for text used as a node name and for command text like .DEFINE or
.MODEL statements.
Use RTF: This tells the program that the text will be an RTF (Rich Text
Field). RTF text can have many interesting properties.
Rotation Angle: This specifies the angle of rotation for the text. Default
is 0 degrees.
Grid Snap: If enabled this causes the text to snap to the nearest grid.
Justification: These list boxes select the location of the text handle. The
handle, shaped like a small box, is the thing that snaps to the nearest grid
and is the thing you use to drag the RTF text to create a different angle.
To add or edit existing text, select the Text panel of the dialog box. Type in or
edit the text and press OK. To make a piece of text start on a new line place the
insertion point text cursor at the desired position and press ENTER.
Grid text can be moved between text and drawing areas by selecting the text,
then pressing CTRL + B. The display of the schematic window can be toggled
between the text and drawing areas by typing CTRL + G.
Second step: Double-click the mouse on the text you want to edit. A dialog box
will appear showing the selected text. Edit the text as desired.
Grid text can also be edited directly on the schematic by holding the Alt key
down while double clicking the text.
53
Formula text
There are two varieties of schematic grid text that use formulas.
First Format
The first form is as follows:
=formula
Grid text of this form behaves like a small spreadsheet. The presence of the "="
at the first character position tells Micro-Cap that the text is really a formula and
that it should calculate the value of the formula every time there is any change to
schematic text. For example, the following four pieces of text define three vari-
ables, L1, C1, and C2 and a piece of formula text:
.DEFINE C1 1N
.DEFINE C2 1N
.DEFINE L1 10U
=2*PI/SQRT(L1*C1*C2/(C1+C2))
Note that these are individual pieces of text, not a single block of text. The for-
mula text must be placed in the schematic, not the text area. The .define state-
ments may be placed in either the text area or in the schematic.
The formula is for the resonant frequency of a Colpitts oscillator. Any change to
any text updates the value and Micro-Cap prints the following:
2*PI/SQRT(L1*C1*C2/(C1+C2))=88.858E6
2*PI/SQRT(L1*C1*C2/(C1+C2))=65.899E6
Formula text can not be used in other expressions. To do that the formula must be
defined with a symbolic variable name like this:
.DEFINE F0 2*PI/SQRT(L1*C1*C2/(C1+C2))
Second Format
The second form is as follows:
text....[formula]...text
For example, if the following four pieces of grid text are entered,
.DEFINE L1 1U
.DEFINE L2 4U
.DEFINE N SQRT(L1/L2)
Formula text of this type is calculated only if the Text dialog box's Formula box
is checked.
For both formats of formula text, circuit variables such as V(Out) or I(R1) can
also be used in the equations. The results would not be calculated until an analy-
sis is run.
55
Spreadsheets
Micro-Cap can have spreadsheets in a schematic. Here is a typical spreadsheet:
The Basics:
Spreadsheets use the usual format. You can enter text or formulas. To enter text
or a formula you double-click on a cell and type it in.
Cells are referred to as column name (A to Z), then row number (1 to 100), so
D24 refers to the cell at column D, row 24.
Text is entered directly. "ABC" prints "ABC". If the cell B1 contains "Power"
then "=B1" in another cell prints "Power".
You can also add strings. If cell A1 contains "Voltage" and B1 contains "Value"
then "=A1+B1" in another cell prints "Voltage Value".
= SIN(2)
=D1
=V(I1)*I(I1)
This prints the product of the voltage across and the current through the source
named I1. In general any expression that is legal in an analysis plot can be used
in a cell.
V(1) refers to the voltage on node 1. What voltage? Well that depends on which
analysis you are running.
In AC and Dynamic AC it means the complex frequency domain value at the last
frequency point. In every other analysis it means the time domain value.
What simulation value? The value is the last one computed in the analysis. In
Dynamic DC, it's simply the DC operating point value. In AC or Dynamic AC,
it's the complex value at the last frequency. In transient it's the value at the last
timepoint.
.Define values: You can also use .defined values. For instance.
.define f1 1e6
.define w1 2*pi*f1
Note that if a conflict arises between a .defined variable and a cell variable
name, then the .defined variable takes precedence.
.define C12 36
Then any cell that uses C12 in its expression will get the .defined value of 36, not
the value of the expression in cell C12.
Wildcard Variables:
Micro-Cap spreadsheets can use the wildcard syntax to enter a large number of
variables.:
57
Example 1: Node voltages
=V([@@])
This prints the value of all node voltages, one per row, and it looks something
like this:
=V(1)
=V(2)
=V(3)
...
=FORMULATEXT(V([@@]))
This prints the names of the node voltages, one per row. This is designed to
match the corresponding node voltage values and looks like this typically:
V(1)
V(2)
V(3)
...
=PD([R@])
prints the power dissipation of all resistors and looks like this typically:
=PD(R1)
=PD(R2)
=PD(R3)
...
=FORMULATEXT(PD([R@]))
prints the names of the power variables of all resistors, one per row. This is de-
signed to match the corresponding resistor values and looks like this typically:
PD(R1)
PD(R2)
PD(R3)
...
58 Chapter 2: The Circuit Editor
Spreadsheet right click menu: The properties of the spreadsheet are controlled
by this menu. To access it, right-click the mouse over a cell or group of cells. It
offers these items:
Edit Item: This lets you control the title text, the font and its colors, and the num-
ber of rows and columns in the spreadsheet.
Cell Color: This lets you set the default background color of the selected cells.
Vertical Alignment: This sets the vertical text alignment. Because the cell's
vertical size can be varied, vertical text alignment is necessary and this item
lets you control it.
Format: This lets you control the numeric format of the selected cells.
Text: These three buttons let you control the text font, font color, and cell
background color. The last item is redundant with the Cell Color item above.
The next two items control the conditional background color of the cell:
If: This field holds a Boolean expression which, if true, changes the color
of the cell from the default color to the one specified in the Color field.
Color: This is the color the cell background will be if the If expression is
true.
For example, if cell D4 has this expression in the If field, C2>E4, then if
cell C2's value is greater than E4's value, the background color will be
set to the color specified in the Color field.
How would you use this? One application would be checking if a circuit
parameter is within specification. You can use circuit variables like V(10)
and even performance functions like PEAK_Y(DB(V(3)),1,1).
59
Auto Sum: This invokes a function that sums the contents of the cells
above. It adds the cells until it finds a cell with plain text. You can do this
manually with, for example, SUM(C1:C10), This feature just makes
it easier.
Auto Average: This works the same way as Auto Sum, but averages the
cells instead of summing them.
Once in Spreadsheet mode, you can either click the left mouse to get a default-
sized (100 rows by 26 columns) spreadsheet or drag the left mouse to create a
smaller one.
First step: Click on the Graphics mode button in the Tool bar. A menu ap-
pears, listing the available graphic objects. Choose one of the objects by clicking
on it. Drag the mouse in the schematic to create the object.
Graphic objects include the line, ellipse, rectangle, diamond, arc, pie, braces, and
picture. All have handles which can be dragged to alter the size and shape of the
object. Drag on a corner handle to change the size of the object. Drag on a non-
corner handle to change the width or length of the object's bounding box. This
lets you change the aspect ratio or relative shape of the object.
Double-clicking on a graphics object invokes a dialog box for editing the object.
If the object is a picture, a file dialog box will be presented. Select the name of
the picture file, border and fill options, and then click on the OK button.
Here is an example of a circuit file with two WMF pictures created and captured
in Harmonic Distortion analysis. Micro-Cap can import or export (create) pic-
tures in TIFF, JPEG, BMP, GIF, PNG, WMF, and EMF formats.
61
Adding and editing flags
First step: Click on the Flag mode button in the Tool bar.
Second step: Click in the schematic at the position where you want to place the
flag. A text box is presented. Type in the name of the flag and click OK.
To edit a flag, double-click on it and edit the name in the text box as desired.
First step: Click on the Select mode button in the Tool bar.
Third step: Drag the selected object or group. Slide the mouse across the drawing
to the desired location and release the mouse button. Be sure to drag within the
body of the object, or within the selected region. If you don't, you will deselect
whatever had been selected. If this happens go to the second step and try again.
First step: Click on the Select mode button in the Tool bar.
Third step: Click on one of the three rotate buttons. The Flip X axis button
rotates about the horizontal axis in 180 degree increment. The Flip Y axis
button rotates about the vertical axis in 180 degree increments. The Rotate button
rotates about the Z axis (perpendicular to the schematic plane) in 90 degree
increments, producing four distinct orientations. CTRL+R also rotates about the
Z axis.
First step: Click on the Select mode button in the Tool bar.
Second step: Drag the mouse to define a region containing the object or group of
objects that you want to step. This creates a box encompassing the desired area.
Normally, when you first create the box, you draw its boundaries just outside the
area of interest, because if you touch one of the objects, you end up dragging it
instead of creating the box. If you step with the box this way, you'll end up with
unconnected sections due to the space between the objects and the original box
boundaries. This is usually not what you want. The way around this is to use the
box handles. These handles are on all four corners and each side of the box. After
the initial box creation, the handles can be dragged to eliminate the spaces. This
lets the stepping process create contiguous, connected sections.
Third step: Click on the Stepping button, to invoke its dialog box.
This dialog box lets you make three choices; the direction in which to step the
box, the number of times to copy it, and whether or not you want to copy the
box's grid text. All attributes of components found in the box are copied, except
Part name, which is always incremented. Grid text, if copied, will be incremented
if the Text Increment option in the Preferences dialog box is enabled.
63
Mirroring schematic objects
Mirroring lets you define a rectangular region called a box and then copy a re-
flected image of the box contents. The mirroring procedure is as follows:
First step: Click on the Select mode button in the Tool bar.
Second step: Drag the mouse to define a region containing the object or group of
objects that you want to mirror. This creates a box encompassing the desired area.
Normally, when you first create the box, you draw its boundaries just outside the
area of interest, because if you touch one of the objects, you end up dragging it
instead of creating the box. If you mirror this way, you'll end up with unconnect-
ed sections due to the space between the objects and the original box boundaries.
This is usually not what you want. The way around this is to use the box handles.
These handles are on all four corners and each side of the box. After the initial
box creation, the handles can be dragged so that the box has no spaces in it. This
lets the mirroring process create a contiguous, connected copy.
Third step: Click on the Mirror button, . This invokes the Mirror dialog box.
This dialog box lets you choose a vertical or horizontal reflection and whether
or not you want to copy the box's grid text. A vertical reflection produces a copy
vertically below the original region. A horizontal reflection produces a copy hori-
zontally to the right of the original region. All attributes are copied except Part
name, which is incremented. Grid text, if copied, will be incremented if the Text
Increment option in the Preferences dialog box is enabled.
First step: Click on the Select mode button in the Tool bar.
Second step: Select the object (component, text, wire, flag, or graphic object)
to be deleted by clicking on it. To select multiple objects for deletion, hold the
SHIFT key down while you click on each object. You can also select one or more
objects by dragging the mouse to define a rectangular region (box). All objects
within the box will be selected when the mouse button is released.
Third step: Press the Delete key to delete the object(s). Deleting in this fashion
does not copy the deleted objects to the clipboard, so they will not be available
for pasting to a new location. If you want to delete the objects and have them
copied to the clipboard for a future paste operation, use the Cut command (CTRL
+ X).
The Delete key alone removes all selected wire segments entirely from one end-
point to another. CTRL + Delete cuts wire segments that cross the select region
box exactly at the box boundaries.
These commands are multistage. They can undo/redo many times and are only
limited by available memory.
65
Enabling / disabling schematic objects
Schematic objects, including parts, text, and wires, can be enabled or disabled.
Enabled objects are included in analyses, SPICE netlist translations, and Bill of
Materials reports. Disabled objects are not included. Enabled objects are colored
normally, while disabled objects are shown in gray. The disabled color is set from
Properties (F10) / Color/Font / Disabled. To enable or disable an individual
object, double click on it, and click the Enabled check box to the state you want.
First step: Click on the Select mode button in the Tool bar.
Third step: Click on the Enable or the Disable tool bar button, or if you
prefer, select the Enable or Disable item from the Edit menu. If the item is a
single object, you can also double click on it and in the dialog box that comes
up click the Enabled check box. A check means the object is enabled. No check
means it is disabled.
The Enable function is useful when you want to temporarily remove text, wires,
or circuitry to see the effect while retaining the disabled circuitry for future use.
In addition to simple enabling there are several other region enabling modes:
You can also employ pure logic expressions using Check variables. Check vari-
ables are named check boxes and are added to the schematic from or Options
/ Mode / Check. These variables have only two states; 1 if their check box is
checked and 0 if not.
Region enabling is a quick and convenient method for evaluating different circuit
options. It is most useful when you tile a schematic and analysis plot and then
toggle the different regions to see the effect on the analysis plot.
67
Node number assignment
Micro-Cap automatically assigns numbers to the circuit nodes when an analysis
is requested, when the circuit is saved to disk, or when any change is made to
the circuit and the Options / View / Node Numbers option is active. Node
numbers are displayed on the schematic only when this option is enabled. When
you want to plot or print a node's voltage waveform you refer to the waveform as
V(node name), where the node name may be either the node number assigned by
the program or a text name assigned by you. For Micro-Cap to associate the node
names with the node, the lower left corner of the text outline box must be placed
directly on the node. Node Snap, if enabled, makes this easier by moving the text
to the nearest node within one grid. The Node Snap option is selected from the
Preferences dialog box (CTRL + SHIFT + P).
The system assigns and displays node numbers according to the following rules:
2. The other nodes are numbered from 1 to the highest node number.
3. When an analog node and a digital node touch, or are connected by a wire,
both nodes are assigned a unique number. The program automatically inserts
an interface circuit between the two nodes. The interface circuit generates an
interface node of the form <num>$ATOD or <num>$DTOA depending upon
whether the digital node is an input or an output, respectively. If the interface
node is accessible (can be referenced in a plot expression), it will be printed
on the schematic. In general, interface nodes between analog parts and digital
primitives are accessible unless they occur at a subcircuit interface.
4. Analog node numbers are displayed in a box with rounded corners while
digital node numbers are displayed in a box with square corners.
5. Nodes with the same grid text node name are connected together. That is,
if two separate nodes each have a piece of identical grid text placed on them,
they are considered to be connected and will share the same node name. This
provides a convenient way of connecting large numbers of common nodes,
without having to use wires to connect them.
Paste CTRL + V Pastes the clipboard contents to the last
mouse click location.
To copy something to the clipboard, select the object or drag select a region.
Press CTRL + C or click on the Copy button. All selected objects will be copied
to the clipboard.
To paste the clipboard contents, first click at the desired location. Then press
CTRL + V or click on the Paste button. The entire contents of the clipboard will
be pasted into the schematic or text area at the site of the last mouse click.
Like most other operations, the clipboard actions can be undone by using the
Undo command. Simply choose Undo from the Edit menu, press CTRL + Z, or
click on the Undo button to undo the operation.
Micro-Cap maintains two separate clipboards: a text box clipboard and a sche-
matic clipboard. Text copied from a text box will not mix with text copied from
the schematic. Text from the text area of a schematic is regarded as schematic
material and is stored to or copied from the schematic clipboard. Thus, it is pos-
sible to copy text from the text area and paste the same text to the drawing area.
Of course, the shuttle command, CTRL + B does this directly. Schematic objects
saved to the clipboard are available only for use within Micro-Cap and cannot be
pasted to other applications. To export schematic pictures or plots, use the Copy
the Entire Window to a Picture File command on the Edit menu.
69
The clipboard list
In addition to the standard clipboard, there is another private clipboard called
the keyboard list. This clipboard holds both normal and RTF grid text, text field
text (like that in a text field or page), pictures from the standard clipboard, circuit
fragments, and analysis limits. You can name the objects you store for later ease
of recall. You might, for example, save favorite circuit fragments for later rapid
use in your designs.
The list is best used to save frequently used items like circuit fragments, analysis
limits, or text.
This procedure copies the selected objects and drags the copy along with the
mouse, leaving the original objects undisturbed. As with other copying operations
like stepping, mirroring, and pasting, part names are always incremented, but grid
text is incremented only if the Text Increment option (Preferences) is enabled.
Drag copying is especially convenient since it replaces the two step process of
cut and paste with a simple one step operation with immediately visible results. If
you don't like the result, press CTRL + Z to undo it and try again.
After the drag operation has begun, you can release the CTRL key and continue
dragging.
Drag copying is often a convenient method for adding new components. If you
want to add another 10K resistor, and a 10K already exists in the schematic, drag
copying is fast and easy. For example, the standard process consumes four steps:
Drag copying is especially useful when an entire region, like the differential stage
of an amplifier, can be copied. Even if some editing of the copied region's objects
is required, the entire process is usually simpler, faster, and less error prone.
71
The Info command
The Info command displays model information about a command statement or a
component. It works like this:
First step: Click on the Info mode button in the Tool bar.
The Info function will provide some information for all components and some
command statements. It generally provides information that is not easily vis-
ible, such as a subckt listing or a model statement from an external file, a digital
source stimulus table, or a Laplace or Function source data table. For simpler
components without model statements, the Info function usually invokes the At-
tribute dialog box.
Text information found in the schematic is highlighted and shown as a part of the
schematic. Other information is displayed in the Model editor or the Text editor.
For the .INCLUDE and .LIB command statements, Info displays the contents of
the file referenced in the command statements.
If the information is found in the text area, the Info command switches to it and
displays the information. To return to the schematic page, press CTRL + G.
First step: Click on the Help mode button in the Tool bar.
Second step: Click on the component for which you want help.
The Help function provides parameter and syntax information for every com-
ponent. This is the same information available from the Help system. It is just a
little easier to access in the context of working with the Circuit editor.
• Show the delay of each path, calculated from the individual delays of the
gates in the path list.
1. Point to End Paths: This shows all paths from the component at the point
of a mouse click to the end points. A path ends when a gate does not drive
another standard or tri-state gate.
2. Point to Point Paths: This shows all paths from the point of the first mouse
click to the point of the second mouse click.
3. Show All Paths: This shows all paths in the circuit starting on STIM, FS-
TIM, or flip-flop outputs and ending when a gate in the path does not drive
another standard or tri-state gate.
First step: Select one of the three commands from the Options menu.
Second step: For the Point to End command, click on the body of a gate or stimu-
lus component. For the Point to Point command, click on the starting component
and on the ending component.
73
At this point, Micro-Cap shows a list of paths appropriate to the chosen com-
mand in the Digital Path dialog box. It typically looks like this:
For each path, the path list shows the name of each gate in the path, and the total
delay through the path for the low to high and high to low signal transitions at the
path start. To calculate the LH delay, the program assumes a low to high transi-
tion at the path start. It then traverses the path, summing the delays using the
actual signal transitions at each gate, the gate's timing model, and the gate's MN-
TYMXDLY value. To calculate the HL transition, the program assumes a high to
low transition at the path start and performs a similar analysis.
A path ends when any gate in the path does not drive a standard gate or a tristate
gate. Path commands handle combinatorial gates only. Subcircuits are not ex-
panded.
Panning: Pan the schematic. Panning means to move the view to a different
part of the circuit. In keyboard panning you use CTRL + <CURSOR KEY>
to move the view in the direction of the cursor key arrow. In mouse panning
you click and hold the right mouse button, while dragging the mouse. The
effect is like sliding a piece of paper across a desktop.
Centering: Use the SHIFT + right click method to re-center the view. While
holding down the Shift button, click the right mouse button at the point you
want centered in the window. Clicking toggles the scale between 1:1 and 1:4
and centers the schematic at the mouse position.
Flagging: Place flags at locations you expect to revisit. Then select a flag
from the Select Flag dialog box which is accessed from the Tool bar or
from the Go To Flag item on the Edit menu.
Page scrolling: Use the Page tabs if the desired area is on another page.
You can also use CTRL + PGUP and CTRL + PGDN to navigate the pages.
Although users are encouraged to adopt the method that works best for them,
each method tends to work best in different circumstances. For small to medium
view changes, use panning. For large changes in medium size schematics, use
centering, or for very large changes in very large schematics, use flags.
75
Global Settings
These numeric values and options control device model and circuit analysis op-
tions. Some of these definitions can be found in the individual device models:
Numeric Options:
ITL2: DC transfer curve iteration limit for each point of the DC sweep.
LTHRESH: This is the voltage that must be exceeded for a logical boolean
function to emit an LONE state. For example, the expression V(1) &
77
V(2) will be TRUE and produce an analog value of LONE only if
V(1)>=LTHRESH and V(2)>=LTHRESH.
R_NODE_GND: This is the resistance added from node to ground when the
Add DC Path to Ground option (Options / Preferences) is enabled and a node
needs a path to ground. A value of 0 means no resistor is added.
SANDH_PRECISION: This is the precision used to determine when a
Sample and Hold has converged.
SD: This is the number of standard deviations in the tolerance band.
SEED: This is the seed number for the RND, RNDR, RNDC, and RNDI(t)
random functions. If SEED is >0 the random numbers are the same with
each usage of the function.
TRTOL: This is the amount by which the standard LTE formulas are
presumed to overestimate the true error.
79
TRYTOCOMPACT: If enabled, this flag causes the program to compact the
past history of lossy transmission line input voltages and currents.
Method Options:
GEAR: Selects the Gear integration method. This method is best used in
circuits where inductors are in series with switches of any kind. This is
usually the case with SMPS circuits.
• New: (CTRL + N) This command invokes the New dialog box to create a
new schematic, SPICE or text, binary library, or Model Program file.
• Open: (CTRL + O) This command invokes the Open dialog box to load an
existing file from the disk.
• Save: (CTRL + S) This command saves the active window file to disk us-
ing the name and path shown in the title bar.
• Save As: This command saves the active window file to disk after prompt-
ing the user for a new file name and (optionally) a new path.
• Encrypt / Decrypt: This option lets a user encrypt a file with a password
or decrypt an encrypted file by supplying its password. An encrypted file can
only be opened for viewing / editing if the password is supplied. Encrypted
files can be simulated without requiring the password. This option is used to
protect proprietary macros (*.mac) and library files (*.lib). It can also be used
on any schematic file. It cannot be used on binary files (*.mdl, *.lbr).
To decrypt a .lib file: Load the file. The program will display the file with
the critical parts of any subcircuits encrypted. Invoke the Encrypt / Decrypt
command. The program will ask for the password. When you supply the
password the program will display and save to disk the decrypted file.
To decrypt a .mac or .cir file: Load the file and supply the password. The
program displays the decrypted file. Use the Save command to save the file
in standard format without encryption.
• Paths: This option lets you specify default paths for DATA (circuits and
output files), LIBRARY (model libraries), PICTURE (picture files), and
DOCUMENT (Reference Manual, User Guide, and other information files).
If more than one path is specified, they must be separated by a semicolon
(;). Micro-Cap first looks locally in the circuit for model data. It searches
LIBRARY paths next, scanning multiple paths in left to right order. See the
Libraries chapter for more information on paths. Local .PATH commands,
within the circuit can be used to specify different paths.
81
Figure 2-12 The Path dialog box
Library: This field specifies the LIBRARY path. This path is used
mainly for model files. This includes binary (*.LBR), text (*.LIB),
Model program (*.MDL), and macro (*.MAC) files.
Picture: This field specifies the PICTURE path. This path is used
for picture files.
Document: This field specifies the DOCUMENT path. This path is used
for the Reference Manual, User Guide, and other information files.
Each field may have one or more paths, separated by semicolons, with
the leftmost paths having higher priority when searching.
Preferred Paths: This group lets you select or manage the path sets.
File Dialog Initial Path: This group lets you decide what folder the File
Open dialog box uses for its initial display.
Use Last Path: This employs the last path used in a file open
operation.
Use Current Path: This employs the path of the displayed file.
Allow Non-existent Paths: This lets you specify paths which do not
exist at the time of creation, but may later. For example, USB or CD
drives.
User Paths: This lets you define path names variables and the associated
paths that can be used in any place where a file path is expected such as
the FILE attribute of a WAV source or in a .LIB statement. There are
three commands to manage the list:
Add: This lets you define new path names and associated paths.
• Migrate: This lets you migrate selected files from an earlier version of
Micro-Cap. After you specify the location of a MCAP.DAT file, MC12
reads it and makes a list of files that may be copied to suitable new locations.
• Translate:
• Binary Library to SPICE Text File: This command translates a
binary Micro-Cap library parameter file, FILE.LBR, into a text file,
FILE.LIB, containing model statements.
• IBIS to SPICE File: This accesses the IBIS dialog box. It creates
SPICE files from IBIS files, set up for a transient run in either Standard
Models or Golden Waveforms Check format.
84 Chapter 2: The Circuit Editor
• Touchstone Files: This option converts Touchstone file parameters
from S, Y, Z, G, H, T, or ABCD (Cascade) format to any other format
(S, Y, Z, G, H, T, or ABCD).
• Load MC File: This command is still available but has been superseded by
the Create Circuit command in the histogram window. It loads a numeric
output file and scans it for references to Monte Carlo performance function
error reports. It then creates the circuits which caused errors during the
Monte Carlo run, showing each circuit with parameter values which caused
failure.
• Backup and Restore...: This command lets you create a backup file and
later restore any file within. You can make multiple backups for extra
security. Mainly this preserves the standard component and shape libraries,
but there are other files in the backup as well (e.g. waveform buffer).
• Close: (CTRL+F4) This command closes the active file. It will optionally
ask if you want to save any changes on disk. You can disable this query at
Options / Preferences / Warnings / File.
• Print Window: This command prints the contents of the active window.
• Print Selected Region: This prints the selected region of a circuit.
• Print Setup: This option changes the printer settings and paper choices. Its
format will vary with different printers, but usually it lets you specify a
particular printer to use and the paper size, source, and orientation.
85
• Edit Recent Files: This lets you manage the display of recently used files
The Recent Files dialog looks like this .
This dialog lets you pin some of the file names to the top of the list by
clicking in the checkbox. The dialog also lets you control the file list size
and manage the display of path information.
• Show Full Paths. This shows the full path in the display. The full path
can get to be pretty long but is helpful when you've used multiple folders.
• Undo: (CTRL + Z) Micro-Cap has a multistage undo. It can undo the last
N operations that change a circuit file. N is limited only by RAM memory
and is usually much greater than 100. Undo can also restore the last state of a
text field, if the text cursor is still in the field.
• Cut: (CTRL + X) This command deletes the selected objects and copies
them to the clipboard. Objects include text field text and schematic objects.
• Clear: (DELETE) This deletes the selected items without copying them to
the clipboard. This command deletes selected wires from their end points.
• Select All: (CTRL + A) This command selects all objects in the current
window or all text in the current text field or document.
• Copy to Clipboard: These options copy all, or the visible portion of, the
front window in several formats to the clipboard, which may then be pasted
87
to other programs. You can't paste a clipboard picture to Micro-Cap, but you
can import a picture file to Micro-Cap using the Picture item from Options /
• Export Graphic File: This creates a picture file from the front window
which can be imported into Micro-Cap or other programs.
• Copy to Clipboard List: This copies the selected schematic region or text
to the Clipboard List.
• Copy Image to Clipboard List: This copies the image in the standard
clipboard to the Clipboard List. For example, if you had previously copied an
analysis plot to the clipboard in say .bmp format, you could then copy it into
the Clipboard List.
• Paste From Clipboard List: This lets you select an object from the
Clipoard List and paste it into the circuit.
• Edit Clipboard List: This lest you delete or rename any object in the list.
• Enable: This enables the selected circuit region.
• Enable With: This enables the selected circuit region conditioned on the
Boolean expression. For example, analysis=_AC would be enabled while AC
analysis is active.
• Properties: (F10) This accesses the Properties dialog box for the
current window. From here you can change the color of features such as
wire or component color. Changes affect all objects.
89
• Graphic Object Properties: This accesses the Properties dialog box
for the graphic objects line, ellipse, rectangle, diamond, arc, braces, and
pie. From here you can change the default properties like color, fill, and
pattern. The changes affect the next graphic object added. To change an
individual object's properties, double click on it and edit the property.
Attributes: This lets you change the display status of the five main
attributes of all components in the circuit, en masse.
Tolerances: This lets you change the tolerances of one or more parts.
Color: This lets you change the color of selected parts, text, and wires.
Font: This lets you change the font of selected grid text and parts.
Reset Node Positions: The relative printing position of the node number,
node voltage, current, power, and condition can be changed by dragging
its text. This command restores their original default positions.
91
• Align: These options let you align grid or part attribute text.
• Align Left: (Ctrl+Shift+Alt+L) Aligns text to the left side.
• Align Right: (Ctrl+Shift+Alt+R) Aligns text to the right side.
• Align Top: (Ctrl+Shift+Alt+T) Aligns text to the top side.
• Align Bottom (Ctrl+Shift+Alt+T): Aligns text to the bottom side.
• Send to Back: This command makes the selected object the back object.
• Next Object (CTRL + Tab): This selects the next object in a stack.
• Find: (CTRL + F) This invokes the Find dialog box shown below.
It's used to find and optionally replace circuit text, including part names,
node names, attribute text, component type, and grid text.
• Replace: This option replaces text in a text document or in the text area of
a schematic. The replace function for schematic attributes is done from the
Attribute dialog box using the Change button.
93
• Find in Files: This command invokes the Find in Files dialog box, which is
used to search the disk for files. You can search for a specific piece of text
(e.g. integrated Z80 mind warp generator), shape names (e.g. NOR3, OP9),
definition names (e.g. NPN, Resistor), component names (e.g. 2N2222A,
1N914,) or any attribute value (e.g. 2.4K, TO5). The principal purpose of this
command is to find a circuit whose name has been forgotten, but some small
part of its content is still known (e.g. I remember I used a 2N4124 in it).
You can search any kind of text file in any folder. It need not be a circuit file.
The Component menu lets you select a component for placing in the schematic.
It is designed to provide easy access to any of the more than 24,000 parts in the
library. Access to more common generic parts is best done from a Component
palette or a Component button. The menu contains these sections:
Analog Primitives: This section has generic analog components for which the
user supplies the values or model statements that define their electrical behavior.
Analog Library: This section has models for commercial analog components.
The values or model statements that define their electrical behavior are provided
in the Model library.
Digital Primitives: This section has generic digital components for which the
user supplies the values or model statements that define their electrical behavior.
Digital Library: This section has models for commercial digital components.
The values or model statements that define their electrical behavior are provided
in the Model library.
95
Animation: This section contains objects which change their display or respond
to user clicks during a simulation. The objects include meters, seven-segment
displays, LEDs, and a variety of digital and analog switches. They work with the
Dynamic DC, Dynamic AC, and Animate modes.
Import: This section is a temporary holding bay for Component library data
from parts that have been imported from circuits. Once a part has been imported,
its name appears on the Component menu and is available for placement in other
circuits. Part names can be dragged from here into other sections of the library.
Filters: This section is present if filter macros have been created by the filter de-
sign feature, accessible from the Design menu.
Macros: This section is present if macros have been created by the Make Macro
command, accessible from Edit / Box / Make Macro.
Last Used: This part of the menu shows recently selected parts.
96 Chapter 2: The Circuit Editor
The Component panel
There is an additional way to access components from the library, the Component
panel. It looks like this:
The Browse panel presents the Component library in the same hierarchical man-
ner that the Component editor does and shows the shape of the selected compo-
nent.
The Search panel searches the library for matching text strings, much like the
Find Component command (SHIFT + CTRL + F) does.
The Favorites panel provides a list of the most often used components.
The panel can be toggled from Preferences / Panel/Window Tabs / Show and
from Options / Panel. CTRL + ALT + X also toggles the panel display.
Double-clicking in the area above the panel tabs undocks the Component panel.
Another double-click in the same area restores it to the docked position.
97
The Windows menu
• Cascade: (SHIFT + F5) This cascades the open windows in an
overlapping manner.
• Tile Vertical: (SHIFT + F4) This vertically tiles the open windows.
• Tile Horizontal: This horizontally tiles the open windows.
• Overlap: This overlaps the circuit and analysis plot windows. If the Plot on
Top option is enabled, the circuit is maximized and a 1/4 size analysis plot is
placed on top, otherwise the analysis plot is maximized and a 1/4 size circuit
is placed on top. This option is available only during an analysis.
• Auto Scale: (F6) Auto scales the schematic to fit the window.
• Toggle Drawing/Text: (CTRL + G) Every schematic has a drawing
area and a text area. The drawing area contains the schematic. The text
area is where local model, subckt, stimulus, and source table statements are
stored. This toggles the display between the drawing and text areas.
• Split Vertical: This vertically splits the front schematic window into two
panes for simultaneous viewing of different parts of the schematic.
• Files in Memory: This group lists the open files in memory. If multiple
circuits have been loaded, you can select one for display from this list.
99
The Options menu
• Main Tool Bar: (CTRL + 0) This toggles the main tool bar on and off.
• Default Main Tool Bar: This option restores the default main tool bar.
• Status Bar: This option toggles the Status bar on and off.
• Panel (CTRL + ALT + X): This option toggles the Component panel.
• Show Error Window: This displays the Error Window.
• Window Tabs: This option toggles the window tabs on and off.
• Mode: This option accesses the Mode sub-menu. It contains these items:
• Select: (CTRL + E) This mode selects objects for editing. To change
attributes like part name or model name, to edit grid text, or to select a
schematic region for moving or deleting you must be in the Select mode.
You invoke this mode by clicking on the Select button, pressing the
SPACEBAR, by typing CTRL + E, or by selecting this menu item.
• Pan: This lets you move the schematic view with a left-click drag.
Right-click drag also works in any mode.
• Text: (CTRL + T) This mode lets you add grid text to the schematic.
Grid text can be used for node names and model statements (which can
also be placed in the text area).
• Wire: (CTRL + W) This mode adds orthogonal wires. Wires are used
to connect components together.
• Line, Rectangle, Diamond, Ellipse, Arc, Pie: These modes let you
draw graphic objects on the schematic or plot. You can select a mode
from here, or click on the Graphics button in the Tool bar, then select the
desired object from the menu that pops up.
object, double-clicking on it lets you type in more exact values. The key
words MIN and MAX place a polygon vertex coordinate flush with the
plot sides. Start the polygon with a left-click and finish with a right-click.
• Open Polygon: This operates like the closed polygon except that the
finishing right-click does not add a line to close the polygon.
• Flag: This mode is used to place flags on the schematic. Flags are used
to mark locations for quick navigation. Normally, you invoke this mode
by clicking on the Flag button, but you may also use this menu item.
• Horizontal Tag: This mode lets you place a horizontal tag between
two data points. This tag measures and labels the horizontal difference
between two data points on one or two waveforms,
• Vertical Tag: This mode lets you place a vertical tag between two data
points. This tag measures and labels the vertical difference between two
data points on one or two waveforms.
• Info: (CTRL + I) This invokes the Info mode. In this mode, clicking
on a component shows its model parameters, model statement, subcircuit
description, or command statement, depending upon the component.
• File Link: This invokes Link mode, in which clicking on grid text or a
part shows its link, which is usually an internet URL, local file address,
or a local executable program.
• Region Enable: This mode lets you drag select a region and assign to
it a boolean expression that typically depends upon values of symbolic
(.define or .param) variables within the circuit.
• Title Block: This mode lets you place a title block in the circuit. It in-
vokes the Title Block display where you may select a title block design
from those already created in the Title Block editor.
• Point to End Paths: This command invokes the Point to End Paths
mode. In this mode, clicking on a digital component displays all paths
from the component clicked to all possible end points. End points include
flip-flops and gates which drive no other gates.
• Point to Point Paths: This command invokes the Point to Point Paths
mode. In this mode, clicking on a digital component displays all paths
from the first component clicked to the second component clicked.
103
• Grid Text: This option shows grid text. Grid text is any text created
with the Text tool.
• Node Numbers: This option shows the node numbers assigned by the
program to each node. Analog nodes have rounded rectangles and digital
nodes have normal angular rectangles. Grid text placed on a node may
serve as an alias for the node number.
• Node Voltages / States: This displays node voltages and digital states.
In Dynamic AC, AC voltages are shown. Otherwise, time-domain values
are shown. Depending on the last analysis, these could be a DC operating
point, transient analysis ending values, or DC Sweep ending values.
• Current: This option displays the last AC, DC, or transient analysis
time-domain currents. During Dynamic AC, AC currents are shown.
• Power: This option displays the last AC, DC, or transient analysis
time-domain power. During Dynamic AC, AC power is shown.
• Condition: This option displays the last AC, DC, or transient analysis
time-domain conditions. Conditions define the operating state for devices
such as OFF, LIN, SAT, and HOT for BJTs.
• Bold Grids User (N): This puts a bold grid every N'th grid point. The
distance between bold grids is selectable from the Properties dialog box.
• Graph Paper: This shows a grid which looks like graph paper.
The next four choices can also be selected from the VIP button , if
• Options-General:
• Time Stamp: This adds a time stamp to numeric output files.
• Date Stamp: This adds a date stamp to numeric output files.
• Warning Time: This sets the duration of warning messages
• Help File on Top: This keeps the Help file on top of any window.
• Print Background: If enabled, this option adds the user-selected
background color to the printouts. It is usually disabled, since most
background colors do not print well.
• Component List Size: This value sets the number of part names
to include in the Recent Parts section of the Component menu.
105
• Add Parentheses to Define:. This brackets the right side of
.define statements with a pair of parentheses to avoid expansion
problems. For example, with the added parentheses, .DEFINE A
1+V(1) is interpreted as (1+V(1)). Without the added parentheses an
expression like 1/A becomes 1/1+V(1) = 1+V(1), which is probably
not what was intended. With the added parentheses 1/A becomes
1/(1+V(1)) as most likely was intended.
• Splitter Size: This value sets the size or the window splitters.
• Show Full Paths Title: This shows the full file and path in the
window title bar. If you use long path names, disabling this option
may unclutter the menu and title bars, though it may be hard to
distinguish files of the same name in different folders.
• Bold Group Names: This option bolds the group names in the
Component menu and panel hierarchical display.
• Sound...: These three options control the use of sound for errors,
illegal operations, and to indicate the end of a simulation run.
• Options-Analysis:
• Select Mode: This causes the mode to revert to Select after any
other mode is completed. This flag applies only when in an analysis.
• Select Curve Color: This option colors the selected curve branch
in the Select Color Primary. It is nearly always on.
• Smart Entry: This option suggests entries for the stepping fields
based upon the parameter's nominal value.
• Plot on Top: This option places the analysis plot on top of the
schematic if they are overlaid, otherwise the schematic floats above.
• Data Point Buffer: This sets the size of the data point buffer. An
analysis plot line is drawn only when the number of undrawn data
points equals this value. Since it is much faster to plot a line with 10
points if they are closely spaced, making this a large value usually
speeds up analyses that are plot-time limited.
• Options-Circuit:
• Text Increment: (Ctrl+Alt+N) This toggles grid text incrementing
for paste, step, drag copy, or mirror operation. Incrementing means
that the ending numerals in the text are increased by one. If no
numerals are present, a '1' is added to the text.
109
enabled, nodes are recalculated and displayed when any editing is
done. For large schematics this can be time consuming. This value
sets an upper limit for node count beyond which automatic node
recalculation will be ignored.
• File Link Default: This field lets you set the syntax for the File
link. The default is www.google.com/search?q="%s"+"data sheet"
which does a Google search for the part name. The %s symbol stands
for the part name.
• Recent Files: This dialog box allows you to select file names for
pinning and set file name and list size options.
• Shortcuts: This accesses the Shortcuts dialog box which lets you
customize the accelerator or shortcut keys.
• Main Tool Bar: This panel lets you show or hide buttons and tool bars
that normally reside in the main tool bar area.
• Color Palettes: This option lets you define your own palettes. Click on
any of the color squares to invoke a color editor that lets you customize
the hue, saturation, and luminance of the selected palette color.
• Auto Save: This accesses the Auto Save dialog box from which you
can enable automatic saving of circuit files to disk every time you run an
analysis or on a specific time schedule.
• Warnings: This accesses the Warnings dialog box from which you can
• Excessive Data Points: This warns when the circuit analysis has
created an excessive number of data points. Data points equal time
points times number of waveform or graphs plotted.
• Part and Node the Same: This warns when a part and node
use the same name, which is legal but risky as it may lead to
ambiguous plots. If D1 is both a node name and a diode name, V(D1)
might mean the voltage on the node D1 or across the diode D1.
111
TNOM and T_MEASURED have been specified for a part.
• Use Extra Thread for Plotting: If enabled, this option uses one
thread for plotting, if it is not being used for an analysis.
113
• Default Properties for New Circuits: (ALT + F10): These items let you
set the default or initial value of the various circuit options. When a circuit is
first created it will use the option settings below. These options can all be
changed after the circuit is created from its Properties (F10) dialog box.
• Schematics: This controls several schematic features:
• Color/Font: This provides control of text font and color for
various schematic features such as component color, attribute color
and font, and background color.
• Title Block: This panel lets you specify the existence and content
of the title block.
• Info Page: This lets you select the items that will be printed to the
Info page.
• SPICE Files: This provides two types of features for SPICE text files.
• Color/Font: This provides font and color control for SPICE files.
• Info Page: This lets you select the items that will be printed to the
SPICE file Info page.
• Tool Bar: This panel lets you select the tool bars and buttons that
appear in the local tool bar area located just below the main tool bar.
• Analysis Plots: This provides control for several analysis plot features:
• Scales and Formats: This panel lets you specify units, scale factor
and numeric format for analysis plots. It provides some plot options
for both the X and Y axes:
• Scale Factor: Only None and Auto are available. Auto picks a
suitable scale factor from the list (T,G,Meg,K,m,u,n,p,f).
• Scale Units: This adds units (Volts, Amps, etc,) to the plot.
Only None and Auto are available. If Auto is selected MC12 will
guess what the units should be from the plot expression.
• Scale Format: This controls the numeric format for the plot
X / Y scales. Choices include Scientific (1.00E4), Engineering
(10.00K), Decimal (10,000.00), or Default (10K).
115
• Watch: This sets the Watch window numeric format.
• Same Y Scales for Each Plot Group: This controls whether
each of the waveforms in the plot group share the same numeric
scale or have their own individual Y-axis scales.
• Colors, Fonts, and Lines: This provides control of text font and
color for many plot features such as scale and title text, window and
graph background colors, and curve color, thickness, and pattern.
• Ruler: This substitutes ruler tick marks for the normal full
screen X and Y axis grid lines.
• Tool Bar: This panel lets you select the tool bars and buttons that
appear in the local tool bar area located just below the main tool bar.
• Fourier: This lets you select the default parameters for Fourier
functions used in analysis plots, including number of points to use in
the routine, and autoscaling options.
117
• Include Numeric Output: This enables creation of the
numeric output file. The other options control content of the file.
• Font: This provides font control for all text in the 3D plot.
• Formats: This panel selects the numeric format for the X, Y, and Z
axis scales and the numeric values in the cursor tables. It also
controls the slope calculation method.
• Tool Bar: This panel lets you select the tool bars and buttons that
will appear in the local tool bar area.
• Font: This provides font control for all text in the histogram.
• Tool Bar: This panel lets you select the tool bars and buttons for
the local tool bar area.
119
options are similar to those for analysis plots.
• Colors, Fonts, and Lines: This provides control of text font and
color for various performance plot features.
• Tool Bar: This panel lets you select the tool bars and buttons that
appear in the local tool bar area.
• Tool Bar: This panel lets you select the tool bars and buttons that
appear in the local tool bar area located just below the main tool bar.
• Fourier: This lets you select the default parameters for Fourier
operations used in the window, including the number of points
to use in the FFT routine, and auto scaling options. These parameters
are distinct from similar parameters specified for Fourier operations
used in the analysis plots. They are usually the same but need not be.
• Formats: This lets you specify the X and Y plot scale formats.
• Formats: This lets you specify the X and Y plot scale formats.
• Options: This lets you specify various Smoke feature options.
• Show Parts With No Smoke Statement: This shows parts in
the Smoke display which have no Smoke parameters.
121
• Graphical Object: This panel controls the properties of graphical
objects such as border, fill, font, and line pattern.
• Spice Type: This panel lets you set the type of SPICE format to
be assumed by new circuit files when they read SPICE material.
• .Measure Definitions: This option loads the file Measure.lib. This file,
located in the library folder, stores global .measure definitions for use in all
circuits. The .measure definitions are automatically available to all circuit
files. Definitions for measuring pulse width, overshoot, frequency, period,
delay, and power factor are included.
• Model Parameter Limits Editor: This editor lets you set the minimum
and maximum values that the model parameters can have. It also shows the
default values, but does not allow you to edit them. A warning message is
generated and placed in the numeric output file for parameters that do not fall
within the limit values. To run a comprehensive check of all models, use
Windows / Check Model Library Parameters.
• Component Palettes: Palettes provide a quick alternative to the
Component menu when choosing components for placement. Membership in
a palette is specified from the Component editor. Palettes can be tailored to
suit personal preferences. Palette display can be toggled by pressing CTRL +
palette number. For example, CTRL + 1 toggles the display of palette 1.
• Transient: (ALT + 1) This option selects transient analysis. This lets you
plot time-domain waveforms similar to what you'd see on an oscilloscope.
• AC: (ALT + 2) This option selects AC analysis. This lets you plot
frequency-domain curves similar to what you'd see on a spectrum analyzer.
• DC: (ALT + 3) This option selects DC sweep analysis. This lets you plot
DC transfer curves similar to what you'd see on a curve tracer.
123
• Harmonic Distortion: (ALT + 8) This option selects Harmonic Distortion
analysis. It runs an instance of transient analysis and then analyzes the
distortion products in the output signal by using FFT routines. You can step
input level and/or frequency and create plots of THD, THDN (with noise),
SINAD, SNR, and any harmonic vs VIN, VOUT, PIN, or POUT. Plots can be
done as voltage or power ratios in dB, %, or simple numeric format. PSS
methods can be used to achieve rapid convergence of the output waveforms
to minimize FFT errors, producing accurate distortion analysis.
Active Filters: This part of the program designs an active filter from your filter
specifications. The filter type can be low pass, high pass, band pass, notch, or
delay. The filter response can be Butterworth, Chebyshev, Bessel, Elliptic, or In-
verse-Chebyshev. Polynomials are calculated from the filter specifications, then
mapped into one of several different circuit styles, ranging from classical Sallen-
Key to Tow-Thomas. Optional plots of the idealized transfer function are avail-
able. Filters can be created as circuits or as macro components.
Passive Filters: This part of the program designs a passive filter from your speci-
fications using capacitors and inductors. The filter type can be low pass, high
pass, band pass, or notch. The filter response can be Butterworth, Chebyshev, or
Elliptic. The filter polynomials are calculated and implemented in either standard
or dual circuit configuration. Optional plots of the idealized transfer function are
available. Filters can be created as circuits or as macro components.
The filter design functions from the Design menu are covered in more detail in
Filters chapter.
125
The Model menu
The MODEL program, accessed from the Model menu, produces optimized ana-
log model parameters from commercial data sheets. It creates model libraries in
either text or binary form. Its main display looks like this:
MODEL takes data sheet information and using a variety of methods, optimizes
the model parameters to fit the supplied data sheet values or graphs. The resulting
model parameters can then be saved and used in the Micro-Cap model libraries.
In text form, they are contained in files with the extension LIB, and encode de-
vice models as .MODEL, .MACRO, and .SUBCKT statements. Text files can be
viewed and edited with any text editor, including the Micro-Cap text editor.
In binary form, model libraries are contained in files with the extension LBR, and
are implemented as a list of model parameters for the parts. These binary files can
be viewed and edited only with the Model editor. The Model editor is invoked
when the File menu is used to open or create a binary library file.
The Model editor should not be confused with the MODEL program, which is ac-
cessed from the Model menu. MODEL produces optimized analog model param-
eters from commercial data sheets. MODEL can create model libraries in either
the text or binary form.
Once the binary libraries are created, the Model editor can be used to view and
edit them. The Model editor display looks like this:
File menu
Type selector
Part name
Part selector
127
The various parts of the editor function as follows:
• Name: This field is where the part name is entered. If the part has been
imported from the MODEL program, this field is a copy of its Name field.
• Memo: This is a simple text field that may be used for any descriptive
purpose. If the part has been imported from the MODEL program, this field
is a copy of its Memo field.
• Type selector: This is used to select which device type to display. Each
library may contain a mixture of different device types. Selecting NPN for
example, displays all of the NPN bipolar transistors in the file.
• Part selector: This selects a part by name for display and possible editing.
It provides a window to review the specific model values for the displayed
part. As in other windows, the Maximize button may be used to enlarge the
window to see more of the model values.
• Add: This adds a new part of the current device type to the current library.
• Delete: This deletes the displayed part.
• Pack: This removes all duplicated and untitled parts and reorders the parts
alphanumerically.
• Copy: This command copies a part from the displayed library to a target
library. If the target library already has a part with the same name, the name
of the newly created copy is set to "oldname_copy". The target library may
be the current library.
• Merge: This command merges a library from disk with the library
currently in memory. The merged library is displayed but is not automatically
saved to disk.
• Find: This command lets you specify a parameter name, then scrolls the
parameter list of the currently displayed part to show the parameter value.
Note that the Find function is available to locate parts by name in the current
library file or in one of the library files on disk. Simply click on the Find
button in the Tool bar.
The Build Command can also be invoked from the icon on the main tool bar
or from the same icon within the Text dialog box. The utility provides support for
these commands:
.HELP
.WARNING
.DEFINE
.MEASURE
.PARAMETERS
.RELTOL
.TR
It is particularly helpful with .define and .measure statements whose syntax can
be complex.
The way it works is simple. Start typing or editing the text for one of the com-
mands above, then click on the Build Command icon. When the dialog box
comes up, select a command, then fill in the boxes. If the command is complex
like a .measure that uses TARG or TRIG then additional fields will open up.
129
The next figure shows such a case:
The dialog box doesn't explain the syntax but it does show what must be entered
in order to create the command, so it helps with learning the syntax.
Here is a simpler case, a .DEFINE command with the key words shown in Bold.
This list box displays all of the existing title block designs in the selected
Title Block file.
Command buttons:
Revert: This command restores the selected title block to its original version
when the title block was first displayed. This only affects the displayed title
block.
131
Edits on other title blocks during the current invocation of the editor
remain in effect. Selecting a new title block disables the Revert feature for
the old title block. All edits on all title block are temporary, however, and
may be discarded when you exit the editor or close the file.
Editor: This invokes the Object editor, which lets you edit the numeric
parameters of the fundamental objects comprising the title block. This
provides finer control over object size and shape than can be obtained with
the normal mouse editing.
Close: This closes the editor and, if any changes have been made, asks if you
want to retain them.
Tool bar:
The Tool bar provides the buttons to select tools for creating, editing, and
viewing the selected title block. The tools and their properties are as follows:
New: (CTRL + N) This command creates a new title block library file. Any
title blocks added to it are available for use.
Open: (CTRL + O) This command loads an existing title block library file. Its
title blocks are then available for use.
Save: This command saves the current title block library file under its exist-
ing name.
Save As: This command saves the current title block library file under a new
name specified by the user.
Revert: This command reloads the current title block library file from the
disk. It is a convenient way to restore the file and ignore any changes.
Remove: This command removes the currently loaded library file. Its title
blocks are no longer available for use.
Add Title Block: This adds a new title block with a user-specified name to the
currently selected title block group and title block file.
Undo: (CTRL + Z ) Operations that change a title block can be reversed with
the Undo command. Multiple Undo commands are allowed.
Cut: (CTRL + X) This command deletes the selected objects and copies them
to the clipboard.
Paste: (CTRL + V) This command copies the contents of the clipboard start-
ing at the last mouse position.
Clear: (DELETE) This command deletes the selected items without copying
them to the clipboard.
Select All: (CTRL + A) This command selects all items in the title block for a
subsequent move, rotation, or deletion.
Select: Click this button to activate the Select mode. You must be in Select
mode to edit or select a portion of a title block for editing.
Pan: Click this button to activate the Pan mode. Panning is used to move the
display view to see different parts of a large title block. As usual, you can
also pan with the mouse. Mouse panning involves dragging the right mouse
button and can be done in any mode. Alternatively, you can select this mode
and drag with the either the left or right mouse button.
Rectangle: Click this button to create a rectangle in the title block by drag-
ging the mouse in the display. To change its shape, drag one of the eight
handles (small black rectangles).
Diamond: Click this button to add a diamond to the title block by dragging
the mouse. To change its shape, drag one of the eight handles.
133
Ellipse: Click this button to add an ellipse to the title block by dragging the
mouse in the display. To change its shape, drag one of the eight handles. To
create a circle, press the SHIFT key while dragging the mouse.
Arc: Click this button to add an arc to the title block by dragging the mouse
in the display. To change its shape, drag one of the eight handles.
Line: Click this button to create a line in the shape by dragging the mouse in
the display. To change the direction or length of the line, drag on one of the
two handles after entering Select mode.
Closed Polygon: Click this button to add a closed polygon. Click the mouse
in the display, once for each vertex. There is no limit on the number of ver-
tices. Double-click on the last vertex or click the right mouse button. This
finishes the polygon by adding a final edge between the first and last vertices.
To change the overall dimensions of the polygon, drag one of the handles.
Use the Object editor to edit the individual vertex coordinates.
Open Polygon: Click this button to create an open polygon. Click the mouse
in the display, once for each vertex. There is no limit on the number of verti-
ces. Double-click on the last vertex or click the right mouse button to end the
polygon. To change the overall dimensions of the polygon, drag one of the
eight handles. Use the Object editor to edit the individual vertex coordinates.
Included Title Block: Click this button to include an existing title block in the
current title block by clicking the mouse in the display where you want the
title block placed. This invokes a list of existing title blocks. Choose the one
you want to include from this list. Once the title block is included, it can be
dragged about.
Text: Click this button to add text to the title block by clicking the mouse in
the display where you want the text placed. This invokes a text dialog box.
Type the text and click OK. To edit text, double-click on it in Select mode.
Line: Click this button to select the outline color of an object. You can also
select the default or no color options.
Fill: Click this button to select the fill color of an object. You can also select
the default or no fill options.
Grid: Click this button to show the grid. The grid is a two-dimensional array
of locations where shape objects must originate and terminate if their nodes
are accessible in a schematic.
Grid Snap: Click this button to force the coordinates of all objects to occur at
a grid point. This ensures that the coordinate points will be usable as connect-
ing points (pins) in a schematic.
Find: Click this button to locate title blocks by name. As you type the name,
it fills the list box with all title blocks that match the name.
Zoom-Out: Click this button to decrease the displayed image size. This does
not affect the size of the image in the schematic.
Zoom-In: Click this button to increase the displayed image size. This does
not affect the size of the image in the schematic.
To Front: Click this button to send the selected object in an overlapping stack
of objects to the front.
To Back: Click this button to send the selected object in an overlapping stack
of objects to the back.
Next Object: Click this button to select a different object in a stack of over-
lapping objects. Click the button until the one you want is selected.
Font: Click this button to change the text attributes of any selected text. This
also changes the default text attributes that will be used the next time text is
added to the shape.
Flip X: This command rotates the selected region about the X axis in 180
degree increments, essentially flipping the object or group about the X axis.
135
Flip Y: This command rotates the selected region about the Y axis in 180 de-
gree increments, essentially flipping the object or group about the Y axis.
Rotate: This command rotates the selected region about the Z axis (the Z axis
is perpendicular to the schematic plane) in 90 degree increments, producing
four distinct orientations.
Mirror: This command creates a mirror image copy of the selected region. It
invokes the Mirror dialog box which lets you choose a vertical or horizontal
reflection and whether you want to copy the text in the region. A vertical
reflection produces a copy vertically below the original region. A horizontal
reflection produces a copy horizontally to the right of the original region.
Move Parts: This lets you move title blocks from any group or file to
another group or file.
Sort: This command lets you sort title block names within a group or whole
file alphanumerically or alphanumerically plus. You can sort names or group
names, within a group or within a group and its children groups.
Help: This accesses the Help material for the Title Block editor.
It is accessed from the Options menu / Mode / Title Block or from the tool
bar icon.
It invokes the Title Block dialog box that lets you select and modify a title block.
It looks like this:
Title Block Select list box: This lets you select a title block from the list of those
already created.
Placement: This lets you choose where to place the title block. The choices in-
clude Top Left, Top Right, Bottom Left, Bottom Right, and Floating.
Field List: This shows a list of the text fields defined in the original design. Text
fields are denoted by a #. For example, #Description. These specify a field that
can be and usually is edited when placed in a schematic. The list shows:
Description: This is a text description of the field that will show in the actual
title block. The text descriptions are fixed for the predefined field names. For
user-defined field names, the word "Custom" is used for the description.
137
Variable: This is a text field name where it is expected that the user will
supply a piece of text to fill in. Example #DESIGNED.
Value: This is the piece of text the user fills in for this field.
One Title: This places one title block per page. The alternative is one title block
per schematic.
Keep Aspect Ratio: This maintains the aspect ratio as you drag the title block to
stretch its size.
Border: This lets you pick the border color of objects like rectangles or circles,
and lines.
Fill : This lets you select the fill color of objects like rectangles, circles, or lines.
Predefined Text Variables List: This is a list of predefined variables whose val-
ues are these:
Default: This sets the title block properties for all of the objects in this page to
the values specified in the Default Properties For New Circuits dialog box un-
der the Options menu.
Set Default: This sets the values in the Default Properties For New Circuits
page to the values that are currently specified in this page.
Revert to Original Size: This restores the title block to the size specified in the
Title Block editor (same number of grids in width and length)
OK: This accepts any edits that have been made and exits the dialog box.
Cancel: This cancels any edits that have been made and exits the dialog box.
Help: This accesses the Help article for this dialog box.
139
The Help system
The Help system provides information on the product in several ways:
• New MC12 Features...: This shows a summary of the new MC12 features.
• Statistics (ALT + Z): This displays a list of statistics showing the key ID,
Micro-Cap version number and executable date. In an analysis it also shows
the setup and run time, the number of analog and digital nodes, the number
of data points calculated during the run, a list of the actual parts in the circuit
after macro and subcircuit expansion, and a list of the number of iterations
and solutions for the run.
• Check For Updates: This shows the latest version of Micro-Cap available
from the Spectrum web site and assists in downloading it.
• Spectrum Web Site: This brings up the Spectrum Software web site.
• Online Registration: This brings up the Micro-Cap registration form.
• Key ID: This displays the security key ID which you sometimes need when
upgrading the program or accessing technical support.
• Sample Circuits: This shows a list of the sample circuits and the features
they illustrate.
The manuals are in PDF format. You must have Adobe Acrobat to read them.
Here are some hints on using them:
• CTRL + 0: Fits the page within the window. This is probably the best
size for browsing.
• End: Takes you to the last page of the index. Index entries are hypertext
links. Clicking on any entry takes you to the referenced page.
• ALT + LEFT ARROW: Takes you back one step to the prior page. This
is handy when using the hypertext links. Use the keyboard arrow, not the
numeric keypad arrow. The right keyboard arrow takes you forward one
step.
• CTRL + F: The Find command lets you search for any text.
• About Micro-Cap: This option shows the software version number.
141
142 Chapter 2: The Circuit Editor