Install SLiCAP

color coded resistors

Download and Install SLiCAP

SLiCAP can be dowloaded and installed by running the MATLAB® script: installSLiCAP.p.

  • Download this script
  • Start MATLAB and navigate in MATLAB to the directory where you saved the downloaded install script
  • Run this script by typing “installSLiCAP” in the MATLAB command window
  • Follow the instructions
    • SLiCAP uses MathJax to render LaTeX equations in web pages. This requires you either to be connected to the Internet, or to have a local copy of MathJax installed on your computer. During installation of SLiCAP you will be asked if you want to install a local copy of MathJax. If so, the installer will install it in the correct directory.
  • For re-installing SLiCAP or installing MathJax separately, simply run the install script again.
  • If the installation failed (older versions of MATLAB cannot automatically connect to HTTPS servers), install SLiCAP manually as described below.

Download and install SLiCAP manually

  • Download the .zip archive of the lastest version of SLiCAP.
  • Extract this archive in a directory that has the same name as the zip file (without file extension).
  • Start MATLAB and only add the MATLAB directory of this install path to the MATLAB search path.
  • Save the updated MATLAB search path setting

Download and install MathJax manually

  • Download the MathJax-latest archive.
  • Create a MathJax-latest directory in de SLiCAP install path
  • Extract the downloaded zip archive in this directory (this may take a while).

Main directory structure after installation (3 levels only)

../_images/SLiCAPtree.svg

Schematic capture

SLiCAP accepts SPICE-like netlists. Many schematic capture programs can be configured to generate such netlists. SLiCAP comes with symbol libraries for LTspice and gSchem.

For manual netlist generation please view the Device Models section in the help file.

LTspice

LTspice can be used for netlist generation. LTspice symbols for SLiCAP are included in the LTspice subdirectory in the SLiCAP install path. LTspice works with Windows and Linux (under Wine). A version for MAC is also available. Go to LTspice for the latest version.

For an overview of SLiCAP symbols for LTspice, please view the LTSpice section in the help file.

Gschem

The open source gschem package can also be used in conjunction with SLiCAP. This package is used by the author and symbols for SLiCAP built-in devices have been included in the SLiCAP zip file.

For an overview of SLiCAP symbols for gSchem, please view the gSchem section in the help file.

The improved gnet-spice-noqsi spice netlister should be used for netlist generation. SLiCAP has a built-in instruction for netlist generation with gschem and this netlister.

The application of gschem as front-end for SLiCAP has been tested under Linux and under Windows.

  • Under Linux you can install it with the package manager. Please visit gEDA for more information.
  • A windows installer for gschem can be downloaded from: gEDA-20130122.zip.
  • The improved spice netlister can be downloaded from: gnet-spice-noqsi.

Linux installation

Linux installation of gschem and the gnet-spice-noqsi is well documented and straightforward.

After installation of gschem you need to create or modify the file: .gEDA/gafrc in your home directory with the contents:

(reset-component-library)
(component-library "<path to SLiCAP symbol Library>" "SLiCAP")

The component-library is found in the extracted SLiCAP_VXX_xxxx.zip file; in the subdirectory gschem/symbols/. Enter the complete path in the .gEDA/gafrc file.

If you wish to have a light background you can create or modify the file .gEDA/gschemrc in your home directory with the contents:

(load (build-path geda-rc-path "gschem-colormap-lightbg")) ; light background

Windows installation

Windows installation of gschem is straightforward: simply extract the gEDA-20130122.zip file and run the Windows installer. In the drop down menu of the “Select Components” dialog box select “Program only”, for the rest accept default settings.

The netlister is installed by copying the file gnet-spice-noqsi.scm from the extracted gnet-spice-noqsi.zip to: C:\Program Files (x86)\gEDA\gEDA\share\gEDA\scheme\gnet-spice-noqsi.

You need to create or modify the file gafrc in the C:\Users\<userName>\.gEDA\ directory. It should have the following content:

(reset-component-library)
(component-library "C:/Program Files (x86)/gEDA/gEDA/share/gEDA/sym/slicap")

The component library is found in the in the subdirectory gschem/symbols/ in the SLiCAP install path. Create a directory C:\Program Files (x86)\gEDA\gEDA\share\gEDA\sym\slicap and copy the component library to this directory.

If you wish to have a light background you can create or modify the file gschemrc in the C:\Users\<userName>\.gEDA\ directory. Its contents must be:

(load (build-path geda-rc-path "gschem-colormap-lightbg")) ; light background

Be sure you save these two files gafrc and gschemrc without any file extension.

Display schematics on html pages

With LTspice you can print schematics to a .PDF file using a PDF printer.

With gSchem running under windows you can write your schematic file to a .PDF file.

For proper display of schematics on html pages these .PDF files need to be be converted to .SVG files.

SLiCAP has a built-in function pdf2svg(<'pdfFileNameWithoutExtension>). Under Linux and Mac OS you need to install ‘psd2svg’ to make this work.

With gSchem running under Linux or Mac OS you can write your schematic file to a .EPS file.

.EPS files can be converted into .PDF files using the eps2pdf.m function. This function, including its license text is found in the MATLAB subdirectory in your SLiCAP installation path. This function requires GhostScript to be installed on your computer.

Ghostscript is often available in the package manager of Linux distributions. Otherwise Ghostscript versions can be downloaded from: Ghostscript.

Inkscape .svg editor

When printing a schematic from LTspice with a PDF printer, the full path of the file will be listed at the bottom of the page. After the .PDF file has been converted into a .SVG file (see above), you can use inkscape to edit this SVG file and delete the footer.

Inkscape runs under Windows, Linux and Mac OS. Inkscape versions can be downloaded from: inkscape.org.

Sphinx documentation

SLiCAP generates complete HTML reports, including beautifully typset expressions, plots, text, code fragments, tables and CSV files. This all does not require installation of additional packages.

Beautiful results are obtained with the Python Sphinx documentation package and the Sphinx Bootstrap theme. SLiCAP generates the Sphinx compatible REstructured text files that can be compiled from within de MATLAB workspace into html documentation with one instruction.

Python-Sphinx

Python works under Windows, Linux and Mac. If you install Anaconda, you have a large number of Python packages available, including Sphinx. The bootstrap theme needs to be downloaded and installed seperately.

  • If you are working under Linux, Python is installed by default and Sphinx can be installed from the package manager.
  • Python for Mac is available at python.org.
  • Python for Windows is available at python.org.
  • After you have installed Python, you can install Sphinx as described.

Sphinx bootstrap theme

After Python has been installed, the Sphinx Bootstrap theme can be installed by opening a command window and enter:

pip install sphinx_bootstrap_theme

Configuration of SLiCAP and Sphinx for working with this theme is not necessary. All configuration files have been included with SLiCAP.