Micro-Cap 12: Electronic Circuit Analysis Program Reference Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 142

Micro-Cap 12

Electronic Circuit Analysis Program


Reference Manual

Copyright 1982-2018 by Spectrum Software


1021 South Wolfe Road
Sunnyvale, CA 94086
Phone: (408) 738-4387
FAX: (408) 738-4702
Internet:www.spectrum-soft.com
Support:[email protected]
Eleventh Edition
June 2018

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.

Software license notice


Your license agreement with Spectrum Software, which is included with
the product, describes the uses of the software which are permitted and the
uses which are prohibited. Any unauthorized duplication of Micro-Cap 12,
in whole or in part, in print, or in any other retrieval or storage system is
expressly forbidden.
Typographic conventions 16

Contents
Chapter 1 - Windows Basics 17
Introduction 18
Parts of a window 18
Basic mouse and keyboard techniques 21
Menus 22

Chapter 2 - The Circuit Editor 23


Circuit structure 24
Schematic objects 26
Schematic modes 27
Circuit editor 32
Selecting and deselecting objects 34
Creating a new circuit 36
Adding and editing components 38
The Attribute dialog box 40
Adding Wires to a schematic 46
Using the Bus 48
Adding and editing grid text 50
Formula text 54
Adding and editing graphic objects 61
Adding and editing flags 62
Moving schematic objects 62
Rotating schematic objects 62
Stepping schematic objects 63
Mirroring schematic objects 64
Deleting schematic objects 65
The Undo and Redo commands 65
Spreadsheets 56
Enabling / disabling schematic objects 66
Node number assignment 68
The clipboard 69
The clipboard list 70
Drag copying 71
The Info command 72
The Help command 72
The Digital Path commands 73
Navigating schematics 75
Global Settings 76


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

Chapter 3 - The Shape Editor 143


The Shape editor layout 144
The Object editor 151
The Block editor 153
The Shape library 155

Chapter 4 - The Component Editor 157


The Component editor layout 158
Adding components to the library 164
Adding subcircuits to the library 165
Using the Add Part wizard 168
Using the Import wizard 170
Adding SPICE Models from Manufacturers 172
Using Copy, Paste, and Replace 177
Making circuit files portable 178

Chapter 5 - The Package Editor 179


The Package editor layout 180
Adding basic packages to the library 183
Adding complex packages to the library 184

Chapter 6 - Transient Analysis 185


What happens in transient analysis 186
The Transient Analysis Limits dialog box 188

 
The Transient menu 195
Initialization 197
The State Variables editor 199
Using the P key 200
Numeric output 201
Operating Point Methods 203

Chapter 7 - AC Analysis 205


What happens in AC analysis 206
The AC Analysis Limits dialog box 208
The AC menu 215
Numeric output 216
Noise 218
AC analysis tips 219

Chapter 8 - DC Analysis 221


The DC Analysis Limits dialog box 222
The DC menu 228
Numeric output 229
Troubleshooting tips 230

Chapter 9 - Dynamic AC Analysis 231


What happens in Dynamic AC analysis 232
A sample of Dynamic AC analysis 235

Chapter 10 - Dynamic DC Analysis 239


What happens in Dynamic DC analysis 240
A sample of Dynamic DC analysis 243

Chapter 11 - Transfer Function Analysis 247


What happens  in transfer function analysis 248
The Transfer Function Analysis Limits dialog box 249
A sample of transfer function analysis 250

Chapter 12 - DC OP Worst Case Analysis 251


What happens in DC Operating Point Worst Case Analysis 252
The Worst Case Analysis dialog box 253


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

Chapter 14 - Stability Analysis 283


What happens in Stability Analysis 284
An example of Stability Analysis 285
How Stability Analysis works 287

Chapter 15 - Scope 289


Analysis plot modes 290
Panning the plot 292
Scaling the plot 293
Tagging the plot 294
Adding graphics to the plot 296
Scope menu 297
The Plot Properties dialog box 303
Cursor mode positioning 318
Waveform Buffer 320
Curve Fit 322
Measurements Window 325

Chapter 16 - Probe 329


How Probe works 330
Probe menu 331
Transient analysis variables 333
AC analysis variables 335
DC analysis variables 337
Probe analog variables 338
Probe regions 339

 
Probing a SPICE file 339
Editing the schematic in Probe 340
Probing macros and subcircuits 340

Chapter 17 - Stepping 341


How stepping works 342
What can be stepped? 342
The Stepping dialog box 343
Public vs. private libraries 346
Stepping summary 347

Chapter 18 - Optimizer 349


How the optimizer works 350
The Optimize dialog box 351
Optimizing low frequency gain 355
Optimizing matching networks 358
Curve fitting with the optimizer 361

Chapter 19 - Monte Carlo Analysis 365


How Monte Carlo works 366
Tolerancing symbolic parameters 370
Tolerancing passives and DC batteries 371
Tolerances and public vs. private libraries 373
Distributions 374
Monte Carlo menu 375
Options 376
The Histogram 379
Performance and measure functions 382

Chapter 20 - Worst Case Analysis 383


What happens in Worst Case analysis 384
A simple example of Worst Case analysis 385
Worst Case analysis using bias tolerances 390
Tolerance libraries 393
The right-click menu 394
RSS calculation procedure 396
Monte Carlo calculation procedure 398
EVA calculation procedure 399
Guidelines for using Worst Case analysis 400


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

Chapter 22 - Performance Functions 419


What are performance functions? 420
Performance functions defined 421
The Go To Function dialog box 425
Performance function plots 428

Chapter 23 - Measurement Functions 435


.Measure functions 436
.Measure library 437
.Measure (AVG, INTEG, MIN, MAX, PP, AND RMS) 440
.Measure (DERIV) 442
.Measure (TRIG,TARG) 443
.Measure (FIND, WHEN) 444
.Measure (PARAM) 445

Chapter 24 - 3D Graphs 447


How 3D plotting works 448
3D example 449
The Properties dialog box for 3D plots 452
Cursor mode in 3D 458
3D Performance or measure functions 459
Changing the plot orientation 461
Scaling in 3D 462

Chapter 25 - Macros 463


ABS 465
AM 466
AMP 467
BALUN 468

 
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

Chapter 26 - Analog Devices 523


References 524
Animated analog bar 528
Animated analog LED 529
Animated DC motor 530
Animated DPST, SPDT, and SPST switches 531
Animated meter 532
Animated relay 534
Animated traffic light  536
Animated digital switch 537
Animated digital LED 538
Animated seven segment display 539
Battery 540
Bipolar transistor (Standard Gummel Poon Level=1) 541
Bipolar transistor (Philips Mextram Level = 2 or 21) 547
Bipolar transistor (Philips Modella Level = 500 or 501) 552
Capacitor 556
Dependent sources (linear) 561
Dependent sources (SPICE E, F, G, H devices) 562
Diode 567
Diode (Philips JUNCAP and JUNCAP2) 571
Function sources 577
GaAsFET 582
IBIS 587
IGBT 588
Independent sources (Voltage Source and Current Source) 593

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

Chapter 27 - Digital Devices 767


The digital simulation engine 768
Digital nodes 768
Digital states 769
Timing models 772
Unspecified propagation delays 773
Unspecified timing constraints 774
Propagation delays 775
Digital delay ambiguity 777
Timing hazards 779

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

Chapter 28 - Libraries 881


The Shape Library 882
The Package Library 882
The Component Library 883
The Model Library 885
How models are accessed 886

Chapter 29 - Expressions 887


What are expressions? 888
Numbers 889
Symbolic variables 890

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

Chapter 30 - Command Statements 917


.AC 918
.ARRAY 919
.DC 922
.DEFINE 923
.ELIF  925
.ELSE 925
.END 926
.ENDIF 926
.END_MEASURE 926
.ENDS 927
.ENDSPICE 927
.FUNC 928
.HELP 928
.IC 928
.IF 929
.INCLUDE 930
.LIB 931
.MEASURE 932
.MACRO 932
.MODEL 933
.NODESET  936
.NOISE 936
.OP 937
.OPT[IONS] 937
.PARAM 938
.PARAMETERS 939
13
.PATH 939
.PLOT 940
.PRINT 940
.PSS 940
.RELTOL 941
.SENS 942
.SPICE 942
.STEP 943
.SUBCKT  944
.TEMP  946
.TF 946
.TIE 946
.TR 947
.TRAN  948
.WARNING 948
.WATCH 950
.WCASE 950
.BEGIN_MEASURE 921

Chapter 31 - The Model Program 951


How to start Model 951
The Model window 952
The Model tool bar 954
The Model menu 956
A bipolar transistor example 962
Optimizing subcircuits in the Model program 968
Diode graphs 974
Bipolar transistor graphs 975
JFET graphs 977
MOSFET graphs 978
Opamp graphs 980
Core graph 981
User Graphs 982
Ferrite Bead graph 983
NTC Thermistor graph 984

Chapter 32 - The IBIS Translator 985


What is IBIS? 986
The IBIS translator 987
An example of IBIS file translation 990

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

Chapter 34 - Convergence 1023


Convergence defined 1024
What causes convergence problems 1025
Convergence checklist  1026

Chapter 35 - Fourier Analysis 1031


How FFT functions work 1032
Fast Fourier Transform functions 1034
An FFT example 1040
The Fourier control panel 1045
The FFT window 1048

Chapter 36 - Periodic Steady State 1051


The need for Periodic Steady State 1052
Periodic Steady State sample circuits 1055
Periodic Steady State assumptions and limitations 1059

Appendix A - File types 1061


Appendix B - Model library files 1064
Appendix C - Sample circuit files 1069
Appendix D - Accelerator keys 1074
Index 1079

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:

Press HOME, then press ENTER.

2. Text that is to be typed by the user is denoted by the text enclosed in double
quotes. For example:

Type in the name "TTLINV".

3. Combinations of two keys are shown with the key symbols separated by a plus
sign. For example:

ALT + R

4. Option selection is shown hierarchically. For example this phrase:

Options / Preferences / Options / General / Sound

means the Sound item from the General section of the Options group in the
Preferences dialog box, accessed from the Options menu.

5. Square brackets are used to designate optional entries. For example:

[Low]

6. The characters "<" and ">" bracket required entries. For example:

<emitter_lead>

7. User entries are shown in italics. For example:

emitter_lead

8. The OR symbol ( | ) designates mutually exclusive alternatives. For


example, PUL | EXP | SIN means PUL or EXP or SIN.

16 
Chapter 1 Windows Basics

What's in this chapter


This chapter introduces and reviews the basics of working with Windows. It
describes the common Windows structures including menus, dialog boxes, text
boxes, list boxes, drop-down list boxes, option buttons, and check boxes. It also
covers basic mouse and keyboard handling techniques and describes the differ-
ence between selecting and choosing.

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

Horizontal scroll bar

Figure 1-1 The parts of a window

18 Chapter 1: Windows Basics


The various parts of a window and their purposes are as follows:

Control menu box


The Control menu box is located in the upper-left corner of the window. This
box is a standard feature of all Windows applications and is mainly used to con-
trol the Micro-Cap window size and location on the desktop. It lets you re-size,
move, maximize, minimize, and close the Micro-Cap window. The mouse can
also be used to perform these tasks by dragging.

Circuit control menu box


The Circuit control menu box is similar to the standard control-menu box except
that it controls a circuit window only. There can be many circuit windows open
simultaneously. This standard Windows structure is provided for management of
circuit windows, but there are easier ways to manipulate circuit windows. These
will be described in later chapters.

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.

Maximize / Restore button


The Restore button restores the windows prior size or maximizes the windows
size.

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

20 Chapter 1: Windows Basics


Basic mouse and keyboard techniques
This section explains the basic terms and techniques used to select and choose
items from windows, menus, list boxes, and dialog boxes. The definitions of the
more common terms are as follows:

This Term Means


Click To quickly press and release a mouse button.
Double-click To click a mouse button twice in rapid succession.
Drag To hold the mouse button while you move the mouse.
Point To move the mouse until the mouse pointer is at the
desired location on the screen.

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.

Ellipsis (... ) A dialog box appears revealing more choices to


be made before the command can be completed.

Check mark A check mark means the option is in effect.

A key combination The key combination is a shortcut for this item.

A triangle This indicates that a cascading menu appears


listing additional choices.

22 Chapter 1: Windows Basics


Chapter 2 The Circuit Editor

What's in this chapter


This chapter describes the Circuit editor, the foundation of the Micro-Cap user
interface. It provides access to all of the basic program functions, including cir-
cuit construction, analyses, and the various editors.

Features new in MC12

• Spreadsheet: A spreadsheet that can reference simulation variables was


added. It can be included as a schematic object.

• 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.

• Build command: The Build command feature has been expanded to


handle the .RELTOL, .TR, and .WARNING commands.

• Localize command: The Localize command feature has been expanded to


handle files that use the extensions USR, STM, ROM, RAM, S2P, PLAND,
PLOR, and PLNXORC. Files are localized by including them on schematic
text pages.

• 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:

• Schematic, a picture of the circuit topology.


• SPICE text file, a textual description of the circuit topology.
Schematics
Schematics are comprised of drawings and text. Drawings provide the circuit
description and text provides the modeling and analysis information required for
the analysis. Micro-Cap runs analyses from data contained in the schematic. It is
not necessary to convert it to a SPICE netlist first, although Micro-Cap can also
analyze SPICE netlists. Sometimes Micro-Cap also uses modeling information
from libraries referenced in the schematic.

Each schematic contains a drawing area and a text area.

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.

24 Chapter 2: The Circuit Editor


You can split the display to simultaneously show different parts of the drawing
and/or text areas by dragging the vertical or horizontal splitter bar towards the
middle of the window.

SPICE text files


SPICE netlists are standard SPICE text descriptions of a circuit, a subcircuit, or
a model statement. Micro-Cap generally follows the original Berkeley SPICE2G
format, with many PSpiceTM, SPICE3, and some HSPICETM extensions. Text files
are entered and edited in a text document similar to what a text editor or a word
processor creates. When you create a new SPICE text file, Micro-Cap opens a
text document and lets you edit it as desired. Only when you start an analysis
does Micro-Cap error check it.

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.

Direct SPICE netlist inclusion


The program includes a pair of commands, .SPICE and .ENDSPICE, which al-
lows the direct inclusion of SPICE coded circuitry within a schematic's text
pages. For example:

.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.

• Spreadsheets: One or more spreadsheets that can reference simulation values.


• Graphics: Graphical objects include lines, rectangles, ellipses, diamonds, arcs,
pies, brackets, and pictures. They are used for aesthetic or documentation pur-
poses and have no effect on the electrical behavior of the circuit.

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.

These are the only objects that can be placed in a schematic.

Text can be moved between a drawing page and any text page.

26 Chapter 2: The Circuit Editor


Schematic modes
The Schematic editor is a modal editor. That means the behavior of the mouse
when it is clicked or dragged in the schematic depends upon what mode it is in.
Schematic modes affect either the mouse behavior or the schematic display.

• 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:

• Editing the selected object (Requires a double click)


• Clearing the selected region (Deleting without copying to the clipboard)
• Cutting the selected region (Deleting with copying to the clipboard)
• Moving the selected region
• Rotating the selected region
• Stepping the selected region
• Mirroring the selected region
• Making a macro of the selected region
• Copying the selected region to the clipboard
• Making a BMP file of the selected region
• Drag copying the selected region
• Moving the selected object to front or back
• Shuttling the selected text object between the text and drawing areas
• Changing the selected object's color or font
• Defining the upper-left corner position of a subsequent paste operation
To select an object you must first be in Select mode. To enter Select mode do one
of the following:
• Click on the Select mode button or press CTRL + E.
• Press the SPACEBAR key. Press it again to restore the original mode.
• Press and hold the SHIFT key down. In this mode you can select objects or
a region, but you can't drag the mouse. When the key is released, the original
mode is restored.

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.

28 Chapter 2: The Circuit Editor


Component mode: This mode lets you add components to the schematic. The
component that gets added is the last one chosen.

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.

30 Chapter 2: The Circuit Editor


Cross-hair cursor: This mode adds a full-screen schematic cross-hair cursor. Its
principle use is in aligning components.

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:

Menus Title bar


Vertical splitter
Main tool bar
Circuit tool bar

Vertical scroll
Mouse info box bar control
Component panel

Page selector tabs


Page scroll bar control

Horizontal splitter Horizontal scroll bar control


Window tabs Status bar (showing component information)

Figure 2-1 The Schematic editor


The principal components of the editor are as follows:

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

32 Chapter 2: The Circuit Editor


to the circuit. The tool bar provides a quick way to access those options. Clicking
on a button will activate the desired option.

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.

To select or deselect a single object:


Press SHIFT and click on the object. The object's selection state is toggled. If
the object was formerly selected, it becomes deselected. If it was formerly
deselected, it becomes selected.

To select multiple contiguous objects:


Drag the mouse creating a region box. This selects all objects that originate
within the box.

To select or deselect multiple contiguous objects:


Press SHIFT and drag the mouse creating a region box. This toggles the
selection state of all objects originating within the box.

To select or deselect multiple non-contiguous objects:


Press and hold SHIFT while clicking on each individual object or dragging
on each group whose selection status you want to change. This toggles the
selection state of the object or group.

When would you want to deselect specific objects? Sometimes it is necessary


to select most but not all of a large group of contiguous objects. It is easier and
faster to drag select the entire group and then deselect one or two of them than to
individually select each of the desired objects.

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

34 Chapter 2: The Circuit Editor


on attribute text opens a local edit box at the text location and lets you edit it
there without using the Attribute dialog box.

To select all objects in the window, press CTRL + A. To deselect all objects, click
on any empty space in the window.

Rapid switching to/from Select mode:


In the course of building or editing a schematic, you will often need to switch
between modes, especially between Select mode and Component or Wire mode.
To make this process easier, several short term mode switchers are available:

• To temporarily suspend the current mode and enable Select mode,


press and hold the SHIFT key down. You can use this pseudo Select
mode for object selection only. You can't drag objects. When the SHIFT
key is released the former mode will be restored.

• To temporarily suspend the current mode and enable Select mode,


press and hold the CTRL key down. The mode will change to Select.
You can use the Select mode as needed. When the CTRL key is
released the former mode will be restored. Note that under this mode
you can't move objects with the mouse. CTRL + mouse drag is used to
drag copy an object.

• 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.

Pressing the SPACEBAR key is the easiest method of alternating


between Select and other modes.

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:

Figure 2-2 The New dialog box

This dialog box lets you create one of several file types:

• Schematic(.cir) These are text files that describe schematics.

• Macro(.mac) These are text files that describe macro schematics.

• Text(.txt) These are general text files.

36 Chapter 2: The Circuit Editor


• SPICE(.ckt) These are text files used for SPICE circuit netlists.

• 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.

• Worst Case Tolerance Library(*.tlib)


These are text library files for bias tolerances used in
the Worst Case feature.

• 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 Analog Library section contains pre-modeled analog components referenced


by part names similar to their commercial names. In this section, you'll find parts
like IRF510, 2N2222A, and 1N914. These parts have electrical attributes already
defined in subckts, macros, or model statements somewhere in one of the model
library files referenced by the master index file, ".LIB NOM.LIB", which MC12
automatically includes in every circuit file.

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.

38 Chapter 2: The Circuit Editor


The Digital Library section contains commercial digital components with part
names similar to their corresponding commercial part names. In this section,
you'll find parts like 7400, 7475, and 74LS381. These parts also have electrical
attributes defined in the model library files referenced by the file, NOM.LIB.

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.

To edit a component's attributes:


Click on the Select button in the Tool bar. Double-click on the part to invoke
the Attribute dialog box. Click on the attribute name that you want to edit, then
click in the Value field and type in any changes. You can also change the model
name by choosing a new model name from the Model list box.

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.

Show check boxes

Change button
Navigate buttons
Color buttons
Display controls
Plot selector
Attribute list box

Model list box

Command buttons

Enabled box
Columns
selector
Source of displayed File Link
model information

Edit area

Help bar

Figure 2-3 The Attribute dialog box

40 Chapter 2: The Circuit Editor


The attributes are shown in the Attribute list box. For an inductor, the attribute
and name are as shown in the table.

Attribute Name Attribute Value


PART L1
INDUCTANCE 10m
FLUX BLANK
FREQ BLANK
MODEL IND1
SMOKE BLANK
COST BLANK
POWER BLANK
PACKAGE BLANK
SHAPEGROUP Default

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:

FLUX is an optional flux expression that replaces the INDUCTANCE expression


in transient analysis.

FREQ is an optional expression that replaces the INDUCTANCE expression in


AC analysis.

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.

To edit a particular attribute value, select it by clicking on the attribute name in


the Attribute list box. Next, click in the Value field and edit it as desired.

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.

Display Controls: This lets you show or hide these items:

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.

Command buttons: These provide the following functions:

42 Chapter 2: The Circuit Editor


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.

Font: This lets you alter the font and style of the selected attribute.

Add: This adds a new 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.

Combinations: This finds the best series / parallel combination of standard


part values that approximates the RESISTANCE, CAPACITANCE, or IN-
DUCTANCE value. For example, a value of 1234567 ohms becomes

1.235MEG = 1.2MEG + (133K | 47.5K) (e=0.0035% n=3).

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.

This option is similar to the Fit to Standard Values command.

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.

Play: For WAV sources, this plays the WAV 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.

This option is similar to the Fit to Standard Values command.

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.

44 Chapter 2: The Circuit Editor


Help bar: This area shows helpful information for the item under the mouse.
Show Data on Exit: If enabled, this shows the source material for the part. This
usually means a .model statement.

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.

Several points are worth keeping in mind:

• The segment orientation of a two-segment wire can be changed by clicking


the right mouse button before the wire is completed (before the left mouse
button is released).

• Connections are indicated by a dot.

• 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.

46 Chapter 2: The Circuit Editor


• A wire that crosses another wire's end point or a component's lead dot will
connect to the wire or component lead.

• 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.

• Although wires are the principal method of interconnecting nodes, grid


text may also be used. Two nodes with the same piece of grid text placed on
them are automatically connected together. This feature is especially useful
in cases where you have many components sharing a common node, such as
analog VDD and ground nodes, or digital clock, preset, and clear nodes. In
the figure below, R1 and R2 are in parallel, because they are each connected
to a node named with the text ABC.

Naming is done by dropping a piece of text on a node or by double-clicking


on a wire and changing its node name. Both procedures name the node.

• 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

Figure 2-4 Typical bus connector

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:

Figure 2-5 The Bus dialog box

48 Chapter 2: The Circuit Editor


The dialog box has these features:

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:

A,B,C,D A four pin bus with pins labeled A, B, C, and D


A[1:4] A four pin bus with pins labeled A1, A2, A3, and A4
C[1:4,8,9] A six pin bus with pins labeled C1, C2, C3, C4, C8, and C9
0:7 An eight pin bus with pins labeled 0, 1, 2, 3, 4, 5, 6, and 7
[A,B][1,2] A four pin bus with pins labeled A1, A2, B1, and B2

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:

Straight: Wires emerge perpendicular to the connector.


Up: Wires slant in one direction.
Down: Wires slant in the opposite direction.

Color: This controls the connector color.

Pin Markers: This check box controls the display of pin markers.

Pin Names: This check box controls the display of pin names.

Enabled: This check box enables/disables the connector.

OK: This accepts the changes and exits the dialog box.

Cancel: This ignores the changes and exits the dialog box.

See ANIM3 for an example of how to use the bus in a circuit.

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.

To add grid text to a schematic:


First step: Click on the Text mode button in the Tool bar.

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:

Figure 2-6 The Text dialog box

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.

Apply: This applies the changes to the selected text.

Help: This accesses the Help system.

50 Chapter 2: The Circuit Editor


Page Tabs

Text: This is where you enter or edit the text.

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.

Instances X: This sets the number of rows of text.

Pitch X: This specifies the spacing in number of grids between


rows of text.

Instances Y: This sets the number of columns of text.

Pitch Y: This specifies the spacing in number of grids between


columns of text.

Stepping is used to name wires or nodes with grid text. For


example, if you wanted sixteen names A0, ... A15 vertically
arranged, you enter text of "A0", select Instances X = 1,
Instances Y = 16, and Pitch Y = 2 (grids).

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

Font list box: This selects the text font.

Size list box: This selects font size.

Selects bold font.

Selects italic font.

Selects underline font.

Selects strike through font.

51
For RTF, selects superscript font.

For RTF, selects subscript font.

Selects the font color.

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.

Pastes from the clipboard list.

Build command: Invokes the Command Builder to build a piece of


command text. This is useful for building complex command statements.
It handles these commands.

• .HELP
• .DEFINE
• .PARAMETERS
• .WARNING
• .MEASURE
• .RELTOL
• .TR
• .WARNING
It is invocable only when starting a piece of text or when editing an
existing command.

Selects and inserts unusual characters.

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.

52 Chapter 2: The Circuit Editor


Formula: Checking this tells the program that the text contains a
formula and that the expressions it contains are to be calculated.

Delimiter: This tells the program what character(s) are to be used to


define or delimit the embedded expressions. Although any characters
may be used, brackets [], or braces{} are recommended.

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.

To edit grid text:


First step: Click on the Select mode button in the Tool bar.

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

Formula text is designed to provide a convenient way to automatically compute


and display new design values from complicated formulas. For example, if you
change the value of C1 to 10nF, Micro-Cap prints a new resonant frequency as
follows:

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))

54 Chapter 2: The Circuit Editor


F0 could now be used in an expression or, in the AC analysis limits Frequency
Range field, or in a device attribute.

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)

The voltage gain of a transformer with a primary inductance of [L1] and a


secondary inductance of [L2] is [SQRT(L1/L2)]. The voltage gain is [1/N].

The last piece of text will actually appear as follows:

The voltage gain of a transformer with a primary inductance of 1u and a second-


ary inductance of 4u is 0.5. The voltage gain is 2.0.

In this example the delimiter characters are [ and ].

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".

Formulas begin with an "=". For example

= SIN(2)

prints the value of sin(2)

=D1

prints the value of the cell at column D row 1.


56 Chapter 2: The Circuit Editor
Simulation Values: You can use simulation values in the spreadsheet. For
example:

=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

Then "=w1" will print 6.28Meg.

Note that if a conflict arises between a .defined variable and a cell variable
name, then the .defined variable takes precedence.

For example, if you have this .define in the schematic:

.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)
...

Example 2: Power dissipation

=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.

Format Cells: This lets you control several items:

Horizontal Alignment: This sets the horizontal text alignment.

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.

Adding a spreadsheet to a circuit: You add a spreadsheet by first getting into


Spreadsheet mode and you do that by:

1) Clicking on the Spreadsheet icon.

2) Selecting Spreadsheet mode from Options / Mode / Spreadsheet

3) Selecting Spreadsheet mode from the Graphics menu invoked by the


Graphics icon.

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.

60 Chapter 2: The Circuit Editor


Adding and editing graphic objects

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.

Figure 2-7 A circuit with two WMF picture files

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.

Moving schematic objects

First step: Click on the Select mode button in the Tool bar.

Second step: Select the object or group of objects.

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.

Rotating schematic objects


To rotate a single object, click on it and hold the left mouse button down, then
click on the right mouse button. Each click rotates the part 90 degrees. CTRL+R
also rotates a selected object.

To rotate a group of objects follow the following procedure:

First step: Click on the Select mode button in the Tool bar.

Second step: Select the object or group of objects.

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.

62 Chapter 2: The Circuit Editor


Stepping schematic objects
Stepping lets you define a rectangular region and then duplicate its contents a
specified number of times. It is called stepping after the photolithographic term
'step and repeat' used in the semiconductor industry. This feature is most useful
for creating highly repetitive circuit structures such as PLA, RAM, or ROM. The
stepping 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 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.

Figure 2-8 The Step 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.

Figure 2-9 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.

64 Chapter 2: The Circuit Editor


Deleting schematic objects

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.

The Undo and Redo commands


The Undo command undoes the effect of an operation. It is activated by pressing
CTRL + Z, by clicking on the Undo button , or by selecting the Undo item
from the Edit menu. Undo is available for most edits to text fields, schematics,
shapes, and analysis plot objects. Changes available for undoing include editing,
deleting, moving, rotating, reflecting, and stepping. Text edits are not revers-
ible after the text cursor has been moved to another field. If a command is not
reversible, you can still reverse its effects by saving the file prior to using the
command, and then using the Revert option from the File menu to load the old
version of the file stored on disk.

There is also a Redo command. It is activated by pressing CTRL + Y, by clicking


on the Redo button , or by selecting the Redo item from the Edit menu. It is
the complement of Undo.

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.

Here is how you enable or disable schematic objects:

First step: Click on the Select mode button in the Tool bar.

Second step: Select the object or group of objects.

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:

Regions enabled with an expression:


You can make the enablement of a region dependent upon expressions involving
symbolic variables (those created with a .DEFINE or a .PARAM statement). This
lets you switch blocks of circuitry back and forth by changing a single parameter.
Use the Region Enable mode, at Options / Mode / Region Enable, or click on
the Region Enable tool bar button to define a region and then its enabling
expression. To change the expression double-click on the expression text within
the Region Enable box.

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.

66 Chapter 2: The Circuit Editor


Regions enabled with a check box:
If you click the Check box in the Region Enable dialog box, then the region's
objects are enabled or disabled by clicking on the check that appears in the box.
Enabling the Check mode disables the Expression mode.

Regions enabled with a group name:


If you click the Check box in the Region Enable dialog box and specify a name
in the Group field, then the region's objects are enabled or disabled by clicking
on the button that appears in the box. Only one named region can be enabled at
a time. Clicking on the button disables all other regions using the same group
name. You can have multiple groups of the same or different names.

This circuit, called Region_Enable1, is included on the CD. It demonstrates the


three region enabling modes.

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:

1. Ground is node number 0, but its node number is never displayed.

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.

68 Chapter 2: The Circuit Editor


The clipboard
The clipboard is a temporary storage area that is used to save schematic or text
fragments, as a prelude to pasting them to a new location. It is an invaluable tool
for editing schematics or text, and can save considerable time. The clipboard
commands are as follows:

Command Shortcut key Effect


Clear DELETE Deletes the selected object without copying
to the clipboard.

Cut CTRL + X Deletes the selected object and copies it to


the clipboard.

Copy CTRL + C Copies the selected object to the clipboard.


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.

Here is what a typical Clipboard List looks like:

Figure 2-10 The Clipboard List dialog box

The list is best used to save frequently used items like circuit fragments, analysis
limits, or text.

70 Chapter 2: The Circuit Editor


Drag copying
Copy and paste works well when you want to duplicate a part of a circuit, but
there is another, often easier, option called drag copying. It works as follows:

• Select a circuit object or region to be duplicated.


• Press and hold the CTRL key down.
• Drag on any item in the selected area.

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 can be used on any schematic object, whether it is a component,


wire, graphics object, spreadsheet, flag, or piece of grid text.

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:

1. Enter Component mode.


2. Select Resistor.
3. Click in the schematic.
4. Enter the resistor RESISTANCE and (sometimes) MODEL attributes.

The drag method uses one step:

1. CTRL + drag a 10K resistor to the new location.

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.

Second step: Click on the command or component.

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.

The Help command


In addition to the general Help command, there is a component specific Help
mode. Here is how it works:

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.

72 Chapter 2: The Circuit Editor


The Digital Path commands
One of the most important properties of digital circuits is path delay. Path delay is
how long a signal takes to propagate through each of the many possible paths in a
circuit. Micro-Cap provides several related commands for analyzing and display-
ing these paths. These commands do three things:

• Identify and list the gates involved in the paths.

• Show the delay of each path, calculated from the individual delays of the
gates in the path list.

• Graphically show selected paths on the schematic by highlighting the


gates in the selected path.

There are three digital path commands:

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.

The procedure to use these commands is as follows:

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:

Figure 2-12 The Digital Path dialog box


Scroll through the list and click on a path and Micro-Cap will redraw the sche-
matic and highlight the path. You can use the DOWN ARROW key to trace each
path in the list from top to bottom.

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.

74 Chapter 2: The Circuit Editor


Navigating schematics
Navigating means being able to quickly display the part of the schematic you are
interested in. There are several methods to accomplish this:

Schematic scrolling: Scroll the schematic using the vertical or horizontal


scroll bars. This is the conventional method. It is slow but sure.

Scaling: Use the Zoom-Out or Zoom-In buttons in the Tool bar


to resize the schematic and get your bearing.

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:

ABSTOL: Absolute current tolerance. This venerable SPICE parameter


specifies the absolute tolerance to be added to the relative current tolerance.
Together, their sum must exceed the difference in successive solution values
for each current in the circuit to achieve convergence at a particular solution
point. Increasing ABSTOL often helps to converge high current devices.

CHGTOL: Absolute charge tolerance. This parameter is like ABSTOL but


applies only to charge variables.

CSHUNT: If nonzero, a capacitor of this value is added from each node to


ground as an aide to transient convergence.

DEFAD: MOSFET default drain area in sq-m.

DEFAS: MOSFET default source area in sq-m.

DEFL: MOSFET default channel length in m.

DEFNRD: MOSFET default number of drain squares.

DEFNRS: MOSFET default number of source squares.

DEFPD: MOSFET default drain periphery in m.

DEFPS: MOSFET default source periphery in m.

DEFW: MOSFET default channel width in m.

DIGDRVF: Minimum drive (forcing) resistance for digital IO models.

DIGDRVZ: Maximum drive (high impedance) resistance for digital models.

DIGERRDEFAULT: Default maximum error message limit for individual


digital constraint devices.

76 Chapter 2: The Circuit Editor


DIGERRLIMIT: Default maximum error message limit for all digital
devices during each analysis run.

DIGFREQ: The minimum digital time step is 1 / DIGFREQ.

DIGINITSTATE: Initial state of flip-flops and latches: 0=clear, 1=set, 2=X.

DIGIOLVL: Default digital IO level, 1 to 4. Specifies one of four DtoA


and AtoD interface circuits.

DIGMNTYMX: Specifies the default digital delay: 1=Min, 2=Typical,


3=Max, 4=Min/Max.

DIGMNTYSCALE: Specifies scale factor used to calculate unspecified


minimum delays from specified typical delays.

DIGOVRDRV: Minimum ratio of drive resistances for one gate to overdrive


another driving the same node.

DIGTYMXSCALE: Specifies scale factor used to calculate unspecified


maximum delays from specified typical delays.

DIODE_MAX_IS: Clips the temperature adjusted diode parameter IS at the


specified value when the N parameter in the diode is below .1.

GMIN: Specifies the minimum branch conductance.

INTERPOLATION_ORDER: Specifies the interpolation order used in


FFTs in transient and Harmonic and Intermodulation distortion analysis.

ITL1: Operating point iteration limit before supply relaxation is attempted.

ITL2: DC transfer curve iteration limit for each point of the DC sweep.

ITL4: Transient analysis iteration limit for each time point.

LONE: This is the value produced by a logical expression when the


expression is TRUE.

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.

LZERO: This is the value produced by a logical expression when the


expression is FALSE.

PERFORM_M: This is the number of data points on each side of a data


point that must satisfy a performance function search criteria before the data
point is accepted. It is used to minimize the effect of noisy data.

PIVREL: Minimum relative value required of a pivot in the matrix solver.

PIVTOL: Minimum absolute value required of a pivot in the matrix solver.

RELTOL: This is the relative voltage and current tolerance. Successive


solution values for each iterated voltage or current variable in the circuit must
be less than the sum of the relative and absolute tolerances to achieve
convergence at a solution point. Increasing or decreasing RELTOL is
occasionally required to converge difficult circuits.

RMIN: This is the minimum absolute value of the resistance of a resistor or


an active device lead resistance, (e.g. BJT RB, RE, and RC).

RP_FOR_ISOURCE: If nonzero, a resistor of this value is added across all


current sources.

RSHUNT: If nonzero, a resistor of this value is added from each node to


ground as an aide to DC operating point and possibly transient convergence.

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.

78 Chapter 2: The Circuit Editor


TNOM: Default model parameter measurement and analysis temperature.

TRTOL: This is the amount by which the standard LTE formulas are
presumed to overestimate the true error.

VNTOL: Absolute voltage tolerance. This parameter specifies the absolute


voltage tolerance to be added to the relative voltage tolerance. Together,
their sum must exceed the difference in successive solution values for each
iterated voltage in the circuit to achieve convergence at a particular solution
point. Increasing VNTOL is useful in converging high voltage devices.

WIDTH: Controls output column width.

Check Box Options:

NOOUTMSG: This disables the creation of output warning messages.

NUMERIC_DERIVATIVE: If enabled, this flag causes Micro-Cap to use


numeric derivatives in lieu of algebraic formulas for function sources.

PRIVATEANALOG: If enabled, all analog devices have private model


libraries. A device can have a private copy of its model library or a public
copy. If the copy is private, alterations made to the model values by stepping,
optimization, or Monte Carlo features affect only the one device. If the copy
is public, it will be shared by all analog parts with the same model name and
changes made to the model values by the stepping or Monte Carlo features
affect all devices which share the copy. The presence of a DEV tolerance in
a model statement forces a private copy, regardless of the state of the
PRIVATEANALOG flag. The default value for this option is enabled.

PRIVATEDIGITAL: If enabled, all digital devices have private model


libraries. A device can have a private copy of its model library or a public
copy. If the copy is private, alterations made to the model values by stepping,
optimization, or Monte Carlo features affect only the one device. If the copy
is public, it will be shared by all digital parts with the same model name and
changes made to the model values by the stepping or Monte Carlo features
affect all devices which share the copy. The presence of a DEV tolerance in
a model statement forces a private copy, regardless of the state of the
PRIVATEDIGITAL flag. The default value for this option is disabled.

79
TRYTOCOMPACT: If enabled, this flag causes the program to compact the
past history of lossy transmission line input voltages and currents.

PATH_TO_GROUND: If enabled, this option causes Micro-Cap to do the


path to ground check before running an analysis. All nodes must have a DC
path to ground in order to be solvable. If such nodes are found, Micro-Cap
can optionally add a Gmin conductance from the node to ground to resolve
the problem.

VOLTAGE_LOOP_CHECK: This option causes Micro-Cap to do a check


to ensure that there are no loops containing only voltage sources. The circuit
must have no such loops in order to be solvable, but the check can usually be
done just once and then avoided to save analysis setup time. This time is
usually only a concern with very large circuits.

FLOATING_NODES_CHECK: This option causes Micro-Cap to do a


check to ensure that there are no nodes having only one connection. Since the
presence of such nodes poses no problem for Micro-Cap, it is recommended
that this option be disabled, unless you are creating a circuit that you plan to
port (via the translate to SPICE command) to another simulator that does not
handle such nodes and you want to check for them.

Method Options:

EULER: Selects the Backward Euler integration method. This is mostly


for academic investigations and is rarely used for practical simulations,
mainly because the other two methods are more accurate.

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.

TRAPEZOIDAL: Selects the trapezoidal integration method. This is the


best overall integration method.

80 Chapter 2: The Circuit Editor


The File menu
The File menu provides commands for the management of schematic circuit files,
SPICE circuit files, document text circuit files, and model library files.

• 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

The Path dialog box provides these options:



Data: This field specifies the DATA path. This path is used mainly for
circuits, source data files, and output files.

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.

List box: This field lets you select a path set.

82 Chapter 2: The Circuit Editor


Add: Creates a new path name for the set of displayed paths.

Update: Updates selected path name with the displayed paths.

Delete: This deletes the selected path set name.

File Dialog Initial Path: This group lets you decide what folder the File
Open dialog box uses for its initial display.

Use Defined Path: This employs the path fields.

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.

Look in Subfolders: This option causes the program to search in any


subfolders within the specified paths.

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.

Edit: This lets you edit selected user paths.

Delete: This lets you delete selected user paths.

OK: This accepts changes and exits the dialog box.

Cancel: This ignores changes and exits the dialog box.

.PATH: This adds new or replaces existing .PATH commands in the


top, or displayed circuit.

Help: This explains how to use the dialog box.


83
• Cleanup: This lets you remove clutter by deleting many working files
created by Micro-Cap but often of secondary importance. The most common
files that need frequent deleting are the numeric output files (*.TNO, *.ANO,
and *.DNO) and the probe data files (*.TSA, *.ASA, and *.DSA).

• 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.

• SPICE Text File to Binary Library: This command translates a


SPICE text file, FILE.LIB, containing model statements, into a binary
Micro-Cap library parameter file, FILE.LBR.

• Schematic to SPICE Text File: This command creates a SPICE
netlist from the active schematic. Any or all analyses may be specified
and several types of SPICE formats may be specified.

• Schematic to Printed Circuit Board: These commands create


netlist files to be used as input to Protel, Accel, OrCad, or PADS.

• Schematic to Old Version: This translates the current schematic file to


older formats. For example, if you want to simulate a circuit created with
MC5 through MC10, you would use this command. MC12 can read any
of the older formats. Saving a file in MC5 format, and then reading it
back with MC12 will lose some of the MC12 options in the original file.

• Bill of Materials: This command creates a bill of materials for the


schematic listing part name, type, value, quantity, and other attributes.
It lets you format and arrange the order of the items that are to be printed.

• Model to SPICE File: This option converts MODEL program data


files into SPICE style model statements in a SPICE text file.

• 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.

• Revert: (CTRL+Alt+R) This command restores the file in the active


window to the one currently on disk.

• 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.

• Close All: This command closes all active files.


• Print Preview (Ctrl+Alt+P): This previews what the printed schematic,
analysis plot, 3D plot, performance plot, or Monte Carlo plot will look like
with current print options. It also lets you select, move, and resize the
schematic and plot.

• Print: (CTRL+P) This command prints a copy of the document shown in


Print Preview in accordance with the instructions in Print Setup.

• 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 .

Figure 2-13 The Recent Files dialog box

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.

• Variablize Paths. This shortens the path by using a variable name


instead of the full path name. E.g. <Data> rather than c:\mc12\data.

• Don't Show Paths. This shows only the file name.


• Exit: (ALT+F4) This exits the program.

86 Chapter 2: The Circuit Editor


The Edit menu
This menu provides the following options. Equivalent tool bar buttons appear
next to the commands below.

• 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.

• Redo: (CTRL + Y) Redo operates in the opposite direction of Undo. It


restores the prior circuit state. Like Undo, it can redo the last N operations
that change a circuit file.

• Cut: (CTRL + X) This command deletes the selected objects and copies
them to the clipboard. Objects include text field text and schematic objects.

• Copy: (CTRL + C) This command copies selected objects to the


clipboard. Objects include text from text fields and schematic objects.

• Paste: (CTRL + V) This command copies the contents of the clipboard


starting at the current cursor position. If a group of characters in a text field
is currently selected at the time of the Paste operation, they are replaced with
the text in the clipboard. If the front window is a schematic, the paste is done
from the last point in the schematic where the mouse was clicked.

• Paste Image: (Ctrl+Shift+Alt+V) This pastes the clipboard image to the


schematic at the location of the last left-click of the mouse.

• Clear: (DELETE) This deletes the selected items without copying them to
the clipboard. This command deletes selected wires from their end points.

• Clear Cut Wire: (CTRL + DELETE) This command deletes selected


wires by cutting them exactly at the sides of the select box.

• 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 /

Mode, or by clicking on the graphic icon. Select Picture, then drag or


click in the schematic and Micro-Cap prompts for the picture file name.

• 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.

• Disable: This disables the selected circuit region.


• Add Schematic Page: This adds a new schematic page to the circuit.
• Add Text Page: This adds a new text page to the circuit.
• Localize File to Pages: This copies a selected data file to a text page in the
circuit. The file is usually a source file like *.USR or *.WAV.

• Delete Page: This deletes one or more schematic or text pages.


• Add Macro Section: This adds a new macro section to the schematic.

88 Chapter 2: The Circuit Editor


• Localize...: This localizes circuit model data by copying macros,
subckts, and model statements from the libraries to the circuit. It is a handy
way to embed model information in the file prior to sending the circuit to a
colleague who may not have your models. It can also serve as a refresh step,
restoring model information from the master libraries in case you have edited
the models and want to restore them.

• Build Command: This accesses the Command Builder dialog box.


• Box: These commands affect objects enclosed in the selected "box" region.
• Step Box: This steps all objects within the selected region vertically or
horizontally (or both) a specified number of times.

• Mirror Box: This creates a horizontal or vertical mirror image of the


objects enclosed in a selected region.

• Rotate: (CTRL + R) This performs a counterclockwise rotation of the


objects in a selected region.

• Flip X: This flips the objects in a selected region about the X-axis. The
X-axis is defined as the horizontal line that bisects the selected region.

• Flip Y: This command flips the objects in a selected region about a Y-


axis. The Y-axis is the vertical line that bisects the selected region.

• Make Macro: (CTRL + M) This makes a macro from the circuitry


inside of the current box region. It gathers it into a new circuit, labels the
pin names, saves the macro under a name you choose, records an entry
in the macro components library file, MACRO.CMP, and replaces the
circuitry within the box region with an adjustable symbol representing
the circuitry. After the macro command, the circuit will simulate just as
before, but the schematic will have less clutter.

• Change: (Ctrl+Shift+A)These options let you change several attribute


features:

• 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.

Apply Display Properties: This command copies the display properties


of a selected part to all other parts with the same component name. It
could be used, for example, to make all resistors blue and use Arial 12
point font for the RESISTANCE attribute and Courier 14 point font for
the PART attribute. To apply it, edit a part to appear the way you like it,
then use this command to make all other similar parts appear the same.

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.

Rename Components: This renames all parts using standard naming


conventions and reorders the parts to make the node numbers flow from
left to right and top to bottom. It updates the part names in analysis plot
expressions, so R(RX) changes to R(R5) if the part name is changed
from RX to R5. It does not update node numbers in analysis expressions,
however, so these must be changed manually.

Rename Defines: This command renames all .defined symbolic names


where conflicts exist between the symbol name and predefined names.

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.

Fit to Standard Values: (Ctrl+Shift+S) This fits all of the resistors,


capacitors, and inductors in the circuit to a single standard value or to a
series / parallel combination of standard values. The dialog box looks
like the next figure.

90 Chapter 2: The Circuit Editor


Figure 2-13 The Fit to Standard Values dialog box

This dialog box provides several options:

Combinations: This finds the best series / parallel combination


of standard part values that approximates the resistance,
capacitance, and inductance values. For example, a capacitance
of 50.45pF becomes:

50.435p = (120p+87p) (e=-0.02973% n=2)

The closest value is achieved with a 120pF capacitor in series


with an 87pF capacitor. The resulting value is 50.435pF, which is
within 0.02973% of the original value. New values are assigned |
to the RESISTANCE, CAPACITANCE, or INDUCTANCE, and
COMBINATION is set to the construction formula. Its syntax is:

v1 + v2 means the series combination of v1 and v2


v1 | v2 means the parallel combination of v1 and v2
v1 + (v2 | v3) means the series combination of v1 and the
parallel combination of v2 and v3.
(v1 + v2 ) | (v3 + v4) means the series combination of v1 and v2
in parallel with the series combination of v3 and v4.

Single Part: This finds the closest single part value for
RESISTANCE, CAPACITANCE, or INDUCTANCE.

The Create Report option places a summary of the choices made


in a schematic page called Standard Values. The part files to use,
maximum error, and maximum series, parallel, and total parts to
use are set at Options / Preferences / Combinations.

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.

Figure 2-14 The Find dialog box

• Bring to Front: A click on a stack of overlapping objects selects the front


object in the stack. This command makes the selected object the front object.

• Send to Back: This command makes the selected object the back object.
• Next Object (CTRL + Tab): This selects the next object in a stack.

92 Chapter 2: The Circuit Editor


• Go To Flag: This dialog box lets you reposition the display on a flag.
Select a flag, click on the OK button and the program redraws the schematic,
with the selected flag at the center of the display.

• 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.

Figure 2-15 The Find In Files dialog box


• Repeat Last Find: (F3) This command repeats the search and finds the
next object in the circuit that matches the search criteria.

• 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.

94 Chapter 2: The Circuit Editor


The Component menu
This hierarchical menu shows the contents of the Component library. The library
was created and can be edited by the Component editor, although most users will
not need to do much editing. One part of the menu looks like this:

Figure 2-16 The Component menu

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.

Find Component: (CTRL + SHIFT + F) The Find Component command lets


you search the Component library for a part by its name, shape, definition, or
memo field. It looks like this:

Figure 2-17 The Find Component dialog box


To select a component for placement, use the cursor keys or click the mouse on
one of the parts on the Component menu items. When you select a component,
Micro-Cap automatically changes the tool mode to Component. To actually place
the component, click the left mouse button in the schematic, or click and drag the
component to where you want it to be placed. To rotate the component, click the
right button before the left button is released.

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.

• Maximize: This maximizes a selected window or circuit window icon.


• Arrange Icons: This neatly arranges any minimized circuit window icons.
• Maximize Over Multiple Monitors: This maximizes the selected
window and spreads it out over two or more monitors. This is handy when
you have two monitors with the same resolution and the same pixel count.
The Tile Vertical or Tile Horizontal command then places the schematic on
one monitor and the analysis window on another.

• Zoom-In: (CTRL + numeric keypad + ) If the active circuit window is


a schematic, this command magnifies the schematic. This command affects
only the display, not the printed size. If the active circuit window is a text
window, this command draws the window using the next largest font size.

• Zoom-Out: (CTRL + numeric keypad - ) If the active circuit window


is a schematic, this command shrinks it. The command affects only the
display, not the printed size. If the active circuit window is a text window,
this command redraws the window using the next smallest font size.

• 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.

98 Chapter 2: The Circuit Editor


• Split Horizontal: This horizontally splits the front schematic window into
two panes for simultaneous viewing of different parts of the schematic.

• Split Vertical: This vertically splits the front schematic window into two
panes for simultaneous viewing of different parts of the schematic.

• Space Splitters Evenly: This arranges any active splits evenly.


• Remove Splitters: This removes any split panes in the window.
• Component Editor: This accesses the Component editor.
• Shape Editor: This accesses the Shape editor.
• Package Editor: This accesses the Package editor, which manages the
information needed to generate netlists to popular PCB programs.

• Title Block Editor: This accesses the Title Block editor.


• Calculator: This invokes the Calculator window. It lets you type in
expressions and it calculates the result. You can use circuit variables if you
are in an analysis mode. It can even do symbolic derivatives. Here are some
sample expressions:

(1+2*j)*(1+2*j)....complex product returns -3 + 4*j



VBE(Q1)*IB(Q1) + VCE(Q1)*IC(Q1)....power in a BJT

SERIES(N,0,25,1/FACT(N))...Evaluates the first 26 terms of 1/FACT(N).

The derivative of X^X returns X*X^(X-1)+X^X*LN(X).

• Check Model Library Parameters: This checks the model parameters


of parts in the Model library against the limits set in the Model Parameter
Limits Editor. The check is only done for parts that are implemented from
basic model primitives such as NPNs, NMOS, JFETs, diodes, etc. Subckt and
macro-based parts are not checked.

• 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.

• Component: (CTRL + D) This mode lets you add a component to the


schematic. Invoke this mode by clicking on the Component button, typ-
ing CTRL + D, or selecting this menu item.

• 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.

• WireD: This mode is used to draw diagonal wires in the schematic.


• Bus: This mode is used to add Bus connectors to the schematic.

100 Chapter 2: The Circuit Editor


• Check: This lets you create a Check box variable. These variables have
only two states; 1 if their box is checked and 0 if not.

• 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.

• Closed Polygon: This command lets you place a closed polygon in a


schematic or an analysis plot. In an analysis the polygon is intended for
use in defining valid specification ranges. After rough drawing a polygon

Figure 2-19 The Polygon dialog box

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.

If you double-click on either polygon type, you see this display:


This dialog lets you choose the Border and Fill colors:

• None: This produces a clear fill.


• Solid: This produces a solid fill using Color 1.
• Gradient: This produces a gradient from Color 1 to Color 2 fill.
• Pattern: This produces a patterned fill of the selected pattern.
101
• Picture: This fills the space with a selected picture.
• Browse: This lets you select the picture file.
• Fit to size: This fits the picture within the polygon.
• Tile: This tiles the picture within the polygon.
• Center: This centers the picture within the polygon.
• Points: This lets you edit the numerical coordinates of the polygon.
• Left Brace: This mode is used to place a left brace graphical object.
• Right Brace: This mode is used to place a size right brace.
• Brace Pair: This mode is used to place a pair of braces.

• 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.

• Spreadsheet: This mode lets you place spreadsheets in the schematic.


• Picture: This mode lets you place picture files in the schematic.

• Scale: (F7) This command puts the analysis plot in Scale mode.
• Cursor: (F8) This command puts the analysis plot in Cursor mode.
• Point Tag: This mode lets you place a point tag on a plot. A point tag
labels the X and Y values of a single data point on a waveform.

• 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.

• Function Tag: This mode lets you place a performance or measure


function tag on an analysis plot. The tag calculates the function each time
the analysis is run and then labels the tag with the function value.

102 Chapter 2: The Circuit Editor


• Help: (CTRL + H) This command invokes the component help mode.
This mode lets you click the mouse on a schematic component to see its
parameter and model syntax.

• 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.

• Probe: (SPACEBAR) Since you can edit schematics while probing,


this sets the mouse behavior to probing as opposed to editing.

• Rubberbanding (SHIFT + CTRL + R): If enabled, this option causes


drag operations to extend the circuit wires to maintain node connections.
When disabled, drag operations sever selected wires at their endpoints
and drag them without changing their shape or length.

• View: These options determine what will be drawn on the schematic.


• Attribute Text: If checked, this shows component attribute text.

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.

• Pin Connections: This option displays a dot at the location of each


pin. This helps you see and check the connection points between parts.

• No Grid: This displays no schematic grid.


• Grid: This displays a standard grid without bold grid points.

• Grid Bold 5: This shows a fine schematic grid bolding every 5'th point.
• Grid Bold 6: This displays a standard schematic grid with every 6'th
grid point in bold. 6 is the standard grid spacing of simple parts.

• 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

104 Chapter 2: The Circuit Editor


they are enabled from Properties (F10) / View / Calculate.

• Last Value: This displays the last current, voltage, or power.


• RMS Value: This displays the RMS current, voltage, or power.
• Average Value: This displays the average current, voltage, or power.
• Peak Value: This displays the peak current, voltage, or power.
• Cross-hair Cursor: This option adds a cross-hair cursor.
• Border: This option adds a border to every page in the schematic.
• Border One: This option adds a single border to the schematic.
• Title: This option displays the title block if one has been added.
• Show All Paths: This command shows all digital paths and their delays.
Selected paths are highlighted on the schematic. It is an immediate command
as opposed to the Point to End Paths and Point to Point Paths modes, which
require mouse clicks to specify path endpoints before a path list appears.

• Preferences: (CTRL + SHIFT +P) This accesses the Preferences


dialog box, where many user preferences are selected. These include:

• 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.

• Component Menu Shape Display: This option shows the shape


as different components are selected from the Component menu.

• 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.

• Use Bitmaps in Menus: This option enables or disables the use


of bitmap icons on the menus.

• Auto Load Last Files: This automatically loads the specified
number of recently opened files

• Sort Model Parameters: This option alphanumerically sorts


model parameters in the Attribute dialog box, the numeric output,
and the Model Parameters Limits editor.

• Bold Group Names: This option bolds the group names in the
Component menu and panel hierarchical display.

• Large Tool Bar: This enables large tool bar icons.


• WMF / EMF Transparent: Places transparent graphics images.
• User Name: This lets you edit the user name.
• Company Name: This lets you edit the company name.
• Component Menu Column Height: This sets the number of
components in a single column of part names in the Component

106 Chapter 2: The Circuit Editor


menu. If the default value of 0 is used, the program determines an
optimal height.

• 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.

• Add DC Path to Ground: This option automatically adds a


R_NODE_GND resistor from node to ground where there is no
resistive path from the node to ground.

• Inertial Cancellation: If enabled, this option causes the logic


simulator to employ inertial cancellation, which cancels logic pulses
whose durations are shorter than the device delay. If this option is
disabled, the simulator does not cancel short pulses.

• 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.

• Analysis Progress Bar: If enabled, this option displays a progress


bar during a simulation run in the Status Bar area, if the Status Bar
feature is enabled on the Options menu.

• Macro Drill Down: Prior to MC9, probing a macro produced a list


of macro nodes and parts, which could be selected for display. This
option enables direct probing of macro schematics.

• Convergence Assist: This enables Convergence Assist which


optimizes Global Settings parameters to help a circuit converge. It
may modify RELTOL, ABSTOL, VNTOL, ITL4, ITL2, GMIN,
METHOD, and others to achieve convergence. If it succeeds, it adds
an .OPTIONS statement to the circuit with the modified parameters.
107
• Dynamic Auto Run: Micro-Cap has a mode called Dynamic
Analysis. In this mode, you simultaneously see and edit the
schematic and view the analysis plot. The plot is dynamically
updated after every edit is made to the schematic if this option is
enabled. If it is disabled, the analysis and plot are updated only when
you expressly ask for it by clicking the Run button or pressing F2.

• Derivative Threshold: Function sources using expressions need


partial derivatives. The expressions for these derivatives are created
automatically. Complex expressions can lead to even more complex
derivatives, which can bog down the analysis. If the symbol length of
the derivative expression exceeds this threshold, then a numeric
derivative is used instead.

• 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.

• Component Cursor: If enabled, this option replaces the mouse


arrow pointer with the shape of the currently selected component
when Component mode is active.

• Copy / Paste Model Information: This option copies and pastes


any associated .model or .define text statements along with the part.
This is handy when pasting localized models between circuits.

• Node Snap: (Ctrl+Alt+N) This flag compels components, wires,


and text to originate on a node if a node's pin connection dot is
within one grid of the object being placed or moved.

• Rubberbanding: This enables / disables rubberbanding.

108 Chapter 2: The Circuit Editor


• Block Select Display Mode: This option enables the block select
mode, which shows the background of selected objects in the Block
Select color. This makes selected objects easier to spot, especially
when there is only one object. If disabled, the selected object is
drawn in the standard foreground Select color.

• Auto Show Model: This mode causes model statements added to


the schematic text area to automatically split the circuit window and
show the newly added model statement.

• Node Highlight: This option automatically highlights the entire


node as the mouse cursor passes near the node.

• Automatically Add Opamp Power Supplies: This automatically


adds and connects the VCC and VEE power supplies for level 3
OPAMP primitives. It places the batteries on a schematic page
called Power Supplies. Note that it will not work for vendor supplied
opamp subckt models.

• Element Info: If enabled, this shows element information for the


object under the mouse pointer.

• Expanded Element Info: If enabled, this shows additional


element information for the object under the mouse pointer. This
includes a fair amount of data from the device structure such as
beta, transconductance, capacitance, etc.

• Component Import: This option imports part information from a


circuit file and installs the part in the Component library, making it
available for use by the circuit. If disabled, unique parts not in the
Component library cannot be shown or analyzed.

• Select Mode: This option causes the schematic mode to revert to


Select after any other mode is completed. For example, to place a
component you must be in the Component mode. After placing the
component, the mode normally stays in Component mode. If this
option is selected, the mode reverts to Select immediately after a
component is placed. The same thing would happen when drawing
wires, placing text, querying a part, or any other mode-based action.

• Nodes Recalculation Threshold: If Show Node Numbers is

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.

• Rainbow: This option controls the Rainbow color sequence.


• Status Bar: This lets you change the Status bar text attributes.
• Panel/Window Tabs: This section lets you control the display and
appearance of the Component panel and Window tabs.

• Error Window: This controls the display of the Error Window.


• Component Palettes: This lets you name the nine component palettes
and control their display in the Main tool bar. You can also toggle their
display on and off during schematic use with CTRL + palette number.

• 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

110 Chapter 2: The Circuit Editor


enable or disable specific warning messages including:

• File: This provides a warning when closing an edited file whose


changes have not yet been saved.

• Quit: This asks if you really want to quit.
• Opamp Power Supplies: This alerts the user when Micro-Cap
adds VCC and VEE power supplies.

• Add DC Path to Ground: This warns when adding resistors to


avoid a DC path to ground.

• Excessive Time Points: This warns when the circuit analysis


limits call for an excessive number of time points.

• 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.

• Excessive Source Points: This warns when a PWL, STIM, or


User source generates an excessive number of breakpoints.

• Revert: This asks for confirmation before allowing a file revert.


• AC Signal: This issues a warning when attempting an AC analysis
in which the AC signal for all sources is zero. This is nearly always
incorrect as all AC voltages and currents will be zero.

• 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.

• Spice3 TEMP Parameter: Issues a warning when the SPICE3


Temp parameter is used as a device attribute.

• Level Changed: Issues a warning when a Level parameter is


changed where the model parameters would need to change.

• TNOM and T_MEASURED: Issues a warning when both

111
TNOM and T_MEASURED have been specified for a part.

• Smoke Pervasive Change: Issues a warning when user is about to


make a change that has a large-scale affect.

• Model Attribute Not Used: Issues a warning when both a time


varying expression and a model attribute are defined for a resistor,
capacitor, or inductor. Model attributes cannot be used when
time-varying expressions are defined for the resistance, inductance,
flux, capacitance, or charge.

• Change Part Name: Issues a warning when a part name needs to


be changed.

• Duplicate Part Name: Issues a warning when a part name has


been used more than once, creating a potential ambiguity.

• Leave / Retrace with Threads: Issues a warning when using


Retrace or Leave disables the use of threads.

• Create .IC Statement: Issues a warning when generating an .IC


statement in the State Variables Editor.

• F or S in Transmission Line: Issues a warning when an F or S


variable is used in the transmission line component, and an analysis
besides AC or Dynamic AC analysis is being run.

• Excessive Temperature Coefficients: Issues a warning when one


of the temperature coefficients in a resistor, capacitor, or inductor is
set to an excessive value.

• Duplicate Components: Issues a warning when duplicate


parts (with the same name) in the Component library.

• Missing ) for Model statements: Issues a warning when a


missing ) is detected in a model statement.

• Numeric Node/ Pin Names: Issues a warning when a pure


number is used for a pin or node name. This can cause confusion
with program assigned numeric names and is not recommended.

112 Chapter 2: The Circuit Editor


• Digital Messages: Controls the use of use of digital warning
messages, which can become numerous.

• Improper FFT X Variables: Issues a warning if you have the


wrong X variable. For example, in transient analysis, if you try to
plot with X = T and Y = HARM(V(A)). In this case, X should be F.

• Monte Carlo Create Circuit: Issues an advisory / warning when


you press the Create Circuit button.

• Did You Know?: This accesses a list of new feature reminders.


• Style: The Style dialog box lets you select and define different circuit
styles. Styles consist of text fonts, colors, sizes, and display styles.

• Combinations: This controls the Fit to Standard Value command.


• Slider: This controls how the Slider works. The slider is a device for
smoothly changing the value of component, model, and symbolic (.define
or .param) variables, while watching the analysis plot respond. Both the
mouse and the Up and Down cursor keys control the slider. Sliders can
be placed anywhere on the screen.

• International Settings: This provides selection of the language used


for menus and other text.

• Threads: Threads are separate execution streams that can be used to


execute multiple tasks in parallel, usually saving considerable run time.
There are several threading control options:

• Use Threads: If enabled, this option uses threads if your computer


has multiple CPUs available.

• Use Threads Count: If the Use Threads option is enabled, this


specifies the maximum number of threads to use.

• 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.

• Format: This sets various numeric format options.


• View: This sets the default bold grid spacing and shape group.
• User Grids: This sets the schematic bold grid spacing.
• Shape Group Priority: When a part is placed in a schematic,
its shape group is set to Default which tells MC12 to select its
shape from this list in the order specified. You can change the
order (priority) by selecting a shape group and using the up/
down icons to move it to a new position in the list.

• Schematic Display of Voltage, Current and Power:


• Calculate: This panel controls whether to calculate the
RMS, Average, and Peak values during an analysis. Because
these calculations add about 10% to the run time, you should
enable these flags only if you need the values.

• Default Display: This panels sets the default display to be


used. Last shows the ending values and is always calculated.
RMS, Average, and Peak show the ending RMS, average,
and peak values for the run. Each of these values is
calculated during the analysis run.

• 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.

114 Chapter 2: The Circuit Editor


• Tool Bar: This lets you select the tool bars and buttons that appear
in the local tool bar area located just below the main tool bar.

• 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).

• Cursor Format: This controls the numeric format for numbers


printed in the Cursor tables.

• Auto / Static Grids: This specifies the number of grids to use


when auto scaling or when the Static Grid option is enabled.

• Enable Scaling: This option enables scaling in the X or Y


direction. To allow scaling in the Y direction only, disable this
option in the X panel, and vice versa.

• Optimizer: This sets the Optimizer window numeric format.

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.

• Static Grids: If enabled this option produces fixed plot grids


that stay in place as the plot is panned, as in MC6. Otherwise the
grids move when the plot is panned, as is standard in Micro-Cap.

• Keep X Scales the Same: If enabled, this option keeps the X


scales of different plot groups the same.

• Slope Calculation: This controls the method for measuring


slope; normal, dB/octave, and dB/decade. The latter two are
more appropriate for certain AC measurements.

• Save Range Edits: This flag copies Range changes to the


Analysis Limits dialog box Range fields.

• 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.

• Scope: This sets initial Scope options:


• View: This sets the initial Scope view options, including:
• Data Points: This marks calculated points on the plot. All
other values are linearly interpolated.

• Tokens: This adds tokens to each curve plot. Tokens are


small graphic symbols that help identify the curves.

• Ruler: This substitutes ruler tick marks for the normal full
screen X and Y axis grid lines.

• Plus Mark: This replaces continuous grids with "+"


marks at the intersection of the X and Y grids.

• Horizontal Axis Grids: This adds horizontal axis grids.

116 Chapter 2: The Circuit Editor


• Vertical Axis Grids: This adds vertical axis grids.
• Minor Log Grids: This adds but does not label minor log
grids between major grids at the 2, 3, 4...9 positions.

• Minor Log Grids 2 5: This adds and labels minor log


grids between major grids at the 2 and 5 positions.

• Baseline: This adds a zero baseline as a reference.


• Horizontal Cursor: In cursor mode (F8), this adds a
horizontal cursor which intersects the two vertical numeric
cursors at their respective data point locations.

• Tracker: These options control the display of the cursor,


intercept, and mouse trackers, which are little boxes containing
the numeric values at the cursor data point, its X and Y
intercepts, or at the current mouse position.

• Cursor: These options control the initial cursor behavior flags.


• Align Cursors: This flag forces the cursors in different
plot groups to be aligned at all times.

• Keep Cursors on Same Branch: This flag forces the


cursors to stay on the same curve branch

• 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.

• Numeric Output: This group lets you choose what to include


in the Numeric Output displays and the corresponding output text
files (*.TNO, *.ANO, and *.DNO).

• Show: This allows selection of the material to include in the
numeric output file.

117
• Include Numeric Output: This enables creation of the
numeric output file. The other options control content of the file.

• Include Main Header: This prints the main header.


• Include Analysis Limits: This adds the analysis limits.
• Include Branch Headers: This adds branch headers that
identify the item being stepped or the Monte Carlo case
number.

• Include Model Parameters: This prints the model


parameters.

• Include Zero Parameters: This enables the printing


of zero-valued parameters.

• Include Undefined Parameters: This shows


undefined model parameters using their default values.

• Include Operating Point Values: This controls printing


of the operating point data to the file.

• Include Noise: This adds individual part noise values.


• Include Waveform Values: This controls waveform
printing. The numeric output icon in the analysis limits
dialog box, adjacent to each expression, must be enabled.

• Include Waveform Headers: This prints identifying


expression text above each numeric column.

• Table Formats: This controls how the numeric output


curve / waveform tables will be arranged. Horizontal, the
conventional format, uses horizontal column vectors.
Vertical prints the time column, followed sequentially by
single column vectors, one for each output. Vertical X,Y
Alternate is the same but with an extra analysis variable
column inserted between each output vector. Finally,
Vertical X,Y Pairs produces vertically arranged column pairs
of the analysis variable and one output.

118 Chapter 2: The Circuit Editor


• Formats: These settings control the numeric formats:
• Numeric Output Values: This controls the format of
everything except the values of the waveforms / curves.

• Curve X: This controls the format of the X values of the


waveforms / curves ( typically T in transient, F in AC).

• Curve Y: This controls the format of the Y values of the


waveforms / curves.

• 3D Plots: This provides control for several 3D plot features:


• Color: This provides color control of 3D plot features such as
general scale and title text, window and graph background colors,
axis colors, patch color, and surface line color.

• 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.

• Monte Carlo Histograms: This panel provides control for Monte


Carlo histogram plot features:

• Color: This provides color control of histogram features such as


scale and title text, window and graph background, and bars.

• 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.

• Performance Plots: This panel controls performance plot features:


• Scales and Formats: This panel lets you specify units, scale
factor, numeric format and other options for performance plots. The

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.

• Numeric Output: This group lets you choose what to include in


Performance plots numeric output and the corresponding output files.

• Fourier: This panel controls the Fourier window features:


• Scales and Formats: This panel lets you specify units, scale
factor, numeric format and other options for FFT plots. The options
are very similar to those provided for analysis plots.

• Colors, Fonts, and Lines: This provides control of text font


and color for various plot features such as general scale and title
text, window and graph background colors, and individual curve
color, thickness, and pattern.

• 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.

• Numeric Output: This group lets you choose what to include in


the FFT numeric output and the corresponding output files.

• Model: This panel controls the Model Program features:

• Color/Font: This provides control of text font and color for


various plot features for the Model program displays.

• Formats: This lets you specify the X and Y plot scale formats.

120 Chapter 2: The Circuit Editor


• Tool Bar: This panel lets you select the tool bars and buttons that
appear in the tool bar area of the Model Program display.

• Smoke: This panel controls the Smoke features:


• Color/Font: This provides control of text font and color for
various plot features for the Model program displays.

• 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.

• Show Mouse Tracker: This enables the small text descriptions


describing the fields under the mouse.

• Show Non-Valid: This shows parameters that have been


declared not valid.

• Show Measured Value Signs: This enables display of the sign


| of the measured quantity, which is usually hidden.

• Device, Show and Valid: These fields select the parameters


of the various devices that will show and which are valid.

• Derating: This lets you select the derating library.


• Worst Case: This panel lets you control these features:
• Formats: This lets you select the various numeric formats.
• Libraries: This lets you select the tolerance library.
• Bias Tolerances: This lets you specify the bias tolerances,
• Globals: This panel controls the properties of new graphical objects
and the type of format type assumed when reading in SPICE files.

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.

• Global Settings: (CTRL + SHIFT + G) This shows the Global Settings


dialog box where many simulation control choices are made. These settings
are discussed in greater detail in the Global Settings section of this chapter.

• User Definitions: This option loads the file MCAP.INC. This file, located
on the directory with MC12.EXE, stores global definitions for use in all
circuits. The contents of the file are automatically included in all circuit files.

• .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.

122 Chapter 2: The Circuit Editor


The Analysis menu
The Analysis menu is used to select the type of analysis to run on the circuit in
the active window. It provides these options:

• 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.

• Dynamic DC: (ALT + 4) This option selects an analysis mode in which


MC12 automatically responds to user edits by finding and displaying the DC
solution to the current schematic. You can change battery voltages and
resistor values with slider controls or with the cursor keys. You can also
make any edit such as adding or removing components, editing parameter
values, etc. MC12 responds by calculating the DC solution and will display
voltages and states if is enabled, currents if is enabled, power
dissipation if is enabled, and device conditions if is enabled.

• Dynamic AC: (ALT + 5) In Dynamic AC, MC12 runs AC analysis and


displays AC voltages, currents and power terms directly on the schematic
while stepping through a list of frequency values. The program displays AC
voltages if is enabled, AC currents if is enabled, and AC power
terms if is enabled.

• DC OP Worst Case: (ALT + 6) This option selects an analysis mode in


which the program calculates the DC OP worst case values. It computes three
measures of worst case: RSS (root sum square of variances), Monte Carlo,
and extreme value analysis. The worst case feature is also available on the
Scope menu for AC, DC Transfer, and transient analysis.

• Transfer Function: (ALT + 7) This option selects an analysis mode in


which the program calculates the small signal DC transfer function. This is a
measure of the incremental change in a user-specified output expression,
divided by a very small change in a user-specified input source value. The
program also calculates the input and output DC resistances.

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.

• Intermodulation Distortion: (ALT + 9) This selects Intermodulation


Distortion analysis. Intermodulation distortion analysis lets you step input
level and/or frequency and create plots of IM2, IM3, or H1 (1'st harmonic)
vs F, VIN, VOUT, PIN, or POUT. Plots can be done as voltage or power
ratios in dB, %, or simple numeric format. PSS methods are also available as
in the case of harmonic distortion. You can use SMPTE, CCIF, or DIN
standards for input voltage and frequency, or enter your own.

• Stability: (ALT + 0) This selects Stability analysis. This is a variation of


AC analysis that measures gain and phase margin by the Middlebrooke and
Tian methods.

• Probe Transient: (CTRL + ALT + 1) This selects transient analysis


Probe mode. In Probe mode, the transient analysis is run and the results are
stored on disk. When you probe or click part of the schematic, the waveform
for the node you clicked on comes up. You can plot all of the variable types,
from analog node voltages to digital states. You can even plot expressions
involving circuit variables.

• Probe AC: (CTRL + ALT + 2) This option selects AC Probe mode.


• Probe DC: (CTRL + ALT + 3) This option selects DC Probe mode.
• Run Script: This option runs the currently displayed batch file. This is a
convenient alternative to running a batch file from the Start menu, a DOS
command line, or setting up an icon to run the batch file.

124 Chapter 2: The Circuit Editor


The Design menu
The Design menu accesses the Filter Design functions.

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.

Figure 2-19 The Active Filter Designer

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:

Figure 2-20 The Model program

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.

The program is described in detail in the Model Program chapter.

126 Chapter 2: The Circuit Editor


The Model editor
Model libraries provided with Micro-Cap come in two forms, text and binary.

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

Model parameter display

Figure 2-21 The Model editor


The Model editor is invoked from the File menu by loading a binary model li-
brary file (e.g. one with a LBR extension).

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.

128 Circuit Editor


Chapter 2: The
Build Command
Micro-Cap includes a utility to help build complex .commands. The dialog box is
invoked from the Edit menu and looks like this:

Figure 2-22 The Build Command dialog box

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:

Figure 2-23 .Measure command with TRIG and TARG


This measures the time delay between the second rise of V(IN) above 2.5 to the
fourth fall of V(OUT) below 2.5.

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.

Figure 2-24 .Define command

130 Chapter 2: The Circuit Editor


The Title Block editor
The Title Block editor is selected from the Windows menu. It functions very
much like the Shape editor. Its display looks like this.

Figure 2-25 Title Block editor

Title Block list box:

This list box displays all of the existing title block designs in the selected
Title Block file.

Command buttons:

Add: This command adds a new title block to the library.

Delete: This command deletes the currently selected title block.

Duplicate: This command duplicates the currently selected title block.

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.

Help: This accesses the Help system.

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.

132 Chapter 2: The Circuit Editor


Add Group: This adds a new group with a user-specified name to the
currently selected file.

Undo: (CTRL + Z ) Operations that change a title block can be reversed with
the Undo command. Multiple Undo commands are allowed.

Redo: (CTRL + Y ) The Redo command cancels one Undo command.


Multiple Redo commands are allowed.

Cut: (CTRL + X) This command deletes the selected objects and copies them
to the clipboard.

Copy: (CTRL + C) This command copies selected objects to the clipboard


from where they may be pasted to the display.

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.

Align-Left: Left-aligns one or more selected pieces of attribute or grid text.


Select one piece as the anchor (CTRL+click).

Align-Right: Right-aligns one or more selected pieces of attribute or grid


text. Select one piece as the anchor (CTRL+click).

Align-Top: Top-aligns one or more selected pieces of attribute or grid text.


Select one piece as the anchor (CTRL+click).
134 Chapter 2: The Circuit Editor
Align-Bottom: Bottom-aligns one or more selected pieces of attribute or grid
text. Select one piece as the anchor (CTRL+click).

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.

136 Chapter 2: The Circuit Editor


Title Block mode
The Title Block editor creates a library of title block designs that can be selected
and used in schematics. To actually place a title block in a schematic, you use the
Title Block mode.

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:

Figure 2-26 Title Block dialog box


This dialog box has the following controls:

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.

Description Field Name


Title #TITLE
Description #DESCRIPTION
Designed By #DESIGNED
Company By #COMPANY
Checked By #CHECKED
Approved By #APPROVED
Document No. #DOC_N
Date #DATE
Max Sheet #MAXSHEET
Sheet #SHEET
Max Page #MAXPAGE
Page #PAGE
Section #SECTION

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:

$NAME This prints the circuit name.


$NAMEEXT This prints the circuit name with its extension.
$MC This prints the version of Micro-Cap.
$DATE This prints the current date.
$TIME This prints the current time.
$USER This prints the user's name from Options menu /
Preferences / Options / General / User Name

138 Chapter 2: The Circuit Editor


$COMPANY This prints the user's company from Options menu /
Preferences / Options / General / Company Name
$PAGE This prints the page number.
$PAGENAME This prints the name of the page.
$MAXPAGE This prints the largest page number.
$SECTION This prints the section number.
$SECTIONNAME This prints the name of the section.
$MAXSECTION This prints the largest section number.
$SHEET This prints the sheet number.
$MAXSHEET This prints the largest sheet number.
$DATESAVED This prints the date that the file was last saved.
$TIMESAVED This prints the time that the file was last saved.
$PATH This prints the path of the file.

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.

Apply: This applies your changes.

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:

• Contents (F1): This section provides help organized by topics.


• Search for Help On...: The search feature lets you access information by
selecting a topic from an alphabetized list.

• Product Support: This option provides technical support contact numbers.


• User's Guide: This accesses the User's Guide.
• Reference Manual: This accesses the Reference Manual.
• Tip of the Day...: This option provides short tips on product features that
are displayed each time Micro-Cap is started.

• 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.

140 Chapter 2: The Circuit Editor


• Demos: These live demos show how to use the principal features. They
describe the basics of creating schematics and running analyses. Other topics
include: adding new parts to the library, using Probe, IBIS files, parameter
stepping, Fourier analysis, analog behavioral modeling, filter design, anima-
tion, distortion, optimization, Monte Carlo analysis, performance plots, and
more.

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.

• Page Up: Takes you to the next lower page number.


• Page Down: Takes you to the next higher page number.
• Home: Takes you to the first page. The Contents section begins on page
3. Contents entries are hypertext links. Clicking on any entry takes you to
the referenced page.

• 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

You might also like