home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
maj
/
969
/
pc_ecap.doc
< prev
next >
Wrap
Text File
|
1994-01-23
|
113KB
|
2,455 lines
P C - E C A P
Version 3.01
Program Reference Manual
Copyright (c) 1990-94 by Peter Volpa
All Rights Reserved
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Peter Volpa
Circuit Systems
418 Church Road
Sicklerville, NJ 08081-1727 USA
Table of Contents
-----------------
Introduction . . . . . . . . . . . . . . . . . . . . . 1
License . . . . . . . . . . . . . . . . . . . . . 2
Ordering Information . . . . . . . . . . . . . . . 3
(also registering by credit card)
Disclaimer, Trademarks, ASP info . . . . . . . . . 4
System Requirements . . . . . . . . . . . . . . . 5
Installing PC-ECAP . . . . . . . . . . . . . . . . 6
Quick Start . . . . . . . . . . . . . . . . . . . . . 7
Miscellaneous program information :
Printer configuration . . . . . . . . . . . . . . 8
Data format . . . . . . . . . . . . . . . . . . . 9
Accessing data files in other directories . . . . 9
Memory requirements vs. maximum circuit nodes . . 9
Network / Multi-User operation . . . . . . . . . . 10
Getting Started . . . . . . . . . . . . . . . . . . . 11
Main Menu Descriptions . . . . . . . . . . . . . . . . 11
Select input file . . . . . . . . . . . . . . . . 11
Edit input file . . . . . . . . . . . . . . . . . 12
Analyze circuit . . . . . . . . . . . . . . . . . 16
Plotting results . . . . . . . . . . . . . . . . 17
View output data . . . . . . . . . . . . . . . . . 18
Output to printer . . . . . . . . . . . . . . . . 18
Change program settings . . . . . . . . . . . . . 19
(number of sample points, printer type, etc.)
Quit this program . . . . . . . . . . . . . . . . 20
Analyzing a Circuit Using PC-ECAP . . . . . . . . . . 21
Input format . . . . . . . . . . . . . . . . . . . 22
Circuit element description . . . . . . . . . . . 23
Specifying AC analysis parameters . . . . . . . . 26
(group delay, impedance, vswr, return loss)
Specifying transient analysis parameters . . . . . 28
Computational techniques for transient analysis . 30
An example! . . . . . . . . . . . . . . . . . . . 33
An example of transient analysis . . . . . . . . . 34
Another example (using the Model Maker) . . . . . 36
Models . . . . . . . . . . . . . . . . . . . . . . . . 38
References for modeling . . . . . . . . . . . . . 39
Revision History . . . . . . . . . . . . . . . . . . . 40
Appendix A - Command Line Switches . . . . . . . . . . 42
Appendix B - Error Messages . . . . . . . . . . . . . 43
Appendix C - PC-ECAP to Lotus 1-2-3 file conversion . 48 PC-ECAP Reference Manual page 1
Introduction
PC-ECAP is an easy to use AC circuit analysis program which
analyzes circuits consisting of resistors, capacitors,
inductors, transformers, transmission lines, transistors
(both bipolar and FET's), operational amplifiers and
transconductance amplifiers.
Totally integrated in one package, it contains a full screen
text editor for preparing analysis input, an electronic
circuit analyzer that calculates your circuit's frequency
and transient response, a high resolution display plotter
that supports all common graphics adapters and a high
resolution plotter compatible with most printers.
Features:
* Calculates Magnitude, Phase, Group Delay,
Impedance, VSWR and Return Loss.
* Calculates Transient response for step, pulse,
ramp, square wave, triangle wave and sine wave
inputs. Can also calculate impulse response.
* Completely menu driven - very easy to use.
* Can analyze circuits with up to 90 nodes,
and with as many as 1000 components.
* Built in full screen editor with on-line help
function.
* Free input format - common abbreviations such as
P, U, N, M, K, MEG, G are recognized. For
example if your circuit has a 47pf capacitor, all
you need to enter for its value is 47pf.
* Supports CGA, EGA, VGA, Hercules, MCGA, AT&T and
even the Monochrome Display Adapter.
* All calculations are done in 15 digits of double
precision.
* High resolution plots on IBM/Epson 9 and 24 pin
compatible printers, HP LaserJet, and HP DeskJet.
* Program may be configured to send its output to
LPT1, LPT2, LPT3 or a disk file.
* Bipolar transistor model maker. Just enter your
transistor's operating parameters and PC-ECAP will
create a Hybrid-Pi model for your transistor.
* Will utilize a math coprocessor if available, but
does NOT require one.
* Built-in network / multi-user support. PC-ECAP Reference Manual page 2
License
PC-ECAP is distributed as "shareware". It is NOT public
domain or free software.
Non-registered users of this software are given the
opportunity to evaluate the complete PC-ECAP software
package for 30 days with no obligation. If, after the
evaluation period, you find PC-ECAP to be suitable for your
needs, you must register your copy or discontinue using
PC-ECAP.
What we're saying is if you use this program, then you
should pay for your copy. That way Circuit Systems will be
able to provide updates, support, and generally stay in
business.
PC-ECAP is distributed in two forms: a registered version
and an unregistered version. The unregistered version is a
fully-functional program that has all the features of the
registered version. However, the unregistered version
requires the user to go through an initialization procedure
each time PC-ECAP is started. The initialization procedure
requires the user to enter a random number before PC-ECAP
will run. The registered version does not have this
initialization procedure.
The REGISTERED version of PC-ECAP is LICENSED TO THE SINGLE
PERSON WHO REGISTERED THE PROGRAM AND MAY NOT BE DISTRIBUTED
IN ANY MANNER.
All users are granted a limited license to copy the
UNREGISTERED version of PC-ECAP for the trial use of others.
This license does NOT include distribution or copying of
this software:
* In conjunction with any other product or service.
* In general use within a company or school.
* For any "disk fee" other than a small (generally
$2.00 to $5.00) copying charge.
* For distribution in any modified form. The file
containing this license information MUST be
included along with full documentation and all
the files that make up this software package. PC-ECAP Reference Manual page 3
Ordering Information
A PC-ECAP registration licenses you to use the product on a
regular basis. Registration also entitles you to technical
support, update notices, and enables you to get future
releases of PC-ECAP at a minimal price.
Individual registrations come in two forms. The first,
registration only, costs $89 (plus $2.00 shipping and
handling). Upon receipt of your paid registration form, we
will send you the latest registered version of PC-ECAP with
documentation on the disk. We also offer PC-ECAP with a
printed manual. For $99 (plus $4.00 shipping and handling)
we will send you the latest registered version of PC-ECAP
along with a professionally printed bound manual. New
Jersey residents should include 6% sales tax.
Site licensing is also available. Prices are based on the
estimated number of users. Please write for more
information.
A PC-ECAP registration form is included in the distribution
package for your convenience. It is in the file ORDERFRM.
Please take time to fill it out and return it. If you would
like high-quality software to continue to be made available
on a try-first basis and for a reasonable cost, it is up to
YOU to support such programs.
Please send your registration form, suggestions and any
comments that you might have to:
Peter Volpa or For questions only,
Circuit Systems no orders. Call
418 Church Road (609) 875-5433
Sicklerville, NJ 08081-1727 12 - 10 PM EST
Questions may also be sent by Email on CompuServe to
72202,3043 or via the Internet at '72202.3043@compuserve.com'.
I check for mail only about once a week, so it might be just
as quick to write if you live in the U.S.A.
Registering PC-ECAP by Credit Card
We have established a special arrangement with the Public
(software) Library for those of you who wish to order by
credit card. For credit card orders only, you can order
from PsL with your Master Card, Visa, AmEx or Discover card
by calling (800) 2424-PsL or (713) 524-6394. You may also
FAX to (713) 524-6398 or CompuServe to 71355,470 or mail to
PsL, P.O. Box 35705, Houston, TX 77235-5705. These numbers
are for ordering only. For information about volume
discounts, site licensing, shipping of product, returns,
latest version number or other technical information, please
write to Circuit Systems or call (609) 875-5433. All credit
card orders will be charged $4 for Shipping and Handling. PC-ECAP Reference Manual page 4
DISCLAIMER
ALTHOUGH WE HAVE EXTENSIVELY TESTED PC-ECAP AND BELIEVE IT
WILL GIVE ACCURATE RESULTS IF USED CORRECTLY, WE SUPPLY THIS
PROGRAM AS IS. CIRCUIT SYSTEMS DISCLAIMS ALL WARRANTIES,
EXPRESSED OR IMPLIED, THAT THIS PROGRAM IS FIT FOR ANY
PURPOSE. CIRCUIT SYSTEMS ALSO ASSUMES NO LIABILITY FOR ANY
DAMAGES EITHER DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT
FROM THE USE OF THIS PROGRAM.
Trademarks
MS-DOS and Excel are registered trademarks of Microsoft
Corporation.
PC-DOS, PC/AT, PC/XT, and PS/2 are registered trademarks of
IBM Corporation.
Compaq is a registered trademark of Compaq Computer Corp.
Hercules is a registered trademark of Hercules Computer
Technology.
AT&T is a registered trademark of American Telephone and
Telegraph Company.
Olivetti is a registered trademark of Ing. C. Olivetti.
LaserJet and DeskJet are registered trademarks of
Hewlett-Packard Company.
Lotus and 1-2-3 are registered trademarks of Lotus
Development Corporation.
Quattro Pro is a registered trademark of Borland
International Corp.
AS-EASY-AS is a trademark of TRIUS, Inc.
Association of Shareware Professionals
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon MI 49442-9427 or send a Compuserve
message via CompuServe Mail to ASP Ombudsman 70007,3536.
The OMB may be contacted by FAX by sending to the ASP FAX
number: (616) 788-2765. In communication with the OMB
please include a telephone number and/or FAX if available. PC-ECAP Reference Manual page 5
System Requirements:
* IBM PC, XT, AT, PS/2 or compatible.
* PC or MS-DOS 2.0 or later.
* One floppy disk drive.
* 384K of system memory.
* A graphics card is recommended for best
performance. But if all you have is a Monochrome
Display Adapter, PC-ECAP will even graph its
results on that - though the resolution will be
much lower.
* An IBM/Epson, HP LaserJet or HP DeskJet compatible
printer if hard copy is desired. Most printers
used with IBM and IBM compatible computers support
one of these standards.
Attention users of MS-DOS version 3.2
Version 3.20 of MS-DOS contains a bug that can cause
unexpected results in programs that use floating-point math
(eg. PC-ECAP).
You do not need to read any further unless your system has
ALL of the following characteristics:
1. You use MS-DOS version 3.20.
2. You boot from a hard-disk drive.
3. Your system has a math coprocessor (for instance,
an 8087 chip).
4. You run programs that use floating-point math
(eg. PC-ECAP).
For systems that satisfy all of the preceding conditions,
you may be able to eliminate floating-point math problems by
installing a small patch in DOS. Please contact Microsoft
for complete details on this.
Since this bug has been fixed in later versions of MS-DOS,
you may also want to consider upgrading your DOS to a more
recent version. PC-ECAP Reference Manual page 6
Before You Begin
The very first thing that you should do before going any
further is to make a backup copy of your distribution disk.
To do this just use the DOS command DISKCOPY. This will
work whether or not you have two floppy disk drives. It
also doesn't matter if the diskette that you want to copy to
is formatted or not. DISKCOPY will format it for you.
From the DOS prompt type this:
DISKCOPY A: B:
You will be asked to "Insert source diskette in drive A:"
This should be your original PC-ECAP disk. Continue to
follow the directions on the screen and you will have your
backup copy.
Installing PC-ECAP
We have included an "Install" program with PC-ECAP to make
installation very easy. The Install program will not do
anything "funny". It will not modify your AUTOEXEC.BAT or
your CONFIG.SYS files. What it will do is create a
subdirectory on your hard drive called "\ECAP". Then it
will copy all the needed PC-ECAP files from your floppy
drive to that subdirectory. If you have any PC-ECAP program
files (NOT data files) prior to version 2.0, they will be
deleted. That's all. It is strictly for your convenience.
The default "from" drive is the drive where INSTALL.EXE is
located and the default "to" drive is drive C:. These may
be changed to any other drives or directories as needed.
If you don't have a hard drive, you don't need to proceed
any further. Skip the rest of this section and use your
backup copy as your working disk.
To use the install program, insert your backup copy of
PC-ECAP into your floppy drive and type:
A:INSTALL
Follow the directions and before you know it, you will have
PC-ECAP on your hard drive. PC-ECAP Reference Manual page 7
Quick Start
Although there is no substitute for reading this entire
manual, I know there are those of you who can't wait to try
a new program. So for those who like to try-first-read-
later, this will give you a taste of what PC-ECAP can do.
Start PC-ECAP by typing:
ECAP
at the DOS prompt.
From the main menu choose the "Select input file" selection.
Select EXAMPLE1.DAT as your input file. The circuit
described by EXAMPLE1.DAT is a simple RC low-pass filter and
is shown below.
1 1.59K 2
------/\/\/\/\------*---------
|
|
input ___|___ .1uf output
_______
|
|
0 |
--------------------*----------
Now from the main menu choose "Analyze circuit". The
analysis will begin and you will see the results as the
program progresses. When the analysis is complete, the
results will be plotted on your display. First you will see
a plot of Magnitude vs. Frequency. If you press any key
other than ESC you will get a plot of Phase vs. Frequency.
Pressing any key (other than ESC) again will show you
Magnitude again. When you are finished, press ESC to return
to the main menu.
As I said, this is a taste - for the details read on. PC-ECAP Reference Manual page 8
Printer Configuration
PC-ECAP supports four printer types. To properly print on
your printer, you must configure the program for the printer
that you are using. The "Change program settings" choice of
the main menu has an option to "Pick a printer to use".
Select your printer from the list given. One of these types
should be a good match for your printer. Refer to the
"Change program settings" section in the manual for more
details. Be sure to save your choice.
There might be times when you want to print on single sheets
of paper instead of the more common continuous forms paper.
If this is the case, you will need to use the DOS MODE
command before running PC-ECAP.
Each time that a single page has completed printing, the
printer stops and returns an error. Depending on the
printer, this error may be "OFF-LINE" or "OUT-OF-PAPER". In
any case, what gets reported to the program is a "WRITE
FAULT ERROR". PC-ECAP was unable to write to the printer.
The DOS MODE command provides a way around this problem.
MODE will enable an "infinite retry on printer". Which
really means - return a printer busy signal and continue
retrying until the printer accepts the output. When this is
done, a "WRITE FAULT ERROR" will not be reported to PC-ECAP
and the program will simply wait for the next sheet of
paper.
If your DOS version is 4.01 or less, type this before
running PC-ECAP:
MODE LPT1:,,P
If you are running DOS 5 or DOS 6, MODE has a slightly
different format:
MODE LPT1: RETRY=B
If you are printing to a printer other than LPT1, you should
change the MODE command accordingly. See your DOS manual if
you need more help on this.
If you need to use the MODE command you should add it to
your AUTOEXEC.BAT file. This setup will install it
automatically. PC-ECAP Reference Manual page 9
Users of PC-ECAP versions prior to version 2.0
Before version 2.0, all numbers were represented and stored
in BCD format. With version 2.0, numbers are now stored in
IEEE binary format. However, PC-ECAP can read any result
files stored in BCD. When you access an old file you will
see the message "Converting file format . . .". This
conversion is done "on the fly", meaning the converted file
is not saved. To avoid this file conversion every time you
view an old file, simply rerun an analysis.
Accessing PC-ECAP Circuit Files in Other Directories
If you are running DOS 3.0 or later you may easily work with
circuit files in other directories or on other drives. To
do this you must have the directory that contains the
PC-ECAP program files listed in your PATH. You should have
a line similar to this in your AUTOEXEC.BAT file:
PATH=C:\ECAP
Yours will not be EXACTLY like this one. You may have
additional directories listed or the drive letter may be
different. The important thing is that the PC-ECAP drive
and directory be part of the PATH. You may want to refer to
your DOS manual if you need more information on this.
Once your PATH is set up, DOS will know where to find
PC-ECAP no matter where you are. And under DOS 3.0 or
later, PC-ECAP will know where to find any additional files
it needs to run.
Memory Requirements
As of PC-ECAP version 2.1, you can analyze circuits with up
90 nodes. Older versions of the program had a limit of 40
nodes. Analysis of a 90 node circuit requires that you have
450K bytes of free memory. That is, memory left after you
load any memory resident programs. If you don't have this
much memory available, don't worry. You will just be
limited to circuits having fewer nodes. If you have less
than 450K free, PC-ECAP will give you its estimate of the
largest circuit that you may analyze on program start up.
Keep in mind that this is an estimate and therefore it is
not exact. Therefore, if you are told that you have enough
memory to analyze circuits with up 57 nodes, and you have a
circuit with 58, give it a try. It may very well work.
Also please note, that since node numbers start at 0, the
highest possible node number is 89. PC-ECAP Reference Manual page 10
PC-ECAP can also use upper memory blocks (UMB's) for its
memory needs. You must be running DOS 5 or greater and have
a line similar to the following in your CONFIG.SYS file:
DOS=UMB
You can check on UMB availability with the DOS MEM command.
Typing "MEM /C" will list the conventional and upper memory
in your system. If no upper memory is listed, either your
hardware doesn't support UMB's or your system is not set up
properly. See your DOS manual if you need help with this.
PC-ECAP will try to use any free upper memory listed.
The estimate given at program startup will not take into
account any UMB's. These blocks can be highly fragmented,
so it is not possible to know if they are large enough to
use until they are needed.
Network / Multi-User Operation
PC-ECAP has built-in support to run on a local area network.
Your network must support DOS file-sharing (added with DOS
version 3.0). When running on a network, multiple users may
share circuit description and analysis result files.
PC-ECAP imposes two main restrictions when accessing files
on a network. If a file is being edited, no one else may
run an analysis on it. If a circuit is being analyzed, no
one may view or output the results until the analysis is
complete. In general, individual file access at any one
time is restricted to operations that make sense. For
example, a circuit whose analysis is only partially complete
can't be viewed. Of course you may do any operation you
choose if you are the only person using a particular file.
If you attempt to access a file that is already in use,
PC-ECAP will display the message, "File is currently being
used by someone else". You may wait until that file is
available or you may choose to work on a different file.
You should also be aware that PC-ECAP maintains a single
configuration file. So if you change some of the program
settings, and then write these changes to disk, the next
person on the network to run the program will get these new
settings. PC-ECAP Reference Manual page 11
Getting Started
PC-ECAP is started by typing the following command at the
DOS prompt:
ECAP [ options ]
The optional command line switches are used to manually set
the video mode. Since PC-ECAP is usually able to do this
automatically, these options should not be needed by 99% of
computers. They are covered separately in Appendix A. If
you have trouble seeing the main menu after the opening
screen, please refer to this appendix.
When PC-ECAP is started, you will first see the main menu.
The program has been designed to be very easy to use, and
the menu system plays an important part in reaching this
goal. All menu choices may be selected in either one of two
ways. First, a selection may be made by typing the first
letter of an item. These are highlighted so they stand out.
Selection may also be made by using the cursor keys (up
arrow, down arrow, home and end) to highlight a choice.
When "ENTER" is pressed the selection is made. The program
will do its best to logically anticipate your next choice.
For example, after editing a circuit description and
returning to the main menu, the choice "Analyze circuit"
will be highlighted - assuming that after editing, you most
likely will want to analyze your circuit.
MAIN MENU Descriptions
Select input file
This selection will display an alphabetically sorted
list of all the circuit description files in your
current directory. Use the cursor keys to select a
file to use. If you see "more . . ." displayed at the
beginning or end of the list, this means that there are
additional files on another page. You can use the PgUp
or PgDn keys in addition to the up arrow, down arrow,
left arrow, right arrow, home and end keys to view
them. Once your choice is highlighted just press ENTER
to select it.
PC-ECAP also has a "Speed Search" feature. To use it,
type the first letter of the file that you want to
select, followed by enough letters to uniquely specify
it. In most cases all it takes is 2 or 3 letters.
Your desired file will be highlighted. Press ENTER to
select it. PC-ECAP Reference Manual page 12
If you want to select a file that is not listed (for
example - a new circuit description that you want to
input) press F2. A window will appear asking for the
filename. Type the filename and press ENTER. All
filenames should be eight characters or less in length.
If you type in more than eight, only the first eight
will be accepted. A file extension is optional, if it
is omitted the extension ".DAT" will be appended to the
filename. If a filename has an extension other than
".DAT", the ".DAT" extension will be substituted in its
place.
You can delete a highlighted file by pressing F3. When
you do so, a window will appear asking, "Delete File?".
Answer "Yes" to delete. "No" or ESC will abort the
operation.
If at any time you want to abort the current operation,
pressing the ESC key will return you one level up in the
program.
Edit input file
This starts the built-in full screen editor. The file
that you want to edit must be selected first. If no
file is selected, you will be sent to the "Select input
file" screen and then returned to the editor.
The editor is very straight forward to use, just type
each line followed by the ENTER key. When in the
editor these keys have special meaning:
Right Arrow - move one character to the right.
Left Arrow - move one character to the left.
Home - move to the beginning of the line.
End - move to the end of the line.
Up Arrow - move one line up.
Down Arrow - move one line down.
Ctrl Home - move to the beginning of the file.
Ctrl End - move to the end of the file.
PgDn - move 20 lines down.
PgUp - move 20 lines up.
Del - will delete the character directly above
the cursor. PC-ECAP Reference Manual page 13
Backspace - will delete the character to the left of
the cursor.
Tab - move cursor 4 spaces to the right.
Shift-Tab - move cursor 4 spaces to the left.
Ins - will toggle between the insert and
replace modes. In the insert mode the
cursor will change to a block cursor and
any characters typed will be inserted
between any characters already on the
screen. When in replace mode, any
characters typed will type over those on
the screen.
In addition to these special keys, five function keys
have special meaning. Press them alone or in
combination with the "Alt" key to access the following
features.
F1 Help
One of the features that has been added to make
PC-ECAP easy to use is the on-line help. When F1
is pressed a window will appear containing useful
information on items such as circuit element
description formats, analysis range and sweep
type, value types and examples. You can move
through these with the PgUp and PgDn keys. When
you are ready to continue editing, pressing F1
again or the ESC key will close the window and let
you edit.
F2 Model Maker
The model maker allows you to more accurately
model bipolar transistors. The transistor model
used is the Hybrid-Pi model. Despite its
simplicity, this model gives quite good results
for analysis up to about one half of the
transistor's cutoff frequency (Ft).
When the model maker is activated, a window will
appear. You will first be asked for the node
numbers of the transistor. Enter these pressing
the ENTER key after each entry for base, emitter,
and collector. You next have to answer four
questions. You will be asked (and need to know)
the following:
Transistor DC collector current - hopefully you
will know this. If not, try your best guess. PC-ECAP Reference Manual page 14
Transistor current gain or Beta - since the gain
of bipolar transistors varies with collector
current, the number that you enter here should be
at the collector current specified above for best
results. Usually it is available in the data
sheet for the transistor.
Transistor Gain-Bandwidth product (Ft) - this also
should be at the collector current entered above
(check the data sheet).
Transistor common base output capacitance - this
is just the base to collector capacitance.
Usually it is listed as Cobo in the transistor
data. (Which means output capacitance common base
with the emitter open).
After all the information is entered, the window
will close and components for the model will be
inserted into your circuit description after the
current cursor line.
F3 Insert Line
Pressing F3 will insert a blank line above the
current cursor line and move the cursor line and
all lines below it down.
F4 Delete Line
Pressing F4 will delete the current cursor line
and move all lines below it up. The deleted line
will be placed in the cut buffer and can be pasted
if desired.
F5 Find Component
The Find Component feature is useful to find
circuit elements in your circuit description file.
Just press F5, enter the element to be found, and
the line containing the element will be
highlighted with the cursor positioned there. If
the element does not exist, a "Component not
found" message will appear.
Alt-F1 Net List
This feature can make it easier to track down
errors in your circuit description. The Net List
is a node by node list of all the circuit elements
that make up your description. By comparing the
connections in this list to your circuit's
schematic, you can verify that your circuit is
described properly. PC-ECAP Reference Manual page 15
When the Net List is selected, you will be asked
whether you want your list sent to the screen or
to a defined printer. If you select screen, a
window will appear listing your circuit's nodes
and their attached components. Use the cursor
keys to move through this list. To close this
window and return to editing, just press ESC.
Alt-F2 Rename File
You may change the name of a circuit description
file by selecting "Rename File". A window will
appear asking for your new file name. Type the
new name and press ENTER. ESC will close the
window and leave the existing file name unchanged.
When you rename and save a file, the old named
file will still exist. This is useful if you have
a circuit that is very similar to an existing
circuit description. You can modify the existing
description and save it under a new name. If you
want to delete the old named file, you can do so
from the "Select input file" menu.
Alt-F3 Paste Line
This option will insert a line saved in the cut
buffer above the current cursor line and move the
cursor line and all lines below it down.
Alt-F4 Copy Line
Will copy the current line into the cut buffer.
Used with the Paste Line feature above.
Alt-F5 Find Next
This will find the next component meeting your
search criteria as specified under "Find
Component". If you have asked for a unique
component, you won't be able to find a "next".
This option is most useful when you want to find
all occurrences of a part, such as all capacitors
or all resistors, etc.
Leaving The Editor
When you are finished with your editing, press the ESC
key. If you have made any changes to the file, a
window will pop up and ask, "Save Changes?".
Answer "Y" to save all changes, or "N" to ignore all
changes. An ESC will cancel the exit, if you have
changed your mind. PC-ECAP Reference Manual page 16
Analyze circuit
This choice will begin the actual analysis of the
circuit selected. If a file containing the circuit
description has not been selected, you will first be
sent to the "Select input file" screen and then
returned to begin analysis.
PC-ECAP will subject your circuit to a 1 volt signal at
the selected input node and then calculate the desired
response at the selected output node. The input signal
is from an ideal voltage source and therefore it can
drive any impedance. Any output node selected will not
be loaded by PC-ECAP.
This analysis is repeated for each of the frequency
points within the specified input range. The number of
points is determined by the "Change the number of
sample points" option under the "Change program
settings" choice of the main menu. Its use will be
fully explained under that heading. If you are doing
an AC analysis, PC-ECAP will display magnitude and
phase results as the analysis progresses. For a
transient analysis the individual points are not
available until the analysis is complete. The results
of the analysis are also saved in a disk file. The
file will have the same name as the circuit description
file but will have a file extension of ".OUT". PC-ECAP Reference Manual page 17
Plotting results
When the analysis is finished, the results will be plotted
on your display. For all display adapters other than VGA,
PC-ECAP will use the highest resolution that your display
adapter supports. VGA adapters will be run in EGA mode (640
x 350). The resolution used will be as follows:
CGA 640 x 200
EGA 640 x 350 enhanced display
640 x 350 monochrome display
640 x 200 color display
Hercules 720 x 348
VGA 640 x 350 monochrome or color
MCGA 640 x 480 monochrome or color
AT&T 640 x 400
MDA 80 x 25
When viewing the graphs on most display adapters you have
the options "Zoom", "Print", "Full" and ESC. The MDA only
has "Print" and ESC.
"Zoom" allows you to enlarge an area of a graph. Press the
'Z' to display two vertical bars with an attached bottom.
You may continue to press 'Z' to narrow the bars. The
number of times this is possible depends on the number of
sample point you have selected for this analysis. When the
bars are at their narrowest, they encompass 35 sample
points. When you have the bars at the desired width, you
can position them horizontally by pressing the Right arrow,
Left arrow, Home or End keys. When the bars are where you
want them, press ENTER to zoom up on the area selected.
When zooming, you may also use the Up arrow and Down arrow
keys to position the bottom dashed line. Moving this bar
sets a minimum vertical scale for your graph. This can be
very useful to help view small variations in amplitude.
You may press 'F' at any time for a "Full" screen display of
your graph. This simply presents the graph as it was
originally displayed.
You may also press 'P' at any time to get a hard copy print
out of just your graphs. The printout will be Zoomed if the
graph is Zoomed on your display. All graphs for your
analysis will be printed.
Pressing ESC will return you to the main menu. Any other
key will cycle through the various plots. PC-ECAP Reference Manual page 18
View output data
This selection allows you to view the results of
circuits that have been previously analyzed. The
results will be listed in tabular form on the display.
You can use the cursor keys to move through them. The
cursor keys that are active under this selection are
the following:
Up Arrow - scroll up one line.
Down Arrow - scroll down one line.
PgUp - scroll up 19 lines.
PgDn - scroll down 19 lines.
Home - display the first 19 lines.
End - display the last 19 lines.
The analysis results can also be plotted on the display
by pressing the F1 function key. Plotting works the
same way as described in the "Analyze circuit" section.
Pressing any key except 'Z', 'F', 'P' or ESC will cycle
through the various plots. Pressing ESC will return
you to the tabular listing of the data. Press ESC again
to return to the main menu.
Output to printer
PC-ECAP will normally send the results of an
analysis to a printer selected under the "Change
program settings" option. If desired, the results can
instead be sent to a disk file for printing later. The
file will have a filename that is the same as the file
selected, but with a file extension of ".PRN".
Partial output listing
This choice will output a listing of the circuit
description at the time of analysis and high resolution
plots of the results.
Full output listing
Choosing this option will output a listing of
the circuit description at the time of analysis, a
tabular listing of the analysis results, and high
resolution plots of these results.
For printed output it is necessary to have a printer
that is compatible with IBM/Epson, HP LaserJet or HP
DeskJet printers. Most printers used with IBM
compatible computers support one of these standards, PC-ECAP Reference Manual page 19
although in a few cases it may be necessary to select
the proper mode by means of a switch on the printer.
Be sure you have configured PC-ECAP for your particular
printer type. This is done under the "Change program
settings" option of the main menu. (see next section
for details).
Change program settings
PC-ECAP allows you to configure certain aspects of its
operation. The configuration information is saved in a
disk file that is read every time the program is run.
The name of this file is "PC-ECAP.CFG". If this file
is not present it will be created. This should only be
necessary the very first time you run PC-ECAP. The
file will have as defaults: 70 sample points for
analysis, LPT1 selected as the output destination, and
an IBM/Epson 9 pin printer selected as your printer
type. Any of these may be changed by means of this
menu.
Change number of sample points
When an analysis is performed, the desired range is
divided into a number of sample points. The number of
points may be set to 35, 70, 140, 280 or 560. It
should be noted that you must obviously make a choice
between the high analysis resolution provided by
selecting 560 sample points and the faster
computational speed offered by selecting 35 points.
The number of points you select really depends on the
circuits that you analyze. I have found that for most
circuits 70 sample points works quite well. You should
increase the number of points if you have a circuit
that has abrupt changes in its response. You may also
need to increase the number of points if you analyze
circuits over a very wide frequency or time range.
Select output destination
The output from PC-ECAP can be sent to a printer
designated as LPT1, LPT2, or LPT3. Alternately output
may be sent to a disk file for later printing. For
printed output, select the port that you have your
printer attached to (normally this will be LPT1).
Pick a printer to use
PC-ECAP supports four different printer types. One of
these types should be a good match for just about any
printer. The supported printer types are: IBM/Epson 9
pin, HP LaserJet (or HP DeskJet), Epson 24 pin and IBM
24 pin. Just choose the type that matches your
printer. Since some printers can emulate more than one
type, be sure that your printer and PC-ECAP are both PC-ECAP Reference Manual page 20
configured for the same printer type. After you make
your selection, it is important that you "Write changes
to disk" (see next choice). If you don't save your
printer configuration, PC-ECAP will not be setup
properly the next time you use it. This only needs to
be done once.
If you have an HP DeskJet printer, you should select HP
LaserJet as your printer type.
HP LaserJet or HP DeskJet users have an additional
choice after the printer type is selected. You will be
asked "2 graphs on page?". In almost all cases you
should answer "Yes" to this question. If you have an
HP DeskJet, you MUST answer "Yes". If you answer "No"
and have an HP LaserJet, graphs will print in landscape
mode (sideways). This option was added mainly to
support older HP LaserJet series I printers. These
printers don't have enough memory to print two graphs
on a single sheet of paper. The option to print in
landscape mode may be occasionally useful to users of
newer HP LaserJet printers. But since graphic
resolution is the same for either choice, most people
will favor using less paper over full page graphs.
Some printers allow you to manually set a particular
font, pitch or mode. DO NOT DO THIS. On most printers
this will override any printer commands that your
computer may send, and PC-ECAP's printed output will
not print properly. If you have a problem with printed
output, insure that your printer is in "Pgm" mode.
When in "program" mode, your printer will follow your
program's commands, and your printed output will appear
as intended.
Write changes to disk
This selection will write any changes in configuration
to the "PC-ECAP.CFG" file. Select this option to make
the changes you have made carry over to the next
session of PC-ECAP. If the changes are not written to
disk, they will be in effect only for your current
session.
Return to main menu
Returns you to the main menu.
Quit this program
Ends your current session with PC-ECAP and returns you
to DOS. PC-ECAP Reference Manual page 21
Analyzing a Circuit Using PC-ECAP
The first step in analyzing any circuit is to draw the
circuit on a piece of paper. Next number all the nodes in
the circuit. A node is any connection of 2 or more
components. Node numbers must be non-negative integers.
There are two rules that you must follow when numbering
nodes, first ground or the common connection between input
and output must always be designated as node number 0.
Secondly, although the nodes may be numbered in any order,
none may be skipped.
PC-ECAP has a limit of 90 nodes and can handle up to 1000
components. Some components count as more than one circuit
element. You can use the following as a guide;
Resistors, Capacitors, Inductors, Transmission
lines, Fet's and Transconductance amplifiers
each count as one circuit element.
OpAmps and Bipolar transistors count as two.
Transformers count as four.
So it is possible to have fewer than 1000 components in your
circuit and still exceed this limit. Although, in practice,
it is highly unlikely that you will reach this limit. PC-ECAP Reference Manual page 22
Input Format
The input format of a PC-ECAP circuit description is easy to
learn and remember. Fields describing a component are of
the free format type and are simply separated by spaces.
Circuit element names should begin with a letter designating
the type of circuit element and may optionally be followed
by up to 14 additional alphanumeric characters.
Values used to describe a circuit element may be integer
(100), floating point (1000.45), either an integer or
floating point number followed by an integer exponent
(1E-3, 4.7E6) or either an integer or floating point number
followed by one of the following scale factors:
P=1E-12 N=1E-9 U=1E-6 M=1E-3 K=1E3
MEG=1E6 G=1E9
Letters immediately following a number that are not scale
factors are ignored, and letters immediately following a
scale factor are ignored. So 10, 10ohms and 10Hz all
represent the same number, and u, uf and umhos all represent
the same scale factor. Note that 1000, 1000.0, 1000Hz, 1E3,
1.0E3, 1K and 1KHz all represent the same number.
In addition, some values may also be expressed in "European"
format. This format has one or more digits followed by a
scale factor that also takes the place of a decimal point,
followed by one or more digits. For example, 1500 would be
expressed as 1K5. When values are in this format, these
scale factors are recognized: R, K, M. `R' is equal to a
factor of 1. `K' is equal to 1000, as above. `M' is equal
to a factor of 1E6. Please note the difference between this
use of `M' and `M' in the non-European format above. When
`M' is placed at the end of a number it multiplies the
number by 1E-3. But when `M' is placed between two numbers,
the multiplication factor is 1E6. Be careful!
Some examples:
6R8 is 6.8, 5K1 is 5100, 4M7 is 4.7 million PC-ECAP Reference Manual page 23
Circuit Element Description
Resistors
Rxxxx N1 N2 Value
N1 and N2 are the two element nodes. Value is the
resistance in ohms.
Examples:
R1 1 2 100
RLOAD 12 15 1K
Capacitors
Cxxxx N1 N2 Value
N1 and N2 are the two element nodes. Value is the
capacitance in farads.
Examples:
C4 8 9 1uf
COSC 2 3 22pf
Inductors
Lxxxx N1 N2 Value
N1 and N2 are the two element nodes. Value is the inductor
value in henries.
Examples:
L3 7 0 10mh
LTANK 4 5 56uh
Transformers
Txxxx +Pri -Pri +Sec -Sec N
+Pri and -Pri are the nodes for the transformer primary.
+Sec and -Sec are the nodes for the transformer secondary.
N is the turns ratio between primary and secondary (Np/Ns).
The + and - signs denote the phasing of the windings,
e.g. the +Pri node will be in phase with the +Sec node.
Example:
T1 3 0 4 5 10turns PC-ECAP Reference Manual page 24
Transmission Lines (lossless)
Xxxxx N1 N2 Impedance Length
N1 and N2 are the two ends of the transmission line. The
line model used is unbalanced, so N1 and N2 are referenced
to ground. The line impedance is in ohms. The Length is
specified in meters.
Example:
X1 1 2 50 3
Bipolar Transistors (both NPN and PNP)
Bxxxx NB NE NC Beta Rbe
NB, NE, and NC are the base, emitter and collector nodes
respectively. Beta is the Transistor current gain. Rbe is
the equivalent base-emitter resistance (in ohms) used in the
Hybrid-Pi transistor model.
Example:
B1 9 0 11 100 1250
Field Effect Transistors (both JFETs and MOSFETs)
Fxxxx NG NS ND Gm
NG, NS, and ND are the gate, source, and drain nodes
respectively. Gm is the FET transconductance in mhos
(Amps/Volt).
Example:
F2 3 4 0 2000umhos
Operational Amplifiers
Oxxxx N+ N- NO Gain Rout
N+, N-, and NO are the non-inverting input, inverting input
and output nodes respectively. The opamp output is
referenced to ground (node 0). Gain is the open loop gain
of the opamp, usually somewhere between 10,000 and 1 million
times. Rout is the open loop output resistance for the
opamp. Real opamps usually have an output resistance
between 10 and 150 ohms.
Example:
O1 1 2 2 100k 75 PC-ECAP Reference Manual page 25
Transconductance Amplifiers
Gxxxx N+ N- NO+ NO- Gm
N+ and N- are the non-inverting input and inverting input.
NO+ and NO- are the non-inverting output and the inverting
output. Please note that these outputs are floating. In
other words the actual output is not from either output to
ground, but is developed between the outputs. Either output
(but not both) may be tied to ground if a single ended
output is desired. Gm is the amplifier transconductance in
mhos (Amps/Volt). The transconductance amplifier may be
used in its own right or it may be used to perform a voltage
to current conversion, sometimes useful when simulating
other devices.
Example:
Gxxxx 1 2 3 0 100mmhos
A Few Words About Transconductance Amplifiers
Although most people are familiar with bipolar transistors
and operational amplifiers, not as many know about
transconductance amplifiers. These amplifiers are another
variation of a dependent source. The common bipolar
transistor is a current controlled current source; A small
current entering the base controls a much larger current
flowing between the collector and emitter. The opamp is a
voltage controlled voltage source; A very small input
voltage effectively controls a much larger voltage swing at
the output. With this said, a transconductance amplifier
can be described as a voltage controlled current source; A
small voltage difference between the two inputs controls a
current flowing either into or out of the output. In our
case this current will flow from one output to the other.
Valid Circuit Elements
All of the lines that make up a PC-ECAP circuit description
file must either begin with one of the previously mentioned
elements, be blank, or be a comment. To add a comment to
your circuit description, begin the line with a semicolon.
An example comment might be:
; this begins the second filter section
If a line begins with something other than a circuit
element, a blank line, or a comment, PC-ECAP will abort the
analysis and flag the bad line. PC-ECAP Reference Manual page 26
Specifying AC Analysis Parameters
Once your circuit has been described you need to determine
how it will be analyzed. PC-ECAP will subject your circuit
to a 1 volt signal at the selected input node and then
calculate the response at the selected output node. In an
AC analysis, the frequency of the input signal can be swept
over the specified range in either a linear or logarithmic
fashion.
The PLOT statement is used to tell PC-ECAP which node of
your circuit will be used for the input, which node will be
used for the output, the frequency range that you want to
analyze, the sweep mode (linear or logarithmic) and the
analysis type. PLOT should be the last statement in your
description.
This is the AC format for the PLOT statement:
PLOT NI NO Start-freq. Stop-freq. Plot-mode Plot-type
PLOT may optionally be abbreviated to P. NI is the
circuit's input node. NO is the circuit's output node.
Start-frequency is simply the beginning frequency for the
analysis. Stop-frequency is the upper frequency limit of
the analysis. Plot-mode specifies whether a linear or a
logarithmic frequency sweep is to be performed. This may be
abbreviated to 3 letters (LIN or LOG) if desired.
Plot-type may optionally be used to specify the analysis
type. If it is not specified, magnitude and phase will be
calculated. To calculate group delay, impedance, VSWR or
return loss, you must provide this parameter.
for: Plot-type is:
group delay Delay
impedance in magnitude ZPolar
and phase format
impedance in Real and ZRectangular
Imaginary format
VSWR SWR <reference impedance>
(voltage standing
wave ratio)
return loss RLoss <reference impedance>
Plot-type may be abbreviated to the letters that are
capitalized. PC-ECAP Reference Manual page 27
Impedance, VSWR (voltage standing wave ratio) and return
loss calculations will be done at the input node specified.
This doesn't mean that you can't calculate an output
impedance instead. If your circuit's output is node 8, and
you are interested in its output impedance, just specify
node 8 as the input node for the PLOT statement. You can
look at it this way, to determine impedance, PC-ECAP must
apply an excitation signal to your circuit. This signal is
always applied to the node listed as the input node for your
circuit.
For VSWR and return loss, a reference impedance must also be
specified. This is the impedance that your circuit is
supposed to be matched to. This is usually 50 or 75 ohms,
but it may be any positive value.
As an example of what we have been discussing, we might have
a circuit where node 2 is the input and node 5 is the
output. The lowest frequency that we want to look at is 100
Hz and the highest frequency is 10 KHz. We are only
interested in magnitude and phase vs frequency. And we want
to sweep this range logarithmically.
This PLOT statement will specify all this:
PLOT 2 5 100HZ 10KHZ LOG
For another example, we have a circuit with node 1 as its
input. We are interested in determining the input VSWR vs
frequency. The input is supposed to match 50 ohms, and
operate from 7.0 MHz to 7.3 MHz.
This is the PLOT statement that will do the job:
PLOT 1 5 7MEG 7.3MEG LIN SWR 50
Please note that for impedance, VSWR or return loss
calculations, the output node specified in the PLOT
statement is unimportant. It is ignored.
What is Group Delay anyway?
If a circuit is designed to pass all important frequencies
with equal amplitude and have absolutely linear amplitude
characteristics, a waveform may still pass through badly
distorted. The problem is delay distortion; if all
frequency components do not pass through a circuit with the
same time delay, the output waveform will not look the same
as the input. Group delay is the rate of phase shift vs
change of frequency, and is defined as:
1 d0
group delay = --- x --- seconds
360 df PC-ECAP Reference Manual page 28
Specifying Transient Analysis Parameters
PC-ECAP also has the capability to analyze the transient
behavior of a circuit. This feature can give you important
information about a circuit's response vs time. You have a
choice of eight different input waveforms for analysis. In
addition, a circuit's impulse response can also be
calculated.
As with an AC analysis, the program will subject your
circuit to a 1 volt (peak) signal from an ideal voltage
source. The input waveform can be one of the following: a
step (unit step, and two modified step functions), pulse,
ramp, square wave, triangle wave, or sine wave. You may
optionally add noise to any of these waveforms.
The PLOT statement is used to specify all the parameters
needed for a transient analysis. This is its format:
PLOT NI NO TStart TStop TRAN Wave-Type TPeriod NOISE
PLOT may be abbreviated to P. NI is the circuit's input
node. NO is the circuit's output node.
TStart is a time offset for the input waveform. The input
waveform will be delayed by the amount specified by TStart.
It can be helpful to delay the rising edge of the input when
analyzing some circuits.
TStop is just the final time for the analysis. TRAN tells
PC-ECAP that a transient analysis is desired.
Wave-Type selects the waveform at the input and should be
one of the these:
STEP
This is a unit step. The wave is 0 volts when time
is less then TStart. At TStart, the voltage goes to 1
volt and stays there.
STEP1 [rise-time]
This is a modified step function. It behaves like the
STEP just discussed, but has a rise time that is shaped
by a COSINE function. A rise time must be specified
for this function. The rise time is the amount of time
the leading edge takes to go from 20% to 80% of its
final value. If a rise-time is not specified or is
zero, it will default to TStop / 8. PC-ECAP Reference Manual page 29
STEP2 [rise-time]
This is a another modified step function. It behaves
like the STEP discussed before, but has a rise time
that is shaped by a RAMP function. A rise time must be
specified for this function. The rise time is the
amount of time the leading edge takes to go from 20% to
80% of its final value. If a rise-time is not
specified or is zero, it will default to TStop / 8.
PULSE [pulse-width]
This pulse is 0 volts at any time less than TStart. At
TStart, it goes to 1 volt and stays there for a time
equal to "pulse-width". After this time (TStart +
pulse-width) the voltage returns to 0 for the remainder
of the analysis. "Pulse-width" must be specified. If
it is not or is zero, it will default to one-half
"TStop".
RAMP [pulse-width]
This waveform is 0 volts for any time less than TStart.
At TStart the voltage will linearly increase, finally
reaching 1 volt when time is equal to TStart + pulse-
width. At the next time step, the voltage will
immediately return to 0. As with the PULSE, "Pulse-
width" determines the width of the RAMP and must be
specified. If it is not or is zero, it will default to
one-half "TStop".
SQRW [frequency]
This will generate a square wave. At TStart the
voltage will jump to +1 volts. Half way through the
cycle, the voltage will change to -1 volts. This cycle
will continue forever. The frequency is determined by
the "Frequency" parameter which must be specified. If
"Frequency" is missing, it will default to 1/TStop.
TRIW [frequency]
This will generate a triangle wave. At TStart the
voltage will linearly increase to +1 volts. A quarter
way through the cycle, the voltage will begin to ramp
down. When the voltage reaches -1 volts, the ramp will
reverse and start back up to +1 volts. This cycle will
continue forever. The frequency is determined by the
"Frequency" parameter which must be specified. If
"Frequency" is missing, it will default to 1/TStop. PC-ECAP Reference Manual page 30
SINW [frequency]
This will generate a sine wave. At TStart the voltage
will increase to +1 volts. A quarter way through the
cycle, the voltage will reverse direction. When the
voltage reaches -1 volts, the wave will reverse and
start back up to +1 volts. This cycle will continue
forever. The frequency is determined by the
"Frequency" parameter which must be specified. If
"Frequency" is missing, it will default to 1/TStop.
IMPULSE
This option will compute the impulse response for your
circuit. The impulse function is defined as a pulse of
infinitely high amplitude with an infinitely short
duration. The area under this pulse (voltage x time)
is equal to 1. Although this pulse can't truly exist
in the real world, it is nevertheless useful in some
situations. The impulse response always starts at time
0. TStart is ignored (but a value MUST still be
supplied).
NOISE
Noise is an optional parameter that can be added to any
of the waveforms described other then IMPULSE. When
present, pseudorandom noise is added to the wave
specified.
Computational Techniques Used in PC-ECAP Transient Analysis
The method PC-ECAP uses to compute transient response is a
bit unconventional and deserves some explanation. It's not
necessary to understand all of this in detail, but a basic
understanding of the principals involved will help you get
the most out of the program.
You may have heard of something called a Fourier transform.
This is a mathematical operation that can convert from the
time domain (amplitude vs. time) to the frequency domain
(amplitude vs. frequency). With the Fourier transform you
can take a waveform and break it down into the series of
individual frequency components that make it up.
As with most mathematical operations, there exists an
inverse to the Fourier transform. The Inverse Fourier
transform can take a set of frequency components and
construct a waveform in the time domain. This is a very
powerful tool. It allows you to work in the frequency
domain when convenient and then convert to the time domain
only when desired. PC-ECAP Reference Manual page 31
PC-ECAP can easily calculate the frequency response of a
circuit (amplitude vs. frequency). By using an Inverse
Fourier transform, we can calculate what is called the
Impulse response of the circuit. If you know the Impulse
response of a circuit, it is possible to find the response
to ANY other waveform by a mathematical operation called
convolution. This is very powerful technique and certainly
involves a lot of underlying mathematics.
So, to calculate the transient response of a circuit,
PC-ECAP first computes the magnitude and phase at a series
of harmonically related frequencies. Next it performs a
Discrete Inverse Fast Fourier Transform. At this point we
have the Impulse response. In the next step, a Discrete
Convolution is performed between the Impulse response and
the desired waveform that was specified at the circuit's
input. The result is the transient response of the circuit
to the waveform specified.
It is important to realize that the accuracy of the analysis
depends on the number of sample points chosen. The number
of sample points determine not only the number of points
that you wind up with in the time domain, but they also
determine the number of frequencies used in the Inverse FFT.
Choosing too few sample points will impair the accuracy of
the analysis.
How few is "too few"? That depends on your circuit. Every
circuit that contains at least one capacitor or inductor has
what is called a "natural frequency". Also sometimes called
the "natural response". Some circuits have many "natural
frequencies". These are nothing more than the various time
constants (for RC's or RL's) or resonant frequencies (for
LC's) in a circuit. If you have some background in
electronic theory, these are the poles and zero's of a
circuit.
If you pick too few sample points, the program will not use
enough frequencies to properly characterize your circuit.
The time scale you select also effects the accuracy of your
results. If the time scale is large compared to the natural
frequencies of your circuit, you will have to increase the
number of sample points used. If the time scale is too
small, the analysis frequencies will start above the
circuit's natural frequency and accuracy will suffer.
For the problem of picking a time scale that is too short,
the thing to remember is the Impulse response of a circuit
must die out to zero in the time frame specified. This is
important and easily determined. If you want to check this
condition, specify IMPULSE as your Wave-Type. You should
see your circuit's response go to zero sometime before the
TStop time. If it doesn't, you must increase TStop. PC-ECAP Reference Manual page 32
A circuit that has a large span of natural frequencies will
require the most care to analyze. For the low natural
frequencies, the TStop time must be set large enough so the
Impulse response dies out to zero. At the same time, the
number of sample points must be great enough to properly
characterize the high natural frequencies.
All this will make more sense when you actually analyze a
few circuits. Vary the number of sample points to see the
effect. Try setting the TStop time much larger than the
lowest natural frequency in your circuit. Try setting the
TStop time shorter than the highest natural frequency in the
circuit. By trying these things you will quickly get a feel
for their effect and understand more than you can by just
reading. PC-ECAP Reference Manual page 33
An Example Please!
It's about time now to look at an example circuit. We will
analyze a simple RC low-pass filter. The circuit is shown
below.
1 1.59K 2
------/\/\/\/\------*---------
|
|
input ___|___ .1uf output
_______
|
|
0 |
--------------------*----------
This circuit has 3 nodes and they have been numbered.
Notice that we have numbered the common node between the
input and the output as node 0. This is required.
The next thing to do is to describe the circuit to PC-ECAP
so that it will know just what is connected to what and the
component values associated with each part. The next two
lines will completely describe this circuit:
R 1 2 1.59K
C 2 0 .1UF
The first line says to PC-ECAP that a resistor is connected
between nodes 1 and 2 and has a value of 1.59K (notice that
you don't have to enter 1590 for the resistor value, PC-ECAP
understands what "K" means).
The second line reads "a capacitor is connected between
nodes 2 and 0 and has a value of .1uf". Now all we have to
tell PC-ECAP is where we want to put the input signal, where
we want to look for the output and what frequency range we
want to cover. This is done with the PLOT statement. For
this circuit we want node 1 to be our input and node 2 to be
our output. Also we want to sweep the input frequency from
100Hz to 10KHz in a logarithmic fashion. The next line will
tell PC-ECAP all this.
PLOT 1 2 100 10KHZ LOG
On your distribution disk (or in the archive file if you got
this program from a BBS) you will find EXAMPLE1.DAT. This
file contains the circuit description for this circuit. PC-ECAP Reference Manual page 34
If you haven't started PC-ECAP yet do so now. From the
main menu choose the "Select input file" selection. Select
EXAMPLE1.DAT as your input file. Next from the main menu
choose "Edit input file". The editor will load EXAMPLE1.DAT
and you will see the following:
; Example1.dat - RC low-pass filter with a cutoff frequency
; of 1 KHz.
R 1 2 1.59k
C 2 0 .1UF
PLOT 1 2 100 10KHZ LOG
This circuit description tells PC-ECAP all that it needs to
know about this circuit and how you want to analyze it.
Press ESC to get back to the main menu and now choose
"Analyze circuit". The analysis will begin and you will see
the results as the program progresses. When the analysis is
complete, the results will be plotted on your display.
First you will see a plot of Magnitude vs. Frequency. If
you press any key other than ESC you will get a plot of
Phase vs. Frequency. Pressing any key (other than ESC)
again will show you Magnitude again. If you have an EGA
with 256K of memory or a Hercules or VGA card, both pages of
graphics memory will be used and the change from Phase to
Magnitude and back will be instantaneous.
An Example of Transient Analysis
EXAMPLE2.DAT is the same circuit as EXAMPLE1.DAT. But this
time we're going to run a transient analysis. We'll pick a
Stop time of 3 ms and a 1.5 ms Pulse for the input. The
input pulse will be delayed .1 ms to show the leading edge
better. This is the circuit listing:
; Example2.dat - RC low-pass filter with cutoff frequency of
; 1 KHz. This example shows how to analyze a circuit's
; transient response.
R 1 2 1.59K
C 2 0 .1UF
PLOT 1 2 .1MS 3MS TRAN PULSE 1.5MS
That's all there is to it. Select EXAMPLE2.DAT and run an
analysis on it. Try varying the Stop time or the Pulse
width. PC-ECAP Reference Manual page 35
Another Example
We have included a few other sample circuits with PC-ECAP.
EXAMPLE3.DAT is a 75 ohm high-pass filter that can be used
to reject television interference. EXAMPLE4.DAT is a
band-pass filter for use as a modem receive filter. This
example shows how group delay is calculated. EXAMPLE6.DAT
is an LC low-pass filer for which input impedance is
calculated. EXAMPLE7.DAT is an example of the calculation
of return loss. EXAMPLE8.DAT is an LC band-pass filter for
which VSWR is calculated. EXAMPLE9.DAT is an LC low-pass
filter with a Square wave as input (for another example of
transient analysis). If you'd like, take a look at them and
run an analysis. You may want to draw them on a piece of
paper first to really see what you are doing. PC-ECAP Reference Manual page 36
For our last example we're going to take a look at
EXAMPLE5.DAT. This circuit is a single stage transistor
amplifier made with a 2N3904 NPN transistor. We will
demonstrate the use of the "Model Maker" that is part of the
full screen editor. Here's the circuit:
+10 volts
0 |
\ R4
/ 470 ohms
\
/
R3 |
8.2K | 3
+--\/\/\/\----*---------
| | output
| /
R1 | | /
1 270 ohms | 2 |/ 2N3904
-------/\/\/\/\---*---------|
| |\
input R2 \ | \
1.2K / _\/
\ |
/ |
| 0 |
------------------*-------------*---------
As you can see the first thing you need to do is to number
the nodes. Please take a look at the top of R4. This end
of the resistor connects to the +10 supply voltage but we
have numbered it as node 0. This is an important point.
Any node that has a DC voltage connection should always be
connected to ground. For the sake of an AC analysis, any DC
voltage source is the same thing as ground.
Now that we have numbered the nodes, we can describe the
circuit:
R1 1 2 270
R2 2 0 1.2K
R3 2 3 8.2K
R4 3 0 470
Alright, now we are ready for the NPN transistor. The
transistor that we are using is a 2N3904. We could use a
simple one line description for this transistor, but that
wouldn't show what happens to the transistor at high
frequencies. What we need is a more sophisticated
transistor model. One that will change its characteristics
as the frequency changes like a real transistor. PC-ECAP Reference Manual page 37
PC-ECAP has the capability to create just such a model. But
first you need to know some information about the transistor
that you want to model. This is what is required:
DC collector current -
For this circuit about 10 milli-amps flows
from the collector to emitter.
Transistor current gain -
At 10 ma. this is a minimum of 100. This is
the same as Beta (the current gain at DC).
Transistor Gain-bandwidth product -
For the 2N3904 with a collector current of 10
ma. this is 300 MHz minimum. This is also
known as Ft.
Common base output capacitance -
This is just the capacitance from the base to
the collector. For the 2N3904 it is 4 pf
maximum.
Now that we have the required information we can make a
transistor model. Please note that it doesn't matter for an
AC analysis whether the transistor is NPN or PNP.
From the editor press F2. This will start the Model Maker
function. A window will appear and ask first for the node
numbers for base, emitter and collector. You would just
enter 2, 0, and 3. Then you will be asked for the
information mentioned above. After answering all the
questions your model will be created and inserted into your
circuit description on the line following the cursor.
For this circuit we might want to know just how good a
frequency response we have, so let's sweep a frequency range
of 1 KHz to 100 MHz. And let's do it logarithmically. With
node 1 as the input and node 3 as the output, this line
should make PC-ECAP do what we want:
P 1 3 1KHZ 100MEG LOG
As you might notice, PLOT can be abbreviated to P.
That's all there is to it. Run an analysis and see what
kind of amplifier we have. You should also try changing
some component values to see what happens. What happens if
you decrease R1? Or increase it? PC-ECAP Reference Manual page 38
Models
The circuit models that PC-ECAP uses for Transformers,
Bipolar transistors, FET's, Operational Amplifiers, and
Transconductance Amplifiers are ideal models. If you
desire, you can easily create models that are more complex.
For Bipolar transistors if your need a better model just use
the "Model Maker" feature in the editor. As previously
discussed, a Hybrid-Pi transistor model will be created and
inserted into your circuit description.
For the transformer, the addition of two inductors will make
a transformer that is quite "real". You can add an inductor
in parallel with the primary to model the transformer's
magnetizing inductance. This inductor should be equal to
the transformer's primary inductance. The transformer's
manufacturer can supply the inductor value for this or you
can measure it yourself (the secondary should be open for
this test). A second inductor can be added in series with
the primary winding (and the inductor paralleling the
primary). This inductor will model the transformer's
"leakage" inductance. This inductance is due to the
magnetic field that does not couple the primary and
secondary windings. Again, the transformer's manufacturer
can supply this or you can measure it (measure the primary
inductance as before, but this time short out the
secondary). By adding these two inductors, you will create
a transformer that has a finite bandwidth. The parallel
inductor affects the low frequencies and the series inductor
will affect the high frequencies.
For FET's, the addition of a capacitor to model the gate to
source capacitance and a second one to model the gate to
drain capacitance will improve accuracy at high frequencies.
You can get the appropriate values from your transistor's
data sheet. Also the Siliconix Low Power Discretes data
book is an excellent source for more information on this.
For FET's: Cgs = Ciss - Cgd = Ciss - Crss
Cgd = Crss
Operational Amplifiers today are usually frequency
compensated internally. Most of the time a method called
"dominant pole compensation" is used. This method inserts a
pole in the opamp's frequency response at a very low
frequency. This pole will dominate the response (hence the
name) and roll off at a 20 db/decade rate. The opamp model
that PC-ECAP uses is not frequency dependent. The open-loop
gain that you ask for is the gain that you will get for all
frequencies. It's not that difficult to make an opamp model
that will decrease its gain as frequency increases. Such a
model is included on your disk as OPAMPMOD.DAT. Please take
a look at it. PC-ECAP Reference Manual page 39
References for Modeling
Although we have tried to give you some useful information
to use for modeling circuit elements, a full treatment of
the subject is beyond the scope of this manual. For those
of you who are interested, a good college library should
have several books that might help. Two references that may
be more readily available for many people are:
"National Semiconductor Linear Applications Handbook" from
National Semiconductor Corporation
2900 Semiconductor Drive
Santa Clara, CA 95052-8090
This handbook has an excellent paper entitled "The
Monolithic Operational Amplifier: A Tutorial Study". This
paper tells you just about everything that you would want to
know about the inner workings of opamps.
A good reference for FET's in general is:
"Siliconix Low Power Discretes Data Book" by
Siliconix Incorporated
2201 Laurelwood Rd.
Santa Clara, CA 95054-1516
They have several interesting application notes on the use
of FET's.
Parting Comments
A considerable amount of time and effort was expended to
develop PC-ECAP. We sincerely hope that you feel it was all
worth it. We want you to know that we don't intend to stop
here. We have even more ideas for enhancements we would
like to add in future releases. But it is you that will
make it possible. By registering your copy of PC-ECAP, you
will help make the possible into reality. Thanks for your
support. PC-ECAP Reference Manual page 40
Revision History
Version 3.01 - 1/24/94
Some Super VGA cards using Western Digital 90C31 or 90C31
chips have a bug in their video BIOS. This causes PC-ECAP
to hang on program startup. A work around has been added
to solve this problem. Added /v and /vm switches to force
640x480 graphics modes. Also added the tab key to editor.
Version 3.00 - 11/01/93
Added Transient analysis calculations. Added transmission
lines as circuit elements. Added zoom and print features to
plot screen. Added support for HP DeskJets. Improved
support for HP LaserJet Series I. Now displays more digits
of frequency when plotting narrow band high frequency
graphs. Analysis routine is now 40-100% faster.
Version 2.10a - 8/18/93
In some rare situations, graphs would autoscale improperly.
Fixed.
Version 2.10 - 11/09/92
Now handles circuits with up to 90 nodes. Added option to
print only circuit description and graphs. Negative
inductor values are now accepted. Changed listing format
for frequencies of 10 GHz and above. Added network (LAN)
support. Fixed "border flash" when switching from graphics
to text mode on some CGA cards. Added table of contents to
manual.
Version 2.01 - 2/03/92
Improved syntax checking on the circuit description files.
More input errors are spotted and flagged.
Version 2.00 - 10/14/91
Added group delay, impedance, VSWR and return loss
calculations. Now has full support for 24 pin printers.
Now supports HP LaserJet. Editor has been enhanced.
Analysis routine is now twice as fast as previous versions.
Added AT&T and MCGA support. Added support for a math
coprocessor. European format for element values now
accepted. Improved error checking on circuit description
files. International time and date on printouts now
supported. Numbers are now stored in IEEE binary format.
No longer supports "non-compatible" video. Now requires
384K of system memory.
Version 1.11 - 11/23/90
Added the filename to the headers and plot sheet of the
printout. Negative resistance values are now accepted.
Fixed bug in hard copy plotting routine - plot would display
spurious points if the plot exceeded the maximum range.
Fixed bug in analysis routine; Occasionally, a circuit with
a very wide range of reactive component values could create
an internal numeric overflow. PC-ECAP Reference Manual page 41
Version 1.10 - 9/14/90
Added the option of 35 sample points to the select number of
sample points menu. Greatly increased the number of plot
ranges available when displaying results. Magnitude now
spans .1 db/div to 80 db/div and Phase now spans 22.5
degrees/div to 720 degrees/div.
Version 1.02 - 1/30/90
First release widely distributed. PC-ECAP Reference Manual page 42
Appendix A - Command Line Switches
PC-ECAP will automatically determine the type of video
display adapter that your computer uses and will set itself
accordingly. There are a few situations where it is not
possible to accurately determine the adapter type. For
example, if a monochrome monitor is used with a CGA card,
the program has no way of knowing that. Also, there are
some advanced EGA cards that will change their display mode
to match a given program. Since PC-ECAP is trying to change
its mode to match the video adapter, there can be no
guarantee as to what you will actually wind up with.
In order to accommodate these situations (as well as others
that may be unforeseen at this time) PC-ECAP has a series of
optional command line switches that can be used to set the
video display mode.
To start PC-ECAP with a command line option, type this at
the DOS prompt:
ECAP [ option ]
Where "option" is one of the following:
/H Hercules Monochrome Graphics card (or
compatible).
/C Color/Graphics Adapter with color monitor.
/CM Color/Graphics Adapter with monochrome
monitor. For use with Compaq monochrome
display or computers having LCD displays.
/E Enhanced Graphics Adapter with EGA monitor.
/EC Enhanced Graphics Adapter with CGA monitor.
/EM Enhanced Graphics Adapter with monochrome
monitor.
/MC Multi-Color Graphics Array.
/M Monochrome Display Adapter.
/A AT&T or Olivetti video adapter with color
monitor.
/AM AT&T or Olivetti video adapter with
monochrome monitor. May also be useful for
some Laptop computers.
/V VGA Adapter with color monitor. 640x480
/VM VGA Adapter with monochrome monitor. 640x480 PC-ECAP Reference Manual page 43
Appendix B - Error Messages
ABORT -- Bad circuit description
The PLOT statement must be the last line of your
circuit description. You have entered additional
circuit elements after the PLOT statement. Move these.
ABORT -- Blinking nodes have been skipped
You have skipped over one or more nodes in your circuit
description. Node numbers must begin at 0, and be
numbered consecutively.
ABORT -- Blinking nodes have less than two components
Your circuit description has one or more "dangling"
components. All nodes (other than the input) must have
at least two components attached.
ABORT -- Insufficient memory for operation
PC-ECAP makes extensive use of dynamic memory. That
is, memory that it allocates only when needed.
Although this makes for very efficient memory usage,
peak memory requirements can not be known up front.
Your only choice here is to do without the feature
that gave you this error or get more RAM memory for
your computer. PC-ECAP can use Upper Memory Blocks
(UMB's) if you have DOS 5 or greater. Be sure you
have UMB support enabled.
ABORT -- Invalid circuit element
You have an unknown circuit element in your circuit
description file. Valid lines must be either blank,
begin with a semicolon ";" (if a comment), or begin
with one of the letters of a circuit element.
ABORT -- Invalid node number
You have a circuit element that has one or more node
numbers that is not an integer, is negative or is
greater than 89. PC-ECAP Reference Manual page 44
ABORT -- Invalid reference impedance
You have asked to compute the VSWR or return loss for a
circuit, but have not specified an impedance to
reference these calculations to. Or your impedance is
negative or zero. Must be a positive value.
ABORT -- Too many circuit nodes
You have 1 or more circuit nodes with a number greater
than 89, either because you actually have a circuit
with more than 90 nodes or you have made a typo and
have inadvertently skipped some.
ABORT -- Too many circuit elements
You have exceeded the limit of 1000 circuit elements.
R, C, L, Transmission lines, Fet's and Transconductance
amplifiers each count as one circuit element. OpAmps
and Bipolar transistors count as two. Transformers
count as four.
ABORT -- Too many transmission lines
You have more than 64 transmission lines in your
circuit.
ABORT -- Unknown parameter specified
You have listed a parameter that is unrecognized and
unexpected. Recheck the syntax of the line displayed.
ABORT -- Unknown sweep type
You have specified a sweep type that is something other
than LINear, LOGarithmic or TRANsient (may be
abbreviated to the letters shown capitalized).
ABORT -- Wave type not specified
You have asked for a transient analysis, but have
omitted the type of waveform to be used as input. PC-ECAP Reference Manual page 45
CAUTION! Conflicting transistor parameters supplied
The data that you have entered for your transistor
doesn't make any sense. For example - you may have
said that your transistor has a very high cutoff
frequency and then specified a huge base to collector
capacitance. Or you may have specified a very low
collector current and a high cutoff frequency. Things
that contradict each other. Recheck your data and
change if necessary.
ECAPHERC.DRV is not found
You have a Hercules or Hercules compatible graphics
card, and the required driver ECAPHERC.DRV is missing.
This driver is needed to display text when PC-ECAP is
in graphics mode. If you have DOS version 3.0 or
greater, PC-ECAP will look for this file in the same
directory that contains ECAP.EXE. This may be
different than the directory that contains your circuit
files. Otherwise, ECAP.EXE and ECAPHERC.DRV should be
in the current directory.
File is currently being used by someone else
You can get this message when you are running PC-ECAP
on a network or multi-user system and you attempt to
access a file that is already in use. Wait until the
file is available or pick a different file.
Floating point math error -
It should not be possible to get this error. If it has
occurred, please send us a complete description of what
you did to get it, so that we may look into the
problem.
Input File Size Limit Reached
PC-ECAP allocates a 500 line buffer for its editor.
Your circuit description file has exceeded this amount.
The only way this should happen is if you have filled
your circuit description file with comments or other
nonessential information. Remove the extra data.
Insufficient disk space
Well, what can we say, your disk is full. Delete those
files that you really don't need or get a bigger disk. PC-ECAP Reference Manual page 46
LPT1, LPT2 or LPT3 is not ready
You requested PC-ECAP to print something but your
printer isn't ready. Check to see that your printer's
power is turned on. Also check to see if your
printer's cable is connected. You will also get this
message if you try to print on a printer that does not
exist.
No files found. Enter name of new file.
When you tried to select an input file, PC-ECAP didn't
find any that had the extension ".DAT". If you
actually believe that there should be circuit
description files in you current directory, quit
PC-ECAP and check to see if you are in the correct
directory.
Not enough space for . . .
You are out of memory and PC-ECAP is unable to load.
Remove any TSR programs from memory or get more memory
for your computer.
Please create this file or select another
You have asked for an analysis of a circuit that does
not exist. Use the text editor to create a circuit
description file for your circuit.
Please run an analysis or select another
You have asked to see the results of a circuit that you
haven't analyzed yet. Run an analysis.
Unable to delete "filename"
You tried to delete a file that was most likely marked
as Read Only. Check to see if this is the case and
change the file's attribute if necessary.
You have enough memory to analyze circuits with
up to ## nodes.
If your computer has less than 450K of free memory
available, you will see this message when you start
PC-ECAP. The program is giving an estimate of the
maximum circuit size you can analyze based on the
amount of memory in your system. PC-ECAP Reference Manual page 47
Your copy of PC-ECAP has been damaged!
Someone or something (another program perhaps) has
changed your copy of ECAP.EXE. PC-ECAP checks itself
every time it runs and this check has failed.
Reinstall the program. PC-ECAP Reference Manual page 48
Appendix C
PC-ECAP to Lotus 1-2-3 file conversion
Included with the REGISTERED version of PC-ECAP is the
utility program ECAP2WKS. This program can be used to
convert PC-ECAP ".OUT" files into Lotus 1-2-3 compatible
spreadsheets. This can be very useful if you want to do
additional operations on your data, such as normalizing
circuit gain at a particular frequency or plotting several
quantities on the same graph.
These PC-ECAP spreadsheets can be used with just about all
of the popular spreadsheet programs such as Lotus 1-2-3,
Quattro Pro, Microsoft Excel and the excellent shareware
program AS-EASY-AS.
To convert a file just type:
ECAP2WKS filename.out
Filename.out should of course be the name of the PC-ECAP
file that you want to convert. If you don't specify a file
extension, ".OUT" will be assumed. As an option, you can
also specify the name of the converted ".WKS" file. To do
this, just add its name after "filename.out". The ".WKS"
file extension is optional:
ECAP2WKS filename.out filename.wks
ECAP2WKS will accept wildcards. For example, to convert all
files beginning with "BAND", such as "BAND_ONE", "BAND_TWO",
etc., type:
ECAP2WKS band*.out
And finally, you may also specify full drive and path
specifications along with the filenames. For example:
ECAP2WKS D:\ecap\lowpass.out C:\lotus\123files\
will convert "LOWPASS.OUT" to "LOWPASS.WKS" and place it in
the \LOTUS\123FILES subdirectory on drive C:.
ECAP2WKS checks to see if the file specified is really a
PC-ECAP ".OUT" file before attempting a conversion.