
******************************************************************
*                                                                *
*            SNAP  -  Small Nodal Analysis Program               *
*                                                                *
******************************************************************


Written by:        Jerry Fitzpatrick
                   636 Cherrywood Drive
                   Wheeling, Illinois 60090


6/4/88     Version 2.1 released



Introduction
------------

SNAP is a linear electronic circuit analysis program that is 
somewhat like SPICE. To use SNAP, you create a text file 
describing the circuit you wish to analyze. This "network" file
is a collection of component types, labels, values, and node
numbers which is processed to create a runnable SNAP program.

The programs you use are:

    PRESNAP - converts the network file into a runnable 
              SNAP file

       SNAP - creates a custom screen and window, allowing 
              you to read in a SNAP file and perform DC or 
              AC analysis and output data to the console,
              printer, a file, or built-in plotter.


This version of SNAP supports up to 50 nodes, 100 components,
and 50 output variables. SNAP is quite fast: it can solve a
7-node circuit for 100 different frequencies and plot 500
points, all in 30 seconds (refer to the AC example).



Using SNAP
----------

To use SNAP, follow these steps using the CLI:

    1)  Create a network file using a text editor. I
        recommend Rick Stiles' UEDIT (hint, hint) but 
        ED and other ones will do. The name of this 
        file must end in '.net'.

    2)  Compile the network file using PRESNAP. This
        will create a new file by the same name, but
        with the extension '.snp'. DO NOT specify the
        extension in the file name. That is:

              use,       PRESNAP my_circuit
              NOT,       PRESNAP my_circuit.net

        If PRESNAP finds errors in the network file, it
        will not create an output file. Instead it puts
        out error information in a file named 'snap.err'.

    3)  Invoke SNAP by typing 'SNAP' on the command line. 
        Select OPEN from the project menu and, at the 
        requester, enter the file name. As with the network
        file, DO NOT specify the extension.



Network Component Templates
---------------------------

There are eleven component types in SNAP. Each one is denoted by
a unique three-letter mnemonic (such as RES for resistor). Each
component has its own set of parameters that is needed, as shown
below:


Resistor                RES   Label   N+   N-   Value
Capacitor               CAP   Label   N+   N-   Value
Inductor                IND   Label   N+   N-   Value
DC Voltage Source       DCV   Label   N+   N-   Value
AC Voltage Source       ACV   Label   N+   N-   Value
DC Current Source       DCI   Label   N+   N-   Value
AC Current Source       ACI   Label   N+   N-   Value
Current-Controlled 
   Voltage Source       CVS   Label   N+   N-   Branch   Value
Current-Controlled 
   Current Source       CCS   Label   N+   N-   Branch   Value
Voltage-Controlled 
   Voltage Source       VVS   Label   N+   N-   NC+   NC-   Value
Voltage-Controlled 
   Current Source       VCS   Label   N+   N-   NC+   NC-   Value


         N+      =  positive node
         N-      =  negative node
         NC+     =  positive control node
         NC-     =  negative control node
         Label   =  component label, up to eight characters
         Branch  =  the label of the controlling branch
         Value   =  component value (in ohms, farads, etc.)



Output Templates
----------------

There are ten output types in SNAP: five for current and five
for voltage. Each one is denoted by a unique two-letter mnemonic
following a period, as described below:


Voltage (in volts unless otherwise specified)

Real Component            .VR   N1-N2 ...
Imaginary Component       .VI   N1-N2 ...
Magnitude                 .VM   N1-N2 ...
Phase (in degrees)        .VP   N1-N2 ...
Magnitude (in decibels)   .VB   N1-N2 ...


Current (in amps unless otherwise specified)

Real Component            .IR   Branch ...
Imaginary Component       .II   Branch ...
Magnitude                 .IM   Branch ...
Phase (in degrees)        .IP   Branch ...
Magnitude (in decibels)   .IB   Branch ...


     N1-N2  =  voltage difference between nodes N1 and N2
               (the '-N2' may be omitted if you want voltage
               with respect to ground)

     Branch =  current through the specified branch (only
               resistors, capacitors, and inductors are
               allowed here)




**************************** Menus *******************************


Project
-------

About            Produces a small advertisement for SNAP.

Open             Brings up a requester for you to enter the
                 name of the SNAP file to be opened. Once
                 opened, the file name is displayed in the
                 title bar at the top of the screen.

Quit             Exit from SNAP.



Analysis
--------

Type             Selects analysis type, AC or DC. If you
                 choose AC, you will be prompted for a 
                 range of frequencies and the number of 
                 points to calculate. Warning: hundreds of
                 points can take quite a while to display
                 or print. Plotting is usually more 
                 appropriate in these cases.

Scale            Selects the type of scale to use for
                 AC calculations, logarithmic or linear.
                 For Bode plots, use the LOG scale. For
                 better plotting accuracy over short
                 frequency ranges, use the LIN scale.

Start            Starts the analysis. If the calculations
                 are likely to take more than fifteen seconds,
                 a requester will ask you to verify whether
                 you want to proceed.


Output
------

Console          Selects the console as output. Keep in mind
                 that your outputs will scroll off the screen
                 if they run longer than about 22 lines (inc.
                 the SNAP header).

Printer          Selects the printer as output.

Plotter          Selects the plotter as output and activates
                 the PLOTTER menu. The first five outputs in
                 your network file are plotted. The plots are
                 automatically scaled based on the minimum
                 and maximum values of all the outputs. LOG
                 plots can span a maximum of three decades.

                 The plots are color-coded in the order
                 (1) ORANGE, (2) BLUE, (3) YELLOW, (4) VIOLET,
                 and (5) GREEN.

File             Selects a file as output. A requester lets
                 you choose the name for the file.



Plotter
-------

Redraw           Redraws the plotter output on the screen.
                 This is also useful for plotting the 
                 calculations after printing them out,
                 without re-starting.

Title            Lets you enter a text title for the plot.
                 The title is displayed centered at the top
                 of the plot.

Save             Saves the plot screen to a file named
                 'snap.plt'. This file is in IFF format so
                 you modify the plot with DeluxePaint or
                 other such programs.

