@database AmiSPICEed.guide

@Node Main "AmiSPICEed.guide"

   AmiSPICEed V2.1 - English Short manual

   This guide is meant to be an introduction to the functions and use
   of this program. To obtain information about the actual components and
   their use you have to read the SPICE manual included with the SPICE
   archive.


 @{" Introduction, Requirements and Installation " Link "Einf"}
 @{" README!!                                    " Link "Recht"}

 @{" Window                                      " Link "Fenster"}
 @{" Menus                                       " Link "Menus"}
 @{" ToolTypes                                   " Link "ToolTypes"}

 @{" Elements of the internal library            " Link "Intern"}
 @{" The NE5561-model                            " Link "NE5561"}
 @{" Construction of the libraryfile             " Link "BIBO"}

 @{" Specialities                                " Link "Besonder"}

@EndNode

@Node "Einf" "Introduction, Requirements and Installation"

   AmiSPICEed is a graphical schematic editor that enables direct input of
   analogue circuits into the SPICE simulator. This makes it possible to
   input the circuit as a schematic instead of a node list. By using the
   libraryfile you can input your own components into the schematic and
   simulation.

   To use the program you need at least the following:

   - An AMIGA with OS 2.04 or later

   - A harddisk

   - A workbench screen with 640x400 Pixel or more

   - Installed SPICE program. (AMINET: misc/sci/)

   - "amigametaformat.library" by Henk Jonas is required for EPS-export.

   ENGLISH MANUAL, this version written by Leif Johnsson
                   E-mail: leffesko@algonet.se
                   expanded by Dirk Hasse

@EndNode


@Node "Recht" "README!! "

   AmiSPICEed V2.1 is (c) in 1997 - 2000 by Dirk Hasse.

   AmiSPICEed V2.1 may be freely redistributed as long as no modifications
   are made and nothing is charged for it. Commercial usage is strictly
   forbidden.

   I am not responsible for any damage directly or indirectly caused by the
   usage of AmiSPICEed. Anything you do is at your own risk.

   If you consider the program to be useful and if you want to do something
   for the further development, you can transfer me some money to the
   following bank account:

   Volksbank Brilon
   BLZ: 41661719
   Acc.-Nr.: 100881319

   PPC-board, Surfboards or keyfiles are accepted to.

   Dirk Hasse
   Bernhardusstr. 34
   59929 Brilon
   GERMANY


   Bug-reports, comments, questions etc. please ONLY via email:

   beavis@azrael.uni-paderborn.de


   @{" A picture of me doing what I like most... " Link "surfing.iff/MAIN"}


   Brilon, May 01. 2000

@EndNode

@Node "Fenster" "Window"

   The different windows have the following functions:

   @{fg highlight}@{b} Edit-Window @{ub}@{fg text}

   This window is used for showing and editing the schematic. With the aid
   of the scrollbars you may move about the complete schematic. Adding
   components at the edge will resize the scrollable area, in this way you
   you can use schematics of almost infine size. ( Hmmm... or at least up to
   the limit of the used 32 bit position counter...) From version 1.1 the cursor
   keys will let you scroll without limits.

   When you have "glued" a component to the mouse-pointer, just Click on the
   wanted position on the schematic and it will be placed. The selection-point
   for each component is marked with a light dot (Click on it to select the
   component). In EDIT-MODE this point will be highlighted when the mouse-pointer
   is move across it.
   The filename and path will be shown in the window titel.

   From version 1.2 you can edit elements by a double-click when in EDIT-MODE.

   @{fg highlight}@{b} Library-Window @{ub}@{fg text}

   This window contains two listwievs, one with all installed libraries and one
   with all the components in the selected library. All libraries are
   ASCII-files.

   IMPORTANT To edit the schematic you must select EDIT_MODE in the internal
   library. In order to connect the components togheter you must be in this mode.


   @{fg highlight}@{b} Plot-Window @{ub}@{fg text}

   This window is opened ASYNCHRONOUS (that means, that you can continue your
   work in the other windows!), if a simulation is started via the menu
   "Run SPICE..." and succesfully performed. The voltages and currents, which
   where selected via the view voltage and view current elements, are
   graphically displayed here.

   The following gadgets apear at the top of the window:

   Close:      : Close the window

   Save ASCII  : All active plots (checkbox gadgets) can be saved as an ASCII-
                 file with selectable name. The used delimitter can be selected
                 by the tooltype: "DELIMITTER".

                 Example file for DELIMITTER=TAB:

                 time     U0     U1     I0
                 0        1      0.5    0.01
                 0.1      0.5    0.67   0.023
                 0.2      0      0.8    0.04

   Split (Join): You can choose between two possible display-modes:

                 Joined : All voltages and currents are displayed in one plot.

                 Spitted: Every voltage or current is displayed in a seperate
                          plot.

   Add plot     : The expression given in the string-gadget will be parsed and
                  added to the plot-window. The new identifier for this plot
                  will be Pxx. You can use normal mathematical expressions
                  with the following restrictions and elements:

                  - floating point values without exponents, e.g. 1.234

                  - variables which are already plotted in the window, e.g.
                    U0,U1,P0,A10
                    ATTENTION: in AC-analysis-mode there will be the real and
                    imaginary part of each voltage or current. In this case
                    the use of U0 is the same as SQRT(Re(U0)^2+Im(U0)^2), the
                    magnitude. ABS(U0) would cause the same result.

                  - Special chars: ^,+,-,*,/,(,)

                  - functions:

                    ABS(x)   :   magnitude abs(x) = sqrt(Re(x)^2 + Im(x)^2)
                    PHASE(x) :   phase  phase(x) from -Pi to Pi
                    DB(x)    :   dezibel  db(x) = 20*log10(x)
                    RE(x)    :   real part
                                 CANNOT BE USED ON WHOLE EXPRESSIONS!
                                 Re(U0+U2) IS NOT POSSIBLE!
                    IM(x)    :   imaginary part
                                 CANNOT BE USED ON WHOLE EXPRESSIONS!
                                 Im(U0+U2) IS NOT POSSIBLE!

                  - No negative values or variables can be used.
                    -2*U0 or 2*(-U0+U1) are invalid and CAN lead to wrong
                    results. You could use the following trick:
                    0-2*U0 and 2*(U1+U0)

                  - there's no 100% syntax-checking, so be carefull

                  - some examples of expressions which make sense:

                    + plot of magnitude and phase of an AC-plot:

                      abs(U0) und phase(U0)

                    + plot of a voltage-difference:

                      U0-U1

   On the left hand you can select which variables to plot via some checkbox
   gadgets.

   PROBLEMS:

   If a (nearly) konstant voltage or current is displayed in a seperate plot,
   the routine which draws the y-grid may get trapped in an endless loop. I
   don't know why, so I added a timeout after 100 loops. On my machine, it
   takes 1 second until the program continues to work.

   If the height of a plot gets too small, it may happen that no y-values
   are printed. You should expand the windowsize or disable some plots in
   this case.

@EndNode

@Node "Menus" "Menus"

   You have the following Menues at your disposal:

   @{" Project " Link "Project"}
   @{" Edit    " Link "Edit"}
   @{" Library " Link "Library"}

@EndNode

@Node "Project" "Project"

   Contents of Project menu:

   @{fg highlight}@{b}Clear (sub-)circuit...@{ub}@{fg text}

   All components in the current schematic and it's subcircuits will
   be erased.

   @{fg highlight}@{b}Load...@{ub}@{fg text}

   A circuit will be loaded and the current circuit with all subcircuits
   will be erased. If used in a subcircuit the parent circuit will not be
   erased.

   @{fg highlight}@{b}Save...@{ub}@{fg text}

   The circuit will be saved to disc, including subcircuits.

   @{fg highlight}@{b}Save as IC...@{ub}@{fg text}

   The current (sub-)circuit will be saved to disc. The directory is ICs and
   the filename is the name of the current IC by default.

   @{fg highlight}@{b}Export to SPICE...@{ub}@{fg text}

   The circuit will be save to disc as a SPICE inputfile.

   @{fg highlight}@{b}Run SPICE...@{ub}@{fg text}

   The circuit will be simulated by SPICE and the result presented in a
   Plot-window. This is done in the following way:

   1.  The circuit will be saved to disc in a Temp-file.
   2.  A CLI-window is opened and the SPICE output is shown here.
   3.  The simulation is started by this call to SPICE
   4.  SPICE writes it's output to a Temp-file.
   5.  AmiSPICEed reads this output and opens the Plot-window.


   The simulation can only be started when all of the following apply

   -   At least one Ground-connection defined
   -   At least one voltmeter or ammeter defined
   -   A simulation must be defined


   @{fg highlight}@{b}Export to TeX...@{ub}@{fg text}

   The circuitpart will be saved to disc in TeX-format by using the EEPIC
   Macrofunctions. The complete circuitpart will be saved , NOT only the
   visible part in the window. It may be scaled by editing the appropriate
   ToolTypes.

   @{fg highlight}@{b}Export as EPS...@{ub}@{fg text}

   The circuitpart will be saved to disc in EPS-format. The complete circuit-
   part will be saved, NOT only the visible part in the window. The postscipt-
   font and it's size can be configured with the tooltypes.

   @{fg highlight}@{b}Save window positions@{ub}@{fg text}

   The current window positions and sizes will be save in "AmiSPICEed.prefs".
   This will enable you to continue  your next session with the windows in
   the same positions.

   @{fg highlight}@{b}About...@{ub}@{fg text}

   A Information window will be shown.

   @{fg highlight}@{b}Help...@{ub}@{fg text}

   The file "AmiSPICEed.guide" will be shown by Multiview.
   Multiview must be in your path.

   @{fg highlight}@{b}Quit...@{ub}@{fg text}

   This will end the program.

@EndNode

@Node "Edit" "Edit Menu"

   Contents of Edit-menu:

   @{fg highlight}@{b}Edit element...@{ub}@{fg text}

   The parameters of the selected component can be edited in a window.
   All compnents will have its component number as the first parameter, ie.
   the number following the identifier (R, L,  C, ...). All other parameters
   are component specific and can be defined in the library file. Parameters
   with empty datafields will not be saved in the SPICE-file,

   WARNING!!: The height of the Edit-window is adapted to the number of
              changeble parameters. This may cause problems on small screens.
              (NOT TESTED)

   Keyboard operation:

   From Version 1.1 the first gadget will be activated, and all gadgets will be
   reachable by the TAB key. When all values are defined you may end the input
   by RETURN followed by "u" or "c" fore Use and Cancel. A press on SPACE will
   activate the first gadget.

   @{fg highlight}@{b}Edit stimulus...@{ub}@{fg text}

   The "Piecewise linear current/voltage" can be edited with graphic support.
   This is performed with the aid of a string gadget for input of time, amplitude
   pairs and a plot window for viewing the specified curve. A press on RETURN
   will redraw the graph, OK saves your curve and CANCEL restores the previous
   values. The values must be in chronological order and negative time is not
   allowed.

   Keyboard operation:

   When the string gadget is deactivated ie after a press on RETURN, it is
   possible to activate the OK Cancel and Show gadgets with the "o", "c" and
   "s" keys, SPACE will reactivate the string-gadget.

   @{fg highlight}@{b}Show subcircuit@{ub}@{fg text}

   After selecting an IC-module the corresponding sub-circuit will be shown.
   This change to a deeper hieriarcally level is indicated in the window title
   by an arrow (->). The titel "Receiver->Filter" means that the subcircuit
   "Filter" is included in the "Receiver" circuit.

   @{fg highlight}@{b}Return to higher circuit@{ub}@{fg text}

   Return to the circuit or subcircuit containing the current subcircuit.

   @{fg highlight}@{b}Delete@{ub}@{fg text}

   The selected component and all its connections will be erased. If it's an
   IC all of the circuits and subcircuits in it will be deleted.

   @{fg highlight}@{b}Move@{ub}@{fg text}

   The selected component can be moved to a new position. The component will
   be dropped when you click on a position in the schematic. All connections
   will be retained.

   @{fg highlight}@{b}Rotate@{ub}@{fg text}

   The selected component will be rotated 90 degrees. All connections
   will be retained.

   @{fg highlight}@{b}Flip@{ub}@{fg text}

   The selected component will be mirrored in the horizontal axis.
   All connections will be retained.

   @{fg highlight}@{b}Redraw@{ub}@{fg text}

   The schematic will be redrawn. This function is included to rectify
   possible graphics driver errors (Should not be neccesary but !!!)

@EndNode

@Node "Library" "Library Menu"

   Contents of Library-menu:

   @{fg highlight}@{b}Load...@{ub}@{fg text}

   You may load additional libraries from disc. At program start all
   libraries in the drawer bibs/ will be loaded.

   @{fg highlight}@{b}Remove...@{ub}@{fg text}

   The selected library will be removed from memory. This can not be
   executed on the internal library or on any library that have components
   in the current schematic.

@EndNode

@Node "ToolTypes" "ToolTypes"

   You have the following ToolTypes to use:

   @{fg highlight}@{b}SPICEEXE@{ub}@{fg text}

   Your Path and filename of the SPICE program. Ie. SPICEEXE=SPICE:spice_3f5

   @{fg highlight}@{b}SPICEWINDOW@{ub}@{fg text}

   Definition for the window used by SPICE to give you information.
   Ie. SPICEWINDOW=CON:0/20//180/Running SPICE...

   @{fg highlight}@{b}PLOTCOLOUR1 to PLOTCOLOUR6@{ub}@{fg text}

   You can define six colour registers to be used when plotting the results.
   It's important to remember that Workbench places its first 4 colours in
   the first register and additional colours in the last register, ie
   PLOTCOLOUR1=127

   @{fg highlight}@{b}PLOTBACKGR@{ub}@{fg text}

   This defines the background colour, please do not use the same colour as
   PLOTCOLOUR or PLOTTEXT, ie. PLOTBACKGR=0

   @{fg highlight}@{b}PLOTTEXT@{ub}@{fg text}

   This defines the colour for the axes and text in the plotwindow, ie.
   PLOTTEXT=1

   @{fg highlight}@{b}TEXUNIT@{ub}@{fg text}

   This defines the size in the TeX-output. One screen pixel gets this length
   in the TeX document. The value TEXUNIT=0.2mm works well with most smaller
   schematics.

   @{fg highlight}@{b}EPSFONT@{ub}@{fg text}

   The postscript-font for EPS-output ca be selected here. Ie. EPSFONT=Courier

   @{fg highlight}@{b}EPSFONTSIZE@{ub}@{fg text}

   Defines the size of the postscript-font in pixel, ie. EPSFONTSIZE=12

   @{fg highlight}@{b}F1 to F10@{ub}@{fg text}

   You may create shortcuts to selected components via F1 to F10, including
   the EDIT-MODE. The function key must have both the library name and
   component name given, comma separated, like this:

   F1=Internal elements,EDIT-MODE

   This will activate the EDIT-MODE in the Internal library via the F1 key.
   Errors in the decoding of the key definition will not be reported,
   but the the key will be undefined.

   @{fg highlight}@{b}SCREENMODE@{ub}@{fg text}

   If this tooltype is defined, AmiSPICEed will start on it's own custom-
   screen with the given mode-ID (hex-value). For a PAL-HIRES-INTERLACED
   screen you have to enter: SCREENMODE=$00029004.

   @{fg highlight}@{b}SCREENCOLS@{ub}@{fg text}

   If AmiSPICEed opens an own customscreen, you can define EXACTLY 8 colors.
   Each gun is desribed by 4 bits ($0 to $f). The tooltypes PLOTCOLOUR1 to
   PLOTCOLOUR8 and PLOTTEXT, PLOTBACKGR must be used, too.
   Example: SCREENCOLS=$bbb,$000,$fff,$06A,$1f1,$e2e,$fe2,$e33

   @{fg highlight}@{b}DELIMITTER@{ub}@{fg text}

   The delimitter for the ASCII-output of all active plots in the plotwindow
   can be selected here. Possible strings are: "SPACE", "TAB" or a character
   of your choice. Example: DELIMITTER=SPACE

   @{fg highlight}@{b}DRAWVALUES@{ub}@{fg text}

   The values of some elements can be printed to the edit window too, if this
   tooltype is set. (eg. RO (10k)) Currently the elements resistor, capacitor
   and inductor are supported.

   @{fg highlight}@{b}GRID@{ub}@{fg text}

   A visible grid can be selected by the tooltype GRID=ON.

@EndNode

@Node "Intern" "Elements of the internal library"

   Contents of the Internal Library:

   @{fg highlight}@{b}EDIT-MODE@{ub}@{fg text}

   This element is activated to edit the schematic. Components can be
   selected operated on by the commands in the Edit-menu.

   You also use this item to connect two components, procedure as follows:

   1. Click on the selection-point in the first component.
   2. Click on the connection-point in the first component

   From version 1.3, the first connection-point ca be selected directly,
   without activating the corresponding element first.

   A line between the mouse pointer and the connection-point is activateda:

   3. Click on the selection-point in the second component.
   4. Click on the connection-point in the second component

   From version 1.3, the second connection-point can be selected directly,
   too.

   The connection will now be drawn on the schematic.

   You use the same method to change alredy drawn connections. The
   interconnections have four hidden connection-points that can be found
   by moving the pointer round the selection-point, they will be
   highlighted !

   @{fg highlight}@{b}Text@{ub}@{fg text}

   You can add information to the schematic with this component. The
   information is not used in the simulation. The Edit-menu can be used to
   change the text.

   @{fg highlight}@{b}Ground@{ub}@{fg text}

   GROUND, each schematic MUST have at least one !

   @{fg highlight}@{b}Knot@{ub}@{fg text}

   If several components have to be connected together you have to use this
   interconnection component. Place it on the schematic and use it as a
   normal component.

   @{fg highlight}@{b}Interface@{ub}@{fg text}

   Used to connect to the circuit containing the subcircuit. Each Interface
   in the subcircuit will generate one connection-line on the IC-component
   in the "calling" circuit.

   @{fg highlight}@{b}IC@{ub}@{fg text}

   Used to link a subcircuit to the circuit.

   @{fg highlight}@{b}View voltage@{ub}@{fg text}

   Voltmeter, place this on the nodes you want to plot the result from.

   @{fg highlight}@{b}View current@{ub}@{fg text}

   Currentmeter, place this on the nodes you want to plot the result from.

   @{fg highlight}@{b}OPTIONS@{ub}@{fg text}

   All global simulation variables of SPICE (eg. temperature of the
   environment) can be altered here.

   @{fg highlight}@{b}Additional components...@{ub}@{fg text}

   These components determine the simulation parameters you want. Try not
   to use more than one in schematic. The parameters use SPICE commands
   and you will have to study the SPICE documentation to decide what you
   need to put here. (but then you all know SPICE by heart, or ... ;_) )

@EndNode

@Node "NE5561" "The NE5561-model"

Here I present you a Pulse With Modulator chip. It has all the
functions needed to build a Switched Mode Power Supply (SMPS) including a
Pulse by pulse current limiter.
This model of the NE5561 chip is a complete model and all functions
in the block-diagram are supported, including undervoltage lockout and
the supply current versus supply voltage karakteristic.

Here is a list of specifications that is supported in the model.


Erroramplifier:         spec.               source
Openloop gain           60db                datasheet
Output impedance        220 Ohm             measured
Output Voltage swing    max 7V min 0.4V     datasheet & measured
Bandwidth               3Mhz                datasheet

Output Stage:
Output Current          max 40mA min 20mA   datasheet
Vce saturation(Ic-20mA) max 0.4V            datasheet
Output voltage (Vce)    max Vcc+1.4V        datasheet

Current limiter:
Trip level              0.5V                datasheet

Reference:
Vz output               8.2V                datasheet
Vz impedance            10 Ohm              datasheet & measured
Vref                    3.75V               datasheet

Supply current:
between 10V and 22V     7mA                 datasheet
maximum at 25V          40mA                datasheet
Undervoltage lockout    <10V                datasheet

(You can supply this chip with a current source between 8mA and 40mA).

Oscillator:
min. capacitor          1nF                 SPICE limit (see below)
max. duty cycle         about 90%           SPICE limit (see below)
max. frequency          I don't know for spice but in real it is 100kHz.


I had a hard time to make the model work without convergence problems.
I don't garranty that this won't happen in your application but if it
does you have to keep severval things mind:

- Pin 5 of the chip.
The oscillator can be a problem if you choose a too small capacitor
value, or the resistor value is too high.
So, Tcharge/Tdischarge has to be smaller than 10. This will cause a
max dutycycle of about 90%.

- Pin 6 of the chip.
This is the current limiter input. If you don't need a current limiter
you can put the input to ground. But if you need one and SPICE can not
converge, try this. Put in the 'OPTIONS' the statement: 'METHOD=GEAR'.
SPICE will then try to solve the circuit in an other way.

SPICE tip:

If you have build an SMPS and you want to know what the converter does
in steadystate, you can speedup the simulation by giving the output
capacitor an initial value that is the same as the nominal output voltage
at the nominal load. Don't forget to type in the transient analyses 'UIC'
This means 'Use Initial Condition' else it doesn't work. This way you don't
have to simulate the startingup of the converter cause the output voltage
is allready there.

Note,
To simulate an SMPS circuit you realy need a fast machine with a FPU or
you are waiting for hours to get some results.

Have fun with,

Hendrik Jan Zwerver
 
   @{" NE5561 block diagram " Link "NE5561.iff/MAIN"}

@EndNode

@Node "BIBO" "Construction of the libraryfile "

   This part of the program requires a properly syntaxed file to operate
   correctly ! The following rules must be followed.

   - Comments or empty lines are not permitted.
   - Identifiers MUST be written with capitals.
   - The files must be constructed according to the following rules
     including line-order.

   All of the files in the bibs-drawer will be loaded at program start.
   The files are NOT checked for proper function at read time, be warned
   it is possible to interfere with program operation by supplying false
   information.

   A description of the lines making up the library files follows.
   Only the @{fg highlight}highligted Text@{fg text} shall be included in
   the actual library file !!

   -------------------------------------------------------------------------
   Library file header:
   -------------------------------------------------------------------------
   @{fg highlight}#AmiSPICEed Library@{fg text}

   This line functions as file-identification.

   @{fg highlight}My element@{fg text}

   Library name, will be displayed in the Listview.

   -------------------------------------------------------------------------
   Component description.
   -------------------------------------------------------------------------
   @{fg highlight}#ELEMENT@{fg text}

   First line in the component definition.

   @{fg highlight}My element@{fg text}

   Component name, will be displayed in the Listview.

   @{fg highlight}ID@{fg text}

   SPICE-Identifier for the component. I.e. R for resistors, C for capacitors.
   An X means that the definition is a complete subcircuit and not a SPICE
   component ( example: CMOS.bib)

   @{fg highlight}My model@{fg text}

   The name of the SPICE-model or #NO_MOD if no model definition is
   included.

    | Case a:
    | With a model-name given the following lines defines the model, can be
    | several lines. The identifier PNP or NPN on the first line can be
    | followed by several lines of parameter definitions
    | ( example: bipolar.bib)
    |
    | Case b:
    | If the identifier X and a name for the subcircuit is given, the following
    | lines must contain the definition of the subcircuit.
    |
    | @{fg highlight}#SUBCIRCUIT@{fg text}
    |
    | Here you put the circuit definition with components and model descriptions
    | The nodes 1, 2, 3, ... will be used as interfaces to the schematic where
    | it is used. The number of interfaces will be defined later.
    |
    | From version 1.3 you can use parameters in subcircuits by using the
    | following shortcuts: #1, #2, ... ,#9. These shortcuts will automatically
    | be replaced by the given parameter-values later, and they have to be used
    | in the identifier-field of the following parameter description, too.
    | A resistor and a capacitance could be described like this:
    | ...
    | R1 1 2 #1
    | C1 2 3 #2
    | ...
    | @{fg highlight}#END_MOD@{fg text}
    |
    | This line end the model or subcircuit definition.

   @{fg highlight}MODE@{fg text}

   This line is leftover from previous program revisions. The meaning is
   not defined but the string #NO_MODE must be placed in this position for
   now.

   Here comes the parameters that are written after the node-numbers in the
   SPICE inputfile (i.e. resistance value). It is possible to have several
   parameters listed after each other even without identifier. The program
   will generate a window where all parameters may be edited. The parameters
   consists of 3 lines.

   @{fg highlight}Description@{fg text}

   This line is presented in the Parameter window to identify the parameter.

   @{fg highlight}Identifier@{fg text}

   Identifier written in front of the parameter value in the SPICE inputfile.
   I.e. IC= for the parameter initial condition. If no identifier is needed
   the string #NO_IDENTIFIER must be included (i.e. resistance value)

   From version 1.3 you can define the corresponding shortcuts (#1 to #9) here,
   if the element is descibed by a subcircuit with parameters. EVERY USED
   SHORTCUT HAS TO BE DESCIBED HERE! An example is the "transformer"-element
   in the "passive elements"-library.

   @{fg highlight}Parameter@{fg text}

   Default value of the parameter or a empty line.

   The next parameter definition may start here.

   @{fg highlight}#END_OPTS@{fg text}

   This line indicates the end of the parameter definitions.

   The next lines deals with the definition of nodes. You may define several
   nodes for each component. Each node definition contains 2 lines.

   @{fg highlight}My knot@{fg text}

   Name of the node. (i.e. Base, Emitter, Collector)

   @{fg highlight}x,y,direction@{fg text}

   x and y are positions of the connectionpoint relative to the component
   reference position, both are counted in pixels and have to be in increments
   of 10. Direction sets the direction from the reference position and can be
   one of 4 possible, #DIR_LEFT,#DIR_RIGHT,#DIR_UP,#DIR_DOWN

   The next node definition may start here.

   @{fg highlight}#END_KNOTS@{fg text}

   This line indicates the end of the node definitions.

   The last part deals with the graphical representation in the schematic
   You design the symbol with lines, circels and text, the definition can
   extend over several lines.

   @{fg highlight}command,x1,y1,x2,y2@{fg text}

   command sets the type of graphic element:

   L  : Line
   C  : Circle
   N  : Component name shown
   S  : SPICE-Identifier with component number shown

   x,y values are in pixels relative to the reference point (0,0), this is
   also the mouse selection point.

   L  : x1,y1 Startingpoint, x2,y2 Endingpoint
   C  : x1,y1 Centerpoint, x2,y2 Radius
   N,S: x1,y1 Position, x2=3D0,y2=3D0

   @{fg highlight}#END_GRAPH@{fg text}

   This line indicates the end of the graphic definition and the end of the
   component definition. The next line can be the start of another component
   by placing the string #ELEMENT in it.

   @{fg highlight}#END_BIB@{fg text}

   The last line in the libraryfile. Any lines following this will be
   ignored.


   That's it folks !
   Anyone considering writing or enlarging a library must check the
   SPICE syntax requirements and maybe provide resonable default values
   for the required variables.

@EndNode

@Node "Besonder" "Specialities"

   @{fg highlight}non-linear controlled voltage/current (B-source)@{fg text}

   The non-linear controlled sources in the "sources" library can be used
   within AmiSPICEed as it is described in the SPICE manual. But whenever
   voltages of given points in the circuit shall be used, there is a little
   divergence from the normal notation which is caused by the algorithm
   AmiSPICEed is using. Normally, V(1) means the voltage of knot "1" in the
   *.cir circuit-file. AmiSPICEed distributes these knot-numbers dynamically,
   so that no one could know this at creating-time.

   If you want to use the voltage of a given point of the circuit in an
   expression of a no-linear controlled source, you have to do the following:

   - At the given point you HAVE to place a "knot"-element from the
     "internal library".

   - Double click the knot, so that the edit-window opens. Give the knot a
     defined number (e.g. 1)

   - In the expression of the non-linear source, you can refer to the voltage
     of this knot by entering V(1)

   Expressions like V(1,2) are not allowed and must be replaced by
   (V(1)-V(2)).

   The example circuit "B-Test" realises a multilpication of two voltages
   over two resistors. The functionality should be visible there.

@EndNode

