QSpice
Information, tools, components, and documentation for the QSpice® circuit simulator
This repository is about how QSpice works and how to make it do more. Much of the content focuses on C-Block (DLL) components. It has tutorials (the C-Block Basics series), code templates, debugging aids, and setup guides for the DMC, Microsoft Visual C++, and MinGW compilers and the Visual Studio and VS Code IDEs. It also contains:
- Reusable components and symbols: GPIO pins, WAV file input and output, SPI devices, a PID controller, and potentiometers.
- Tools that work with QSpice’s own files: A C-Block code generator, a color theme manager, a file parser, a schematic viewer, and an alternate schematic and symbol editor.
- Microcontroller co-simulation: Microchip PIC, AVR, and dsPIC devices running real firmware inside QSpice simulations.
Sources, documentation, and demonstration schematics are included throughout.
This is an independent and unofficial site. See About This Repository.
Contents
| Project | Description |
| QMdbSim2 Project | Microchip microcontrollers (PIC, AVR, dsPIC) in QSpice simulations using Microchip's own simulator. Includes the QSymGen3 tool that generates device symbols, schematics, and DLL code. |
| QParser2 Project | A framework for reading and writing QSpice schematic and symbol files with unofficial file-format documentation. Several tools in this repository are built on it. |
| QSchEdit | An alternative QSpice schematic and symbol editor. This is a sub-project of The QParser2 Project. It is currently an early preview subject to major unannounced changes. |
| QSchView | A read-only QSpice schematic viewer, printer, and SVG exporter. The QSchView Project is a sub-project of The QParser2 Project. |
| QCodeGen | An alternative to the QSpice C-Block code generator that uses user-defined templates and updates existing code without overwriting it. |
| QColorPrefs | A command-line utility to save, restore, and share QSpice color themes. |
| QTcpServer Project | A TCP-based client/server framework for C-Block components. |
C-Block Components
| Component | Description |
| GPIO Components | Symbols and a class for general-purpose I/O pins (microcontroller tri-state pins). |
| WavIO Components | Read and write basic audio WAV files as simulation signals. |
| SpiIO Components | Custom SPI master and slave components with ADC, DAC, and potentiometer examples. |
| SerialIO Components | A proof-of-concept serial buffer. See SpiIO for the improved version. |
| PID Controller Component | A discrete PID controller courtesy of @KSKelvin. |
Documentation and Setup
Retired and On Hold
| Project | Status |
| QMcServer Project | On hold. A proof-of-concept microcontroller simulation framework replaced by QMdbSim and QMdbSim2. |
| QMdbSim Project | Superseded by the QMdbSim2 Project. |
About This Repository
- This repository is not affiliated with, endorsed by, or supported by Qorvo or Skyworks.
- What’s here comes from public documentation, the QSpice forum, and my own experiments. Any of it could be incomplete or entirely incorrect, so use it at your own risk.
- Unless stated otherwise in a particular project, projects are open source under the GNU General Public License v3.0.
- Some projects use other vendors’ tools or libraries (named in each project’s documentation). They are subject to their respective owners’ license terms.
Support
I support these projects myself on Qorvo’s official QSpice forum where you’ll find me as @RDunn. Qorvo and Skyworks do not support them.
When you ask a question or report a problem, please include:
- A description of what you did, what you expected, and what happened instead.
- The project or tool name and version plus your QSpice version.
- Any error messages exactly as they appear.
- For C-Block code, the compiler you used.
- Example files that show the problem (schematics, symbols, and source code) cut down to as little as still shows it.
New forum members can’t attach files at first. See New User To Basic User (File Upload) for how to get that permission.
Links
QSpice
Other Recommended Sites
Useful Forum Threads
Development Tools
These are free tools used by projects in this repository. Each is subject to its owner’s license terms.
- Microsoft Visual Studio Community — The free edition of Visual Studio. Includes the Microsoft C/C++ compiler (MSVC) and a full debugger for C-Block DLLs.
- Visual Studio Code — A free code editor. It has no compiler of its own, so pair it with MSVC, MinGW, or DMC (see VS Code Configuration).
- MSYS2 — The easiest way to install the MinGW-w64 GNU compilers on Windows. QSpice C-Blocks need the 32-bit (mingw32) toolchain.
- MinGW-w64 — The GNU C/C++ compilers for Windows.
- Digital Mars — The DMC compiler that ships with QSpice (see the DMC notes).
- Qt for Open Source Development — The free open-source edition of the Qt framework used by the GUI tools here.
- Qt VS Tools — An extension that adds Qt support to Visual Studio.
- MPLAB X IDE — Microchip’s free IDE and simulator used by the QMdbSim2 Project.
- Eclipse Temurin — Free Java builds. The QMdbSim2 Project needs a 32-bit Java 8.
- Inkscape — A free vector graphics editor for the SVG files that QSchView and QSchEdit export.
Trademarks
- QSPICE is a registered trademark of Qorvo US, Inc., now part of Skyworks Solutions, Inc.
- Qorvo is a registered trademark of Qorvo US, Inc.
- Skyworks is a registered trademark of Skyworks Solutions, Inc.
- Microchip, MPLAB, PIC, AVR, and dsPIC are registered trademarks of Microchip Technology Incorporated.
- Qt is a registered trademark of The Qt Company Ltd. and its subsidiaries.
- Microsoft, Visual Studio, Visual C++, and Visual Studio Code are trademarks of the Microsoft group of companies.
- Java is a registered trademark of Oracle and/or its affiliates.
评论