·

Cursos Gerais ·

Eletrônica Analógica

Envie sua pergunta para a IA e receba a resposta na hora

Fazer Pergunta
Equipe Meu Guru

Prefere sua atividade resolvida por um tutor especialista?

  • Receba resolvida até o seu prazo
  • Converse com o tutor pelo chat
  • Garantia de 7 dias contra erros

Recomendado para você

Texto de pré-visualização

CircuitMaker Integrated Schematic Capture and Circuit Simulation User Manual for Windows Revision C CircuitMaker 6 CircuitMaker PRO ii Information in this document is subject to change without notice and does not represent a commitment on the part of MicroCode Engineering The software described in this document is furnished under a license agreement or nondisclosure agreement The software may be used or copied only in accordance with the terms of the agreement It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement The purchaser may make one copy of the software for backup purposes No part of this manual may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying recording or information storage and retrieval systems for any purpose other than the purchasers personal use without the express written permission of MicroCode Engineering Copyright 19881998 MicroCode Engineering Inc All Rights Reserved Printed in the United States of America CircuitMaker TraxMaker and SimCode are trademarks or registered trademarks of MicroCode Engineering Inc All other trademarks are the property of their respective owners MicroCode Engineering Inc 927 West Center Orem UT 84057 USA Phone 801 2264470 FAX 801 2266532 wwwmicrocodecom License Agreement iii MicroCode EngineeringSoftware License Agreement PLEASE READ THE FOLLOWING LICENSE AGREEMENT CAREFULLY BEFORE OPEN ING THE ENVELOPE CONTAINING THE SOFTWARE OPENING THIS ENVELOPE INDICATES THAT YOU HAVE READ AND ACCEPTED ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT IF YOU DO NOT AGREE TO THE TERMS IN THIS AGREEMENT PROMPTLY RETURN THIS PRODUCT FOR A REFUND CircuitMaker is a proprietary product of MicroCode Engineering and is protected by Copyright Law MicroCode Engineering grants you a nonexclusive license to use CircuitMaker subject to the terms and restrictions of this license agreement You are receiving a license to use CircuitMaker MicroCode Engineering retains title to CircuitMaker and is the sole copyright owner You as an authorized end user of CircuitMaker are permitted certain rights to use CircuitMaker as defined in this license agreement You are authorized to use CircuitMaker on only one 1 computer at a time You must obtain additional license agreements before using the software on additional computers or on a computer network You may make a backup copy of CircuitMaker for the sole purpose of protecting your investment from loss You may transfer your right to use CircuitMaker to another party as long as the entire software package including the manual and a backup copy of CircuitMaker are transferred to the receiving party However before transferring this program the receiving party must agree to be bound by the terms and conditions of this agreement If you transfer the program you must remove CircuitMaker from the computer on which it is installed and destroy the backup copy at the time of transfer Your licence terminates at the time of transfer In no case is the right granted to sell distribute trade or give away copies of CircuitMaker except as stated in this paragraph You may not decompile disassemble reverse engineer or in any way modify the program code without the prior written consent of MicroCode Engineering This agreement is effective until terminated You may terminate this agreement at any time by destroying the program documentation and any the backup copy or by returning the same to MicroCode Engineering The licence will terminate automatically if the terms of this agreement are violated The program code is provided on an as is basis without warranty of any kind whatsoever either expressed or implied MicroCode Engineering does not warrant the software to be error free nor does it warrant it to meet your specific requirements License Agreement iv MicroCode Engineering will at no charge replace defective CDsdiskettes or CDsdiskettes that are returned within ninety 90 days of the date of purchase MicroCode Engineering warrants that the program will perform in substantial compliance with the enclosed documentation If you report a significant defect in writing to MicroCode Engineering and MicroCode Engineering is unable to correct it within ninety 90 days you may return the entire software package for a refund Under no conditions will MicroCode Engineerings liability exceed the purchase price of this software NO LIABILITY OF ANY FORM SHALL BE ASSUMED BY MICROCODE ENGINEERING OR ITS REPRESENTATIVES NOR SHALL DIRECT CONSEQUENTIAL OR OTHER DAMAGES BE ASSUMED BY MICROCODE ENGINEERING EVEN IF MICROCODE ENGINEERING HAS BEEN ADVISED OF SUCH DAMAGES Disclaimer CircuitMaker is a simulation program that in most cases produces results very similar to a real life circuit It is however only a simulation program and is not expected to provide exactly the same results as a real life circuit in every instance While MicroCode Engineering Inc has tried to provide a product which is suitable to a wide variety of applications we realize that it cannot produce satisfactory results in all applications CircuitMaker allows you to minimize the amount of breadboarding required to produce a functional circuit but it must not be used as a replace ment for proper breadboarding MicroCode Engineering Inc reserves the right to revise the program andor manual from time to time without obligation of MicroCode Engineering Inc to notify any person or organization of such change or revision MicroCode Engineering Inc makes no representations or warranties with respect to the program CircuitMaker or the manual either express or implied including implied warranty of merchantability or implied fitness for a particular purpose No liability of any form shall be assumed by MicroCode Engineering Inc or its representatives nor shall direct consequential or other damages be assumed by MicroCode Engineering Inc even if MicroCode Engineering Inc has been advised of such damages This program is supplied As Is Any user of this software uses it at their own risk In any case the liability of MicroCode Engineering Inc is limited to the price the user actually paid License Agreement v US Government Restricted Provisions If this software is acquired by or in behalf of a unit or agency of the United States Government these provisions apply This Software a Was developed at private expense and no part of it was developed with government funds b Is a trade secret of MicroCode Engineering Inc for all purposes of the Freedom of Informa tion Act c Is commercial computer software subject to limited utilization as provided in the contract between the vendor and the governmental entity and d In all respects is proprietary data belonging solely to MicroCode Engineering Inc For units of the Department of Defense DOD this software is sold only with Restricted Rights as that term is defined in the DOD Supplement to the Federal Acquisition Regulations 522277013 c 1 ii and Use duplication or disclosure is subject to restrictions as set forth in subdivision c 1 ii of the Rights in Technical Data and Computer Software clause at 522277013 Manufacturer MicroCode Engineering Inc 927 West Center Street Orem Utah 84057 If this software was acquired under a GSA Schedule the US Government has agreed to refrain from changing or removing any insignia or lettering from the Software or the accompanying written materials that are provided or from producing copies of the manuals or disks except one copy for backup purposes and e Title to and ownership of this Software and documentation and any reproductions thereof shall remain with MicroCode Engineering Inc f Use of this Software and documentation shall be limited to the facility for which it is acquired and g If use of the Software is discontinued by the installation specified in the purchasedelivery order and the US Government desires to use it at another location it may do so by giving prior written notice to MicroCode Engineering Inc specifying the type of computer and new location site US Governmental personnel using this Software other than under a DOD contract or GSA Schedule are hereby on notice that use of this Software is subject to restrictions which are the same or similar to those specified above License Agreement vi Contents vii Table of Contents Chapter 1 Welcome to CircuitMaker Introduction11 Required User Background 11 Required HardwareSoftware 11 Installing CircuitMaker 12 Installing the Hardware HW Keys 12 Updating from a Previous Version 13 MultiUser Project Installations 16 Technical Support18 About the Documentation 19 Manual Conventions 19 Using Online Help 110 Watching the Online Tutorial 111 Where to Go from Here 111 Chapter 2 Getting Started CircuitMaker Basics21 Starting CircuitMaker 21 CircuitMaker Workspace 21 Connectivity 22 About CircuitMaker Windows 22 Anatomy of a Schematic Drawing 23 CircuitMaker Conventions 23 CircuitMaker Files 23 Accessing Tools and Features 24 Task Overview 24 Using the Toolbar 24 Using the Mouse 26 HotKeys 27 Shortcut Keys 27 Contents viii CircuitMaker Preferences 28 Changing Preferences 28 Restoring Factory Defaults 28 Basic CKT File Management 29 Starting Saving Closing a CKT File 29 Opening and Reopening a CKT File 210 Reverting to Previously Saved File 210 Chapter 3 Tutorials Tutorial 1 Drawing a Schematic 31 Using the Device Selection Dialog Box 31 Selecting a Transistor 33 Selecting the Resistors 33 Selecting V and Ground Devices 34 Changing ResistorTransistor LabelValues 35 Wiring the Circuit Together 35 Tutorial 2 Simulating a Digital Circuit 36 Tutorial 3 Analog Analysis 37 Simple Circuit Analysis 38 Creating a Simple RC Circuit 310 Simulating a Simple AC Circuit 312 Tutorial 4 More Circuit Simulation 313 Setting Up the Analysis 316 Running the Simulation 317 MixedMode Simulation Example320 Chapter 4 Drawing and Editing Schematics Drawing and Editing Tools41 Arrow Tool 42 Wire Tool 42 Text Tool 42 Delete Tool 42 Zoom Tool 43 Contents ix Rotate 90 Button 43 Mirror Button 44 Grid Title Block and Borders44 Grid 44 Title Block 45 Borders 46 Listing and Selecting Devices 47 The Graphical Parts Browser 47 HotKeys 49 Searching for Devices 410 Placing Devices 412 Selecting Devices 412 Nudging Devices 413 Wiring the Circuit414 Auto Routing 414 Manual Routing415 Quick Connect Wiring 416 Extending Joining and Cutting Wires 416 Moving Devices with Connected Wires 417 Working with Bus Wires 417 Working with Bus Connection Wires 418 Wiring with Connectors419 Input and Output Connectors 419 Terminal Device Power Connections 420 Labeling the Circuit 421 Using the Text Tool to Label 421 Changing Device Labels 421 Editing Devices422 Device422 LabelValue 423 Designation 423 Description 424 Package 424 Auto Designation Prefix 424 Spice Prefix Characters 424 Analog 425 Contents x Digital 425 Parameters 426 Bus Data 426 Spice Data 428 Example of Using SPICE Data 430 Exclude from PCB 431 Exclude from Bill of Materials431 Pins 431 Faults 433 Printing and Exporting Circuits 433 Printing Circuits 433 Exporting Circuits as Graphics 434 Chapter 5 Digital Logic Simulation CircuitMakers Simulation Modes 51 Devices and Simulation 52 Using the Digital Logic Simulator 52 Digital Logic Simulation Tools 53 DigitalAnalog Button 53 Reset Button 53 Step Button 54 RunStop Button 54 Probe Tool 54 Trace Button 55 Waveforms Button 55 Propagation Delays 56 Digital Waveforms 57 Digital Options 58 Setting Breakpoints in a Circuit 59 Digital Instruments 59 Pulser 59 Data Sequencer 510 Pattern Editor 512 Contents xi Chapter 6 AnalogMixedSignal Simulation CircuitMakers Simulation Modes 61 Devices and Simulation 62 Overview of Analog Simulation 62 Before You Use the Analog Simulator 62 Setting Up Analog Analysis 63 Selecting Analog Simulation Mode 63 Analog Simulation Tools 63 DigitalAnalog Button 64 Reset Button 64 Step Button 64 RunStop Button 64 Probe Tool 65 Trace Button 66 Waveforms Button 66 Vcc and Ground 66 Working with Test Points 67 Test Point Types 68 Default Test Points 68 Exclusive Test Points 68 RunTime Test Points 69 Running the Simulation 611 Using the Analysis Windows 611 Displaying Waveforms 612 Scaling Waveforms 613 Offsetting Waveforms 615 Using Measurement Cursors 615 Setup Button 615 Reset Button 617 Setting Up Analog Analyses 618 Always Set Defaults 618 DC Analysis DC Sweep 619 AC Analysis AC Sweep 620 DC Operating Point Analysis 622 Transient Analysis 621 Contents xii Parameter Sweep Analysis 626 Fourier Analysis 629 Transfer Function Analysis 630 Noise Analysis 632 Temperature Sweep Analysis 635 Monte Carlo Analysis 636 Impedance Plot Analysis 641 Using XSpice for Windows643 NET and RAW File Output 645 Warning Messages vs Error Messages 646 Setting Up AnalogSPICE Variables647 ASCIIOUTPUT Check Box 647 DVCC DVDD and DGND648 Integration Method 648 Analysis Data Saved in RAW File 648 AnalogMixed Signal Instruments 649 Multimeter 649 Multifunction Signal Generator 650 Accessing the Signal Generator Editor 651 Editing Sine Wave Data 652 Editing AM Signal Data 654 Editing FM Signal Data 655 Editing Exponential Data 656 Editing Pulse Data 657 Editing PieceWise Data 658 Data Sequencer 659 Chapter 7 Exporting Files Bill of Materials 71 Single Item Per Line 72 Multiple Items Per Line 73 Saving Displaying and Printing the Bill of Materials 73 Including Attributes 74 Creating an Attribute File 74 Setting Up Export Options 77 Exporting Waveforms as Graphics 78 Contents xiii Exporting Circuits as Graphics 78 Exporting a SPICE Netlist 79 Exporting a SPICE Subcircuit79 Exporting a PCB Netlist 710 What is a Net 710 What is a Netlist 710 PCB Netlist Requirements 710 Exporting to Popular PCB Netlist Formats 711 TraxMaker PCB Netlist Format 712 CircuitMaker to TraxMaker 713 Run TraxMaker and Load Netlist 714 Create KeepOut Layer 714 Board Size in Mils 714 Automatically Place Components 714 Chapter 8 Fault Simulation Device Faults 81 Pins Stuck High 81 Pins Stuck Low 81 Pins Open 82 Adding Device Faults 83 Enable Device Faults 83 Fault LabelValue 83 Faults and Device Pins 83 Internal HighLow Check Boxes 84 Hint Message 84 Fault Password 84 Using the Access Faults Dialog Box85 Managing Circuit Faults 86 Disable Circuit Options 86 Hints and Replacements 89 Circuit Default Values 89 Fault Lock Password 810 Creating Black Box Macros 810 Fault Example 811 Contents xiv Chapter 9 File Menu New 91 Open91 Reopen 91 Merge 91 Close 92 Save 92 Save As 92 Revert 92 Import Simulate SPICE Netlist 92 Export 93 Bill of Materials 93 Print Setup 93 Fit to Page 94 Print Circuit 94 Print Waveforms94 Preferences 94 Exit 910 Chapter 10 Edit Menu Undo 101 Cut 101 Copy 101 Paste 101 Move101 Delete Items102 Duplicate 102 Copy Circuit to Clipboard 102 Copy Waveforms to Clipboard 102 Select All103 Find and Select 103 Rotate 90 103 Mirror 104 Straighten Wires 104 Place Labels 104 Contents xv Set Prop Delays104 Set Designations 105 Edit Edit Items106 Edit Bus Connection 106 Edit Bus Wire Number 107 Edit Device Data 107 Edit Digital Params 107 Edit RunTime Test Point 107 EditSelect SPICE Model 107 Edit PROMRAM 108 Edit Pulser 108 Edit Multimeter 109 Edit InputOutput 109 Edit Data Sequencer 109 Edit Signal Generator 1010 Edit ScopeProbe Name 1010 Group Items 1010 Font 1011 Chapter 11 Macros Menu New Macro 111 Edit Macro 111 Save Macro 112 Expand Macro 112 Macro Lock 113 Macro Utilities 114 Save Macro 114 Class Selected Device 115 Expand Macro 115 Delete Macro 115 Model Data 116 Macro Copier 116 Save ASCII Library 117 Convert ASCII Library 117 Update Search List 118 Contents xvi Chapter 12 Options Menu Auto Repeat121 Auto Refresh 121 Device Designations 121 ArrowWire 122 Cursor Tools 122 Show Pin Dots 122 Show Bus Labels 123 Show Page Breaks 123 Moveable Page Breaks 123 Show Node Numbers 123 Show Prop Delays 123 Device Display Data 124 Circuit Display Data 124 Grid 125 Title Block 125 Border 127 Chapter 13 View Window Menus View Menu 131 Toolbar 131 Colors 131 Display Scale 132 Normal SizePosition 133 Fit Circuit to Window 133 Refresh Screen 133 Window Menu 133 Cascade Windows 133 Tile Windows 133 Windows 133 Contents xvii Chapter 14 Simulation Menu DigitalAnalog Mode 141 Analyses Setup 141 Digital Options 141 Pin Connections141 Reset 141 Step 142 Run 142 Trace 142 Display Waveforms 142 Scope Probe 142 Display Variable Names142 Chapter 15 SPICE Beyond the Basics Troubleshooting SPICE Convergence 151 Solving Operating Point Analysis Failures 152 Solving DC Analysis Failures 153 Solving Transient Analysis Failures 154 SPICE Option Variables155 SPICEs Elementary Devices 1513 Resistors 1513 Semiconductor Resistors 1513 Capacitors 1514 Semiconductor Capacitors 1515 Inductors 1515 Coupled Mutual Inductors 1516 VoltageCurrent Controlled Switches 1517 Independent Sources 1517 Linear VoltageControlled Current Sources 1519 Linear VoltageControlled Voltage Sources 1519 Linear CurrentControlled Current Sources 1520 Linear CurrentControlled Voltage Sources 1520 NonLinear Dependent Sources 1521 Contents xviii Lossless Transmission Lines 1522 Lossy Transmission Lines 1523 Uniform Distributed RC Lines Lossy 1524 Junction Diodes 1524 Bipolar Junction Transistors BJTs 1525 Junction FieldEffect Transistors JFETs 1525 MOSFETs 1526 MESFETs GaAsFETs 1527 SimCodeTM Devices 1528 NODESET Statement 1528 IC Statement 1528 Suggested Reading 1530 Chapter 16 Creating New Devices Whats In This Chapter 161 Creating Device Symbols162 Using Symbol Editor Display Controls 163 Drawing a Symbol with the Mouse 164 Selecting Shapes 165 Adding an Existing Shape 166 Importing a Metafile Device 167 Adding DIP LCC and QFP Packages 167 Editing Pin Information 168 Element List and Edit Buffer 169 Element Definitions 1610 Tutorial Creating a Device Symbol 1614 Expanding an Existing Macro Device 1617 Creating Macro Devices with Internal Circuitry 1619 Working with SPICE Models 1621 Editing SPICE Models with a Text Editor 1621 Editing SPICE Models in CircuitMaker 1622 Editing SPICE Subcircuits 1627 Model and Subcircuit Linking Files 1632 Contents xix Creating New SPICE Models with Parameter Passing 1637 General Form Generic Model 1637 General Form Alias 1637 Editing Digital Model Parameters 1639 Chapter 17 Digital SimCode TM Creating New SimCode Devices 172 The 74LS74 Example 174 Editing Device Data for SimCode Devices 178 SimCode Language Definition 1710 Device Setup Functions 1710 Device Test Functions 1710 Output Pin Functions 1711 Expression Operations 1711 Expression Functions 1712 Program Control 1713 Output Text 1713 Debug 1713 SimCode Language Syntax 1714 xxxxsource 1714 CHANGETIME 1715 CHANGEDxx 1715 DELAY 1716 DRIVE 1718 EVENT 1720 EXIT 1720 EXTTABLE 1721 FREQUENCY FMAX 1723 GOSUB 1724 GOTO 1724 IF THEN 1725 INPUTS 1726 INSTANCE 1727 INTEGERS 1728 IOPAIRS 1730 Contents xx LEVEL 1731 LOAD 1732 MATH FUNCTIONS 1734 MESSAGE 1735 MINTYPMAX 1736 NOCHANGE 1739 NUMBER 1739 OPERATORS 1740 OUTPUTS 1741 PARAMSET 1742 PROMPT 1743 PWLTABLE 1745 PWRGNDPINS 1746 READDATA 1747 REALS 1748 RECOVER 1750 RETURN 1751 SELECTVALUE 1751 SETUPHOLD 1752 STATE 1753 STATEBIT 1755 STEPOFF 1756 STEPON 1756 STRENGTH 1757 SUPPLYMINMAX 1758 TABLE 1759 VALUE 1760 VILVIHPERCENT 1761 VILVIHVALUE 1762 VOLVOHMIN 1763 WHILE DO 1764 WIDTH 1765 WIDTHTIME 1766 Index Chapter 1 Welcome to CircuitMaker 121 C H A P T E R 1 Introduction Welcome to CircuitMaker the most powerful easytouse schematic capture and simulation tool in its class Thank you for joining thousands of users who have discovered that CircuitMaker provides the features of highend design software at a fraction of the cost Using CircuitMakers advanced schematic capabilities you can design electronic circuits and output netlists for TraxMaker and other PCB design tools and autorouters You can also perform fast accurate simulations of digital analog and mixed analogdigital circuits using CircuitMakers Berkeley SPICE3f5XSpicebased simulator Required User Background With just a minimum of electronics theory you can success fully use CircuitMaker to design and simulate circuits For beginners CircuitMaker is perfect for learning and experi menting with electronics and circuit design For advanced users CircuitMakers powerful analyses provide a sophisti cated environment for testing and trying all the what if scenarios for your design Best of all you can accomplish more in less time than traditional prototyping methods Required HardwareSoftware IBM compatible 486 or higher PC with a hard disk drive and a 3½ high density disk drive Math coprocessor recommended for analog simula tion 8M RAM 15M hard disk space 20M during installa tion Mouse or other pointing device VGA or higher resolution monitor color preferred Welcome to CircuitMaker Chapter 1 Welcome to CircuitMaker 122 Microsoft Windows 95 Windows NT 40 or greater or Windows 31x requires Win32s a set of operating system extensions which allows some 32bit applica tions to run under the 16bit operating system Installing CircuitMaker 1 Start your Windows operating system 2 If you are installing from the CircuitMaker CD insert it into the CD drive and skip to Step 5 OR If you are installing with floppy disks insert Disk 1 into drive A and continue with Step 3 3 If using Windows 95 or NT4 choose Start Run from the Taskbar OR If using Windows 31x choose File Run from Program Manager 4 Type asetup and press Enter 5 Follow the installation instructions Warning If you are reinstalling or upgrading CircuitMaker be sure to install in a different directory to avoid writing over some of your existing work If you are installing under Windows 31x you will be prompted to install the Win32s operating system extensions 6 Doubleclick the CircuitMaker icon to launch the program 7 If you are upgrading from an earlier version of CircuitMaker see the next section Updating from a Previous Version Installing the Hardware HW Keys Most copies of CircuitMaker sold internationally outside the US and Canada come with a Hardware HW key for copy protection If your copy includes a HW key this key must be attached to the parallel port of your computer in Chapter 1 Welcome to CircuitMaker 123 order to run the software If you have any questions please call MicroCode Engineering Technical Support Updating from a Previous Version While upgrading from a previous version of CircuitMaker is a relatively painless process you should take care when converting custom macro libraries and simulating existing circuits When you load a pre40 circuit file identified by the CIR extension it will automatically be converted to the newer ASCII file format which uses the CKT extension If you have not added components to the library simply follow the instructions above in Installing CircuitMaker The new version will be installed in a new directory and you can delete the previous directory If you have added new device symbols to the macro library see Updating 32bit Macro Libraries or Updating 16bit Macro Libraries below If you have added new SPICE models see Updating Model Libraries below Warning Be careful not to discard or overwrite your previous work Updating 32Bit Macro Libraries If you are upgrading from a 32bit version of CircuitMaker and have created your own macro devices or symbols follow these steps 1 Install the new version of CircuitMaker as described earlier Remember to install the new version in a different directory to avoid writing over your existing work Run CircuitMaker 2 Select Macros Macro Copier 3 Open the old USERLIB file as the Copy From file When asked if you want to list only the user defined devices click Yes 4 Open the USERLIB file from your new CircuitMaker directory as the Copy To file 5 Select the first device that you have created and click on the Copy button Repeat for each additional device that Chapter 1 Welcome to CircuitMaker 124 you have created Each device copied will be placed in the new USERLIB file You may be prompted for information regarding the simulation mode for which a device is intended If the device can be used in digital simulations check the Digital box if it can be used in analog simulations check the Analog box If it can be used in either simulation mode check both boxes Updating 16Bit Macro Libraries If you are upgrading from a 16bit version of CircuitMaker and have created your own macro devices or symbols follow these steps 1 Install the new version of CircuitMaker as described earlier Be sure to install the new version into a different directory to avoid writing over your existing work 2 Run the BTOA file conversion utility 3 Select File Convert Library Open the USERLIB file from your previous CircuitMaker directory Save the new file as USERLIBASC 4 Run CircuitMaker 5 Select Macros Convert ASCII Library Load the file USERLIBASC that you just created Save the new file as NEWUSERLIB 6 Select Macros Macro Copier 7 Open the NEWUSERLIB file as the Copy From file When asked if you want to list only the user defined devices click Yes 8 Open the USERLIB file from your new CircuitMaker directory as the Copy To file 9 Select the first device that you created and click on the Copy button Repeat for each additional device that you have created Each device copied will be placed in the new USERLIB file You may be prompted for informa tion regarding the simulation mode for which a device is intended If the device can be used in digital simula tions check the Digital box if it can be used in analog simulations check the Analog box If it can be used in either simulation mode check both boxes Chapter 1 Welcome to CircuitMaker 125 Note Importing of bitmaps and unconverted metafiles is no longer supported for creating devices in CircuitMaker If you have created devices of this type the symbol will not be available in CircuitMaker 6 or PRO the symbol will be replaced by a rectangle These symbols may be redrawn with the Symbol Editor Updating Model Libraries If you have added or modified any of the MOD SUB or LIB files from a previous version you must make these same additions or modifications to the files in the new Models directory Since many of these MOD SUB and LIB files in CircuitMaker 6PRO contain new information added by MicroCode Engineering it is recommended that any changes you made previously be done manually dont just copy your old file over the top of the new one to avoid any possible loss of data If you have created any userdefined symbols to which SPICE models have been linked you must remember that each of these userdefined symbols has a corresponding MOD or SUB file Be sure to copy these files into the new Models directory If you have used CircuitMakers automatic linking feature accessed throught the Model Data button in Macro Utilities dialog box to link a symbol to a useradded SPICE model in a LIB file you must do one of two things 1 Reenter the information using the Macro Utilities dialog box just like before OR 2 Copy the linking information that was automatically placed in the MOD or SUB files into the new files This information would usually be located at the end of the MOD or SUB file that corresponds to the symbol Updating Pre50 Digital Circuits for Analog Simulation Digital circuits created in pre50 versions of CircuitMaker will still run in Digital Logic Simulation mode However if you want to run them in Analog Simulation mode you should be aware of the following Chapter 1 Welcome to CircuitMaker 126 Analog is not a freerunning simulation mode Analog simulations require proper use of Vcc and Ground connections to digital devices Analog simulations require designations of all devices The digital devices saved in old circuits do not contain SPICE data for simulation These must be replaced by new digital SimCode devices To do this delete the existing devices and replace them with new devices from the current library The Pulser is a digital only device It must be replaced by a Data Sequencer or a Signal Generator Devices which are animated in Digital Logic Simulation mode are not animated in Analog Simulation mode MultiUser Project Installations You can configure CircuitMaker to support Projects for multiple users each user having access to separate libraries and preferences Project installations are possible whether on a network or on a standalone system Each user must be assigned a separate directory from which the CircuitMaker preferences libraries and circuit files can be accessed This same method may be used by a single user who needs to access multiple projects each with separate libraries and preferences Note A site license is required for network installation Setting Up Multiple Projects 1 Install and run CircuitMaker as described above to initialize the default file paths then exit 2 Create a separate directory for each user or project 3 Place a copy of the Cirmakerdat file in each users project directory This file contains the Preferences data which allows each user to specify their own circuit and library paths and other circuit and program preferences 4 If a user will need to make modifications or additions to the Macros library changes that must not affect other users place a copy of the USERLIB DEVICEDBDAT SYMBOLDBDAT and HOTKEYSDBDAT files into that users project directory The DEVICEDBDAT Chapter 1 Welcome to CircuitMaker 127 SYMBOLDBDAT and HOTKEYSDBDAT files must always be placed in the same directory as USERLIB 5 If a user will need to make modifications or additions to the SPICE models or subcircuits place a copy of the entire Models directory into that users project direc tory 6 If accidental modification of files which are common to multiple users is a concern see your network adminis trator for details on how to protect these files from modification 7 In Windows 95NT4 Rightclick the Start button and select Open Browse to the CircuitMaker icon rightclick it and Select Properties Click the Shortcut tab OR From the Windows 31x Program Manager click once on the CircuitMaker icon to select it In Program Manager select File Properties 8 Add the word PROJECT onto the string in the Target edit field For example ccirmakerexe project then click OK This enables the Select Project dialog box explained later in this section 9 Run CircuitMaker 10 The Select Project dialog box appears allowing you to find the individual project directories Browse the directories to find one individuals Cirmakerdat file and click OK 11 When CircuitMaker has loaded select File Prefer ences then click Directories and Files 12 Change the Circuit Directory path to that of the project directory This is where that individuals circuit files CKT will be stored 13 If there is a copy of the Userlib file in the project directory change the User Library File path to that of the individuals directory This allows the individual to make changesadditions to the Macros library Chapter 1 Welcome to CircuitMaker 128 14 If there is a copy of the Models directory in the project directory change the Model Directory path to that of the individuals directory This allows the individual to make changesadditions to the SPICE models and subcircuits 15 Click OK to exit the Directories and Files dialog box then click OK in the Preferences dialog box to save these changes 16 Exit CircuitMaker 17 CircuitMaker is now completely configured for one user Repeat steps 916 to configure CircuitMaker for each individual user Accessing a Project 1 Run CircuitMaker 2 The Select Project dialog box appears allowing you to find your personal project directory Browse the directories to find your CIRMAKERDAT file and click on the OK button Technical Support MicroCode Engineering Inc is dedicated to producing only the finest quality software and supporting customers after the initial purchase If you encounter problems while using CircuitMaker or just need general help contact us via phone FAX electronic mail or US Mail and well provide prompt and courteous support NOTE Please be prepared to provide your name and registration number found on the back of the User Manual Disk 1 or the CD jacket when contacting us Telephone 801 2264470 FAX 801 2266532 Internet httpwwwmicrocodecom Email supportmicrocodecom Chapter 1 Welcome to CircuitMaker 129 US Mail MicroCode Engineering Inc 927 West Center Orem UT 84057 USA Future versions of CircuitMaker are planned so please feel free to write and let us know what features or additions you would like to see Our goal is to provide a product that will meet your needs and expectations so feedback from you the end user is essential About the Documentation CircuitMaker comes with two manuals a User Manual and a Device Library Guide This User Manual has been designed to guide you through CircuitMakers many features and simplify the retrieval of specific information once you have a working knowledge of the product The separate Device Library Guide outlines the symbols and device models that are included with CircuitMaker The manual assumes that you are familiar with the Windows desktop 31x 95 and NT and its use of icons menus windows and the mouse It also assumes a basic under standing about how Windows manages applications programs and utilities and documents data files to perform routine tasks such as starting applications opening documents and saving your work Manual Conventions The following conventions are used to identify information needed to perform CircuitMaker tasks Note that this manual contains information for both CircuitMaker Version 6 and CircuitMaker PRO Those features described in this manual which are only available in CircuitMaker PRO are highlighted by the banner at the left Stepbystep instructions for performing an operation are generally numbered as in the following examples 1 Choose File Save This means choose the File menu then choose Save 2 Select the Arrow Tool on the Toolbar Notes Hints and Tips are written in the margins for better visibility CircuitMaker PRO only Chapter 1 Welcome to CircuitMaker 130 Menu names menu commands and Toolbar options usually appear in bold type as are text strings to be typed 3 Type the LabelValue 220K This manual also includes some special terminologywords that are either unique to schematic capture and circuit simulation or have some specific meaning within CircuitMaker Such terms are italicized when first introduced Using Online Help You can access CircuitMakers online Help file CIRMAKERHLP in several ways From the Help Menu To access Help from the Help menu 1 Choose Help CircuitMaker Help Topics 2 Choose the Contents tab to see an overview of all Help topics arranged hierarchically OR Choose the Index tab then enter a keyword to look up a specific Help topic OR Choose the Find tab to find Help topics that contain the word you are looking for From a Dialog Box To access contextsensitive Help 1 Open a dialog box then press F1 to display Help specifically tailored for that dialog box From the Toolbar To get contextsensitive Help about a particular device or item you have placed in the work space 1 Click the Help button on the Toolbar 2 Click the item From the Help File Directly Even when CircuitMaker is not running you can view the Help file by doubleclicking its icon in the CircuitMaker program group Chapter 1 Welcome to CircuitMaker 131 Watching the Online Tutorial For a quick overview of CircuitMaker doubleclick the CM Tutorial icon The ScreenCam demonstrations illustrate the major areas of schematic drawing and simulation Where to Go from Here Once you have mastered a few Windows basics youll be ready to learn CircuitMaker Use the following table to help you get around this User Manual Topic Where to Go CircuitMaker Basics Chapters 2 3 Drawing and Editing Schematics Chapter 4 Simulation Chapters 5 6 Exporting Files Chapter 7 Fault Simulation Chapter 8 CircuitMaker Menus Chapters 914 Advance SPICE Tips Chapter 15 Creating New Devices Chapter 16 SimCode Chapter 17 Chapter 1 Welcome to CircuitMaker 132 Chapter 2 Getting Started 233 Getting Started C H A P T E R 2 CircuitMaker Basics This chapter gives you an overview of the CircuitMaker workspace conventions preferences shortcuts and HotKeys Its a great place to start if you need some guidance before using CircuitMaker to draw edit test and simulate electronic circuits Starting CircuitMaker If you have installed CircuitMaker on your hard disk youre ready to run the program 1 Open the Start menu 2 Choose Programs CircuitMaker 6 or CircuitMaker PRO 3 Choose the CircuitMaker program You can also create a shortcut for CircuitMaker and have the icon display on your desktop all the time CircuitMaker Workspace When you start CircuitMaker the blank workspace appears This is where you place devices that represent real life components such as resistors transistors power supplies etc The CircuitMaker workspace also includes the Toolbar Menu Bar and special windows for circuit simulation and testing purposes After placing devices exactly where you want you simply wire them together The wiring lines you draw form intelli gent links between devices which then allow the circuit to be simulated tested and analyzed using CircuitMakers powerful simulator Figure 21 shows the CircuitMaker workspace filled in with the Drawing Window and several analysis windows 234 Chapter 2 Getting Started Toolbar Title Bar Menu Bar Analysis Windows Drawing Window Figure 21 The CircuitMaker workspace Connectivity An important feature of CircuitMaker is the way electrical connections between the elements in your design are recognized The concept of connectivity is the key to using CircuitMaker to draw and simulate electronic circuits The program stores connection information for simulation and it is also used for creating and exporting netlists into TraxMaker or other pcb layout programs to create a working printed circuit board PCB About CircuitMaker Windows In addition to the Drawing window CircuitMaker offers several other windows most of which display information and waveforms for analog and digital simulations During simulation the windows for the selected analyses appear showing waveforms and simulation data Multiple analysis windows can be open simultaneously however only one window of each of analysis type can be open at a time Chapter 2 Getting Started 235 Anatomy of a Schematic Drawing Figure 22 shows a basic schematic including device symbols labelvalues and designations wires and pindots Figure 22 CircuitMakers straightforward approach makes it easy to identify each part of a schematic drawing CircuitMaker Conventions If you are experienced with Windows applications you already know how to start and quit CircuitMaker select menus using the mouse save your work and locate and organize your documents On the other hand CircuitMaker has special features that are not common to other Windows applications These options let CircuitMaker perform some of the special tasks unique to circuit design CircuitMaker Files CircuitMaker includes a number of special purpose files in addition to the CircuitMaker application The following table lists the various types of files you will use by file extension CKT Schematic or Circuit files DAT Data files HotKeys device library classifications LIB Device library files SRP Script files MOD Model files SUB Subcircuit files RAW Simulation data files Device designation Device labelvalue Wire Pin dot Device symbol Ground 236 Chapter 2 Getting Started Accessing Tools and Features This section shows you the fundamental tools and processes used to draw schematics Task Overview Using CircuitMaker involves six basic procedures 1 placing devices such as resistors transistors power supplies and grounds in the workspace 2 repositioning devices 3 editing devices with precise values and param eters 4 deleting devices if necessary 5 wiring devices together 6 simulating and testing the circuit Using the Toolbar You can perform most CircuitMaker tasks using the buttons on the Toolbar which is conveniently located at the top of the workspace The table on the following page briefly describes each button and tool on the Toolbar Generally a Tool lets you apply a specific action whereas a Button performs a general function For more details about the drawing and editing tools see Chapter 4 Drawing and Editing Schematics For more information about the simulation tools see Chapters 5 Digital Logic Simulation and Chapter 6 AnalogMixed Signal Simulation DigitalAnalog Step Probe Tool Waveforms Search Help Reset RunStop Trace Parts Macro TraxMaker Open Print Wire Tool Delete Tool Rotate 90 New Save Arrow Tool Text Tool Zoom Tool Mirror Chapter 2 Getting Started 237 Tool or Button Lets You Arrow Tool Select move and edit devices wires and text Also used to place wires when ArrowWire option is checked Wire Tool Place wires to connect devices in the circuit Shift to place bus wires Text Tool Add text to the circuit Delete Tool Delete devices wires and text Shift to snip wires Zoom Tool Magnify and reduce the circuit Shift to reduce Rotate 90 Rotate one or more selected devices Mirror Mirror one or more selected devices DigitalAnalog Toggle between Digital or Analog simulation mode AND Gate Digital Transistor Analog Reset Initialize analog and digital simula tions Step Singlestep digital simulations Setup in Digital Options RunStop Run and stop simulations Probe Tool Observeplot data at any points in the circuit contextsensitive Trace Interactively see the logic state of all nodes in Digital simulation mode Waveforms Show digital waveforms in Digital simulation mode Parts Display and select devices from the graphical parts browser Search Search for devices in the library by namenumber Macro Create a new macro or expand a selected macro 238 Chapter 2 Getting Started Help Tool Display information on devices and wires TraxMaker Automatically create a PCB netlist and launch TraxMaker Using the Mouse As in other Windows applications CircuitMaker uses the mouse for clicking selecting and dragging When moving the mouse a corresponding selection tool or cursor movement occurs on the screen The familiar pointer Arrow Tool is used for standard Windows operations such as choosing from menus and dialog boxes You can return to the standard Arrow Tool at any time by selecting the tool from the Toolbar or rightclicking on the schematic background and selecting Arrow RightClick PopUp Menus You can rightclick click with the right mouse button in different areas of the CircuitMaker workspace to open various popup menus see Figure 23 The items listed in the popup menu vary depending on where you rightclick The following locations and circumstances will each access a different popup menu Schematic background Device Wire Text object created with the Text Tool Group of selected items popup menu depends on types of items that you select Waveform label Anywhere else in Waveform window Figure 23 Rightclick the mouse on different areas to access many CircuitMaker features Chapter 2 Getting Started 239 HotKeys For quick and easy device placement CircuitMaker offers up to sixty userdefinable HotKeys that let you place com monlyused devices with a single keystroke For example press the r key lowercase r to get a 1K resistor Or press b for a 10V battery These assignments can be changed and customized so that the parts you use most are right at your fingertips See Chapter 4 Drawing and Editing Schematics to learn how to customize HotKeys For a list of all default HotKeys choose Devices HotKeys1 or HotKeys2 Figure 24 shows the default HotKeys1 list Shortcut Keys Command key or shortcut keys let you select menu commands directly The following table lists the available short cut keys in CircuitMaker Keystroke What it Does CtrlN Starts a new CKT file CtrlO Lets you choose a file to open CtrlS Saves the current file CtrlP Printsplots the current file ShiftSpace Opens the Script Functions dialog box CtrlZ Undo reverse an action CtrlX Cuts the currently selected item or group of items to the Clipboard CtrlC Copies the currently selected item or group of items to the Clipboard CtrlV Pastes the currently selected item or group of items from the Clipboard ShiftInsert Moves the currently selected group of items CtrlD Duplicates the currently selected item or group of items CtrlF or End Refreshes the screen Figure 24 Use HotKeys to quickly select devices You can customize HotKeys to fit your needs 240 Chapter 2 Getting Started Esc Aborts the current operation Page Up Enlarges the display zooms in Page Down Reduces the display zooms out Delete Deletes the current selection Home Centers the screen around the cursor Tab Skips to next input item in dialog boxes Arrow Keys Nudges a selected device by pressing the Left Right Up or Down Arrow keys CircuitMaker Preferences CircuitMaker stores many settings such as program and circuit defaults You specify preference settings using the Preferences dialog box choose File Preferences as shown in Figure 25 You can use different Preference settings or reload the factory defaults See Chapter 9 File Menu for more information Changing Preferences 1 Choose File Preferences 2 Make the desired changes then choose OK Restoring Factory Defaults If your Preferences settings have become confused you can restore them to the way they were when you first started CircuitMaker 1 Choose File Preferences 2 Choose Factory Settings then choose OK Chapter 2 Getting Started 241 Figure 25 Use the Preferences dialog box to manage CircuitMaker settings Basic CKT File Management This section explains the basic CircuitMaker file management procedures Starting Saving Closing a CKT File The features you will use most often are New Save and Save As 1 Choose File New to start a new file 2 Choose File Save if youve already established a filename Or Choose File Save As to give the file a filename This is the way to copy a CKT file 242 Chapter 2 Getting Started 3 Choose File Close Yes to save and exit a CKT file without exiting CircuitMaker OR Choose File Exit Yes to exit CircuitMaker and save your work Opening and ReOpening a CKT File 1 Choose File Open 2 Select the file with CKT extension that you want to open then choose Open You can open any of the last 8 CKT files youve had open 1 Choose FileReopen 2 Select the file you want to reopen Reverting to Previously Saved File If you made changes to a CKT file that you dont wish to save you may revert to the last version of the CKT file you saved under the same filename To revert to the previously saved file 1 Choose File Revert Chapter 3 Tutorials 343 This chapter covers stepbystep processes in the order you would normally perform them Working through the follow ing examples will provide a general understanding of the way CircuitMaker works and will illustrate that there is often more than one way of doing a task Tutorial 1 Drawing a Schematic This tutorial covers the following topics Using the Device Selection dialog box Selecting a transistor Selecting resistors Selecting a V and ground device Changing resistor and transistor label values Wiring the circuit Using the Device Selection Dialog Box Drawing a schematic is as easy as pointing and clicking with the mouse Lets walk through a simple example by con structing the circuit shown in Figure 31 15V Vcc Q1 2N2222A RB 220k RC 870 Figure 31 This is a very simple circuit that consists of one transistor two resistors a power source and a ground C H A P T E R 3 Tutorials 344 Chapter 3 Tutorials 1 Begin by starting the CircuitMaker program and if necessary clearing the workspace by choosing File New or clicking the New button on the Toolbar 2 Choose Devices Browse or click the Parts button on the Toolbar to display the Device Selection dialog box pictured in Figure 32 Note Throughout this tutorial the location of a device in the library is indicated by its major and minor class and its default HotKey if applicable using this format major device classminor device class default HotKey For example a battery is found at AnalogPower b You can also find devices through hotkeys in the Devices HotKeys1 and HotKeys2 menus By simply pressing a HotKey for example the letter b you can quickly select and insert a device into the workspace Figure 32 Use the Device Selection dialog box to pick a device from a large library of devices Notice that in this example the 2N2222A transistor is selected New Button Parts Search Button Parts Button Chapter 3 Tutorials 345 Selecting a Transistor Begin the circuit by selecting the 2N2222A transistor Active ComponentsBJTs 1 Select Active Components in the Major Device Class list BJTs in the Minor Device Class list and NPN TransC in the Device Symbol list Select the 2N2222A transistor in the ModelSubcircuit list 2 Click Place to select this device from the library You can also click the Search button on the Toolbar type 2n2222a and click Find to quickly find the part 3 Position the transistor at about midscreen and then click the left mouse button once Notice that the transistor is placed on the workspace and no longer follows the mouse see picture at left Selecting the Resistors The next procedure involves placing two resistors 1 Choose Options Auto Repeat make sure the feature has a check mark next to it or press CtrlR 2 Select a Resistor Passive ComponentsResistors r by pressing the letter r on the keyboard Notice that the resistor is oriented horizontally 3 Press the r key again or click the Right mouse button to rotate the device 90 4 Drag the resistor above and to the left of the transistor and click the Left mouse button once This will be resistor RB Dont worry about the value yet Since you enabled the Repeat On feature another resistor will appear with the same orientation as the previous one 5 Place the next resistor directly above the transistor This will be resistor RC 6 Another resistor appears Press any key on the key board except R or M to delete it 7 Choose Options Auto Repeat and uncheck the Auto Repeat feature or press CtrlR Transistor Resistor RB Resistor RC 346 Chapter 3 Tutorials Selecting V and Ground Devices Now youll place a voltage source and change its settings 1 Select a V AnalogPower 1 by pressing the 1 number one key Place it above resistor RC 2 Select a Ground AnalogPower 0 by pressing the 0 zero key Place it below the transistor 3 Doubleclick the V device using the Left mouse button to open the Edit Device Data dialog box pictured in Figure 33 Figure 33 The Edit Device Data dialog box lets you change a wide range of device settings 4 Change the LabelValue field to read 15V 5 Click once on the Visible check box next to the Label Value field to change the black check mark to a grayed out check mark This causes 15V to replace the V on the schematic 6 Enter Vcc in the Designation field and click once in the Visible check box next to it so that there is a black check mark in it Click OK Voltage device Ground Chapter 3 Tutorials 347 Wire Tool Changing ResistorTransistor LabelValues Now try the same editing procedure on the transistor and resistors 1 Doubleclick resistor RB 2 Change the LabelValue field to read 220k enter RB in the Designation field make it visible and click OK 3 Doubleclick resistor RC 4 Change the LabelValue field to read 870k enter RC in the Designation field make it visible then click OK 5 Doubleclick the transistor to display the Model Selec tion dialog box Since you have already selected the model that you want to display 2N2222A just click on the Netlist button to open the Edit Device Data dialog box 6 Enter Q1 in the Designation field and make it visible Click OK and then click Exit to return to the schematic 7 If necessary drag the devices and labels around with the mouse to place them in convenient locations Wiring the Circuit Together Now its time to hook up these devices into a working circuit by wiring them together 1 Select the Wire Tool from the Toolbar or use the Arrow Tool if the ArrowWire option is enabled 2 Place the cursor on the emitter pin the pin with the arrow of the transistor When the cursor gets close to the pin a small rectangle appears 3 Click and hold the left mouse button then drag the wire to the pin of the Ground symbol 4 Release the mouse button to make the connection If Options Show Pin Dots is enabled a small dot will be placed at each connection point to verify the connection see circuit example on the following page 348 Chapter 3 Tutorials 5 Place the cursor on the bottom pin of RC and then click and hold the mouse button to start a new wire 6 Drag the end of the wire to the collector pin of the transistor and release the mouse button 7 Connect a wire from the top pin of RC to Vcc 8 Connect another wire from the bottom pin of RB to the base of the transistor 9 Finally connect a wire from the top pin of RB to the middle of the wire which connects Vcc to RC You can move device and wire positions by dragging them with the mouse Tutorial 2 Simulating a Digital Circuit The best way to see how the digital simulation works is to load an example circuit and try some commands 1 Click the Open button in the Toolbar 2 Select the SIMCKT file from the list of available circuits The SIMCKT circuit contains several minicircuits and is useful for demonstrating CircuitMakers digital simulation features 3 Click the Run Tool on the Toolbar to start simulation You know that simulation is running when you see a Hex Display showing a count sequence 4 Select the Probe Tool from the Toolbar and touch its tip to the wire just to the left of the label Probe Wire to the Left The following illustration describes the meaning of the letters that might appear in the Probe Tool depending on what part of the schematic you touch with the tool The completed schematic Pulse between High and Low States Unknown or Tristate Low State High State Run Tool Open Button Chapter 3 Tutorials 349 5 Move the tip of the Probe Tool to the Logic Switch labeled Toggle Switch and click near its center The Logic Display connected to the output of this mini circuit should then start to toggle on and off rapidly 6 Click the Waveforms Tool button on the Toolbar to open the digital Waveforms window Each node in the circuit that has a SCOPE attached is charted in this window 7 Select Simulation Scope Probe A new waveform called Probe displays in the Wave forms window Watch what happens to this waveform as you move the Probe Tool around the circuit 8 Click the Trace button in the Toolbar to see the state of every wire in the circuit as the state changes 9 Click the Stop button in the Toolbar to stop simulation Tutorial 3 Analog Analysis The best way to get acquainted with CircuitMakers analog simulation is to build a few simple circuits set up the analyses and run the simulations This tutorial covers Simple circuit analysis Simulating a simple AC circuit More circuit simulation Setting up the analyses Running the simulation Mixedmode simulation Trace Button Waveform Button Probe Tool Stop Button 350 Chapter 3 Tutorials Simple Circuit Analysis Lets begin with a simple DC circuit 1 Click the New button on the Toolbar This opens an untitled circuit window 2 Click the DigitalAnalog Simulation mode toggle button You know CircuitMaker is in Analog mode when the transistor icon not the AND gate icon is visible on the Toolbar see pictures at left If the AND gate icon is displayed Digital mode click the button to switch 3 Draw the circuit as shown in Figure 34 using the following devices 1 Battery AnalogPower b 1 Ground AnalogPower 0 zero 2 Resistors Passive ComponentsResistors r Figure 34 A quick way to access the devices for this circuit is to use the HotKey shortcuts explained in Chapter 2 and type the keys for the corresponding devices Note Every analog circuit must have a Ground and every node in the circuit must have a DC path to ground 4 Use the Wire Tool to wire the circuit together or the Arrow Tool when the ArrowWire option is enabled 5 Choose Simulation Analyses Setup then click the Analog Options button to display the dialog box shown in Figure 35 Analog Simulation Digital Simulation New Button Wire Tool Chapter 3 Tutorials 351 Probe Tool Figure 35 The third option selected lets you measure voltage current and power with the Probe Tool 6 From the Analysis data saved in RAW file group box select the third option Node Voltage Supply Current Device Current and Power then click OK to exit Analog Options This option lets you to take current and power measure ments with the Probe Tool 7 Click the Run Analyses button to start the simulation OR Click Exit and click the Run Tool on the Toolbar An interactive SPICE simulation window appears during the SPICE data collection process showing the progress of the simulation When the SPICE data collection process is completed the Multimeter Window appears 8 Click the wire connected to the terminal of the battery with the tip of the Probe Tool Notice that the letter V appears on the Probe Tool when you move it over a wire 352 Chapter 3 Tutorials The DC voltage at that node 10V appears in the Multimeter Window 9 Click the wire connected between the two resistors The DC voltage at that node 5V appears in the Multimeter Window SPICE data is not collected for the Ground node in the circuit it is always at zero volts 10 Click the pin of the battery or one of the resistor pins Notice that an I displays on the Probe Tool when it is over a device pin The current through that device 5mA appears in the Multimeter Window 11 Click directly on one of the resistors Notice that a P displays on the Probe Tool when over a device The power dissipated by that resistor 25mW appears in the Value Window 12 Click the Stop button on the Toolbar to stop the simulation and return to editing mode Creating a Simple RC Circuit Now lets replace one of the resistors with a capacitor to create a simple RC circuit where you can see the charging of the capacitor Transient Analysis begins its simulation in a stable DC condition where the capacitors are already charged Since you want to see the capacitor charging from time zero you must set the initial condition of the capacitor to 0V 1 Using the Delete Tool on the Toolbar delete the second resistor the one connected to ground and the wire leading to it 2 Replace the resistor with a Capacitor Passive Compo nentsCapacitors c 3 Select an IC device AnalogSPICE Controls I and connect it to the wire between the resistor and capaci tor This will set an initial condition of 0V on the capacitor for the analysis Your circuit should now look like the one pictured in Figure 36 Delete Tool Stop Button Chapter 3 Tutorials 353 Figure 36 By replacing the resistor with the capaci tor you can create a simple RC circuit to see the charging of the capacitor 4 Run the simulation again by clicking the Run button on the Toolbar This time the Transient Analysis window similar to an oscilloscope appears 5 Click the Transient Analysis window to select it and then click with the tip of the Probe Tool between the resistor and capacitor Notice a diagonal line across the scope This is actually the beginning of the charge curve for the capacitor Your view of the curve is limited by start and stop times of the Transient Analysis that were selected by default You now have the option of changing the Transient Analysis settings to increase the size of the time segment that you can view with the scope or you can reduce the component values so the capacitor will charge quicker For this example you will change the component values 6 Stop the simulation by clicking the Stop button 7 Doubleclick the Resistor to display the Edit Device Data dialog box 8 Change the LabelValue from 1k to 100 and then click OK 9 Doubleclick the Capacitor change the LabelValue from 1uF to 001uF and then click OK Compare your schematic with Figure 37 354 Chapter 3 Tutorials Figure 37 Notice that the resistor and capacitor now have different labelvalues 10 Run the simulation again This time you will see the charge curve of the capacitor Simulating a Simple AC Circuit Now lets create a simple AC circuit using a Signal Generator and two Resistors 1 Click the New button on the Toolbar 2 Draw the circuit as shown in Figure 38 using the following devices 1 Signal Gen AnalogInstruments g 1 Ground AnalogPower 0 zero 2 Resistors Passive ComponentsResistors r Figure 38 A simple AC circuit with a Signal Genera tor and two Resistors 3 Use the Wire Tool to wire the circuit together or the Arrow Tool when the ArrowWire option is enabled Chapter 3 Tutorials 355 4 Make sure you are in Analog simulation mode the transistor icon is showing on the simulation mode button then run the simulation 5 Click the Transient Analysis window to select it then click the wire connected to the output of the Signal Generator The sine wave appears on the scope 6 Hold down the Shift key and click the wire connected between the two resistors A second waveform appears on the scope 7 Stop the simulation Tutorial 4 More Circuit Simulation The next example demonstrates how to use all of the analyses and how to take simple measurements using the cursors in the analysis windows Lets create a basic 10X amplifier circuit using a µA741 Op Amp in this configuration voltage gain RFRI 1 Choose File New 2 Make sure that Analog simulation mode is selected 3 Draw the circuit as shown in Figure 39 using the following devices 1 Signal Gen AnalogInstruments g for Vin on the schematic 2 V devices AnalogPower 1 for Vcc and Vee 2 Grounds AnalogPower 0 zero 3 Resistors Passive ComponentsResistors r for RI RF and RL 1 OpAmp5 Linear ICsOPAMPs for U1 356 Chapter 3 Tutorials Figure 39 A 10X Amplifier Circuit 4 Select the Rotate 90 button on the Toolbar which lets you rotate devices in 90 increments 5 Using the Rotate 90 button rotate RL and the 12V supply 6 Use the Wire Tool to wire the circuit together 7 Use the Arrow Tool to drag the devices wires and labels to make the circuit look clean 8 Select the Arrow Tool and doubleclick the Op Amp 9 Select UA741 from the list of available subcircuits located near the bottom of the list see Figure 310 and click the Select button 10 Click the Netlist button 11 Set the Designation field to U1 set it to be visible and then click OK 12 Doubleclick the top V device 13 Set the LabelValue field to 12V and visible set the Designation field to Vcc and visible set the Device field to NOT visible then click OK 14 Doubleclick the bottom V device Chapter 3 Tutorials 357 Figure 310 Use the Subcircuit Selections dialog box to select a specific model such as the UA741 15 Set the LabelValue field to 12V and visible set the Designation field to Vee and visible set the Device field to NOT visible then click OK 16 Click and drag the labels so they are positioned as shown on the schematic in Figure 39 17 Doubleclick each resistor to change both its Label Value and its Designation and make them visible Set them up as follows Resistor LabelValue Designation Input 10k RI Feedback 100k RF Load 25k RL 18 Doubleclick the Signal Generator 19 Set Peak Amplitude to 01V and the frequency to 10kHz 20 Click the Wave button in the Signal Generator 21 Enable the Source check box for AC Analysis set Magnitude to 01V and Phase to 0 and then click OK You can now use the Signal Generator as a reference for the AC analysis 22 Click the Netlist button 23 Set Designation to Vin Visible and then click OK Note The LabelValue field contains 11V which represents the minimum and maximum programmed voltage swings before you doubleclicked on the Signal Generator 358 Chapter 3 Tutorials Setting Up the Analysis Now that you have created the circuit you will set up the analyses When you run the simulation the results are based on the conditions you set up 1 Select Simulation Analyses Setup 2 Uncheck the Always Set Defaults for Transient and Operating Point Analyses option so it is cleared By unchecking this option you can access the Tran sient and Multimeter Operating Point Analysis setups When checked defaults are used for the simulation 3 Click the TransientFourier button 4 Click the Set Defaults button for default Transient Analysis setups and click OK This provides simulation for 5 cycles of the input signal with 200 data points For best reliability Max Step should be the same size as Step Time More data points require longer simulation time 5 Click the Multimeter button 6 Select the DC Operating Point option in the Display group box and click OK This sets the initial display mode of the Value Window to DC Note You must enable Transient Analysis in order to obtain DC AVG or AC RMS values Multimeter must be enabled in order to use the Multimeter Window 7 Click the DC button 8 Select the Enabled and Enable Secondary options in the DC Analysis Setup dialog box When you are finished entering the following settings into the appropriate fields choose OK Primary Secondary Source Name Vin Vcc Start 15V 10V Stop 7V 14V Step 001V 1V Chapter 3 Tutorials 359 This setup lets you sweep the voltage of Vin over the specified range at each of 5 different Vcc levels 9 Click the AC button 10 Select the Enabled option in the AC Analysis Setup dialog box and enter the following settings into the appropriate fields Start Frequency 1 Hz Stop Frequency 1MegHz Test Points 10 Sweep Decade This setup lets you plot the frequency response of the circuit Click OK to save the settings Click Exit to return to the circuit 11 Select File Save As and save the circuit as MYAMPCKT analyses setups are saved with the circuit Running the Simulation When you run the simulation an interactive XSpice window appears showing the progress of the simulation By placing RunTime Test Points in your circuit beforehand you can monitor the results as XSpice collects the data for more information about Test Points see Chapter 6 Analog MixedSignal Simulation If you dont place any RunTime Test Points you will see only a bar graph showing the progress of the simulation The amount of time it takes to finish is based on the analy ses you have enabled the amount of data youre collecting the complexity of the circuit and the speed of your com puter 1 Select the Probe Tool on the Toolbar 2 Using the left mouse button click the wire connected to the output of the OpAmp with the tip of the Probe Tool CircuitMaker places a RunTime Test Point on that node and displays a dialog box 360 Chapter 3 Tutorials 3 Enable the AC DC and TRAN check boxes change the Max Scale of the DC graph to 15 and then click OK 4 Click the Run button on the Toolbar to start the simulation The interactive XSpice simulation window displays showing the waveforms as the data is collected When the data collection process has completed CircuitMaker displays the analyses windows 5 Select View Fit Circuit to Window or press F4 to make the entire circuit visible 6 Click the Multimeter window to select it its in the upper left hand corner of the screen and should say DC in the title bar 7 Click on any wire in the circuit except a wire connected to ground with the tip of the Probe Tool Notice that the letter V displays on the Probe Tool when its over a wire The DC voltage at that node will be displayed in the Value window 8 Click the pin of the 12V power supply The DC current through that supply appears in the Value window Notice that the letter I appears on the Probe Tool when its over a pin You can also measure current and power on other devices but only if you have enabled corresponding Test Points see the information about Test Points later in this tutorial Note SPICE sees the current flowing into the positive terminal of a power supply Multimeter or Signal Generator as positive current 9 Doubleclick the Multimeter window change the setting to AC RMS then click OK Now when you click the wires in the circuit the AC voltage or current appears Chapter 3 Tutorials 361 10 Click in the Transient Analysis window to select it and then click the wire connected to the output of the Signal Generator with the tip of the Probe Tool A green waveform appears in the Transient Analysis window similar to what would be seen on an oscillo scope 11 Hold down the Shift key and click on the wire con nected to the output of the Op Amp A second yellow waveform appears in the Transient Analysis window A quick comparison of the two waveforms confirms that the amplitude at the output of the amplifier is much greater than the amplitude at the input 12 Click the c cursor at the far right of the Transient Analysis window and drag it to the top peak of the output waveform the yellow one 13 Click the d cursor and drag it to the top peak of the input waveform the green one The actual peak voltages appear at the top of the graph as Yc and Yd As you can see from the Yc and Yd values the peak voltage at the output of the amplifier is 10 times the peak voltage at the input of the amplifier The difference between the two Y cursors is shown as cd 14 Click the b cursor at the top of the Transient Analysis graph and drag it to the top peak of the first cycle of the output waveform 15 Click the a cursor and drag it to the top peak of the second cycle of the output waveform The period period 1frequency of the signal is shown as the difference between the two X cursors ab The frequency also appears directly 16 Draw a selection rectangle around a portion of the waveforms in the Transient Analysis window that is of interest to you Do this by clicking the mouse once and holding the mouse while you draw a box 362 Chapter 3 Tutorials Notice that when you release the mouse button the view zooms in on the portion of the waveform that you selected To restore the original view click the Reset button in the graph window 17 Click the DC Analysis window to select it then click on any wire in the circuit A DC analysis waveform displays in the window similar to what would be seen on a curve tracer Use the cursors to get measurements from the waveforms 18 Click the AC Analysis window to select it and then click the wire at the output of the Op Amp An AC analysis waveform displays in the window 19 Click the Setup button the left button in the upper left hand corner of the AC Analysis window 20 Select Log scale for the X Grid select Decibels for the Y Axis click the Show Wave Grid check box then click OK The waveform now shows the response of the circuit over the specified frequency Use the cursors to get measurements from the waveforms 21 Click the Stop button on the Toolbar to stop the simulation and return to editing mode MixedMode Simulation Example The following BCD counter circuit demonstrates how digital SimCode devices can be used in analog simulation mode 1 Choose File New 2 Make sure that Analog simulation mode is selected 3 Draw the circuit shown in Figure 311 using the follow ing devices Data Sequencer AnalogInstruments 74LS168A Counter Digital by Number741xx V AnalogPower 1 Ground AnalogPower 0 zero Reset Button Chapter 3 Tutorials 363 Logic Switch SwitchesDigital s Logic Display DisplaysDigital 9 Hex Display DisplaysDigital h 4 Doubleclick the V and enter DVCC including the semicolon in the Bus Data field to connect this device to the Vcc pin of the 74LS168A 5 Doubleclick the Data Sequencer 6 Click the Pattern button Figure 311 BCD Counter Circuit 7 Select Count Up and click OK 8 Enter 20 in the Stop Address field and then click OK 9 Choose Simulation Analyses Setup and make sure the Always Set Defaults check box at the bottom of the dialog box is checked and then choose OK 10 Select the Probe Tool on the Toolbar 11 Using the Left mouse button click on the wire con nected to the output of the Data Sequencer with the tip of the Probe Tool CircuitMaker places a RunTime Test Point on that node and a dialog box appears 12 Enable the TRAN check box and the Combine Plots check box 364 Chapter 3 Tutorials 13 Set the Max Scale of the TRAN graph to 20 and then click OK 14 Hold down the Shift key and click the wire connected to the TC terminal count output of the 74LS168A CircuitMaker places a second RunTime Test Point on that node and a dialog box appears 15 Again enable the TRAN and Combine Plots check boxes 16 The Max Scale should already be set to 20 Set the Vert Offset to 6 and then click OK 17 Click the Run button on the Toolbar to start the simulation The interactive SPICE window appears showing waveforms as the data is being collected When the SPICE data collection process is completed the Transient Analysis window appears 18 Click the output of the Data Sequencer to view the clock signal in the Transient Analysis window 19 Click the Man button in the corner of the Transient Analysis window to switch to manual scaling mode 20 Click the Up scale button to change the vertical scale to 10VDiv 21 Click the green waveform label along the lefthand edge of the Transient Analysis window to select the wave form 22 Press the Up Arrow key briefly to change the vertical position of the waveform moving the waveform near the top of the graph 23 While holding down the Shift key click the Q0 output of the 74LS168A A yellow waveform appears near the center of the graph 24 Click the corresponding yellow label along the lefthand edge of the Transient Analysis window to select this waveform 0 5u 10u 15u 20u 25u 30u Xa 2000u Xb 0000 Yc 5400 Yd 0000 ab 2000u cd 5400 freq 5000k X 5000u UnitsDiv Y 1000 UnitsDiv RefGround X5uSDiv Y10VDiv A B C D E F d c b a Chapter 3 Tutorials 365 25 Press the Up Arrow key to change the vertical position of the waveform moving it near the green waveform 26 Repeat this procedure for each output of the 74LS168A The resulting graph should appear similar to the one shown at the left You can run this same circuit in Digital Logic simulation mode To try it stop the simulation switch to digital and run simulation In Digital Logic simulation mode the displays will be animated to show the correct output 366 Chapter 3 Tutorials Chapter 4 Drawing and Editing Schematics 467 Using CircuitMakers robust set of drawing and editing tools you can create simple to complex schematics quickly and easily This chapter covers schematic drawing and editing tools and features Figure 41 CircuitMaker lets you search a library of devices place them wire them together and edit the schematic drawing exactly to your specifications Drawing Editing Tools This section describes the buttons on the Toolbar that you will use when placing and wiring components Drawing and Editing Schematics C H A P T E R 4 Rotate 90 Button Arrow Tool Mirror Button Delete Tool Wire Tool Zoom Tool Text Tool 468 Chapter 4 Drawing and Editing Schematics Arrow Tool Use the Arrow Tool to select items move items flip switches select tools from the Toolbar etc You can double click items with the Arrow Tool to perform many functions such as editing specific devices You can also activate the Arrow Tool by pressing AltA or rightclicking the mouse in the schematic background and choosing Arrow from the popup menu If you choose Options ArrowWire you can use the Arrow Tool to place a wire by clicking on a device pin Wire Tool Use the Wire Tool to place wires in the work area Draw bus wires by holding down the Shift key when starting to draw the wire Refer to the sections Wiring the Circuit and Working with Bus Wires later in this chapter for more information Draw a dashed line by holding down the Alt key while drawing a wire Dashed lines act just like regular wires but if they are not connected to anything they will not be included in a netlist You can also activate the Wire Tool by pressing AltW or by rightclicking the mouse in the schematic background and choosing Wire from the pop up menu Text Tool Use the Text Tool to place text in the circuit Select the tool click in the work area and type the text Choose Edit Font to stylize the text or choose View Colors to assign a different color to text You can alter the way multiline text wraps by clicking it with the Text Tool and resizing its enclosing rectangle You can also select the Text Tool by pressing AltT or by rightclicking in the schematic back ground and choosing Text from the popup menu Delete Tool Use the Delete Tool to selectively delete items Select the Delete Tool click on the item you want to delete and the item is immediately deleted except in the case of wires If you click and hold on a wire with the Delete Tool the wire is highlighted but not deleted until you release the mouse button If you hold down the mouse button and move the Delete Tool away from the wire the wire is not deleted This allows you to see the complete extent of the wire that will be deleted before you actually delete it To delete just a Tip Using the Text Tool you can add text anywhere in the schematic drawing Tip Hold down the Alt key while using the Wire Tool to draw a dashed line for example around a section of circuitry to show that it is a logical block Tip Rightclick with the mouse to access helpful popup menus Contents of the popup menus will vary depending on where you click Chapter 4 Drawing and Editing Schematics 469 segment of wire rightclick on a wire with the Delete Tool and choose Delete Wire Segment and only the segment between the nearest corners or connections will be deleted Cut or divide a wire in two by holding down the Shift key and clicking the wire with the Delete Tool The wire is separated at the contact point You can also select the Delete Tool by pressing AltD or by rightclicking in the schematic background the mouse and choosing Delete from the popup menu Or select an item and press the Delete key on the keyboard to delete that item Zoom Tool Use the Zoom Tool to magnify zoom in and reduce zoom out your circuit To zoom in select the Zoom Tool and position it over the area that you want to enlarge Click the left mouse button to magnify the circuit by the selected Scale Step size To zoom out select the Zoom Tool and position it over the area you want to reduce Hold down the Shift key and click the left mouse button to reduce the circuit by the selected Scale Step Size You can also activate the Zoom Tool by pressing AltZ or by rightclicking the mouse in the schematic background and choosing Zoom from the popup menu Another zooming method is to press the Page Up key on the keyboard to zoom in or the Page Down key to zoom out at any time without using the Zoom Tool In this case the zoom is centered on the position of the mouse cursor See also Display Scale Normal SizePosition and Fit Circuit to Window in Chapter 13 View Window Menus Rotate 90 Button Use the Rotate 90 Button to rotate the selected device in 90 increments You can also rotate a device as you select it from the library by pressing the r key on the keyboard or by clicking the Right mouse button before placing the device in the circuit You can also select the Rotate 90 Button by choosing Edit Rotate 90 or by pressing AltR Note When you rotate a device pin names and numbers and label values remain readable that is they wont be upside down Use the Rotate 90 Button to rotate a selected device in increments of 90 Notice that the LabelValue remains readable as the device rotates 470 Chapter 4 Drawing and Editing Schematics Mirror Button Use the Mirror Button to flip the device horizontally You can also mirror a device as you select it from the library by pressing the m key on the keyboard before placing the device in the circuit You can also select the Mirror Button by choosing Edit Mirror or by pressing AltM Grid Title Block and Borders CircuitMaker gives you many advanced schematic features to enhance your schematic and make precise placement easier Grid Use the Grid option to turn the alignment grid of the circuit window on or off see Figures 41a and b The grid is useful as an aid in precisely aligning objects Use Snap To Grid to place new devices devices not already in a circuit accord ing to the specified grid It also lets you move old devices devices already in the circuit according to the selected grid relative to their original position Note When you place a device exactly on the grid it always remains on the grid regardless of scroll position However Snap To Grid does not guarantee alignment of component pins Choose Options Grid to access the Grid Setup dialog box Figure 41a Use the Grid Setup dialog box to turn the alignment grid on or off Chapter 4 Drawing and Editing Schematics 471 Figure 41b Use the Border Grid Title Block options to enhance the appearance of your schematic Title Block Use the Title Block option see Figure 41b for an example to add a title box to the lower right corner of the page The title block contains the following fields Name Title Revision ID Date and Page The Name and Title fields expand in height to handle multiple rows of text If you leave the Name or Title fields blank CircuitMaker excludes them from the title block The title block also expands in width according to the amount of text that you enter You can print the title block on Grid Moveable Page Breaks Border Title Block 472 Chapter 4 Drawing and Editing Schematics the first page on the last page or on all pages Additionally you can print the full title block on the first page and a reduced title block that is one that does not include the Name and Title fields on subsequent pages Choose Options Title Block to access the Title Block setup options Borders Use this option to quickly locate devices by displaying a coordinate grid system around your schematic see Figure 41b for an example For example suppose you want to find a device that you know is located in the B5 grid square By drawing an imaginary line from the letter B and the number 5 on the margins of the schematic the intersection of these lines locates the grid square containing the device To add a border to your schematic drawing 1 Choose Options Border to display the Border dialog box 2 Select Display Border On Screen to display a border that outlines the total allowed schematic area 3 Select Do Not Print if you dont want to print the border OR Select Print Around Entire Schematic to print the border so that it is only on the outside edges of the outside pages making a border around the entire schematic when the pages are arranged together OR Select Print Around Each Page to print the complete border on each page of your schematic Chapter 4 Drawing and Editing Schematics 473 Listing and Selecting Devices CircuitMaker comes with a library of several thousand devices see the Device Library book for a complete list of the devices and instruments You can select devices or parts from the library using the graphical parts browser see Figure 42 HotKey shortcuts or the Device Search feature The Graphical Parts Browser You can graphically browse through the parts in CircuitMaker from the Device Selection dialog box The parts are listed by Major Device Class Minor Device Class Device Symbol and ModelSubcircuit Figure 42 The Device Selection dialog box lets you graphically browse and select from a library of several thousand devices To list and select a device 1 Click the Parts Button on the Toolbar OR Select Devices Browse OR Press the x key on the keyboard 474 Chapter 4 Drawing and Editing Schematics 2 Locate the device you want to place by first selecting a Major Device Class a Minor Device Class a Device Symbol and if applicable a specific model or subcircuit In this manual device location is indicated as major classminor class For example a 2N3904 could be found at Active ComponentsBJTs Notice that the schematic symbol for the part you select is shown Use the Rotate 90 and Mirror buttons in the dialog box to view each device in other orientations 3 Select the Return check box if you want to return to the Device Selection dialog box after placing a device 4 Click Place to select the device for placement in your circuit or just doubleclick the item to be selected in the Device Symbol list or the ModelSubcircuit list Notice that the device follows the mouse around the screen until you click the Left mouse button Filtering Devices in the Parts Browser The Show Analog Digital and Symbol check boxes in the Device Selection dialog box see Figure 42 let you filter the devices shown to reduce the number of parts to search through Check Analog to display the devices which function in CircuitMakers Analog simulation mode Check Digital to display the devices which function in CircuitMakers Digital Logic simulation mode Check Symbol to display the nonfunctional schematic symbols For example if you are looking for digital devices to use in Analog simulation mode you could uncheck both Digital and Symbol to hide all the devices which will not run in Analog simulation mode At least one of the three boxes must be checked at all times Note that above the picture of the device symbol are the words Digital Only Device Analog Only Device Analog Digital Device or Schematic Only Device This indicates the simulation mode for which the currently displayed device will function properly Chapter 4 Drawing and Editing Schematics 475 HotKeys You can also select devices by pressing a predefined HotKey on the keyboard The Devices menu lists all predefined HotKey assignments and you can reassign HotKeys to different devices as needed Assigning New HotKeys You can assign sixty of your most commonly used devices to HotKeys This lets you quickly select these devices by pressing the HotKey on the keyboard or by selecting the item from the HotKey submenus on the Devices menus To assign a HotKey to a specific device 1 In the Device Selection dialog box Figure 42 display the device for which you want to assign a HotKey 2 Click Change to display the dialog box in Figure 43 HotKeys are listed alphabetically along with the devices that are currently assigned to them 3 Scroll through the list to find the HotKey that you want to assign to your selected device and then click the Assign button Figure 43 Use this dialog box to assign or reassign HotKeys to devices 476 Chapter 4 Drawing and Editing Schematics Unassigning a HotKey To remove a HotKey assignment from the list 1 Follow Steps 13 from the previous section 2 Assign a new device in its place OR Assign none at the top of the list as the HotKey Searching for Devices Click the Device Search button on the Toolbar to display the Device Search dialog box Figure 44 which lets you find all devices that match the part number or description that you enter A match is found any time the search text you enter is contained in a devices major class name minor class name symbol name or model description However only the symbol name and model description appear in the match list Figure 44 This example shows the found set after typing the word voltage in the Device Search dialog box If a search produces items that dont seem to match the search text you entered it might be because the match occurred with the major or minor class names which are not displayed The Device Search feature accepts partial words to match devices For example a search text of op would find OpAmp or loop You can also use an asterisk as a wild card For Note The Device Search feature is not case sensitive Chapter 4 Drawing and Editing Schematics 477 example entering 748 matches 748 7408 74LS08 74138 74285 and so on If you enter multiple words as the search text a match for each word is found though not in the order you enter them For example typing 741 opamp and opamp 741 would both give the same results To search for a device 1 Click the Device Search button on the Toolbar OR Select Devices Search or press ShiftX 2 Type a device name number or description in the text box then choose Find 3 Use the scroll bar if necessary to scroll through the list When you find the device click it to highlight it 4 Select Return after Place to return to the Device Search dialog box after placing an item 5 To eliminate the need to click the Place button when a single match is found select Place Single Items to automatically place an item if it is the only match found 6 Doubleclick the device or click Place to place the highlighted device in the workspace OR Click Browse to display the selected part in the Device Selection dialog box The Browse button is useful to see what the device symbol looks like and also to find other similar devices Note If you modify the User Library USERLIB file expect a slight delay the next time you search for devices in the Device Search dialog box The delay is caused as CircuitMaker builds a new SEARCHDBDAT search list file If for any reason the search list seems incorrect or out of date you can create a new search list file by choosing Macros Update Search List 478 Chapter 4 Drawing and Editing Schematics Placing Devices After you have searched and found a device you can place the device or reselect it using a number of different options illustrated in this section To place a device 1 Select it using one of the methods discussed in the previous section 2 Press the r key or Rightclick the mouse to rotate the device into the position you want 3 Press the m key to mirror the device 4 Leftclick the mouse to place the device in the workspace Note To repeatedly place identical devices choose Options Auto Repeat or CtrlR Selecting Devices Use the Arrow Tool to select and move devices around the workspace There are four different ways of selecting items in the circuit window Selecting a Single Item To select a single item click it with the Arrow Tool Click anywhere else in the work area to deselect the item Selecting Multiple Items To select multiple items hold down the Shift key and click on one or more items with the Arrow Tool To deselect any single item click on it a second time while still holding down the Shift key To deselect all items release the Shift key and click somewhere in the work area away from all items You can also select multiple items by holding down the mouse button and dragging a selection rectangle around the desired items This method works especially well for selecting switches because clicking on a switch will not always select it unless you click on the outer edge of the switch To deselect any single item from a group of selected items Shiftclick on it To deselect all items click in the workspace away from all items Note If the Quick Connect feature is enabled and an unconnected device pin is placed so that it touches a wire or other device pin CircuitMaker will auto matically make the connec tion See the Wiring section in this chapter for details Chapter 4 Drawing and Editing Schematics 479 Selecting All Items To quickly select all items choose Edit Select All Nudging Devices To slightly nudge a device in any direction select a single device and then press the Left Arrow Right Arrow Up Arrow or Down Arrow key as illustrated in Figure 45 A single nudge shifts the device one pixel whether or not SnaptoGrid is enabled Note The nudge feature does not work if you have selected wires or multiple devices It only works with a single device Figure 45 Use the Left Right Up or Down Arrow key to nudge a selected device more precisely 480 Chapter 4 Drawing and Editing Schematics Wiring the Circuit To simulate and generate PCB netlists properly the compo nents in your circuit must be correctly wired together CircuitMakers Auto Routing Manual Routing and Quick Connect methods are fully integrated and automatic so you dont have to choose or switch between wiring modes A valid connection point for wiring is any device pin or wire Wiring Method How to Use Auto Wire Routing Click and drag with the Wire Tool from any valid connection point to another connection point then release Manual Wire Routing Click with Wire Tool to start wire singleclick to change directions then singleclick on a connection point or doubleclick to end wire Quick Connect Place or move a device with the Arrow Tool so that unconnected pins touch a wire or other device pins The SmartWires Advantage Regardless of the method of wiring you use CircuitMakers SmartWires feature lets you connect a wire to a device pin or another wire without being in exactly the right place This ensures perfect connections every time and eliminates any guesswork A userdefinable connection area exists around each valid connection point When you place the Wire Tool in a connection area a rectangle appears highlighting the connection point Use the Preferences dialog box to set the size of the connection area and whether or not to display the rectangle For more information see Connection Area in Chapter 9 File Menu Auto Routing To quickly and easily Auto Route wires 1 Select the Wire Tool from the Toolbar 2 Move the tool over a valid connection point Note A valid connection point is any device pin or wire Tip You can also draw wires with the Arrow Tool if you have enabled the ArrowWire option on the Options menu Wire Tool Chapter 4 Drawing and Editing Schematics 481 3 Click and hold the left mouse button 4 Drag the mouse to another valid connection point and release the mouse button The wire automatically routes between the two points Auto routing requires two valid connection points You cannot draw a wire with auto routing that does not connect to something on both ends Also you cannot draw bus wires with the auto routing method The auto routing can be either Simple or Intelligent depend ing on what you have selected in the Preferences dialog box Simple routing draws only one or two wire segments horizontal andor vertical making the shortest path without regard for devices that might be in the way Intelligent routing tries to find a path which does not cross directly over any devices If no reasonable path can be found the simple method is used Manual Routing Manual routing lets you freely place wires exactly where you want them It also lets you place free wires in your circuit that are not connected to anything Note To draw bus wires use the manual routing method To route wires manually 1 Select the Wire Tool from the Toolbar 2 Move the tool to the position where you want to start the wire 3 Click and release the left mouse button The Wire Tool cursor disappears and is replaced with an extended wiring cursor The extended cursor simplifies the task of precisely aligning wires with other objects 4 Click once with the left mouse button to turn 90 or doubleclick to end the wire 5 Singleclick the mouse to terminate the wire when it is at a valid connection point if you have enabled the Single Click Connect option in the Preferences dialog box 6 To cancel a wire at any time while you are drawing it press any key or rightclick with the mouse Quick Connect Wiring One of the easiest methods for wiring is to use the Quick Connect wiring method This feature allows you to simply touch unconnected device pins to wires or other unconnected device pins and the connections are made automatically To wire using Quick Connect 1 Choose a new device from the library OR Nudge or click and drag an existing device with the Arrow Tool 2 Move the device so that the end of the unconnected pins touches a wire or other device pins 3 Once placed CircuitMaker will connect the device to the wire or pin it is touching NOTE Placing a device so that two pins are parallel over a wire will automatically connect both ends and insert that device into the wire segment as in illustration 3 at left The same connection area size used by SmartWires described previously is used by the Quick Connect feature This connection area determines how close you must be to a wire or pin before CircuitMaker will automatically make the connection and can be altered in the Preferences dialog box By default the Quick Connect option is always active To turn off Quick Connect go to File Preferences or Options Quick Connect to uncheck and deactivate the Quick Connect option Extending Joining and Cutting Wires Wires are fully editable and can be extended joined and cut To extend a wire 1 Select the Wire Tool from the Toolbar 2 Place it over the end of the wire and start a new wire to extend the existing one Chapter 4 Drawing and Editing Schematics 483 To join two wires together 1 Draw a wire from the end of the first wire to the end of the second wire Notice that they become the same wire To cut a single wire into two or more separate wires 1 Select the Delete Tool from the Toolbar 2 Place it over the points where you want to cut the wire 3 Hold down the Shift key 4 Click the left mouse button to cut the wire The wire is divided into multiple wires Moving Devices with Connected Wires You can move a device that has wires connected to it without disturbing the connection When you select and drag a device with the Arrow Tool the wires undergo a rubberband effect meaning that they stretch extend but remain connected to the device Working with Bus Wires Bus wires are a special type of wire that contain multiple individual wires Each bus wire is identified by a number and each individual wire within a bus also has a number Bus wires can be easily identified in a circuit because they are drawn thicker than regular wires To draw a bus wire 1 Hold down the Shift key 2 Draw a regular wire using the manual routing method see Manual Routing earlier in this chapter Note You must hold down the Shift key before you start a wire but you can release the key before the wire is finished Bus wire Bus connection wires 484 Chapter 4 Drawing and Editing Schematics After you draw the bus wire a dialog box shown in Figure 46 prompts you for a bus number Figure 46 Each bus must have a different bus number 3 Enter a unique bus number Note If two separate buses are given the same number they are considered to be the same bus even though they are not physically connected on the screen You can extend join or cut bus wires just like regular wires However you dont need to hold down the Shift key when extending bus wires Working with Bus Connection Wires Regular wires that are connected to a bus wire are called bus connection wires These wires connect to the individual wires within the bus To create bus connection wires 1 Select the Wire Tool from the Toolbar 2 Move the tool over a valid connection point Note A valid connection point is any device pin or wire including a bus wire At least one end of the bus connection wire must be connected to a bus 3 Click and hold the left mouse button 4 Drag the mouse to another valid connection point and release the mouse button When you make the connection a dialog box appears asking you to assign a bus connection wire number 5 Specify a bus connection wire number Chapter 4 Drawing and Editing Schematics 485 6 Choose Angle Connection to TopLeft if you want to change the angle of the connection To edit a bus wire or bus connection wire number double click it with the Arrow Tool and change the number CircuitMaker displays bus and bus connection labels by default but you can disable them by unchecking Options Show Bus Labels Wiring Bus Connection Wires Together If you assign two bus connection wires the same number and you connect them to the same bus wire or to different bus wires with the same bus wire number they function as though they were connected together Wiring with Connectors CircuitMaker has Input Output and Terminal connectors ConnectorsMisc that allow you to connect points together without using direct wires All Input Output and Terminal connectors that have the same name will operate as though they were wired together Doubleclick one of these devices to edit its name Input and Output Connectors The Input and Output connectors have different symbols but they are functionally identical These connectors are sometimes a useful alternative to direct wires The following two examples are functionally equivalent The second example uses Input and Output connectors instead of direct wires to connect the inverter outputs to the AND gate inputs Figure 46a Connections using standard wiring tech niques 486 Chapter 4 Drawing and Editing Schematics Figure 46b The equivalent connections of Figure 46a using Input and Output connectors Terminal Device Power Connections The Terminal connector also called the Terminal device can function like the Input and Output connectors as described previously Additionally the Terminal device can be used to connect to a power bus For example suppose you have several opamps that you want to connect to VCC in a single net but you do not want to run wires everywhere In this case you can use one normal V device and multiple terminal devices Wire the V device to one opamp and wire a Terminal device to the each of the other opamps Enter VCC in the Bus Data field of the V devices Edit Device Data dialog box see Bus Data in the Edit Device section later in this chapter Enter VCC not VCC in the Terminal Name field for each of the Terminal devices This use of terminal devices instead of multiple V devices gives you a single net for the netlist SPICE or PCB You can double click on a Terminal device to edit its name When you click the OK button CircuitMaker automatically copies the Terminal Name field to the Terminals Bus Data field in the Edit Device Data dialog box and appends a semicolon The Terminal Name field is also copied to the LabelValue field If for some reason you want to edit the Bus Data field or LabelValue field directly click the Netlist button make the desired changes click OK and then click Cancel on the Edit Terminal Name dialog box Normally entering the Terminal name in the Edit Terminal Name dialog box should suffice Chapter 4 Drawing and Editing Schematics 487 Labeling the Circuit CircuitMaker offers several methods of labeling the circuit including the Text Tool and editing the device itself Using the Text Tool to Label To label the circuit using the Text Tool 1 Select the Text Tool 2 Click in the workspace where you want to place text 3 Resize the text box as necessary see picture at left 4 Type the text Text can be multilined and fully stylized Always visible text may be repositioned at any time Changing Device Labels Dont confuse a device designation with a device label value Figure 47 illustrates the difference Figure 47 A LabelValue is information about a device whereas a Designation identifies the device in the circuit To label devices using the Edit Device Data dialog box 1 Doubleclick the device 2 If a dialog box other than the Edit Device Data dialog box appears click the Netlist button 3 Type the appropriate text in the LabelValue Designa tion or Description text box 4 Make the text visible on the schematic by selecting its Visible check box You can reposition labelvalues designations and descrip tions anywhere around the device by dragging them with the Arrow Tool Even if you reposition a label around a device it remains attached to the device when the device is moved around the workspace For a detailed description of these labels refer to the following section Editing Devices LabelValue Designation 488 Chapter 4 Drawing and Editing Schematics Editing Devices You can easily edit a wide range of device information related to schematic simulation pcb netlists and other purposes To edit a device 1 Doubleclick on a device to display the Edit Device Data dialog box shown in Figure 48 Note A different dialog box will appear when you doubleclick on certain devices so click the Netlist button to get to the Edit Device Data dialog box Figure 48 Use the Edit Device Data dialog box to enter or change a variety of device information Device This noneditable field shows the device name as it appears in the library menus Use the Visible check box to show or hide the name in the schematic If visible the device name retains the same orientation as the device when you rotate it The labelvalue designation and description however will remain rightside up no matter how the device is rotated Chapter 4 Drawing and Editing Schematics 489 Note that some device names such as Resistor cannot be made visible LabelValue Use this field to enter information about the device such as its label 1N914 2N3904 etc or its value 47K 100U etc or to replace the existing Device name that is make the Device not visible and the Label visible The LabelValue can be dragged around the device on the schematic with the mouse and will remain attached to the device when the device is moved If you set the Visible check box to gray see diagram at left the Label replaces the Device name and retains the same orientation as the device when rotated Otherwise the label value will remain rightside up no matter how the device is rotated Designation Use this field to identify the device in the circuit such as U3 CR7 RLOAD etc You can also make this field visible with the Visible check box This field must contain the device designation in order for simulation and pcb netlists to work properly The Designation label may also be dragged around on the schematic with the mouse It will remain rightside up no matter how the device is rotated This field is filled in automatically when you place the device See Auto Designation Prefix later in this section for more information See also Set Designations in Chapter 10 Edit Menu and Device Designations in Chapter 12 Options Menu for other features that affect device designations Important Individual parts of multipart packages must be grouped properly CircuitMaker takes care of this automati cally if you use devices as they are from the library How ever if you have altered multipart packages they must be grouped using the Edit Group Items command Just changing the Designation field is not sufficient Each individual part must be identified as PART A PART B etc from the Edit Device Pin Data dialog box See Pins later in this chapter LabelValue is visible and retains same orientation as device when rotated Label Value not visible LabelValue is visible The LabelValue field has a tristate Visible check box 490 Chapter 4 Drawing and Editing Schematics Description Use this field for schematic reference only You can use it to display additional information such as custom part numbers tolerances etc This field does not affect simulation Use the Visible check box to make the field visible or not You can also drag the Description label around on the schematic with the mouse The Description label will remain rightside up no matter how the device is rotated Package Use this field to identify the type of physical package footprint the device is in DIP14 TO92B etc When you are creating pcb netlists for TraxMaker or other pcb layout programs make sure the Package name you enter exactly matches the name of the corresponding component footprint in your pcb layout programs library Auto Designation Prefix This is the prefix used when CircuitMaker automatically assigns a devices designation whenever you place a device or select Edit Set Designations The prefix may be up to 4 characters in length Spice Prefix Characters This is the SPICE prefix used in conjunction with the D and M flags described later under Spice Data You would normally use this field when linking the macro symbols you define to the proper model selections when creating new devices see Chapter 16 Creating New Devices for more information Valid prefixes are Prefix Meaning A XSpice Model BV Nonlinear Dependent Voltage Sources BI Nonlinear Dependent Current Sources C Capacitors D Junction Diodes DZ Zener Diodes E Linear VoltageControlled Voltage Sources F Linear CurrentControlled Current Sources G Linear VoltageControlled Current Sources H Linear CurrentControlled Voltage Sources I Independent Current Sources Chapter 4 Drawing and Editing Schematics 491 JN JFETs Nchannel JP JFETs Pchannel K Coupled Mutual Inductors L Inductors MN MOSFETs Nchannel MP MOSFETs Pchannel O Lossy Transmission Lines QN Bipolar Junction Transistors NPN QP Bipolar Junction Transistors PNP R Resistors S Voltage Controlled Switches T Lossless Transmission Lines U Uniform Distributed RC Lines Lossy V Independent Voltage Sources W Current Controlled Switches X Subcircuits ZN MESFETs Nchannel GaAs FETs ZP MESFETs Pchannel GaAs FETs Analog This check box identifies this as a device that can be used in CircuitMakers Analog simulation mode The analog simulator can only simulate a device if there is SPICE simulation data for that device If you attempt to run an Analog simulation using a device that does not have the Analog check box checked CircuitMaker displays a warning message and that device will be ignored in the simulation When creating your own device this box should be checked only if you have supplied SPICE data for the device or if the device is a macro circuit containing other analog devices see Chapter 16 Creating New Devices for more informa tion on new device creation Digital This check box identifies this as a device that can be used in CircuitMakers Digital simulation mode The digital simulator can only simulate a device if there is digital SimCode for that device If you attempt to run a digital simulation using a device that does not have the Digital check box checked CircuitMaker displays a warning message and that device will be ignored in the simulation When creating your own device select this box only if the device is a macro circuit 492 Chapter 4 Drawing and Editing Schematics containing other digital devices or was created using digital SimCode see Chapter 17 Digital SimCode for more on digital device creation Parameters This field stores information that affects the simulation of certain devices For digital SimCode devices this field would contain typedigital It could then be followed by a list of parameters which are generally set in the Digital Model Parameters dialog box Some generic device models can be redefined by passing parameters as an alias to describe a specific device For example the parameter field of a crystal would contain aliasXCRYSTAL and could be followed by a list of databook parameters that define that specific crystal Generally you enter these parameters in the Subcircuit Parameters dialog box See Chapter 16 Creating New Devices for more information on parameter passing Bus Data Use this field to specify which pins on the device are connected to the power or ground buses since these pins are not shown on the predefined device packages This field holds up to 2048 characters which is helpful when creating devices with many power and ground pins The general format for this data is busnampinnumpinnumbusnampinnumpinnum For example on a 74LS83 the Bus Data is DVCC5DGND12 This means that the Vcc bus is connected to pin 5 and the Ground bus is connected to pin 12 The bus data for a 74AC11190 would look like DVCC1516 DGND4567 The order in which the buses are listed is not important Chapter 4 Drawing and Editing Schematics 493 To connect these bus pins for Analog simulation or for creating a PCB netlist to export into TraxMaker or other PCB layout program each bus must be defined There are three devices that can be used for this purpose V Ground and Terminal The Bus Data format for these devices is simply busnam where busnam identifies the specific bus For example each Ground device by default contains the Bus Data GND which causes all of the Ground symbols to be tied together in a single node or net Note For simulation purposes the Ground device always equates to Spice node 0 even if the Bus Data changes A V device does not contain any default Bus Data This is because each V device may represent a different supply voltage However the Bus Data field can also be used on these devices to identify it as the voltage source for the digital devices For this example set the Bus Data to DVCC or DVDD In some cases it may be necessary to connect a different voltage source such as the output of a voltage regulator to the digital devices In such cases connect a Terminal device to the power source and enter DVCC in its Terminal Name field CircuitMaker will make a connection between the Terminal device and any bus that has the same name CircuitMaker will also make a connection between the Terminal and any Input or Output connector that has the same name Do not use a semicolon in the Terminal Name field For example DVCC is correct but DVCC is incorrect for the Terminal Name field Note CircuitMaker automatically copies what you enter in Terminal Name field to the Terminals Bus Data field and appends a semicolon You can short multiple V and Terminal devices together by Bus Data for the V device and Terminal Name for the Terminal device If you short two V devices together you will receive an XSpice error when you run the simulation To avoid this problem remove the Spice Data and Spice Prefix Character from all but one of the shorted V devices See also Vcc and Ground in Chapter 6 AnalogMixed Signal Simulation 494 Chapter 4 Drawing and Editing Schematics Spice Data This field is used to specify the SPICE simulation data for the device The analog devices provided with CircuitMaker already have default SPICE data included If you create your own devices to use with the analog simulation you will need to fill in this field yourself You can enter SPICE data into this field directly or you can reference it to the other fields in the dialog box The percent sign is used as a flag to tell CircuitMaker to reference the already defined fields Their meanings are Name N Inserts the Device Name into the SPICE data string This is the name found in the library menus Label L Inserts the LabelValue into the SPICE data string This requires the first character in the LabelValue string to be an alpha character The label may not exceed 8 characters Value V Inserts the LabelValue into the SPICE data string This requires the first character in the LabelValue string to be numeric The value may be an integer 12 44 a floating point number 314159 either an integer or floating point number followed by an integer exponent 1e14 265e3 or an integer or floating point number followed by one of the following multipliers T 1012 u 106 G 109 n 109 Meg 106 p 1012 K 103 f 1015 m 103 If multipliers are used they must immediately follow the number with no spaces Letters that are not multipliers immediately following a number are ignored and letters immediately following a multiplier are ignored For example 10 10V 10Volts and 10Hz all represent the same number and M MA Msec and MMhos all represent the same multiplier Note that 1000 10000 1000Hz 1e3 10e3 1KHz and 1K all represent the same number Chapter 4 Drawing and Editing Schematics 495 Model M Inserts the LabelValue into the SPICE data string If the first character of the Spice Prefix Characters does not match the first character in the label then it inserts the first character of the prefix at the beginning of the string The M is also required in order to guarantee that the MODEL data for this device will be included in the SPICE netlist file for simulation The Label including prefix may not exceed 8 characters Subcircuit S Inserts the LabelValue into the SPICE data string If the first character in the label is not an X then it inserts an X at the beginning of the string The S is also required to ensure that the SUBCKT data for this device will be included in the SPICE netlist file for simulation The Label including the X may not exceed 8 characters Designation D Inserts the Designation label into the SPICE data string If the first character of the Spice Prefix Characters does not match the first character in the designation then it inserts the first character of the prefix at the beginning of the string Description I Inserts the Description field into the SPICE data string Package P Inserts the Package label into the SPICE data string Bus Data B Inserts the entire Bus Data field into the SPICE data string Named Subcircuit X Inserts the specified subcircuit into the SPICE data string If the subcircuit resides in a SUB file other than the one associated with the symbol name of the current device the SUB file name where the subcircuit is located must also be specified For example XUA741 or XUA741OPAMP5 Include File pathfilenameext Inserts the ASCII text file filename into the SPICE data string by using SPICEs INCLUDE command Path is the same as the current circuit unless enclosed in quote marks 496 Chapter 4 Drawing and Editing Schematics Node number Inserts the node number for the specified pin into the SPICE data string Number refers to the position of the pin in the Edit Device Pin Data dialog box For example the pin at the top of the list is represented by 1 the next pin down is 2 etc See Pins later in this section Analysis Probe Name Inserts the output node number associated with an Analysis Probe For example TP1 or TP1 inserts the node number associated with the pin of the Analysis Probe that has the name TP1 TP1 inserts the node number associated with the pin Example of Using SPICE Data The following examples show how you can use the SPICE Data field when creating custom devices Example 1 If resistor R3 has a value of 27 ohms and is connected between node 5 and ground the SPICE data for R3 could be written as R3 5 0 27ohms However by using a generalized form of the SPICE data it can be updated automatically if items such as designations or node numbers change For example the items in the above example can be substituted accordingly Value Description Substitution R3 Designation D 5 First pin node number 1 0 Second pin node number 2 27ohms LabelValue V Using these substitutions the generalized form of the SPICE Data becomes D 1 2 V Chapter 4 Drawing and Editing Schematics 497 Example 2 If transistor Q2 is a 2N3904 with its collector connected to node 7 its base to node 4 and its emitter to node 12 the SPICE data may be written as Q2 7 4 12 Q2N3904 However you may need to enter SPICE model data into the netlist manually A more universal method would be to enter the following string D 1 2 3 M Example 3 If op amp U4 is an LM741 where the input is connected to node 3 the input is connected to node 1 the V pin to node 5 the V pin to node 12 and the output to node 9 the SPICE data may be written as XU4 3 1 5 12 9 XLM741 But again a more universal method would be to enter the following string D 1 2 3 4 5 S Exclude From PCB Use this check box to exclude a device from the PCB netlist Typically devices used for simulation purposes only external inputs like a signal generator for example would be excluded from the PCB netlist Exclude From Bill of Materials Use this check box to exclude a device from the Bill of Materials See Exporting a Bill of Materials in Chapter 7 Exporting Files for more information on generating a Bill of Materials Pins Click the Pins button on the Edit Device Data dialog box to display the dialog box shown in Figure 49 This dialog box lets you edit the pin designations of the package for the selected device and determine whether the pin designations will be shown on the schematic 498 Chapter 4 Drawing and Editing Schematics You can specify pin numbers using up to five alphanumeric characters Not only can you use standard pin numbers such as 1 2 3 but you can also use pin numbers such as A1 B1 C1 A2 B2 C2 Some device packages actually contain more than one of the same device For example a 7400 Quad 2Input NAND gate actually has 4 gates in the same package The pin numbers are different for each gate CircuitMaker groups together the individual gates to indicate which gates go in which package As you place each gate in the circuit the next available gate is used from the previous package If no gates are available in the previous package a new package is used You can regroup the gates as needed using the Edit Group Items option Each gate in the package is assigned a letter A B C etc and the pin numbers for that gate correspond to that assignment You can manually reassign the pins used for a particular gate by selecting the appropri ate letter PART A PART B etc for that gate with the Up and Down Arrows in the dialog box Figure 49 Use this dialog box as a reference for pin SPICE information Default pin data has already been entered for the predefined devices Clicking the Default Designations button restores the pin numbers to their original default values You can add default pin numbers to a macro device by editing the pin numbers while the macro is expanded and while saving the macro Chapter 4 Drawing and Editing Schematics 499 To edit macro pin names and designations 1 Doubleclick them in the Symbol Editor see Chapter 16 Creating New Devices for more information The order in which the pins appear in the list is deter mined by the order in which you placed pins on the device To edit pin designations for a specific part 1 Doubleclick them in this dialog box This does not change the pin designations in the library Faults Clicking the Faults button on the Edit Device Data dialog box displays the Device Faults dialog box which lets you add fault data to the device If the fault data has been password protected the Access Faults dialog box appears See Chapter 8 Fault Simulation for details Printing and Exporting Circuits When you have finished designing your circuit you can print it on any Windowsselectable printer or plotter or export the circuit to a file and use it in documentation presentations etc Printing Circuits To print a circuit choose File Print If your design is larger than a single sheet of paper it will automatically be printed on multiple sheets of paper To see where page breaks occur choose Options Show Page Breaks Adjusting Print Size There are various ways to adjust the print size of your schematic in CircuitMaker Choose File Print Setup and select Fit to Page and the schematic will be automatically be scaled to fit in a single page or choose Scale and enter the percentage you would like the circuit scaled to 4100 Chapter 4 Drawing and Editing Schematics OR Choose Options Show Page Breaks and click and drag one of the page breaks until the circuit fits in the page as you want it to print Other print options are also available including color printing See Print Setup in Chapter 9 File Menu You can also print digital timing diagrams analog waveforms title blocks borders and grids See Chapter 12 Options Menu for more information Exporting Circuits as Graphics You can export CircuitMaker circuit schematics and use them in documentation presentations etc You can either save the circuit as a graphic file or copy and paste the circuit directly into another software program Use the Export Circuit as Graphic option to save the circuit to disk as a Windows Metafile Device Independent Bitmap or Device Dependent Bitmap Use the Export Options dialog box described earlier to choose the format To export the circuit as a graphic 1 Choose File Export Circuit as Graphic Select the name of the file where you want to save the circuit graphic then choose Save OR Choose Edit Copy to Clipboard Circuit then open another Windows program and Paste the circuit directly into your document See also Chapter 7 Exporting Files Chapter 5 Digital Logic Simulation 5101 Digital Logic Simulation C H A P T E R 5 One of CircuitMakers most powerful features is circuit simulation allowing you to try variations in a design and troubleshoot it before you invest time and money in hardware prototypes CircuitMakers Simulation Modes CircuitMaker is one of the few simulation programs that offers 2 distinct modes of simulation Analog mode and Digital mode This gives you greater flexibility and control over how your circuit is simulated and each mode has advantages depending on the type of simulations you need Analog Mode is the accurate realworld simulation mode you can use for analog digital and mixedsignal circuits This mode will give you results like you would get from an actual breadboard In Analog mode the devices function just like realworld parts and each individual model func tions like its realworld counterpart For example digital ICs have accurate propagation delays setup and hold times etc Outputs of the devices see the effect of loading on them and nearly all the parameters of the real world are taken into account See Chapter 6 AnalogMixedSignal Simulation for more on this mode Digital Mode on the other hand is designed for purely digital logic simulation This mode is only used for digital circuits and depends solely on the logic states of the devices that make up the circuit Digital mode simulation still takes into account propagation delays but they are unit delays instead of actual propagation delays No power supply is required and the digital device output levels are constant in this mode Digital electronics is the world of the computer The binary 1s and 0s of the computer are actually the high and low voltage levels of tiny electronic devices known as integrated 5102 Chapter 5 Digital Logic Simulation circuits Digital logic simulation then becomes a relatively simple task because of the limited number of digital states that must be represented CircuitMakers digital logic simulator is very fast and fully interactive meaning you can flip switches and alter the circuit while the simulation is running and immediately see the response Devices and Simulation CircuitMaker provides four types of devices which can be used in different simulation modes Device Type Will Function In Digital Only device Digital simulation mode only Analog Only device Analog simulation mode only AnalogDigital device Analog or Digital mode Schematic Symbol only No functionality So any Digital Only and AnalogDigital devices will function properly in the Digital mode To find out the intended simulation mode for a device read the words above the symbol pictured in the Device Selection dialog box Or refer to the Device Library book for a description of each device and the simulation mode for which it is intended If you attempt to simulate a device using a simulation mode for which the device is not intended CircuitMaker displays a warning message and that device is ignored producing an open circuit where that device is located Using the Digital Logic Simulator Digital simulation is completely interactive meaning that the circuit responds immediately to changes from input stimulus and the operation of the circuit is shown in real time as it happens on the screen You can observe the operation of the circuit in the following ways Enable CircuitMakers exclusive Trace feature to show the state of every node in the circuit simultaneously as the simulation runs In this mode wires at a logic one are shown as red wires at a logic zero as blue and wires at an unknown or tristate as green these colors may be changed by choosing View Colors Chapter 5 Digital Logic Simulation 5103 Connect any number of SCOPE probes to any nodes in the circuit so that the timing diagrams for those nodes are shown in a separate digital Waveforms window The timing information is updated continuously to show changes as they happen in real time Connect any of a variety of displays and note the conditions shown on them Use the Probe Tool to probe any wire in the circuit either during simulation or after you have stopped it The logic states seen by the Probe Tool can also be charted in the Waveforms window Digital Logic Simulation Tools Several buttons in the Toolbar are used specifically for simulation This section describes these tools Note The functionality of these buttons is somewhat different in CircuitMakers Analog mode See Chapter 6 AnalogMixedSignal Simulation for more information DigitalAnalog Button Click the DigitalAnalog button to choose the simulation mode you want to use When the AND gate icon is dis played you are in Digital simulation mode when the transistor icon is displayed you are in Analog mode Reset Button Click the Reset button to restart the simulation You can also reset by choosing Simulation Reset or by pressing CtrlQ Digital Simulation icon RunStop Button Reset Button Trace Button Probe Tool Step Button Waveforms Button TP1 5104 Chapter 5 Digital Logic Simulation Step Button Click the Step button to run the simulation for one step or simulation tick You can also choose Simulation Step or press F9 Use the Simulation Digital Setup feature see Figure 51 to control the size of a step When you click this tool the simulation runs for one step and then stops This command is handy for debugging a circuit especially when used in conjunction with the Trace button Figure 51 Use the Digital Options dialog box to specify the size of a step and other digital simulation options RunStop Button Click the Run button to start the simulation The icon will change to a Stop Sign Click the Stop Sign icon to stop the simulation You can also choose Simulation Run and Stop or press F10 When the simulation is running you cant perform edit operations such as move and delete if you try CircuitMaker will signal a warning beep You can flip switches with the Arrow or Probe Tool and view or toggle the state of a wire with the Probe Tool Probe Tool Use the Probe Tool to monitor the state of any node in the circuit or to inject a state into a node You can also activate the Probe Tool by pressing AltP or rightclicking the mouse and choosing Probe from the popup menu To see the state of a node either while the simulation is running or after it has stopped touch the Probe Tools tip on a wire or device pin The tool displays one of four messages H L P or no letter at all The meanings of these letters are Chapter 5 Digital Logic Simulation 5105 illustrated at left Choose Simulation Scope Probe beforehand to have CircuitMaker chart the waveforms you see with the Probe Tool in the Waveforms window To inject a state into a node 1 Touch the tip of the Probe Tool on a wire or device pin 2 Click the left mouse button The state of that node changes to be opposite of what it was a one becomes a zero and a zero becomes a one To inject a tristate signal 1 Hold down the Shift key and click Note In both cases if the node is driven by some other device the state change is immediately overridden because the device drives the node back to its original state You can also use the Probe Tool to flip switches while the simulation is running Trace Button Click the Trace button or press F11 to turn the trace feature on or off Use Trace to debug your circuit or to simply provide a convenient way of observing operation of the circuit Trace shows the state of all nodes within the circuit as it runs by drawing the wires in different colors to show the logic state of each wire A wire at a high state is red a wire at a low state is blue and a tristate wire is green Note Because the wires in the circuit will be redrawn each time they change states turning this option on may slow down the simulation speed Waveforms Button In digital mode clicking on the Waveforms button will open or close the digital Waveforms window You can also choose Simulation Display Waveforms or press F12 Waveforms are described in detail later in this chapter High State Low State Pulse between High and Low States Unknown or Tristate 5106 Chapter 5 Digital Logic Simulation Propagation Delays The delay of a device determines how many simulation ticks it takes for a signal to propagate from the input to the output of the device The default delay for all devices is 1 but you can change this to any value from 1 to 14 You determine the realtime value of each tick The concept is that if one device has a delay of one and another a delay of three then in the real world the second device would have a propagation delay three times larger than the first device To change the delay of one or more devices 1 Select the devices 2 Select the Edit Set Prop Delays to display the dialog box shown in Figure 52 3 Enter a new value for the delay and choose OK Figure 52 Use this dialog box to change the propaga tion delay of one or more devices Choose Options Show Prop Delays to display the propa gation delay of all devices in the circuit The delay values are shown within a rounded rectangle located near the center of each device Some devices Pulsers Logic Dis plays macro devices etc do not have a delay so no value will be shown In the case of macro devices the delay is determined by the individual delay setting of each device within the macro Chapter 5 Digital Logic Simulation 5107 Digital Waveforms By attaching SCOPEs DigitalInstrument t to points of interest in the circuit you can graph the states of these nodes over time as the simulation runs Choose Simulation Display Waveforms or click the Waveforms button in the Toolbar to display or hide the digital Waveforms window An example of the waveforms window is shown in Figure 53 Figure 53 The Waveforms window lets you graph the states of nodes over time as the simulation runs Before you can view timing waveforms for any node in your circuit you must connect a SCOPE to each node you want to monitor or choose Simulation Scope Probe to monitor the states of the Probe Tool in the Waveforms window Changing Waveform Order To change the order of waveforms 1 Point the mouse at any of the scope labels in the waveform window 2 Press and continue to hold down the left mouse button 3 Move the rectangle to the desired position 4 Release the mouse button Notice that the waveforms are automatically reordered in the window Repeat this process as often as desired in order to position the waveforms in any order When you save a circuit to disk CircuitMaker also saves the order of the waveforms Breakpoint check boxes 5108 Chapter 5 Digital Logic Simulation Digital Options Use the Digital Options dialog box to control the size of a step when running the simulation in single step mode to set the conditions for break points and to set the simulation speed Choose Simulation Digital to display the dialog box shown in Figure 54 Figure 54 Use the Digital Options dialog box to control the size of a step and other digital simulation options You can define the Step Size in either ticks or cycles A cycle always consists of 10 ticks A tick is the smallest unit of delay for the digital simulator It takes one tick to perform a single step of the simulation for all devices Adjust X Magnification to view a larger or smaller section of the waveforms in the digital Waveforms window By default the magnification is set to 8 A smaller value zooms out a greater value zooms in Use Simulation Speed to control how fast the simulation runs This could be useful for example if the simulation is running too fast to view the states of a sevensegment display Setting this field to a lower number slows down the simulation so you can view the changes of the display Another method of slowing the simulation would be to run it in single step mode or set breakpoints Use the Breakpoint and Conditions options in conjunction with the waveforms window to set breakpoints The follow ing table illustrates the results of various combinations of settings Chapter 5 Digital Logic Simulation 5109 Combination Result LevelAnd All break conditions must be met before the simulation stops LevelOr Any one of the break conditions stops the simulation EdgeAnd The simulation stops when the proper edge occurs on all of the specified waveforms EdgeOr The simulation stops if a transition to any of the specified conditions occurs Setting Breakpoints in a Circuit Use the breakpoint check boxes in the digital Waveforms window see Figure 53 to set breakpoints in a circuit To set a breakpoint 1 Click once in the small breakpoint check box to the left of a SCOPEs label in the Waveforms window to fill the bottom portion of the square indicating a break on zero condition 2 Click a second time to fill the top portion of the square indicating a break on one condition 3 Click a third time to return the square to its empty state indicating no break condition 5110 Chapter 5 Digital Logic Simulation Digital Instruments This section introduces two digital instruments the Pulser and the Data Sequencer Pulser The Pulser InstrumentsDigital p is a digital pulse generator which provides a continuous stream of highs and lows In the pulse format time high time low and trigger mode are individually programmable for each Pulser in the circuit To edit the Pulser settings 1 Doubleclick the Pulser with the Arrow Tool to display the dialog box shown in Figure 55 2 Change the number of simulation ticks for which the pulse will stay high and low the format of the pulse normal or inverted and whether the pulser is in free run or external trigger mode Figure 55 Use the Edit Pulser dialog box to change pulse ticks and set free run or external trigger mode 3 Select External Trigger to use the Pulser as a program mable oneshot In the External Trigger mode the CP1 and CP2 inputs serve as rising and falling edge trigger inputs respectively If either pin receives a trigger pulse then the outputs of the Pulser will go active on the next simulation tick and remain active for Pulse High ticks You can retrigger the Pulser in this mode so additional trigger pulses occurring before the completion of the cycle will cause the active time to be extended for another cycle CP1 CP2 Q1 Q2 Chapter 5 Digital Logic Simulation 5111 Data Sequencer You can use the Data Sequencer InstrumentsAnalog G device in both digital and analog simulation modes Also known as a Data or Word Generator it allows you to specify up to 32767 8bit words which can be output in a defined sequence Since there is no limit to the number of Data Sequencers that you can use in a circuit you could place several in parallel to create a data stream of any width Doubleclick the Data Sequencer with the Arrow Tool to display the dialog box pictured in Figure 56 Figure 56 Use the Edit Data Sequencer dialog box to edit stimulus for your circuits Start Address is the address of the data that outputs first when the simulation begins Stop Address is the address of the data that outputs last before the sequence repeats Use Use External Clock to make the CP1 and CP2 inputs rising and falling edge clock inputs respectively If pins are clocked the Data Sequencer advances to the next address Digital Simulation Mode Only The Present Address option indicates the address of the data that is output next if the circuit is not reset or modified The Tick Increment specifies how many simulation ticks occur before the output is advanced to the next address when the external clock is disabled 8 7 6 5 4 3 2 1 CP1 CP2 Data Seq 5112 Chapter 5 Digital Logic Simulation Analog Simulation Mode Only Low Level and High Level indicate the output voltage levels Step Time is the length of time that the outputs remain at each address when the external clock is disabled Clock VTH is the voltage threshold level at which the external clock pins cause the outputs to advance to the next address Pattern Editor You can type data directly into the Data list box in the Data Sequencer dialog box However when creating a large pattern this method becomes time consuming Choose the Pattern button on the Data Sequencer dialog box to display the dialog box shown in Figure 57 The Pattern Editor helps you to create large complex patterns quickly Figure 57 Use the Pattern Editor to help you quickly create large complex patterns The Pattern Editor not only lets you to enter predefined pattern sequences it also lets you specify which rows addresses and columns bits are affected For example you could fill just one column with a count up sequence to produce a stream of ones and zeros on a single output Or you could fill rows 2367 with ones in just 5 columns and fill the same rows with a repeating Shift 0 Left in the other 3 columns Chapter 5 Digital Logic Simulation 5113 The Increment field indicates how many rows will contain the same data before the next change in pattern For example with an increment of 3 a Shift 1 Left pattern shifts on every third pattern row You can set the maximum pattern size for each Data Se quencer This lets you create small patterns for several Data Sequencers without allocating large amounts of memory or creating large circuit files The Max number of pattern lines by default is set to 32 but can be increased as needed to as many as 32767 It can never be smaller than the Stop Address When you increase the maximum number of pattern rows the new rows are filled with zeros If you decrease the maximum number of pattern rows any pattern data that was stored in the upper addresses is lost perma nently 5114 Chapter 5 Digital Logic Simulation Chapter 6 AnalogMixedSignal Simulation 6115 AnalogMixedSignal Simulation C H A P T E R 6 One of CircuitMakers most powerful features is circuit simulation allowing you to try variations in a design and troubleshoot it before you invest time and money in hardware prototypes CircuitMakers Simulation Modes CircuitMaker is one of the few simulation programs that offers 2 distinct modes of simulation Analog mode and Digital mode This gives you greater flexibility and control over how your circuit is simulated and each mode has advantages depending on the type of simulations you need Analog Mode is the accurate realworld simulation mode you can use for analog digital and mixedsignal circuits This mode will give you results like you would get from an actual breadboard In Analog mode the devices function just like realworld parts and each individual model func tions like its realworld counterpart For example digital ICs have accurate propagation delays setup and hold times etc Outputs of the devices see the effect of loading on them and nearly all the parameters of the real world are taken into account Analog is the classic world of electronics Unlike digital electronics there are no logic state restrictions the voltage level of any given circuit node is not limited to a high or low Analog simulation therefore is much more complex CircuitMakers analogmixedmode simulation uses an enhanced version of Berkeley SPICE3f5XSpice allowing you to accurately simulate any combination of analog and digital devices without manually inserting DA or AD converters This mixedsignal or mixedmode simulation is possible because CircuitMaker includes accurate event driven behavioral models for its digital devices including TTL and CMOS digital devices SPICE Simulation Program with Integrated Circuit Emphasis 6116 Chapter 6 AnalogMixedSignal Simulation In Analog mode there are a also a wide variety of analyses that can be used in Analog mode to test and analyze various aspects of your design Digital Mode on the other hand is designed for purely digital logic simulation This mode is only used for digital circuits and depends solely on the logic states of the devices that make up the circuit Digital mode simulation still takes into account propagation delays but they are unit delays instead of actual propagation delays No power supply is required and the digital device output levels are constant in this mode See Chapter 5 Digital Logic Simulation for more on this mode Devices and Simulation CircuitMaker provides four types of devices which can be used in different simulation modes Device Type Will Function In Digital Only device Digital simulation mode only Analog Only device Analog simulation mode only AnalogDigital device Analog or Digital mode Schematic Symbol only No functionality So any Analog Only and AnalogDigital devices will function properly in Analog mode To find out the intended simulation mode for a device read the words above the symbol pictured in the Device Selection dialog box Or refer to the Device Library book for a description of each device and the simulation mode for which it is intended Overview of Analog Simulation This section explains the basic concepts for simulation in CircuitMakers analog mode Before You Use the Analog Simulator To do analog simulation you must ensure there is SPICE information for each device in the circuit Only those devices listed as Analog or AnalogDigital in the Device Library Digital Mode Analog Mode Chapter 6 AnalogMixedSignal Simulation 6117 book have SPICE data associated with them You can use other devices in the circuit as long as you provide the SPICE information for those devices See Chapter 16 Creating New Devices for more information The Analog check box in the Edit Device Data dialog box indicates whether or not that device will function in Analog simulation mode meaning there is SPICE simulation data available for the device If the Analog check box is not checked and you use the device in analog simulation a warning appears and that device is ignored leaving an open circuit where that device is located Setting Up Analog Analyses You set up analog analyses using the Analyses Setup dialog box described later in this chapter By default whenever you create a new circuit the Always Set Defaults option is enabled for the analog analyses This means that Operating Point Analysis the Multimeter is enabled for simple DC circuits For more complex circuits Transient Analysis the oscilloscope is enabled and set to its default conditions Under normal conditions you probably wont need to change these settings Selecting Analog Simulation Mode You know Analog simulation mode is selected when the transistor icon is displayed on the DigitalAnalog button on the Toolbar Analog Simulation Tools Several buttons in the Toolbar are used specifically for simulation This section describes these tools Note The functionality of these buttons is somewhat different in Digital logic mode See Chapter 5 Digital Logic Simulation for more information RunStop Button Reset Button Trace Button Probe Tool Step Button Waveforms Button AnalogMixed Mode Simulation icon 6118 Chapter 6 AnalogMixedSignal Simulation DigitalAnalog Button Click the DigitalAnalog button to choose which simulation mode you want to operate in When the AND gate icon is displayed you are in CircuitMakers Digital mode when the transistor icon is displayed you are in Analog mode See the CircuitMakers Simulation Modes earlier in this chapter for an explanation of the differences between Analog and Digital mode Reset Button In Analog mode clicking the Reset button generates the node numbers for the circuit without running the simulation This is important if you want to save a SPICE netlist file or view the node numbers on the schematic but not run the simulation You can also reset the simulation by choosing Simulation Reset or by pressing CtrlQ Step Button The Step button is used in Digital mode only Refer to Step Button in Chapter 5 Digital Logic Simulation RunStop Button Click the Run button to start the simulation The icon will change to a Stop Sign Click the Stop Sign icon to stop the simulation you can also choose Simulation Run and Stop or press F10 An interactive XSPICE simulation window appears showing the progress of the simulation see Using XSpice for Windows later in this chapter The amount of time it takes to complete the simulation is based on the analyses you have enabled the amount of data you are collecting the complexity of the circuit and the speed of your computer When the simulation has completed an analysis window appears for each of the selected analyses you have run Note If no changes have been made since the last simula tion was run clicking the Run button will not rerun the simulation but will immediately load the previous simulation data Chapter 6 AnalogMixedSignal Simulation 6119 The Stop icon replaces the Run icon when the Run button is pressed Once the data collection sequence has ended and the analysis windows are displayed pressing the Stop button will stop the simulation closing all analysis windows and returning to schematic editing mode Probe Tool The contextsensitive Probe Tool which you can also select by pressing AltP allows you to quickly probe any points in the circuit during simulation and see the resulting waveform or data in the selected analysis window Note that the Probe Tool is used differently in Analog mode than it is in Digital mode Before running a simulation you can leftclick the Probe tool in the circuit to add or remove RunTime Test Points Or by leftclicking while holding down the Ctrl key you can add or remove Exclusive Test Points in the circuit Note however that you do not have to predefine test points before running a simulation in CircuitMaker See Working with Test Points later in this chapter for more information on using test points During simulation touch the tip of the Probe Tool to a wire device pin or device body to observe or plot data at that point The tool displays one of six letters V I P Z N or R The meanings of these letters are illustrated at left Click the left mouse button while the Probe Tool is at the point in the circuit you wish to probe and a value or waveform appears instantly in the current active analysis window To see multiple waveforms simply Shiftclick with the Probe Tool on as many points as you wish and the corresponding waveforms stack in the current analysis window Note If CircuitMaker indicates that current or power data is not available then go to Simulation Analyses Setup Analog Options and select the Node Voltage Supply Current Device Current and Power radio button in the lower righthand corner of the dialog box Ctrlclicking with the Probe Tool sets a new voltage refer ence point the default voltage reference is ground for the current active analysis window Noise during Noise Analysis Input or output Resistance during Transfer Function analysis Impedance Power Current Voltage 6120 Chapter 6 AnalogMixedSignal Simulation Trace Button The Trace button is only used in Digital mode Refer to the Digital Logic Simulation Tools section of Chapter 5 Digital Logic Simulation Waveforms Button In analog mode click the Waveforms button or press F12 to open all analysis windows for which there is data in the RAW file for this circuit This allows you to view the graphs for this circuit without rerunning the simulation this is only available if the circuit has not been modified since the RAW file was created Clicking the button again closes all waveform analysis windows which also stops the simula tion just like clicking the Stop button and lets you edit the circuit You can open the analysis windows individually from the Windows menu Vcc and Ground CircuitMakers digital devices do not include Vcc and ground pins However to properly simulate these devices in Analog simulation mode Vcc and ground connections are required You can include them by placing entries in the Bus Data field of each digital device which references specific power and ground buses Create a power supply bus by placing a V device in the circuit with a bus identifier such as DVCC or DVDD in its Bus Data field A ground bus is already defined by the Ground symbol which contains GND in its Bus Data field If no bus is placed directly in the circuit the default values for DVCC DVDD and DGND are used These default values are specified in the Analog OptionsSpice Variables dialog box See Setting Up Analog Analyses later in this chapter for more information The Bus Data fields are predefined in CircuitMakers digital devices with values such as DVCC16DGND8 which also identify the specific pin numbers on the package that are connected to the buses DVCC DVCC14DGND7 DVCC14DGND7 GND DGND GND Analog Options Bus Data Bus Data Bus Data Bus Data Bus Data 5V 01uF 01uF Figure 61 Analog Options Bus Data DGND GND Chapter 6 AnalogMixedSignal Simulation 6121 In the example in Figure 61 both the NAND gate and the inverter are connected to 5V and ground along with two bypass capacitors The DGND on the devices is connected to the GND bus through the Analog Options dialog box This is the same procedure used to connect the Vcc and ground pins in a PCB netlist for export to TraxMaker See Chapter 4 Drawing and Editing Schematics Note You can tie together Multiple Vs by using one normal V to supply power and multiple Vs with the SPICE data field deleted You can also use one normal V to supply power and multiple terminal devices ConnectorsMisc Connect these together using the Bus Data field of the V device and the Terminal Name field of the Terminal device Using the terminal devices instead of additional V devices eliminates the step of deleting the SPICE Data field CircuitMaker will make a connection between the Terminal device and any bus that has the same name CircuitMaker will also make a connection between the Terminal device and any Input or Output connector that has the same name Do not use a semicolon in the Terminal Name field For example to connect a Terminal device to the VEE bus enter VEE not VEE in the Terminal Name field CircuitMaker automatically copies what you enter in Terminal Name field to the Terminals Bus Data field and appends a semicolon Working with Test Points Test Points are set in a circuit to tell CircuitMaker where to collect simulation data Note that you do not have to set test points before running a simulation CircuitMaker does it automatically Test Points determine how much data is actually stored in the RAW file and they determine which variables are displayed in the analysis windows when the simulation runs As a result more test points require a longer simulation time Note You do not have to set test points before running a simulation CircuitMaker does it automatically according to the chosen analyses 6122 Chapter 6 AnalogMixedSignal Simulation Test Point Types There three types of Test Points used in CircuitMaker Test Point Type How Used Default Test Points CircuitMaker automatically places Default Test Points in the circuit according to the Analog Options settings These are not displayed on the circuit Exclusive Test Points These are test points you place in the circuit to measure voltage current or power When placed exclusive test points disable the default test points and data is only collected for each exclusive test point RunTime Test Points These are test points you place in the circuit to graph data at a specific point Default Test Points CircuitMaker automatically places Default Test Points in the circuit allowing you to click with the Probe Tool on almost any wire pin or device to measure voltage current or power respectively The Default Test Points are set based on the Analog Options settings See Setting Up Analog Analyses later in this chapter for more information When you place Exclusive Test Points the Default Test Points are automatically disabled and data is only collected for the points that you define Note that Default Test Points are not displayed on the circuit Exclusive Test Points These are test points you place manually in the circuit to measure voltage current or power When placed exclusive test points disable the default test points and data is only collected for each exclusive test point To place Exclusive Test Points in the circuit 1 Make sure the simulation is stopped 2 Select the Probe Tool from the Toolbar Chapter 6 AnalogMixedSignal Simulation 6123 3 Hold the Ctrl key and leftclick the appropriate locations in the circuit Placing Multiple Exclusive Test Points To place multiple Exclusive Test Points 1 Hold the Shift and Ctrl key while leftclicking You can place Exclusive Test Points on wires to measure node voltages on device pins to measure current or on devices themselves to measure power dissipation Data is not collected for devices containing subcircuits Removing Exclusive Test Points To remove all Exclusive Test Points from the circuit 1 Hold the Ctrl key and leftclick the Probe Tool in any blank area of the circuit window Note that when you remove all Exclusive Test Points the Default Test Points become active again RunTime Test Points RunTime Test Points are locations you can define in the circuit where CircuitMaker will automatically display graphical data that is collected during simulation Like regular Exclusive Test Points RunTime Test Points can measure voltage current or power dissipation Note that you can also plot waveforms by simply clicking with the Probe Tool after the simulation is complete You can place RunTime Test Points on wires to measure node voltages on device pins to measure current or on devices themselves to measure power dissipation CircuitMaker displays waveforms only if it actually collects data by default or by the Test Points you define CircuitMaker does not display waveforms for some devices such as those containing subcircuits To place RunTime Test Points in the circuit 1 Stop the simulation 2 Select the Probe Tool from the Toolbar 3 Click the appropriate locations in the circuit using the left mouse button to display the Run Time Test Point dialog box pictured in Figure 62 Current Exclusive Test Point on a device pin Voltage Exclusive Test Point on a wire Power Exclusive Test Point on a device To add an Exclusive Test Point Rightclick the Probe Tool Voltage on a wire To add a RunTime Test Point Leftclick the Probe Tool 6124 Chapter 6 AnalogMixedSignal Simulation Figure 62 Use the RunTime Test Point dialog box to choose the type of analysis data you want to see 4 Specify which type of analysis data you want to see by checking the applicable check box AC AC in decibels DC or Transient 5 If you like you can specify the minimum and maximum Yscale values that will be used on each graph This is optional 6 Place a check in the Combine Plots With Same Analy sis and Scale check box for each RunTime Test Point that you want to combine for displaying multiple waveforms on the same graph during simulation 7 Choose OK When combining RunTime Test Points on a single plot it is sometimes useful to change the DC offset of each waveform so they do not overlap To do so just enter a different offset value in the Vert Offset field for each RunTime Test Point You can also choose to pause when the simulation is complete before returning to CircuitMaker To edit an existing RunTime Test Point doubleclick it with the Arrow Tool Adding Multiple RunTime Test Points To add multiple RunTime Test Points 1 Hold down the Shift key while clicking with the Probe Tool Removing All RunTime Test Points To remove all RunTime Test Points from the circuit 1 Leftclick with the Probe Tool in any blank area of the circuit window Chapter 6 AnalogMixedSignal Simulation 6125 Running the Simulation Once you have created the circuit you can run the simula tion by simply clicking the Run button on the Toolbar One aspect that sets CircuitMaker apart from other SPICEbased simulators is the seamless integration between the schematic design and simulation process There are no complex data fields to enter and everything is done quickly and efficiently from the same workspace CircuitMaker displays an interactive XSpice simulation window during the SPICE data collection process showing the progress of the simulation When the simulation has completed an analysis window appears for each of the selected analyses you have run Using the Analysis Windows CircuitMaker displays data and waveforms using Analysis windows which allow you to quickly and easily test analyze and probe your circuits during simulation Many attributes of the Analysis windows can be changed to customize your view of the waveforms There are also features within the Analysis windows that allow you to precisely measure the waveforms you are viewing When you run a simulation CircuitMaker displays a separate analysis window for each of the following types of analyses that you enable DC curve tracer AC Bode plotter Transient oscilloscope Fourier spectrum analyzer Operating Point multimeter Transfer Function Noise Run Button 6126 Chapter 6 AnalogMixedSignal Simulation For more information on these analyses see Setting Up Analog Analyses later in this chapter Figure 63 shows an example of an analysis window Figure 63 The Transient Analysis window Displaying Waveforms Once you have run a simulation you can quickly view data waveforms at any points in the circuit using CircuitMakers contextsensitive Probe Tool To plot data waveforms in an analysis window first choose the appropriate analysis window by clicking somewhere in it so that it is active then 1 Click any valid point in the circuit with the tip of the Probe Tool See the Probe Tool section earlier in this chapter for information on some of the other types of data that can be plotted with the Probe Tool Click on a wire to measure voltage Click on a device pin to measure current Click on a device body to measure power If CircuitMaker indicates that current or power data is not available then go to Simulation Analyses Setup Chapter 6 AnalogMixedSignal Simulation 6127 Analog Options and select the Node Voltage Supply Current Device Current and Power radio button in the lower righthand corner of the dialog box 2 Hold down the Shift key and click to plot or stack multiple waveforms simultaneously in the analysis window Note that clicking on another point in the circuit without holding the Shift key will replace the previous waveform with a new one 3 Hold down the Ctrl key and click to set a new voltage reference for the active analysis window the default reference is ground Plotting Subcircuit Internal Variables By default CircuitMaker doesnt collect simulation data for any subcircuits internal variables To plot a subcircuits internal variables 1 Choose Simulation Analyses Setup 2 Click Analog Options 3 Click the radio button titled Node Voltage Supply Current and DeviceSubcircuit VARs then choose OK 4 Run the simulation 5 Click the subcircuit device with the tip of the Probe Tool and select the variable from the list Scaling Waveforms You can view waveforms in the analysis windows in either Auto scale or Manual scale mode Select the Man Manual button to set the window to manual scale mode Select the Auto button to set the window to auto scale mode The manual scale controls allow you to specify the units per division for both the X and Y scales using the arrow keys in corner of the analysis window Auto scale mode will automatically scale the analysis window so that the selected waveforms are completely viewable within the window Waveform Scaling and Editing Controls Tip You can nudge waveforms and cursors around the analysis window by selecting a waveform or cursor and using the arrow keys on the keyboard 6128 Chapter 6 AnalogMixedSignal Simulation To scale a waveform in Manual Scale mode 1 Select a waveform by clicking its label in the list on the lefthand side of the graph window For example click A or V8 if you have enabled the Simulation Display Variable Names option If no waveform is selected all waveforms will be scaled simultaneously 2 Use the Up and Down arrow buttons to change the Y scale for the selected waveforms 3 Use the Left and Right arrow buttons to change the X scale for the selected waveforms Note You can adjust only linear scales manual scaling has no affect on log scales In Auto Scale mode CircuitMaker displays all waveforms at the same scale The graph is automatically scaled so that the waveforms fill almost the entire graph You can click and drag a selection rectangle around a portion of the graph then release the mouse to zoom in on that portion of the analysis window See Figure 64 Figure 64 Click and drag a rectangle around any portion of the window to zoom in on that area Chapter 6 AnalogMixedSignal Simulation 6129 Offsetting Waveforms To reposition the waveform on the graph alter its X and Y offsets 1 Select a waveform by clicking on its name in the variable list on the lefthand side of the graph window 2 Click and drag the waveform itself with the mouse or press the arrow keys on the keyboard to change both the X and Y offsets 3 Select the Off button to display the offset values for the selected waveform the values are shown near the top of the analysis window Using Measurement Cursors Four measurement cursors let you precisely measure values in the waveform analysis windows such as amplitude and period There are two cursors on the x axis and two on the y axis To use the measurement cursors 1 Turn the cursors ON or OFF by doubleclicking the tab at the end of the cursor 2 Reposition a cursor by dragging the tab or by selecting it and pressing the arrow keys on the keyboard If no cursor is selected pressing the arrow keys will move the selected waveform The value at each cursors position is displayed at the top of the graph window as well as the difference in value for each pair of cursors In manual scale mode cursor values correspond to the selected waveform only In auto scale mode cursor values correspond to all waveforms assuming there are no offsets Setup Button The Setup button displays the Settings dialog box pictured in Figure 65 which lets you control the X horizontal and Y vertical axes of the graph allows you to store and recall waveforms and lets you control many visual aspects of the analysis windows Note that you can also access many of the analysis window settings through the rightclick popup menu that appears when you rightclick anywhere inside an analysis window Tip You can nudge waveforms and cursors around the analysis window by selecting a waveform or cursor and using the arrow keys on the keyboard 6130 Chapter 6 AnalogMixedSignal Simulation Figure 65 Use the Settings dialog box to control the X and Y axes of the graph to store and recall waveforms and to alter the visual aspects of the analysis window Storing Waveform for Future Reference To store the currently displayed waveform for future reference 1 Select the waveform in the Store list box then click the Store button 2 Specify the name of the file in which to save the waveform Each waveform is stored in a separate file Working with a Stored Waveform To recall a stored waveform and place it on the graph 1 Click the Recall Stored Waveform button 2 Select the appropriate waveform file from the File Selection dialog box and choose Open to display the dialog box shown in Figure 66 Figure 66 This dialog box indicates the number of data points in the file Chapter 6 AnalogMixedSignal Simulation 6131 3 To rename the waveform to avoid naming conflicts with other waveforms type a new name in the Waveform Name text box 4 Select the Persistent Waveform check box to keep the waveform displayed on the graph no matter where else you click on the circuit A persistent waveform has an asterisk placed in front of the name 5 Deselect the Persistent Waveform check box to display the waveform only when you click the corresponding point in the circuit it will be displayed together with the waveform for the loaded circuit 6 To remove a persistent stored waveform select it in the Remove list box and click the Remove button OR Select the waveform by clicking its label on the left side of the graph then press the Delete key on the keyboard You can display multiple waveforms for the same point in a circuit by naming the waveforms the same up to the or character in the name By adding different characters after the or you can plot multiple waveforms for the same point in the circuit For example suppose you name one recalled waveform v41 and another v42 This causes both waveforms to display simultaneously along with the current v4 waveform when you click on node 4 in the circuit Reset Button Click the Reset button in the analysis window to return all of the waveform offsets to zero and restore the graph to its unzoomed state The axes will remain unchanged 6132 Chapter 6 AnalogMixedSignal Simulation Setting Up Analog Analyses CircuitMakers powerful simulation capability includes a wide variety of standard and advanced analyses Choose Simulation Analyses Setup to display the Analyses Setup dialog box pictured in Figure 67 Figure 67 Use the Analog Analyses Setup dialog box to setup the various analyses CircuitMaker offers the following standard and advanced analyses DC Analysis AC Analysis DC Operating Point Transient Parameter Sweep Fourier Transfer Function CircuitMaker PRO only Noise CircuitMaker PRO only Temperature Sweep CircuitMaker PRO only Monte Carlo CircuitMaker PRO only Impedance Plots CircuitMaker PRO only Always Set Defaults You can use the Always Set Defaults for Transient and Operating Points Analyses check box to simplify the task of setting up the Transient and Operating Point analyses It is primarily for the beginning user who does not completely understand or does not want to be concerned with all of the Chapter 6 AnalogMixedSignal Simulation 6133 settings in the Analog Analyses dialog box When this box is checked the Set Defaults button is pressed automatically every time the simulation is run For simple DC circuits those that contain no Signal Generators or reactive de vices only Operating Point Analysis is enabled For more complex circuits Transient Analysis is also enabled and the default start stop and step settings are used DC Analysis DC Sweep The DC Analysis generates output like that of a curve tracer It performs an Operating Point Analysis at each of a series of steps defining a DC transfer curve Source Name is the name of an independent power source either a fixed voltage or current supply or a Signal Generator that is to be stepped in the circuit The start stop and step values define the sweep range and resolution The primary source is required while the secondary source is optional If a secondary source is specified the primary source is stepped over its entire range for each value of the secondary source To set up and run a DC Analysis 1 Choose Simulation Analyses Setup 2 Click the DC button to display the dialog box pictured in Figure 68 Figure 68 The DC Analysis Setup dialog box 3 Specify the settings you want select the Enabled check box and then choose OK 4 Run the simulation 6134 Chapter 6 AnalogMixedSignal Simulation Figure 69 A DC Analysis waveform The waveform in Figure 69 was generated by simulating the ANALOGCKT circuit using the values shown in Figure 68 Notice that the x axis represents the voltage of the primary source and the y axis is the voltage at the output of the circuit The waveforms correspond with each step of the secondary source See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms AC Analysis AC Sweep AC Analysis generates output like that of a Bode plotter computing the smallsignal AC output variables as a function of frequency It performs an Operating Point Analysis to determine the DC bias of the circuit replaces the signal source with a fixed amplitude sine wave generator and analyzes the circuit over the frequency range you specify The desired output of an AC smallsignal analysis is usually a transfer function voltage gain transimpedance etc To set up and run an AC Analysis 1 Connect at least one Signal Generator to the circuit and enable it as an AC Analysis source Chapter 6 AnalogMixedSignal Simulation 6135 Do this by doubleclicking the Signal Generator clicking Wave and setting up the AC Analysis Source options 2 Choose Simulation Analyses Setup 3 Click the AC Sweep button to display the dialog box pictured in Figure 610 Figure 610 Use this dialog box to set up an AC Analysis AC sweep 4 Enter the AC Analysis settings you want see the following table select the Enabled check box and then choose OK Sweep Option What it Means Linear Total number of Test Points in the sweep Decade Number of Test Points per decade in the sweep Octave Number of Test Points per octave in the sweep 5 Run the simulation 6136 Chapter 6 AnalogMixedSignal Simulation Figure 611 An AC Analysis waveform The waveform in Figure 611 was generated by simulating the ANALOGCKT circuit using the values shown in Figure 610 Notice that the x axis represents frequency in a log scale The waveform represents the magnitude of the circuits output voltage in decibels db See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms DC Operating Point Analysis Operating Point Analysis generates data similar to the readings of a DC multimeter It determines the DC bias of the entire circuit with inductors shorted and capacitors opened and determines linearized smallsignal models for all of the nonlinear devices in the circuit It does not take into account the existence of any AC source Operating Point Analysis is generally performed automati cally before each of the other analyses even if it has been disabled in the Analog Analyses dialog box However you must enable it if you want to use the Probe Tool as a multimeter to view the DC DC AVG or AC RMS values of current voltage or power Viewing the DC AVG or AC RMS values also requires that you enable Transient Analysis See Probe Tool earlier in this chapter Figure 612 The Multimeter showing the DC operating point of a point in the circuit Chapter 6 AnalogMixedSignal Simulation 6137 To set up and run DC Operating Point Analysis 1 Choose Simulation Analyses Setup 2 Click the Multimeter button to display the dialog box pictured in Figure 613 Figure 613 Use this dialog box to set up DC Operat ing Point Analysis 3 Select DC Operating Point 4 Select Enabled and choose OK 5 Run the simulation 6 Click the Probe Tool on the point of the circuit where you want to analyze the DC operating point see Figure 612 Transient Analysis A Transient Analysis generates output like that of an oscilloscope computing the transient output variables voltage or current as a function of time over the user specified time interval A Transient Analysis first performs an Operating Point Analysis to determine the DC bias of the circuit always beginning at time zero In the time interval between zero and Start Time XSpice analyzes but does not display the circuit In the time interval between Start Time and Stop Time XSpice both analyzes and displays the circuit Step Time is the suggested computing increment but the timestep will be varied automatically by XSpice in order to properly con verge Max Step limits the varying size of the timestep that XSpice can use when calculating the transient data by default the program chooses either Step Time or Stop Time Start Time50 whichever is smaller Typically Step Time 6138 Chapter 6 AnalogMixedSignal Simulation and Max Step would be the same value If you enable the UIC Use Initial Conditions option the Transient Analysis begins from an initial condition bypassing the Operating Point Analysis This is useful for viewing the charging of capacitors etc To set up and run a Transient Analysis 1 Choose Simulation Analyses Setup 2 Click the TransientFourier button to display the dialog box pictured in Figure 614 Figure 614 Use this dialog box to set up Transient and Fourier Analyses 3 Enter the analysis settings and choose OK 4 Run the simulation 5 Assuming you have enabled the appropriate Test Points you can view and measure voltage current and power dissipation waveforms of the circuit in the analysis window that is displayed Set Defaults Use the Set Defaults button to set up the default parameters of the Transient Analysis Start Time is set to zero and Stop Time Step Time and Max Step are set to display 5 cycles of the lowest frequency Signal Generator in the circuit with a resolution of 200 data points You can define these default values in the Preferences dialog box If the Always Set Defaults check box is checked CircuitMaker acts as if this button is pressed before each simulation Chapter 6 AnalogMixedSignal Simulation 6139 Figure 615 The circuit ANALOGCKT and the Transient Analysis window The waveform in Figure 615 was generated by simulating the ANALOGCKT circuit using the values shown in Figure 614 This analysis shows the voltage at the test points during the time frame specified in the Start and Stop fields Notice that the x axis shows the time in seconds and the y axis is voltage The larger waveform represents the voltage at the circuit output while the smaller waveform is voltage at the source signal generator or input See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms 6140 Chapter 6 AnalogMixedSignal Simulation Parameter Sweep Use a Parameter Sweep for two variables including transistor parameters You can vary only basic components and models subcircuit data is not varied during the analysis You can use the Parameter Sweep feature only when you have enabled one or more of the standard analyses AC DC or Transient Furthermore data is only saved for nodes that have a RunTime Test Point attached The parameter sweep requires the following data Parameter Start Value Stop Value and Step Value The parameter can be a single designation or a designation with a device parameter in brackets The following are valid examples Example What it Varies RF Resistor with designation RF Q3bf Beta forward on transistor Q3 R3r Resistance of potentiometer R3 R3position Position of potentiometer R3 optiontemp Temperature CircuitMaker PRO only U5tpval Propagation delays of digital device U5 Normally you would use a Temperature Sweep to vary the temperature for simulation however temperature can also be varied in the Parameter Sweep useful if you want to vary the temperature as either the primary or secondary parameter in a twoparameter sweep To set up and run a Parameter Sweep Analysis 1 Choose Simulation Analyses Setup 2 Click the Parameter Sweep button to display the dialog box pictured in Figure 616 3 Make the desired settings select Enabled and then choose OK 4 Place RunTime Test Points at the nodes you want to observe 5 Run the simulation 6 View the resulting waveforms in the analysis window such as the one in Figure 617 Chapter 6 AnalogMixedSignal Simulation 6141 Figure 616 Use this dialog box to set up a Parameter Sweep Analysis Figure 617 Parameter Sweep sweeps a selected compo nent in this example a resistor over a defined range in defined steps and plots the output voltage of the circuit at each of those steps The waveform in Figure 617 was generated by simulating the ANALOGCKT circuit using the values shown in Figure 616 Notice that it also plots the input and output voltages for the nominal run meaning all values as they are shown in the schematic 6142 Chapter 6 AnalogMixedSignal Simulation Relative Values Option If you enable the Use Relative Values option on the Parameter Sweep Setup dialog box the values entered in the Start Value Stop Value and Step Value fields are added to the parameters default value For example suppose you do a Parameter Sweep with the following conditions The parameter is a 1kohm resistor The Start Stop and Step fields are 50 50 and 20 respectively You enable Use Relative Values The following resistor values would be used in the simulation runs 950 970 990 1010 1030 and 1050 CircuitMaker displays the results of the Parameter Sweep in the AC DC or Transient Analysis windows depending on which analyses you enabled Sweep Trace Labels For the Monte Carlo Temperature Sweep and Parameter Sweep analyses CircuitMaker gives a unique label to each trace or waveform generated When you enable Simulation Display Variable Names CircuitMaker displays the trace names from each sweep run in the analysis window with a special character appended to the trace name For example the appended characters are m for Monte Carlo t for Temperature Sweep and p for Parameter Sweep There is also a trace for the simulation run which was done with the nominal circuit values This trace will not have a character appended to its trace label The following are some example trace labels with explanations V61p Voltage at node 6 for Parameter Sweep run 1 V62p Voltage at node 6 for Parameter Sweep run 2 V63p Voltage at node 6 for Parameter Sweep run 3 V6 Voltage at node 6 for nominal run V61m Voltage at node 6 for Monte Carlo run 1 V61t Voltage at node 6 for Temperature Sweep run 1 You can doubleclick on a trace label to display details about the device values used in that simulation run Chapter 6 AnalogMixedSignal Simulation 6143 Fourier Analysis Fourier Analysis setup is included with the Transient Analysis setup You must enable the Transient Analysis in order to do the Fourier Analysis When the simulation is completed the Fourier Analysis is displayed in a separate window The Fourier Analysis is based on the last cycle of transient data For example if the fundamental frequency is 10kHz then the transient data from the last 1ms cycle would be used for the Fourier analysis To set up and run a Fourier Analysis 1 Choose Simulation Analyses Setup 2 Click the TransientFourier button to display the dialog box pictured in Figure 618 Figure 618 Use this dialog box to set up a Fourier Analysis 3 Enter the analysis settings and choose OK 4 Run the simulation 5 Assuming you have enabled the appropriate Test Points view and measure voltage current and power dissipation waveforms of the circuit in the analysis window that CircuitMaker displays The waveform in Figure 619 was generated by simulating the BANDPASSCKT circuit using the values shown in Figure 618 This analysis shows the frequency spectrum of the square wave from the signal generator The first peak in the waveform is the amplitude of the component at the fundamental frequency Amplitudes at various harmonics within the specified range are also shown See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms 6144 Chapter 6 AnalogMixedSignal Simulation Figure 619 A Fourier Analysis waveform Transfer Function Analysis The Transfer Function analysis calculates the DC input resistance DC output resistance and DC gain To set up and run a Transfer Function Analysis 1 Choose Simulation Analyses Setup 2 Click the Transfer button to display the dialog box pictured in Figure 620 Figure 620 Use this dialog box to set up a Transfer Function Analysis 3 Select the input source you want to consider from the Source dropdown list 4 Select the Enabled check box and choose OK CircuitMaker PRO only Chapter 6 AnalogMixedSignal Simulation 6145 Note You do not need to specify the output node ahead of time However to specify a reference other than ground click a point in the schematic with the Probe Tool and check the TRANSFER Reference check box in the RunTime Test Point dialog box before you run the simulation 5 Run the simulation 6 Click the Transfer Function window and then click on any node in the circuit to see the Transfer Function data for that node 7 To display the Transfer Function data for multiple nodes hold down the Shift key when you click to display The data that appears indicates the transfer function from the input to the specified node Figure 621 Transfer Function Analysis data The waveform data in Figure 621 was generated by simulat ing the ANALOGCKT circuit using the values shown in Figure 620 This analysis shows the gain from the specified source to the output the point you click with the Probe Tool Notice that it shows DC resistance seen by the source and the DC resistance seen by the output load CircuitMaker PRO only 6146 Chapter 6 AnalogMixedSignal Simulation CircuitMaker PRO only Noise Analysis Noise Analysis lets you measure the noise in your circuit due to noise contributions of resistors and semiconductor devices CircuitMaker can plot the Noise Spectral Density which is the noise measured in Volts squared per Hertz V2 Hz Capacitors inductors and controlled sources are treated as noise free The following noise measurements can be made in CircuitMaker Measurement Description Output Noise The noise measured at a specified output node Input Noise The amount of noise that if injected at the input would cause the calcu lated noise at the output For example if the output noise is 10p and the circuit has a gain of 10 then it would take 1p of noise at the input to measure 10p of noise at the output Thus the equivalent input noise is 1p Component Noise The output noise contribution of each component in the circuit The total output noise is the sum of individual noise contributions of resistors and semiconductor devices Each of these components contributes a certain amount of noise which is multiplied by the gain from that components position to the circuits output Thus the same component can contribute different amounts of noise to the output depending on its location in the circuit To set up and run a Noise Analysis 1 Select the output node by clicking the output node of the circuit with the Probe Tool This places a RunTime Test Point and displays the dialog box shown in Figure 622 In the dialog box that appears check the Enable Noise checkbox and make sure Out is selected Chapter 6 AnalogMixedSignal Simulation 6147 Figure 622 Use this dialog box to set up RunTime Test Points for a Noise Analysis 2 Choose Simulation Analyses Setup 3 Click the Noise button to display the dialog box pictured in Figure 623 Figure 623 Use this dialog box to set up Noise Analysis 4 Specify the analysis information in the Noise Analysis dialog box If you want to measure the noise contribution of each component enter 1 in the Points Per Summary field If you only want to measure input and output noise enter 0 in this field 5 Run the simulation 6 View the input and output noise results CircuitMaker PRO only 6148 Chapter 6 AnalogMixedSignal Simulation 7 Click the Noise analysis window then click on the noise output node 8 Choose Simulation Display Variable Names This labels the input noise waveform as NI and the output noise waveform NO For example if the specified noise output node is node 6 then the output noise waveform would be labeled NO6 and the input noise waveform would be labeled NI6 9 Click a component to measure the output noise contri bution of that component If the component you click on is a subcircuit then you may select from a list of contributing noise sources within the subcircuit Note that component noise data is not available if 0 zero was entered in the Points Per Summary field in the Noise Analysis Setup dialog box Figure 624 This Noise Analysis waveform shows noise at the output and the equivalent input noise at the specified source over a specified frequency range The waveform in Figure 624 was generated by simulating the ANALOGCKT circuit using the values shown in Figures 622 and 623 See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms CircuitMaker PRO only Chapter 6 AnalogMixedSignal Simulation 6149 CircuitMaker PRO only Temperature Sweep You can use a Temperature Sweep only when you have enabled one or more of the standard analyses AC DC or Transient Furthermore CircuitMaker data is only saved for nodes that have a RunTime Test Point attached To set up and run a Temperature Sweep Analysis 1 Select Simulation Analyses Setup 2 Click Temperature Sweep to display the dialog box shown in Figure 625 Figure 625 Use this dialog box to set up a Temperature Sweep Analysis 3 Enter the temperature range you want to sweep 4 Select the Enabled check box 5 Set up one or more standard analysis so that each analysis is performed at the indicated temperatures 6 Place RunTime Test Points at the nodes you want to observe by leftclicking with the Probe Tool on a point in the circuit CircuitMaker displays the results of a Temperature Sweep in the AC DC or Transient Analysis windows depending on which analyses you enabled The waveform in Figure 626 was generated by simulating the ANALOGCKT circuit using the values shown in Figure 625 Notice that the analysis sweeps the temperature of the circuit in specified steps between the start and stop temperature values The waveforms in this example represent the magni tude of the circuit output voltage in db for each temperature step See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms 6150 Chapter 6 AnalogMixedSignal Simulation Figure 626 Temperature Sweep Analysis waveforms Monte Carlo Analysis Monte Carlo Analysis lets you do multiple simulation runs with device values randomly varied according to specified tolerances You can use this feature only when you have enabled one or more of the standard analyses AC DC or Transient Furthermore CircuitMaker saves data only for nodes that have a RunTime Test Point Subcircuit data is not varied during the Monte Carlo Analysis Only basic components and models can be varied The items in the Monte Carlo Setup dialog box are as follows Option Description Simulation Runs Enter the number of simulation runs you want CircuitMaker to perform For example if you enter 10 then CircuitMaker will run 10 simulation runs with different device values on each run within the specified tolerances CircuitMaker PRO only Chapter 6 AnalogMixedSignal Simulation 6151 Seed CircuitMaker uses the specified seed to generate random numbers for the Monte Carlo runs The default seed value is 1 If you want to run a simulation with a different series of random numbers then you must change the seed value to another number Distribution You can choose from the following three distributions for random number generation in the Monte Carlo Analysis Uniform distribution Values are uniformly distributed over the specified tolerance range Suppose you have a 1K resistor with a tolerance of 10 percent There is an equal chance of the generated value being anywhere from 900 ohms to 1100 ohms It is a flat distribution Gaussian distribution Values are distributed according to a gaussian bellshaped curve with the center at the nominal value and the specified tolerance at 3 standard deviations Given a 1K 10 percent resistor the center of the distribution would be at 1000 ohms 3 standard deviations at 1100 ohms and 3 standard deviations at 990 ohms Worst Case distribution This is the same as the uniform distribution but only the end points worst case of the range are used Given a 1K 10 percent resistor the value used would be randomly chosen from the two worst case values of 990 ohms and 1100 ohms On any one simulation run there is an equal chance that the highend worst case value 1100 or lowend worst case value 990 will be used To set up and run a Monte Carlo Analysis 1 Choose Simulation Analyses Setup 2 Click the Monte Carlo button to display the dialog box pictured in Figure 627 CircuitMaker PRO only 6152 Chapter 6 AnalogMixedSignal Simulation CircuitMaker PRO only 3 Enter tolerances as actual values or as percentages for the six general categories of devices then choose OK see Specifying Default Tolerances later in this section 4 Place RunTime Test Points at the nodes you want to observe as in Figure 628 5 Run the simulation 6 View the data as it appears in Figure 632 Figure 627 Use this dialog box to set up Monte Carlo Analysis Chapter 6 AnalogMixedSignal Simulation 6153 Figure 628 Use this dialog box to set up RunTime Test Points for the nodes you want to observe right click with the Probe Tool on a point in the circuit Figure 629 Waveforms for the Monte Carlo Analysis The waveform in Figure 629 was generated by simulating the ANALOGCKT circuit using the values shown in Figures 627 and 628 Notice that this analysis randomly varies the component values within the specified tolerances and then plots the output voltage of the five simulation runs includ ing the input and output voltages for the nominal run See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms CircuitMaker PRO only 6154 Chapter 6 AnalogMixedSignal Simulation Specifying Default Tolerances You can specify default tolerances for six general categories of devices resistor capacitor inductor DC source transistor beta forward and digital TP propagation delay for digital devices You can enter tolerances as actual values or as percentages For example you can enter a resistor tolerance as 10 or 10 If a 1kohm resistor has a tolerance of 10 it varies between 990 and 1010 ohms With a tolerance of 10 a 1kohm resistor varies between 900 and 1100 ohms Each device is randomly varied independent of the other devices For example if a circuit has two 10kohm resistors and the default tolerance is set to 10 then during the first pass of the simulation one resistor might have a value of 953 ohms and the other one could be 1022 ohms CircuitMaker uses a separate and independent random number to generate the value for each device Overriding with Specific Tolerances To override the default tolerance value with specific toler ance values for specific devices 1 Click Add in the Monte Carlo Setup dialog box 2 Enter the appropriate information in the various fields see Figure 630 Figure 630 Use this dialog box to enter device and lot tolerances For basic components like resistors capacitors and induc tors leave the Device Parameter field blank because there are no parameters besides the device value Both device and CircuitMaker PRO only Chapter 6 AnalogMixedSignal Simulation 6155 lot tolerances are allowed but only one or the other is required CircuitMaker calculates device and lot tolerances independently using different random numbers and then adds them together The example in Figure 630 has a device tolerance of 5 and a lot tolerance of 10 and thus a total variation of up to 15 In general component values in the analysis vary independently unless a tracking number is assigned If you give two devices the same device tolerance tracking number and distribution then the same random number is used for both devices when the device values for a simulation run are calculated The same holds true for lot tolerances However device tracking and lot tracking are independent of each other In other words device tracking 1 and lot tracking 1 are unrelated To edit an item in the Specific Tolerances list in the Monte Carlo Setup dialog box 1 Select the item you want to change 2 Click Edit or click Delete to delete the item Impedance Plot Analysis An Impedance Plot Analysis shows the impedance seen by any twoterminal source Normally plotted in the AC Analysis window an Impedance Plot does not have a separate setup dialog box To run an Impedance Plot Analysis run a standard simula tion then click the sources negative terminal with the Probe Tool An impedance plot appears in the selected analysis window This is especially useful to measure input and output impedance versus frequency in the AC Analysis window The impedance measurement is calculated from the voltage at the supplys positive terminal divided by the current out of that same terminal see Figure 631 Clicking the positive terminal of a supply is already defined as an operation to plot current thus the negative terminal must be clicked on for impedance CircuitMaker PRO only 6156 Chapter 6 AnalogMixedSignal Simulation To measure input impedance 1 Run the desired simulation usually AC analysis 2 Select the desired analysis window and then click on the negative terminal of the input source To measure output impedance 1 Remove the source from the input 2 Ground the circuits inputs where the input supply was connected 3 Remove any load connected to the circuit 4 Connect a twoterminal source to the output with the sources positive terminal connected to the output and the sources negative terminal connected to ground 5 Run the desired simulation 6 Select the desired analysis window and then click on the negative terminal of the source with the Probe Tool This causes an impedance plot to appear in the selected analysis window as in Figure 632 Figure 631 For Impedance Plots you would normally change the Y axis to Magnitude Click the Settings button in the analysis window to change X and Y axes for that window CircuitMaker PRO only Chapter 6 AnalogMixedSignal Simulation 6157 Figure 632 This Impedance Plot shows impedance seen by a twoterminal source over frequency The waveform in Figure 632 was generated by simulating the ANALOGCKT circuit and making an adjustment to the AC Analysis window as shown in Figure 631 See Using the Analysis Windows earlier in this chapter for more information about manipulating the waveforms Using XSpice for Windows This section provides an indepth look at CircuitMakers XSpice for Windows how to see the information it displays more closely and the errors and warning messages associ ated with it To view the information in XSpice for Windows 1 Click the Run button to start the simulation Notice the Run icon is replaced by a Stop Sign and the interactive XSpice simulation window appears showing the progress of the simulation If you have added RunTime Test Points to the circuit the corresponding waveforms are displayed as the data is collected otherwise the progress of the simulation is presented as a simple bar graph CircuitMaker PRO only 6158 Chapter 6 AnalogMixedSignal Simulation Figure 633 shows an example of an XSpice simulation window where both Transient and AC analyses are enabled but only AC Analysis has a corresponding RunTime Test Point Figure 633 The XSpice window shows the progress of the simulation 2 Select the Stop When Simulation Is Complete check box if you want XSpice to pause before returning to the CircuitMaker workspace 3 If you have chosen the Stop When Simulation Is Complete option then a dialog box will appear when the simulation is complete asking if you wish to exit XSPICE Click Yes to exit and return to the CircuitMaker analysis windows which let you analyze the simulation data or click No to remain in XSpice for Windows exit later by clicking Quit 4 If you clicked No in Step 3 and are remaining in the XSPICE area click Rescale All in the XSpice menu to rescale all of the plots to fit the Min and Max data that has been collected You can do this even if the simulation is still running 5 While the XSpice window is displayed you can change the scale for a single plot window by clicking the window to pause the simulation and display the dialog box shown in Figure 634 6 Enter the desired scale limits or click the Auto button to scale to the data that is already in the window then choose OK Chapter 6 AnalogMixedSignal Simulation 6159 Figure 634 Use this dialog box to enter new scale limits for the XSPICE plots 7 Use the Up and Down options in the XSpice menu to move the graphs into view if there are more graphs to be displayed than can be shown on your monitor 8 Click Quit in the XSpice menu to stop at any time When you click Quit the dialog box pictured in Figure 635 appears asking if you want to save the simulation data collected This option is very useful if you have been waiting for a long simulation and want to analyze the data which has been collected so far but dont want to wait for the simulation to complete Figure 635 Use Quit to stop long simulations 9 Click Yes to display the graphics windows which let you analyze the simulation data that has been collected OR Click No to discard the simulation data Click Cancel to continue the simulation Note the simulation cannot always be stopped at a location where the data will be available for display NET and RAW File Output While the interactive XSpice simulation window is dis played CircuitMaker generates a SPICE netlist to disk in a temporary file called filenameNET where filename is the name of the circuit file XSpice for Windows analyzes the netlist file and stores the simulation results in a file called 6160 Chapter 6 AnalogMixedSignal Simulation filenameRAW The amount of time it takes to complete the simulation is based on the analyses that are enabled their sweep ranges the complexity of the circuit and the speed of your computer The RAW file can become very large for a complex simulation and is deleted when changes are made to the circuit You can greatly reduce the size of the RAW file by reducing the number of Test Points in the circuit and by disabling the ASCIIOUTPUT option in the Analog Options dialog box See the Test Point Types section earlier in this chapter for more information Warning Messages vs Error Messages Sometimes CircuitMaker displays warning or error messages during circuit simulation These messages are saved in a text file called filenameERR CircuitMaker prompts you to view these messages displaying them in the Windows Notepad editor The following distinguishes the two messages Warning Messages Warning messages are not fatal to the simulation They generally provide information about changes that SPICE had to make to the circuit in order to complete the simulation These include invalid or missing parameters etc Note Normally valid simulation results are generated even if warning messages are reported SimCode warnings may include information such as timing violations tsetup thold trec tw etc or significant drops in power supply voltage on digital components Error Messages Error messages provide information about problems that SPICE could not resolve and were fatal to the simulation Error messages indicate that simulation results could not be generated so they must be corrected before you will be able to analyze the circuit If you need help troubleshooting SPICE simulation errors refer to Chapter 15 SPICE Beyond the Basics Chapter 6 AnalogMixedSignal Simulation 6161 Setting Up AnalogSPICE Variables SPICE allows you to control certain aspects of its simulation such as iteration limits temperature etc Choose Simulation Analyses Setup Analog Options to display the dialog box pictured in Figure 636 To learn more about the option variables listed in this dialog box and how to change their values turn to SPICE Option Variables in Chapter 15 SPICE Beyond the Basics Figure 636 Use this dialog box to control certain aspects of the SPICE simulation ASCIIOUTPUT Check Box By default the simulation data is saved in the RAW file in binary format creating smaller RAW files Use this check box to have SPICE save the simulation data in ASCII format which lets you to read the data directly or load it into other applications Defaultbinary format 6162 Chapter 6 AnalogMixedSignal Simulation DVCC DVDD and DGND These are default values of the Vcc Vdd and ground buses for the digital devices If these buses are not specified in the circuit the default values will be used If a bus name is entered instead of a value that bus will be connected to the devices By default DVCC and DVDD5V DGNDGND Integration Method Choose which numerical integration method you want to use with XSpice The trapezoidal method is relatively fast and accurate but tends to oscillate under certain conditions The gear method requires longer simulation times but tends to be more stable The gear order must be a value between 2 and 6 Using a higher gear order theoretically leads to more accurate results but increases simulation time DefaultTrapezoidal Analysis Data Saved in RAW File Use the four radio buttons see Figure 636 to select the default level at which variables are saved in the RAW file This determines how much data is actually stored in the RAW file and which variables can be plotted in the analysis windows when the simulation is run Select the top button to store only the node voltages and supply currents Select the second button to store node voltages supply currents and device pin currents Select the third button to store node voltages supply currents device pin currents and device power dissipa tion Select the bottom button to store node voltages supply currents device pin variables and subcircuit internal variables If you have added any Exclusive Test Points to the circuit data will be saved only for each Exclusive Test Point and these radio buttons will be disabled Chapter 6 AnalogMixedSignal Simulation 6163 AnalogMixedSignal Instruments Following is a description of instruments found in CircuitMakers device library that are most commonly used in analog and mixedsignal circuits Multimeter In addition to the MultimeterOperating Point analysis window CircuitMaker includes a multimeter instrument for measuring resistance DC DC AVG or AC RMS voltage or current You may place as many multimeters into your circuit as you like When you run the simulation the measured value is then displayed on the meter Remember when measuring voltage connect the meter in parallel with the circuit when measuring current connect it in series When measuring resistance be sure to remove any power sources from the circuit and beware of dangling devices that may cause XSpice errors Also since the multimeter forces a current through the circuit to measure ohms make sure you have only one multimeter set to ohms in the circuit at a time XSpice sees the current flowing into the positive terminal of a power supply Multimeter or Signal Generator as positive current When you place a Multimeter AnalogInstruments in your circuit the dialog box shown in Figure 637 appears showing the settings of the multimeter Note To measure DC AVG or AC RMS values Transient Analysis must be enabled and must simulate enough cycles of transient data to make the measurements meaningful Likewise Operating Point Analysis multimeter must be enabled in order to obtain resistance and DC values DC V 12 00 V 6164 Chapter 6 AnalogMixedSignal Simulation Figure 637 This dialog box appears when you place a multimeter in your circuit The resistance of a voltmeter is high and the resistance of an ammeter is low so it will have little effect on the circuit it is measuring When measuring voltage on a high resistance circuit it may be desirable to increase the resistance of the voltmeter When measuring current through a low resistance circuit it may be desirable to decrease the resistance of the ammeter When measuring pin junction resistance it may be desirable to increase the forcing current of the ohmmeter Multifunction Signal Generator You can place as many of CircuitMakers multifunction signal generators in your circuit as you like Waveform functions include Sinusoidal SingleFrequency AM SingleFrequency FM Exponential Pulse including Triangle and Sawtooth PieceWise Linear The settings for each of these functions are edited through separate dialog boxes which are described in the following sections 10 kHz 11V Chapter 6 AnalogMixedSignal Simulation 6165 Accessing the Signal Generator Editor After placing a Signal Gen AnalogInstruments g in your circuit doubleclick it with the Arrow Tool to display the dialog box pictured in Figure 638 Figure 638 This dialog box shows the settings for the currently selected waveform function All of the waveform dialog boxes have the following items in common VoltsAmps Allows you to select whether this is a voltage or current source Netlist Button Displays the Edit Device Data dialog box described in Editing Devices in Chapter 4 Drawing and Editing Schematics Wave Button Displays the dialog box pictured in Figure 639 allowing you to change waveform functions for this generator To change waveform functions click one of the function buttons and specify this generators effect when running AC Analysis AC Analysis temporarily replaces each AC source with a sinusoidal wave of a fixed magnitude and phase The Source check box allows you to specify whether this generator will be used as an AC source in the AC Analysis The Magni tude and Phase edit fields allow you to specify the fixed values that will be used 6166 Chapter 6 AnalogMixedSignal Simulation Figure 639 Use the Edit Signal Generator dialog box to select the waveform you want to edit Editing Sine Wave Data Click the Sine Wave button to display the dialog box pictured in Figure 640 Use this dialog box to set the parameters of the sinusoidal waveform The waveform beginning at Start Delay is described by the following formula where t instance of time Vt0 to tSD VO VtSD to tSTOP VO VA sin2pF tSD etSDTHETA 10 kHz 11V Chapter 6 AnalogMixedSignal Simulation 6167 Figure 640 Use this dialog box to edit sine wave data DC Offset VO Used to adjust the DC bias of the signal generator with respect to the negative terminal usually ground measured in volts or amps Peak Amplitude VA Maximum amplitude of the output swing excluding the DC Offset measured in volts or amps Frequency F Frequency of the output in hertz Start Delay SD Provides a phase shift of the output by delaying the start of the sine wave Damping Factor THETA A positive value results in an exponentially decreasing amplitude a negative value results in an exponentially increasing amplitude 6168 Chapter 6 AnalogMixedSignal Simulation Editing AM Signal Data Click the AM Signal button to display the dialog box pictured in Figure 641a Use this dialog box to set the parameters of the singlefrequency AM waveform DC Offset VO Adjust the DC bias of the signal generator with respect to the negative terminal usually ground measured in volts or amps Figure 641a Use this dialog box to edit an AM signal Peak Amplitude VA Maximum amplitude of the output swing excluding the DC Offset measured in volts or amps Carrier Frequency FC Frequency of the unmodulated output in hertz Modulation Index MDI Value corresponding to the percentage of amplitude modula tion 1 100 05 50 etc Signal Frequency FS Frequency of the modulating signal in hertz Chapter 6 AnalogMixedSignal Simulation 6169 Editing FM Signal Data Click the FM Signal button to display the dialog box pictured in Figure 641b Use this dialog box to set the parameters of the singlefrequency FM waveform The waveform is described by the following formula where t instance of time Vt VO VA sin2pFCt MDI sin2pFSt DC Offset VO Adjust the DC bias of the signal generator with respect to the negative terminal usually ground measured in volts or amps Figure 641b Use this dialog box to edit an FM signal Peak Amplitude VA Maximum amplitude of the output swing excluding the DC Offset measured in volts or amps Carrier Frequency FC Frequency of the unmodulated output in hertz Modulation Index MDI Value corresponding to a function of amplitude of the modulating signal indicating the level of modulation MDI frequency deviation FS Signal Frequency FS Frequency of the modulating signal in hertz 10 kHz 11V 6170 Chapter 6 AnalogMixedSignal Simulation Editing Exponential Data Use the dialog box in Figure 642 to set the parameters of the exponential waveform The waveform is described by the following formulas where t instance of time Vt0 to tRD VI VtRD to tFD VI VP VI 1 et tRD tRT VtFD to tSTOP VI VP VI et tRD tRT VI VP 1 et tFD tFT Figure 642 Use this dialog box to edit exponential wave data Initial Amplitude VI Initial amplitude of the output with respect to the negative terminal usually ground measured in volts or amps Pulse Amplitude VP Max amplitude of output swing measured in volts or amps Rise Time Delay RD The point in time from t0 when the output begins to rise This provides a phase shift of the output by delaying the start of the exponential waveform Rise Time Constant RT Standard RC charging time constant Fall Time Delay FD The point in time from t0 when the output begins to fall Fall Time Constant FT Standard RC discharging time constant 36 us 05V Chapter 6 AnalogMixedSignal Simulation 6171 Editing Pulse Data To set the parameters of the pulse waveform click Pulse TriangleSawtooth to display the dialog box in Figure 643 Figure 643 Use this dialog box to edit pulse data The waveform is described as follows where t instance of time Intermediate points are set by linear interpolation Vt0 VI VtSD VI VtSDtTR VP VtSDtTRtPW VP VtSDtTRtPWtTF VI VtSTOP VI Initial Amplitude VI Initial amplitude of the output with respect to the negative terminal usually ground measured in volts or amps Pulse Amplitude VP Maximum amplitude of output swing in volts or amps Period 1freq Duration of one complete cycle of the output Pulse Width PW Duration output remains at VP before ramping toward VI Rise Time TR Duration of the ramp from VI to VP Fall Time TF Duration of the ramp from VP to VI Delay to Start SD Duration that the output remains at VI before beginning to ramp toward VP the first time 10 MHz 05V 6172 Chapter 6 AnalogMixedSignal Simulation Editing PieceWise Data Click the PieceWise button to set the parameters of the piecewise linear waveform as pictured in Figure 644 Figure 644 Use this dialog box to set the parameters of the piecewise linear waveform Piecewise linear data must come from one of two sources You can describe the waveform with a set of up to 8 points that you enter directly into this dialog box The time specified for each successive point must be more positive than its predecessor If it is not the cycle will end excluding that and all successive points You can define the waveform in an ASCII text file containing an indefinite number of points Values must be entered in pairs and each pair must include a time position followed by an amplitude The first character of each data line must be a plus sign and each line may contain up to a maximum of 255 characters Values must be separated by one or more spaces or tabs Values may be entered in either scientific or engineering notation Comments may be added to the file by making the first character of the line an asterisk For example Random Noise Data 000000e3 06667 000781e3 06372 001563e3 01177 002344e3 06058 003125e3 02386 003906e3 11258 004688e3 16164 005469e3 03136 006250e3 10934 007031e3 01087 007813e3 01990 008594e3 11168 009375e3 14890 010156e3 02169 010938e3 14915 011719e3 14914 012500e3 01486 Intermediate points are determined by linear interpolation If Max Amp is specified in the dialog box the data in the file will be scaled vertically so that the peaktopeak amplitude 70 us 500m2V 70 us 500m2V Chapter 6 AnalogMixedSignal Simulation 6173 of the waveform is equal to the specified Max Amp and is centered around zero If an Offset is specified the waveform will be offset vertically by the specified amount If a Max Time is specified the waveform will be scaled horizontally to fit the specified Max Time Example circuit PWLCKT Note The PWL file must be located in the same directory as the circuit you are simulating Data Sequencer You can use this device in both digital and analog simulation modes Also known as a Data or Word Generator it allows you to specify up to 32767 8bit words which can be output in a defined sequence Since there is no limit to the number of Data Sequencers that you can use in a circuit you could place several in parallel to create a data stream of any width For a complete description of the data sequencer refer to Data Sequencer in Chapter 5 Digital Logic Simulation 8 7 6 5 4 3 2 1 CP1 CP2 Data Seq 6174 Chapter 6 AnalogMixedSignal Simulation Chapter 7 Exporting Files 7175 Exporting Files C H A P T E R 7 CircuitMaker offers several powerful export options letting you export your circuit data to any of the following output types Bill of Materials Waveforms as graphic files Circuits as graphic files SPICE Netlists SPICE Subcircuits PCB Netlists This level of flexibility lets you easily integrate the work you do in CircuitMaker with a wide variety of other schematic capture simulation and printed circuit board layout pro grams CircuitMaker works seamlessly with TraxMaker meaning that you can export to the TraxMaker PCB netlist format and also configure and launch TraxMaker directly from CircuitMaker This chapter defines the different types of output files and provides stepbystep procedures for them Bill of Materials Formerly known as a Parts List a Bill of Materials is a file that contains information about how many and which kinds of parts are used in your circuit You can export a Bill of Materials to a text file 7176 Chapter 7 Exporting Files To access the Bill of Materials feature 1 Choose File Bill of Materials to display the dialog box pictured in Figure 71 2 See the following sections for more information You can save a Bill of Materials in one of two formats Single Item per line or Multiple items per line Figure 71 You can save display or print a Bill of Materi als in one of two formats Single Item Per Line This format puts each component on a separate line in the Bill of Materials Items are listed in order according to the device designation The columns are tab delimited This format can easily be loaded into a spreadsheet and then sorted and arranged to your liking The following is an example of the single item per line format Bill of Materials for CCMCircuitsDiffampBOM Item LabelValue Attributes Designation 1 1N914 DIODE04 D1 2 1N914 DIODE04 D2 3 2N2222A TO92 Q1 4 2N2222A TO92 Q2 5 2N2222A TO92 Q3 6 32k AXIAL04 R1 7 15k AXIAL04 R2 8 50 AXIAL04 RB1 9 50 AXIAL04 RB2 10 775k AXIAL04 RC1 Chapter 7 Exporting Files 7177 Multiple Items Per Line This Bill of Materials format lists components on the same line if the labelvalue description and package fields match Columns are tab delimited The following is an example of the multiple items format Bill of Materials for CCMCircuitsDiffampBOM Item Quantity LabelValue Attributes Designations 1 2 1N914 DIODE04 D1D2 2 3 2N2222A TO92 Q1Q2Q3 3 1 32k AXIAL04 R1 4 1 15k AXIAL04 R2 5 2 50 AXIAL04 RB1RB2 6 2 775k AXIAL04 RC1RC2 7 1 25k AXIAL04 RE As you can see in the examples the three main things listed for each item are LabelValue Attributes and Designation The default attributes are package and description which can be set for each device in the Edit Device Data dialog box Notice that none of the items in the list had a description so only the package is listed If multiple attributes are present for devices then additional lines are added to list those attributes For example a group of items that has both a package and a description would require a second line to list the second attribute description 5 2 50 AXIAL04 RB1RB2 5 Resistor Saving Displaying and Printing the Bill of Materials To save the Bill of Materials to a file 1 Enter the desired output file path and name in the Bill of Materials dialog box 2 Click the Save button 7178 Chapter 7 Exporting Files To display the Bill of Materials 1 Click the Display button The Bill of Materials appears in the Notepad editor 2 Choose File Print in the Notepad editor to print the Bill of Materials Including Attributes Use the Include Attributes field in the Bill of Materials dialog box to enter items that you want to appear in the attribute column of the Bill of Materials These items must be separated by commas and should be listed in the order that you want them to appear in the Bill of Materials There are two predefined attributes package and description These are listed as the default attributes in the Include Attributes field Deleting an item from the Include Attributes field excludes that attribute from the Bill of Materials You can enter other attributes in the Include Attributes field if they are defined an attribute file as described below Creating an Attribute File You can create an attribute file to define additional at tributes To use an attribute file 1 Create an attribute file 2 Select the attribute file in the Attribute File field of the Bill of Materials dialog box by typing the full path and naming the file or by clicking the Attribute File button to find and select the file 3 Define the attributes in the attribute file and enter the names of the attributes in the Include Attributes field of the Bill of Materials dialog box If you use an attribute file devices that match an entry in the attribute file will have the defined attributes listed in the attribute column in the Bill of Materials An entry in an attribute file must have one of the following two comma delimited formats Chapter 7 Exporting Files 7179 Format 1 LabelValue Package Description Attribute Name Attribute Data This format is used for all devices except for resistors capacitors and inductors Example ua741DIP8MFGFairChild Format 2 Spice Prefix R C or L Package Description Attribute Name Attribute Data This format is used for resistors capacitors and inductors Example cCAP02MFGMallory A device is considered to match an entry in the attribute file if the labelvalue or spice prefix package and description of the device match those of the entry in the attribute file The matching is case insensitive You can use an asterisk wildcard to indicate that a match for a particular item is not required In the Format 1 ua741 example only the LabelValue and the package must match The description does not need to match because of the asterisk A single line in the attribute file can only contain one attribute Additional attributes for the same device type can be listed by using the plus character The plus character means that the LabelValue package and description for the new line are the same as the line above This means that only the new attribute name and attribute data are listed Here is the above ua741 example restated with additional attributes ua741DIP8MFGFairChild COST025 MFGIDUA741N 7180 Chapter 7 Exporting Files The information in the Include Attributes field of the Bill of Materials dialog box could be as follows PackageDescriptionMFGMFGIDcost A corresponding entry in a Bill of Materials would then be 24 3 UA741 DIP8 U1U2U3 Fairchild UA741N 025 Even though Description is listed in the Include Attributes field a description does not appear in the Bill of Materials because the Description field in the Edit Device Data dialog is blank for this device Note that the order of the attributes in the Bill of Materials depends on the order in the Include Attributes field not the order in the attribute file The following are examples of additional entries from an attribute file LM741DIP8MFGNational COST026 MFGIDLM741N rAXIAL04MFGTRW COST005 LF411CAN8MFGNational COST026 MFGIDLM741N cCAP02MFGMallory Chapter 7 Exporting Files 7181 Setting Up Export Options Use the Export Options dialog box to specify the format used when transferring graphics to the clipboard or when exporting a graphic to a file To setup export options 1 Choose File Export Options to display the dialog box shown in Figure 72 2 Choose On Off or Simulation for the Show LED LAMP Display State option 3 Choose Color or BW Black and White to specify the output color Figure 72 The Export Options dialog lets you specify output settings 4 Choose an export format Format Characteristics Windows Metafile Windows format for vector graphics Device Independent Bitmap A pixelbypixel represen tation of a graphic that looks good at any resolution Device Dependent Bitmap A pixelbypixel represen tation of a graphic that only looks good at its original resolution 7182 Chapter 7 Exporting Files Exporting Waveforms as Graphics You can export CircuitMaker waveforms and use them in documentation presentations etc You can either save the waveform as a graphic file or copy and paste the waveform directly into another software program Use the Waveforms as Graphics export option to save the waveforms for the current circuit as a Windows Metafile Device Independent Bitmap or Device Dependent Bitmap Use the Export Options dialog box described earlier to choose the format Note CircuitMaker saves only the information currently displayed in the active Waveforms or Analysis window To save waveforms as graphics 1 Run a simulation so that waveform and analysis windows appear on the screen 2 Click and select the waveform window that you want to export 3 Choose File Export Waveforms as Graphic Select the name of the file where you want to save the circuit graphic then choose Save OR Choose Edit Copy to Clipboard Waveforms then open another Windows program and Paste the wave form directly into your document Exporting Circuits as Graphics You can export CircuitMaker circuit schematics and use them in documentation presentations etc You can either save the circuit as a graphic file or copy and paste the circuit directly into another software program Use the Export Circuit as Graphic option to save the circuit to disk as a Windows Metafile Device Independent Bitmap or Device Dependent Bitmap Use the Export Options dialog box described earlier to choose the format Chapter 7 Exporting Files 7183 To export the circuit as a graphic 1 Choose File Export Circuit as Graphic Select the name of the file where you want to save the circuit graphic then choose Save OR Choose Edit Copy to Clipboard Circuit then open another Windows program and Paste the circuit directly into your document Exporting a SPICE Netlist A SPICE netlist is intended for simulation For more informa tion see Chapter 6 AnalogMixedSignal Simulation and Chapter 15 SPICE Beyond the Basics Use the SPICE netlist NET option to create a SPICE compatible text file describing your circuit You can then import this text file into other Berkeley SPICE3 compatible simulation programs 1 Choose File Export SPICE Netlist 2 Type the name of the netlist file with a NET extension and then choose OK Exporting a SPICE Subcircuit Use the SPICE Subcircuit option to create a SUB text file describing your circuit You can then copy the text file into a SUB file which corresponds to the device symbol you intend to use Connect SCOPE DigitalInstrument t devices to your circuit to indicate the connecting nodes of the subcircuit Label them TP1 1st node TP2 2nd node etc or anything that ends with a number 1 2 3 etc up to a maximum of 64 connecting nodes To export a SPICE Subcircuit 1 Choose File Export SPICE Subcircuit 2 Type the name of the subcircuit file with a SUB extension and then choose OK 7184 Chapter 7 Exporting Files Exporting a PCB Netlist Use the PCB Netlist export option to create a PCB netlist file for your circuit CircuitMaker generates PCB netlists in TraxMaker Protel Tango and many other formats allowing you to use it with a wide variety of Printed Circuit Board layout programs What is a Net Each net represents one electrical junction point or node of a circuit Numerous device pins may be connected to the same net What is a Netlist A netlist is an ASCII text file listing connections which describe the networks or nets of component connections in an electronic circuit Widely used in electronics CAD packages netlists let you transfer design details between applications such as CircuitMaker and TraxMaker Netlists generally contain two types of information Descriptions of the individual components A list of all pintopin connections PCB Netlists come in various formats but generally carry similar data They can often be translated into another format using a text editor The file extension NET is used for MicroCode Engineering netlist files As straightforward ASCII text files netlists are easily viewed created and modified using a simple text editor or word processor such as NotePad PCB Netlist Requirements To create a PCB netlist your circuit must meet the following requirements Each device in the circuit must have a unique Designa tion that is D1 C3 etc Each device must have a value or label that is 10k 2N2222A etc Each device must have a Package type which should match one of the available Patterns in your PCB Layout program that is DIP14 AXIAL04 etc Chapter 7 Exporting Files 7185 Pin numbers must be assigned for each device in the circuit Designators and Package Descriptions types are limited to 12 alphanumeric characters Net names can be 20 characters Pin numbers in netlists are limited to 4 alphanumeric characters No blank spaces may be used within these strings If any of these required items is missing an error message will appear Exporting to Popular PCB Netlist Formats CircuitMaker can export PCB netlists in the following formats making your design usable in any product that supports these PCB netlist formats TraxMaker Protel Tango Orcad PCB II CircuitMaker PRO only PADS CircuitMaker PRO only CadNetix CircuitMaker PRO only Calay CircuitMaker PRO only Calay 90 CircuitMaker PRO only Note that package description names and pin numbers for each device in CircuitMaker must have exact matches to the library footprints of the pcb layout program you are using For example lets say your schematic contains a resistor and you want that resistor to use an AXIAL04 footprint when the netlist is imported into TraxMaker You would need to make sure that the name AXIAL04 is in the Package field of that resistor doubleclick on a part in CircuitMaker to access the Edit Device Data dialog box to view and edit the package field To export a PCB netlist format other than the TraxMaker format 1 Choose File Export PCB Netlist 2 Select the appropriate format from the dropdown list such as Orcad PCB II 3 Type the name of the netlist file and then choose Save 7186 Chapter 7 Exporting Files TraxMaker PCB Netlist Format TraxMaker is a powerful pcb layout and autorouting program from MicroCode Engineering Inc It is fully compat ible with CircuitMaker and the products are designed to work together seamlessly giving you a complete startto finish design system TraxMakers netlist format is identical to the Tango and Protel netlist formats and TraxMaker accepts either a dash or a comma delimiter between the designator and pin number U116 or U116 Some netlists including TraxMaker netlists provide separate formats for component descrip tions and connections Others combine the two sets of data in a single section The following describes the TraxMaker pcb netlist format Character What it Does Marks the start of each component description U8 Labels the Component Designator Designation field DIP16 Indicates the package description type or pattern Package field An identical description is required in the TraxMaker component library 74LS138 Shows the components comment or value Compare with LabelValue field Blank line Left blank for future provision There are usually three blank lines Marks the end of the component descrip tion Marks the start of each net NET3 Names the net U83 Shows the first component by designa tor and pin number Pin numbers in TraxMaker library components must be an exact match Chapter 7 Exporting Files 7187 J211 Indicates the second pin in the net U55 Indicates another pin Marks the end of the net Note that net descriptions are distinguished from component descriptions by the use of rounded rather than square brackets CircuitMaker to TraxMaker TraxMaker is a powerful pcb layout and autorouting program from MicroCode Engineering Inc It is fully compatible with CircuitMaker and the products are designed to work together seamlessly giving you a complete starttofinish design system Because CircuitMaker and TraxMaker are tightly integrated you can automatically export a TraxMaker netlists open TraxMaker define a keep out area load the netlist place and arrange the component footprints all with the TraxMaker Button in CircuitMaker To take a schematic from CircuitMaker into TraxMaker 1 Choose File Export PCB Netlist or click the TraxMaker button on the Toolbar to display the dialog box pictured in Figure 73 Figure 73 Not only can you export a TraxMaker netlist but you can also launch TraxMaker load the netlist and automatically define a keep out area and place the components all from within CircuitMaker Export to TraxMaker automatically using the TraxMaker Button 7188 Chapter 7 Exporting Files 2 Choose TraxMaker from the dropdown list it is chosen for you by default 3 From the TraxMaker Options group box specify the options as described in the following sections Run TraxMaker and Load Netlist Use this option to export the currently opened CKT file to netlist NET format run TraxMaker and load the netlist If CircuitMaker cant find the TraxMaker executable file use the Find TraxMaker button to locate it Once you have located it you dont have to find it again unless the location changes Create KeepOut Layer Use this option to define the board size for the TraxMaker AutoPlacement and Autorouting features both of which attempt to stay within this area when placing and routing netlists See the TraxMaker User Manual for more informa tion Board Size in Mils Use this option to define the size of the Keep Out Layer See the TraxMaker User Manual for more information Automatically Place Components This option activates the TraxMaker AutoPlacement feature which uses several strategies when placing netlisted components on the Board AutoPlacement attempts to arrange components by first grouping then placing the groups using the placement and clearance grids youve specified See the TraxMaker User Manual for more information Chapter 8 Fault Simulation 8189 Fault Simulation C H A P T E R 8 An exciting educational feature of CircuitMaker is the ability to place faulty devices in circuits This lets you as the instructor to create troubleshooting exercises for students For example you can create a working circuit then zap one or more of the devices by applying shorts opens or other faults to selected pins on those devices You can then password protect the fault data and limit the resources available to the student You can add faults to both digital and analog circuits Hints Create a working circuit before adding fault data While CircuitMakers comprehensive fault simulator lets you create multiple complex faults use discretion when adding faults to a circuit One or two damaged pins on an IC a burnt resistor or a shorted capacitor might be enough to challenge the student Device Faults Each device might have multiple faults but each device pin can have only a single fault There are 6 basic types of device faults that can be simulated in CircuitMaker Pins Stuck High In Digital Simulation mode the specified pins will be con nected to a logic high In Analog Simulation mode the specified pins will be connected to an invisible independent voltage source of an instructorspecified value Pins Stuck Low In Digital Simulation mode the specified pins will be con nected to a logic low In Analog Simulation mode the specified pins will be connected to an invisible independent voltage source of an instructorspecified value 8190 Chapter 8 Fault Simulation Pins Open In Digital Simulation mode the specified pins will be discon nected from the device In Analog Simulation mode the specified pins will be connected to the device through an invisible resistor of an instructorspecified value Pins Shorted Together In Digital Simulation mode the specified pins will be shorted directly together In Analog Simulation mode the specified pins will be connected together through a daisychain of invisible resistors of an instructorspecified value Wrong Value For Analog Simulation mode only The Fault LabelValue replaces the LabelValue for the device during simulation User Defined For Analog Simulation mode only The SPICE model or subcircuit specified in the LabelValue for the device is replaced during simulation by the model or subcircuit specified in the Fault LabelValue The faulty model or subcircuit may be one that has been modified by the instructor to operate incorrectly Figure 81 Use the Device Faults dialog box which you access from the Edit Device Data dialog box to set up faults for the device Chapter 8 Fault Simulation 8191 Adding Device Faults To add faults to a device follow these steps 1 Doubleclick the device to display the Edit Device Data dialog box 2 Click Faults to display the Device Faults dialog box Following is a description of the various items on the Device Faults dialog box see Figure 81 Enable Device Faults When checked the faults specified for this device will be enabled It is enabled automatically when you edit fault data Fault LabelValue Use this text box to enter the wrong value and user defined faults mentioned earlier in this chapter If a value is entered in this field it will replace the devices LabelValue when the simulation is run Faulty SPICE model and subcircuit names may also be entered here If the field is left blank the devices real LabelValue will be used in the simulation Faults and Device Pins Select one or more pins from the Device Pins list then click on one of the fault buttons The selected pins will be removed from the selection list and placed to the right of the associated fault button Pressing a fault button again will remove that fault from the pins listed next to it and place the pins back in the selection list Button Used For HIGH The pins stuck high fault In AnalogMixed mode simulation the value to the left of the button indicates the voltage of an invisible voltage source to which the pins are stuck LOW The pins stuck low fault In Analog Mixed mode simulation the value to the left of the button indicates the voltage of an invisible voltage source to which the pins are stuck 8192 Chapter 8 Fault Simulation Button Used For OPEN The pins open fault In Analog Mixed mode simulation the value to the left of the button indicates the resistance very high between the pin and the device SHORT Used for the pins shorted together fault In AnalogMixed mode simula tion the value to the left of the button indicates the value of the resistors very low that are daisychained between each of the selected pins Internal HighLow Check Boxes Use these options for digital simulation only they do not affect analog simulation Stuck high and stuck low faults are assumed by default to be external to the device Due to the nature of the digital simulation it is desirable to use internal highlow faults on input pins and external highlow faults on output pins For this reason you should not have an input pin and an output pin both stuck high or both stuck low on the same device Hint Message The instructor can type a brief hint about the nature of the fault in this field that the student can access while trouble shooting the circuit Fault Password The instructor can enter a password in this text box to restrict access to the fault data If a password is entered here all fault data will be password protected If the pass word is deleted the fault data will no longer be protected Passwords are case sensitive and may be up to 15 characters in length They may include any printable character exclud ing Tab or Enter Password protection Restricts access to the Device Faults dialog box Restricts access to the Circuit Faults dialog box Eliminates fault comments from the SPICE NET file Chapter 8 Fault Simulation 8193 Using the Access Faults Dialog Box If the fault data has been password protected the Access Faults dialog box pictured in Figure 82 appears whenever the student Clicks the Circuit Fault Data button in the Preferences dialog box Clicks the Faults button in the Edit Device Data dialog box Doubleclicks a device if Device Data Display has been checked in the Circuit Faults dialog box Figure 82 The Access Faults dialog box appears whenever a password has been set and the student tries to perform certain actions If Replace Device has not been disabled in the Circuit Faults dialog box the student can click on this button to replace a device This disables the fault data for the device but does not actually delete the fault data If Replacement Status has not been disabled in the Circuit Faults dialog box a message will then be displayed indicat ing whether the replaced device was good or faulty Disable Replacement Status from the Circuit Faults dialog box If Display Hint has not been disabled in the Circuit Faults dialog box the student can click on the Display Hint button to view any hint the instructor has provided for that device The instructor can see how many devices were replaced and how many hints were displayed all from the Circuit Faults dialog box The instructor can also enter the password to gain access to the Device Faults or Circuit Faults dialog box 8194 Chapter 8 Fault Simulation Managing Circuit Faults Use the Circuit Faults dialog box see Figure 83 to control which resources are available to students when faults are enabled You can also define the default analog fault values The settings specified in this dialog box are saved with the circuit To access the Circuit Faults dialog box 1 Choose File Preferences 2 Click the Circuit Fault Data button Figure 83 Use this dialog box to control which resources are available to students when faults are enabled The following information describes the features on the Circuit Faults dialog box Disable Circuit Options Use the options in this group box to limit the features available to the student Note Only the items which are not checked are available to the student Chapter 8 Fault Simulation 8195 By default none of the items are checked meaning that the student has access to all of CircuitMakers features Option Disables Students Ability To Wire Tool Use the Wire Tool or the ArrowWire Tool to modify the circuit Delete Tool Use the Delete Tool or the Delete key to modify the circuit Note This does not prevent the student from replac ing a device by clicking on the Replace Device button in the Access Faults dialog box RotateMirror Rotate or mirror devices in the circuit Cut Command Use the Cut and Move commands to modify the circuit Copy Command Use the Copy Duplicate and Copy Circuit commands Note This prevents the student from copying faulty devices into another circuit which is not password protected Paste Command Use the Paste and Duplicate com mands to modify the circuit Device Replacement Use the Replace Device button in the Access Faults dialog box Note This does not prevent the student from deleting the device or selecting a new device from the device library Replacement Status View a message when a device is replaced The message indicates whether or not the replaced device was faulty Display Hints View any hint messages Script Functions Run any of the script functions Model Selection Select a new SPICE model for any device Subcircuit Selection Select a new SPICE subcircuit for any device 8196 Chapter 8 Fault Simulation Option Disables Students Ability To Signal Selection Change the settings of the Signal Generators Device Data Display View or edit the device data in the Edit Device Data dialog box and change the Visible status of the device labels and values Device Libraries Select new devices from the device library Note This does not prevent the student from replacing a device by clicking on the Replace Device button in the Access Faults dialog box Digital Options Access the Digital Options dialog box Digital Trace Use the Trace feature The Trace feature is used in digital simulation to view the logic states of all the wires in the circuit Show Node Numbers View the node numbers for the circuit Viewing the node numbers could help identify opens and shorts in a circuit Analog Options Access the Analog Options dialog box Analysis Selections Change the enableddisabled status of the analog analyses which limits the student to analysis types you specify The student can however change settings of enabled analyses and run modified simulations Save Circuit Save the circuit This cannot be checked if the Auto Save Circuit after Hint or Replacement option is checked see Hints and Replace ments Chapter 8 Fault Simulation 8197 Hints and Replacements Each time the student presses the Replace Device or Display Hint button in the Access Faults dialog box a flag is set for the selected device If you check the Auto Save Circuit after Hint or Replace ment option the circuit is saved automatically each time the buttons are pressed preserving the students work Option Lets Instructor Hints Displayed View the number of hints that the student viewed Devices Displayed View the number of devices the student replaced Select Replaced Devices View or highlight all devices that were replaced Select Hinted Devices View all devices for which the student viewed a hint Select Faulty Devices View all devices that have fault data in them whether the faults are enabled for that device or not Replace Selected Devices Disable the fault data for all selected devices does not delete the fault data Clear HintsReplacements Clear the flags Circuit Default Values Use the Circuit Default Values group box to set the default values that correspond to the various faults in Analog Simulation mode These defaults can be overridden for each device individually Value Default Value For the Invisible HIGH Voltage source to which the specified pins of a device are connected when a HIGH fault is specified The factory default is 5V 8198 Chapter 8 Fault Simulation Value Default Value For the Invisible LOW Voltage source to which the specified pins of a device are connected when a LOW fault is specified The factory default is 0V OPEN Resistor placed between the specified pins and the device The factory default is 1G ohm SHORT Resistors that are daisychained between the specified pins of the device The factory default is 1m ohm Fault Lock Password The instructor might enter a password in this field to restrict access to the fault data If you enter a password here all fault data is password protected If the password is deleted the fault data will no longer be protected Passwords are case sensitive and may be up to 15 characters in length They may include any printable character excluding Tab or Enter Warning If you forget the password you will not be able to access the fault data for the circuit Creating Black Box Macros The instructor may lock a macro so that it cannot be expanded by the students thus creating a black box macro To create a black box macro 1 Choose Macros Expand Macro 2 Choose Macros Macro Lock 3 Enter any number up to 4 digits and then save the macro When you attempt to expand the macro again a display prompt asks you to enter the 4digit code A code of 0 zero leaves the macro unlocked Warning If you forget the code you will not be able to expand the macro Chapter 8 Fault Simulation 8199 Fault Example The following stepbystep example illustrates how to use the Circuit Faults dialog box 1 Open the example circuit PS1CKT 2 Click the Run button on the Toolbar to run the simula tion 3 Select the Transient Analysis window and then probe around on the circuit to verify that the circuit is working properly If you click on the positive side of the filter capacitor C1 you should see a ripple on waveform at about 15VDC If you click on the emitter side of the transistor Q1 you should see a DC voltage of about 6V 4 Stop the simulation by clicking the Stop button on the Toolbar 5 Doubleclick the filter capacitor C1 to display the Edit Device Data dialog box then click the Faults button 6 Click on device pins 1 and 2 shown in the Device Pins list box Click on the short button This will cause a short to be placed across the capacitor 7 Click on the Enable the following selected Device Faults check box to enable the fault 8 Click OK to exit the Device Faults dialog box then click OK to exit the Edit Device Data dialog box 9 Choose File Preferences 10 Click the Circuit Fault Data button to display the Circuit Faults dialog box 11 Click Device Data Display so it is checked 12 Click the Clear HintsReplacements button to clear these flags 13 Type xxx in the Fault Lock Password text box 14 Click OK to exit the Circuit Faults dialog box then click OK to exit the Preferences dialog box 8200 Chapter 8 Fault Simulation 15 If you want to save the fault settings for the circuit not required for this example you must now save the circuit 16 Click the Run button on the Toolbar to restart the simulation 17 Look at the waveform on the positive side of the filter capacitor You should see a sine wave of very low amplitude about 80mV peaktopeak The student might determine from this measurement that the filter capacitor is shorted and needs to be replaced 18 Stop the simulation by clicking the Stop button in the Toolbar 19 Doubleclick the filter capacitor C1 to display the Access Faults dialog box then click the Display Hint button to view the hint 20 Doubleclick the filter capacitor again to display the Access Faults dialog box then click the Replace Device button to disable the fault data for this device 21 Run the simulation again to see if the problem has been fixed 22 Stop the simulation 23 Choose File Preferences and then click the Circuit Fault Data button to display the Access Faults dialog box 24 Type xxx into the Fault Lock Password text box then click OK to exit the Circuit Faults dialog box Notice that there was one device replaced and one hint displayed 25 On the File Preferences Circuit Faults dialog box click the Device Data Display check box to remove the check and delete the xxx from the Fault Lock Password field 26 Click the Select Replaced Devices button 27 Click OK to exit the Circuit Faults dialog box then click OK to exit the Preferences dialog box The device that was replaced the filter cap is selected Chapter 9 File Menu 9201 File Menu C H A P T E R 9 The File menu contains commands that enable you to open save and print circuits and waveforms New Select New to clear the current circuit from the work area and begin a new circuit If an unsaved circuit is present in the work area when you select this command you will be asked if you want to save the current circuit first Open Choose Open to abandon the current circuit and load a different circuit into the workspace If an unsaved circuit is present in the work area you will be asked if you want to save the current circuit first A file selector dialog will then be displayed allowing you to choose the circuit to load into the work area The file extension used by default is CKT Circuit files created with older versions of CircuitMaker have the CIR extension To open these files select the CIR file type As these files are opened they will be converted to the new ASCII format and should be saved with the CKT extension Reopen Use the Reopen command to quickly reopen any of the last 8 circuits that you have used If changes have been made to the current circuit you will be asked if you want to save the circuit before closing Merge The Merge option lets you to add a circuit saved on disk to the circuit in the work area This command is useful because it lets you save commonly used circuits or portions of circuits to disk then reuse them as often as you need without having to rebuild them from scratch each time 9202 Chapter 9 File Menu Select Merge and choose the circuit to be added to the work area The circuit will be placed starting at the top left corner of the screen so be sure to position the work area and existing circuit accordingly Close Use Close to close the open windows If changes have been made to the current circuit you will be asked if you want to save the circuit before closing Save Choose Save to save the current circuit in the work area to disk using the name shown in the Title Bar When you save a circuit whose title is UNTITLEDCKT a file selector dialog box appears allowing you to save it under a specific name Save As Choose Save As to save the current circuit to disk using a file name that is different than the one shown in the Title Bar CircuitMaker will display a file selector dialog box allowing you to choose the path and a file name of up to eight characters The circuit is saved in an ASCII format with a default file extension of CKT Revert Choose Revert to abandon any changes made since last saving the circuit to disk and load the last saved version back into the work area CircuitMaker will then display a dialog box asking you to confirm that you want to revert to the last saved version Import Simulate SPICE Netlist Use this option to import and simulate a SPICE netlist that you might have created in another simulation program When you use this feature CircuitMaker does not display the actual schematic drawing Instead it runs the simulation displays the waveform data and provides a plot variable which you can use to choose different variables to plot Chapter 9 File Menu 9203 To import and simulate a SPICE netlist 1 Choose Import Simulate SPICE Netlist 2 Select a file with a NET extension and choose Open 3 When the simulation is complete select an analysis window and then click the Probe Tool on the plot variable 4 Select a variable from the list that appears then choose OK A waveform plots data for the variable you selected 5 To plot multiple variables hold down the Shift key while selecting variables Export CircuitMaker allows you to export a variety of files and formats including circuit and waveforms pcb and Spice netlists See Chapter 7 Exporting Files for a complete description of the exporting options Bill of Materials Formerly known as a Parts List a Bill of Materials is a file that contains information about how many and which kinds of parts are used in your circuit You can export a Bill of Materials to a text file See Exporting a Bill of Materials in Chapter 7 Exporting Files for more information Print Setup The File Print Setup option allows you to scale the output to the printer 10 to 1000 and choose between black and white or color You can also select the desired printer and page orientation by clicking the Printer button 9204 Chapter 9 File Menu Figure 91 The Print Setup dialog box lets you scale the output and set other printing options Fit to Page Use the Fit to Page option on the Print Setup dialog box to scale the schematic automatically so that the entire sche matic fits on a single printed page Print Circuit Choose File Print Circuit to print the current circuit or to save it to a print file A Printer dialog box appears allowing you to select the desired output If the circuit is too large to fit onto a single page it will automatically be divided into pagesize blocks as it is printed see Show Page Breaks in the View menu CircuitMaker supports all printers and printer options in the Printer dialog box Printer setups will vary depending on the device you are printing to but typically options such as page orientation and reduction factor are available Print Waveforms Choose File Print Waveforms to print the waveforms to a printer or save them to a print file Only the information currently displayed in the active Waveforms or Analysis window is printed Preferences Choose Preferences Figure 92 to change the default settings of CircuitMaker Preferences are stored in the CIRMAKERDAT file Chapter 9 File Menu 9205 Figure 92 The Preferences dialog box lets you change everything from program defaults to circuit defaults The options you set in the Program Defaults group box remain in effect no matter what circuit is loaded while the items in the Circuit Defaults group box are saved with each individual circuit Click Factory Settings to reset all the Preferences to their original factory default settings DevicePlot Font This option lets you specify the default font used in CircuitMaker This font is used on all device labels wire labels pin names key caps ASCII displays and plot windows Default Font Button This button sets CircuitMakers default font to its factory default which is Courier New This is a TrueType scalable rotatable monospaced font that comes with the Windows operating system 9206 Chapter 9 File Menu Auto Repeat When checked the Auto Repeat option will be activated by default Auto Repeat lets you repeatedly place a device until you either doubleclick or press any key This option is also accessible from the Options Menu See Auto Repeat in Chapter 12 Options Menu ArrowWire Tool When checked the ArrowWire Tool options is activated by default The ArrowWire Tool allows you to initiate a wire by clicking on a device pin with the Arrow Tool This options is also accessible from the Options Menu See ArrowWire in Chapter 12 Options Menu Single Click Connect Use this option to manually route wires When Single Click is enabled you can terminate a wire by a single mouse click on any valid connection point You can still terminate a wire at any location with a doubleclick even if the end of the wire is not at a valid connection point When the Single Click option is disabled you must doubleclick to end the wire This doubleclick mode lets you turn a wire very close to other wires or pins without connecting to them Display Toolbar When checked the Display Toolbar option will be activated by default This option is also accessible from the View Menu See Toolbar in Chapter 13 View and Window Menus Prompt to SAVE If modifications have been made to the circuit you may want to save the circuit before you run the simulation If this box is checked then each time you run the simulation CircuitMaker will warn you if the circuit has not been saved Display Variable Names When checked the Display Variable Names option will be activated by default The Display Variable Names option replaces the A B C labels used on the analog analysis windows with the variable names such as V8 etc This allows you to identify the various points in the circuit more consistently with those being graphed in analysis windows This option is also accessible from the Simulation Menu See Display Variable Names in Chapter 14 Simulation Menu Chapter 9 File Menu 9207 Connection Area The connection area defines a rectangle around valid connection points a valid connection point is any device pin or wire The SmartWires feature lets you connect a wire to a valid connection point even if your cursor is not exactly on that point By setting the X and Y values you specify how close within how many pixels you must be to the connection point before the wire will snap to that point By default the cursor must be within 3 pixels of the connection point When the Sound On option is enabled the system will beep through the PCs speaker each time the cursor enters a connection area When the Show Box option is enabled a rectangle will appear around the connection area each time the cursor enters that area Auto Wire Routing Auto wiring can be simple or intelligent depending on which check box you select Simple routing draws only one or two wire segments horizontal andor vertical making the shortest path without regard for devices that might be in the way Intelligent routing tries to find a path which does not cross directly over any devices If no reasonable path can be found the simple method is used Default Transient Analysis These options allow you to control the parameters supplied to the Transient Analysis when the Default Setups button is pressed in the Analog Analyses dialog box These values are only used in circuits which contain one or more Signal Generators Cycles Displayed determines the number of cycles of the lowest frequency Signal Generator to be analyzed Points Per Cycle determines the resolution of the analysis Export Options Button Click on the Export Options button to access and modify the export options CircuitMaker will use when exporting circuits and waveforms as graphic files These export options can also be accessed from File menu directly See Chapter 7 Exporting Files for details on how to export waveform and circuit graphics 9208 Chapter 9 File Menu Directories and Files Button The default directories and files used by CircuitMaker are user definable Circuit Directory is the path to where CircuitMaker stores your circuit CKT files Model Direc tory is the path to where your SPICE model libraries are located Script Directory is the path to where your script SRP files are located User Library File is the path and file name of your USERLIB Macros file Note The DEVICEDBDAT HOTKEYDBDAT and SYMBOLDBDAT files must be in the same directory as USERLIB Show Pin Dots When checked the Show Pin Dots option will be activated by default The Show Pin Dots option will place a small dot at every connection point in the circuit This option is also accessible from the Options Menu See Show Pin Dots in Chapter 12 Options Menu Show Bus Labels When checked the Show Bus Labels option will be acti vated by default The Show Bus Labels option displays bus labels in the circuit This option is also accessible from the Options Menu See Show Bus Labels in Chapter 12 Options Menu Show Page Breaks When checked the Show Page Breaks option will be activated by default The Show Page Breaks option will display the page divisions according to the paper size selected for the printer This option is also accessible from the Options Menu See Show Page Breaks in Chapter 12 Options Menu Show Node Numbers When checked the Show Node Numbers option will be activated by default The Show Node Numbers option will display the node number of every node in your circuit This option is also accessible from the Options Menu See Show Node Numbers in Chapter 12 Options Menu Chapter 9 File Menu 9209 Show Prop Delays When checked the Show Prop Delays option will be activated by default The Show Prop Delays option will display the propagation delays for all devices in the circuit This option is also accessible from the Options Menu See Show Prop Delays in Chapter 12 Options Menu Auto Refresh When checked the Auto Refresh option will be activated by default The Auto Refresh option will automatically refresh the screen as you are editing the circuit This option is also accessible from the Options Menu See Auto Refresh in Chapter 12 Options Menu Show Designation When checked the Show Designation option will be activated by default The Show Designation option will display the device designations for all devices in the circuit This option is also accessible from the Options Menu See Device Designation in Chapter 12 Options Menu Grid The Grid options in the Preferences dialog box allow you to set default grid settings that will be used every time you open CircuitMaker These options include grid size along with view print and snap options This option is also accessible from the Options Menu See Grid in Chapter 12 Options Menu Title Block The Title Block options in the Preferences dialog box allow you to set default Title Block settings that will be used every time you open CircuitMaker This option is also accessible from the Options Menu See Title Block in Chapter 12 Options Menu Border The Border options in the Preferences dialog box allow you to set default border settings that will be used every time you open CircuitMaker These options include view and print preferences This option is also accessible from the Options Menu See Border in Chapter 12 Options Menu 9210 Chapter 9 File Menu Circuit Fault Data Button Click on the Circuit Fault Data button to access and modify the circuit fault options CircuitMaker will use See Circuit Faults in Chapter 8 Fault Simulation for more information Circuit Display Button Click on the Circuit Display button to access and modify the default circuit display options CircuitMaker will use This option is also accessible from the Options Menu See Circuit Display Data in Chapter 12 Options Menu Select Colors Button Click on the Select Colors button to access and modify the default color options CircuitMaker will use This option is also accessible from the View Menu and from the rightclick pop up menu when rightclicking on an analysis window See Colors in Chapter 13 View and Window Menus Exit Choose File Exit to exit CircuitMaker and return to Windows If there are unsaved changes you will be asked if you want to save them Chapter 10 Edit Menu 10211 Normal cursor Paste cursor The commands in the Edit menu provide some of the tools necessary to construct and modify circuit diagrams Undo Many of CircuitMakers editing commands can be undone Edit operations which can be undone are Cut Paste Delete and Move Only the most recent edit can be undone and many commands are not able to be undone including Run Single Step Reset Define New Macro Expand Macro and Delete Macro Cut Use Cut to remove all selected items and place them in the paste buffer and on the system clipboard Copy Use Copy to place all selected items in the paste buffer and on the system clipboard Paste The Paste option displays the contents of the paste buffer in the CircuitMaker workspace and the displayed items follow the mouse around the screen The cursor is replaced by the paste cursor indicating the top left corner of the paste area When the items are positioned at the desired location click the mouse to finalize the paste To cancel the paste press any key or doubleclick the mouse Note You cannot use Paste to paste items from the system clipboard Move Use the Move option to perform both a Cut and a Paste This provides a quick way to move an entire circuit or portion of a circuit to a new position on the screen Connections to other portions of the circuit are lost C H A P T E R 10 Edit Menu 10212 Chapter 10 Edit Menu Delete Items This feature removes all selected items from the workspace Duplicate Choose Duplicate to make a copy of all selected items When this command is selected the duplicated items follow the mouse around the screen The cursor is replaced by the paste cursor indicating the top left corner of the paste area When the items are positioned at the desired location click the mouse to finalize the duplication To cancel the duplica tion press any key or doubleclick the mouse Copy Circuit to Clipboard Choose Copy to Clipboard Circuit to copy the entire circuit to the system clipboard in one of three formats Windows Metafile Device Independent Bitmap Device Dependent Bitmap Choose File Export Options to select the desired format This feature enables you to later paste the contents of the clipboard into a graphics program for further manipulation printout etc When this command has been executed an alert box appears informing you that the circuit has been copied to the clipboard Note You cannot paste items into the CircuitMaker workspace that were copied using this command It is designed only to copy the circuit to the system clipboard Copy Waveforms to Clipboard Use Edit Copy to Clipboard Copy Waveforms to copy the contents of the Waveforms window to the system clipboard in one of three formats Windows Metafile Device Independent Bitmap Device Dependent Bitmap Choose File Export Options to select the desired format When copying waveforms to the clipboard an alert box appears to inform you that the waveforms have been copied Chapter 10 Edit Menu 10213 Before you can use this feature at least one Analysis window must be open You can copy only the information currently visible in the Waveforms window to the clipboard To ensure that meaningful waveform information is copied run the simulation prior to using this feature Select All This option selects all items in the work area This is useful when you want to cut copy or move the entire circuit Find and Select Use the Find and Select feature Figure 101 to locate a specific device placed on the workspace by Node Number Designation Label or Value or Symbol Name If CircuitMaker finds a device that matches your description it is highlighted Figure 101 Use the Find and Select dialog box to search for devices you have placed in the workspace For example if a SPICE message indicates a problem at node 27 and your schematic is rather complex this command can help you find the specified node All wires connected to that node will be selected You can also search for multiple devices For example to select all the transistors enter Q in the Designation field All characters after the Q will be ignored in the search Rotate 90 This is the same as the Rotate 90 button described in Chapter 4 Drawing and Editing Schematics Note To find inputoutput connectors put the connec tor name in the Label or Value field of the Find and Select dialog box 10214 Chapter 10 Edit Menu Mirror This is the same as the Mirror button described in Chapter 4 Drawing and Editing Schematics Straighten Wires When you have wires with multiple bends sometimes you may want to clean them up a little This is a quick way of taking out some of the extra kinks without having to adjust the wire manually To straighten wires 1 Select the wires you want to straighten 2 Choose Edit Straighten Wires Place Labels This option lets you place the labels of all selected devices in their standard positions without rotating or mirroring Set Prop Delays Use Edit Set Prop Delays for Digital Logic Simulation only to alter the propagation delay of all selected devices The delay of a device determines how many simulation ticks it takes for a signal to propagate from the input to the output of the device 1 Select a device then choose Edit Set Prop Delay to display the dialog box pictured in Figure 102 2 Enter a new value for the delay then click OK Figure 102 Use the Edit Delay dialog box to alter the propagation delay of all selected devices The default delay for all devices is one 1 but by using Set Prop Delays you can change this value to any integer from 1 to 14 The units assigned to delay are arbitrary and it is left Chapter 10 Edit Menu 10215 to you to determine what they are The concept is that if one device has a delay of one and another a delay of three then in the real world the second device would have a propaga tion delay three times larger than the first device Set Designations Choose Edit Set Designations to display the Set Designa tions dialog box pictured in Figure 103 Use this feature to renumber devices designations of devices you have already placed in the schematic You can renumber all devices or a group of devices you have selected Figure 103 Use this dialog box to renumber device designations for all devices or a group of devices The Set Designations feature is useful if you want the devices in a schematic or a particular group of devices to have designations numbered with a certain range of num bers For example you might want to renumber all the resistors in your schematic R40 R41 R42 R43 and so on To renumber device designations 1 Unselect all devices that is dont select any devices to renumber all devices on the board OR Select a group of devices by holding the left mouse button while you draw a box around the devices OR Hold down the Shift key while clicking the devices you want to select 2 Choose Edit Set Designations 3 Type a number in the Starting Number text box 10216 Chapter 10 Edit Menu 4 Select All if you want all devices to be renumbered OR Click Selected Devices to renumber only those devices you have selected 5 Select Show Device Designations if you want the designations to appear in the schematic Designation assignments will start at the stated starting number and proceed from there skipping any designations that are already in use Note Set Designations is not the same thing as the Device Designations feature on the Options menu which numbers newly placed devices with a specified number or the next available number after the starting number you specify For more information see Device Designations in Chapter 12 Options Menu You can set the designation prefix for individual devices using the Edit Device Data dialog box described in Editing Devices of Chapter 4 Drawing and Editing Schematics Each device must have a unique designation in order for analog simulation to work Edit Edit Items While some item parameters can be edited by double clicking the item some item parameters cannot The Edit Items submenu provides editing access to all parameters The following sections describe the items on this submenu Edit Bus Connection This feature lets you modify the number associated with an existing wire that is connected to a bus wire see Figure 104 It also lets you select the angle on the connecting wire 1 Select the wire connected to a bus by clicking it once then choose Edit Edit Items Edit Bus Connection OR Doubleclick the wire with the Arrow Tool 2 Enter a new number or angle then choose OK Chapter 10 Edit Menu 10217 Figure 104 Use this dialog box to edit a wire connected to a bus Edit Bus Wire Number This feature lets you change the number associated with an existing bus wire 1 Select the bus wire to be edited by clicking it once and then choose Edit Edit Items Edit Bus Wire Number OR Doubleclick the bus wire with the Arrow Tool 2 Enter a new number then choose OK Edit Device Data Choose Edit Edit Items Edit Device Data to change device labels values SPICE data etc Refer to Chapter 4 Drawing and Editing Schematics for more information Edit Digital Params Choose Edit Edit Items Edit Digital Params to change digital SimCode device parameters Refer to Digital SimCode Devices in Chapter 16 Creating New Devices for details Edit RunTime Test Point Choose the Edit Edit Items Edit RunTime Test Point command to change the setting for the selected RunTime Test Point Refer to RunTime Test Points in Chapter 6 AnalogMixedSignal Simulation for details EditSelect Spice Model Use the Edit Edit Items EditSelect Spice Model option to change the SPICE model for the selected device Refer to SPICE Models in Chapter 16 Creating New Devices for details 10218 Chapter 10 Edit Menu Edit PROMRAM Use the Edit Edit Items Edit PROMRAM option Figure 105 to program the 32 x 8 PROM or the 1k x 8 RAM Once a PROM is programmed it retains its contents until repro grammed When you save a circuit containing a PROM to disk the contents of the PROM are also saved For debug ging purposes the contents of the RAM can be viewed and edited but the data will not be saved with the circuit 1 Click a single PROM or RAM to select it and then choose Edit Edit Items Edit PROMRAM OR Doubleclick the device with the Arrow Tool to display the dialog box pictured in Figure 105 2 Program the device as desired then choose OK Figure 105 Use this dialog box to enter either hexadecimal or binary numbers for the PROMRAM device Edit Pulser Use Edit Edit Items Edit Pulser to change the pro grammed settings of a Pulser The pulse format time high time low and trigger mode are individually programmable for each Pulser in the circuit For a complete description of the Pulser refer to The Pulser in Chapter 5 Digital Logic Simulation Chapter 10 Edit Menu 10219 Edit Multimeter This feature allows you to change the function of the selected digital multimeter device not the Multimeter analysis window 1 Select the Multimeter by clicking it once then choosing Edit Edit Items Edit Multimeter OR Doubleclick the device with the Arrow Tool Refer to Multimeter in Chapter 6 AnalogMixedSignal Simulation for additional information Edit InputOutput This feature Figure 106 lets you change the name associ ated with an INPUT or OUTPUT device 1 Select the Input or Output device by clicking it once then select Edit Edit Items Edit InputOutput OR Doubleclick the device with the Arrow Tool Figure 106 Change an InputOutput name Edit Data Sequencer Use the Edit Data Sequencer option to change the pro grammed settings of a Data Sequencer This device lets you specify up to 32K bytes which can be outputted in a defined sequence 1 Select a Data Sequencer by clicking it once then choosing Edit Edit Items Edit Data Sequencer OR Doubleclick the Data Sequencer with the Arrow Tool 10220 Chapter 10 Edit Menu For a complete description of the Data Sequencer refer to Data Sequencer in Chapter 5 Digital Logic Simulation Edit Signal Generator Use Edit Signal Generator to change the programmed settings of the selected multifunction signal generator For a complete description of the signal generator refer to Multifunction Signal Generator in Chapter 6 Analog MixedSignal Simulation Edit ScopeProbe Name This feature see Figure 107 lets you change the name of an existing SCOPE or Analysis Probe 1 Select the scope or probe by clicking it once then choose Edit Edit Items Edit ScopeProbe Name OR Doubleclick the scope or probe with the Arrow Tool 2 Type a new name 3 Click Netlist to display the Edit Device Data dialog box Figure 107 This dialog box lets you change the name of an existing SCOPE or Analysis Probe Group Items Use this option to specify the devices that are contained within the same package For example a 7400 Quad 2Input NAND gate actually has 4 gates in the same package The pin numbers are different for each gate The individual gates are grouped together automatically as they are placed in the circuit You could regroup the gates using this feature Chapter 10 Edit Menu 10221 To group items 1 Select the items that you want to group in the same package 2 Choose Edit Group Item Font Choose Font Figure 108 to change the font attributes of any selected freefloating text field or the default font for new text Figure 108 Use the Font dialog box to change the font for freefloating text fields or new text To change the font 1 Select the text by highlighting it 2 Choose Edit Font 3 Make the desired changes and choose OK 10222 Chapter 10 Edit Menu Chapter 11 Macros Menu 11223 Macros Menu C H A P T E R 11 Using commands in the Macros menu you can expand CircuitMaker to meet your exact needs This chapter describes the options used to create edit and manipulate macros Refer to Chapter 16 Creating New Devices for a stepbystep tutorial about creating macro devices New Macro Select New Macro to create a new schematic symbol to add to the library If there is a circuit displayed CircuitMaker asks if you want that circuit included inside the macro for simulation Macros are saved in a disk file called USERLIB and once created are available for use in any circuit or in another macro device Edit Macro To edit a macro follow these steps 1 Expand the macro by highlighting it and choosing Macros Expand Macro Note When a macro is expanded the workspace will be cleared If necessary save your work beforehand 2 Click the expanded macros symbol to select it 3 Choose Macros Edit Macro to edit its name device data or symbol You can also doubleclick the expanded macros symbol with the Arrow Tool If an existing macro is expanded and saved with a new name it is saved as a new macro and does not overwrite the existing macro The dialog box shown in Figure 111 appears when you use Edit Macro feature If no macro either a newly defined or an expanded one is present in the work area the Edit Macro menu item is grayed indicating that it is not available 11224 Chapter 11 Macros Menu Figure 111 Use this dialog box to change an existing macro You can define a macro as having multiple parts per pack age that is you may specify that there are more than one of these macro circuits all identical in a single chip Save Macro Use the Macros Save Macro option to save or resave a macro device An existing macro saved in this manner will be placed in its original position in the device library All devices require a Major Device Class designation so if you use the Save Macro option to save a new macro CircuitMaker displays the Macro Utilities dialog box allowing you to specify both a major and minor class To save an existing macro in a new location refer to the Macro Utilities later in this chapter To save under a different name refer to Edit Macro Macro devices are stored in the USERLIB file Expand Macro Use the Macros Expand Macro option to edit a previously saved macro device Expanding a macro device means that the black box containing the macros circuitry is opened and all internal circuitry is visible Note Most of the devices included with CircuitMaker are not macro devices and cannot be expanded To expand a macro follow these steps 1 Click a single macro device to select it 2 Choose Macros Expand Macro OR Click the Macro button on the Toolbar Chapter 11 Macros Menu 11225 An alert box appears warning that expansion of the macro will clear the work area Note If you havent saved your work click the Cancel button to abort the expansion save the current workspace and then reselect Expand Macro If you dont need to save the work area click OK to complete the expansion of the macro 3 Make changes to an expanded macro using any of the available editing commands 4 When you have finished making changes to the macro choose Macros Save Macro Macro Lock An instructor may want to lock a macro so that it cannot be expanded by the students thus creating a black box To lock a macro follow these steps 1 Expand the macro 2 Click the expanded macros symbol to select it 3 Choose Macros Macro Lock to display the dialog box pictured in Figure 112 Figure 112 Use the Macro Lock feature to lock a macro as a black box Enter any number up to 4 digits then save the macro When you attempt to expand the macro again you will be prompted to enter the 4digit code A code of 0 zero leaves the macro unlocked Warning If you forget the code you will be unable to expand the macro 11226 Chapter 11 Macros Menu Macro Utilities The Macro Utilities option on the Macros menu displays the dialog box pictured in Figure 113 which enables you to save expand or delete a macro The following sections describe the use of these features Figure 113 The Macro Utilities dialog box lets you save expand or delete a macro Save Macro The Save Macro button on the Macro Utilities dialog box lets you to save or resave a macro device If there is no macro expanded or newly defined in the work area this button is grayed Refer also to the section Save Macro described earlier in this chapter To save a macro follow these steps 1 Select both a major and minor device class to indicate where the device is saved in the device library Note You can add new major and minor class names by typing in a new name in the Major Device Class and Minor Device Class text edit fields 2 Click Save Macro CircuitMaker saves the macro in the USERLIB file and clears the workspace Chapter 11 Macros Menu 11227 Class Selected Device Use the Add and Remove buttons in the Class Selected Drive group box to move devices into different major and minor device classes To use this group box follow these steps 1 Select the device in the circuit window 2 Choose Macros Macro Utilities 3 Select the major and minor device classes from the list boxes 4 Click Add to add the device to the selected classes OR Click Remove to remove the device from the selected classes If a device is removed from all classes it will be inserted in the User Defined major class To remove a device completely see Delete Macro below Expand Macro Use the Expand button in ExpandDelete Macro group box to perform the same function explained earlier in this chapter To expand a macro device select the macro then click the Expand button Delete Macro Use the Delete button in the ExpandDelete Macro group box to delete a macro device from the USERLIB file Warning You cannot open a circuit which uses a macro that has been deleted from the library unless you first create a new macro with the same name To delete a macro device follow these steps 1 Save the workspace if you need to save When the macro is deleted the workspace will be cleared 2 Make a backup of the USERLIB file before you create or delete macros in case something goes wrong and you want to restore the original library 11228 Chapter 11 Macros Menu Note Most of the devices listed in the Macro Utilities dialog box are actually in the DEVICELIB file and cannot be deleted 3 Select the macro 4 Click Delete Macro Model Data Use the Model Data button on the Macro Utilities dialog box to add new SPICE models to CircuitMakers library This button displays a dialog box that lets you place new references into the linking file for selected symbol Refer to Model and Subcircuit Linking Files in Chapter 16 Creating New Devices Macro Copier The following steps illustrate how you can use the Macro Copier to copy your macros into a new version of USERLIB 1 Choose Macros Macro Copier to display the dialog box pictured in Figure 114 Figure 114 Use this dialog box to copy macros from one macro library to another 2 Click lower left Open button to display the Open dialog box CircuitMaker asks you if you want to list only the user defined devices Chapter 11 Macros Menu 11229 3 If you are copying devices that you have created click Yes 4 Select the file from which macros will be copied This is the library file which has your macros in it probably USERLIB in your old CircuitMaker directory 5 Click the lower right Open or New button to display either the Open or the Save As dialog box 6 Select the file to which macros will be copied This is usually the USERLIB file in your new CircuitMaker directory 7 Select a macro to copy from the left hand file list If a macro already exists with the same name CircuitMaker will delete the existing macro 8 Click the Copy button CircuitMaker might prompt you for information regard ing the simulation mode for which the device is in tended If the device can be used in digital simulations check the Digital box if it can be used in analog simulations check the Analog box If it can be used in either simulation mode check both boxes Save ASCII Library Use Save ASCII Library to write the currently loaded USERLIB file to an ASCII file CircuitMaker displays a file selector dialog box asking for the name of the ASCII file In this format user defined symbols which have been saved in Windows metafile or bitmap format will be lost and replaced by a simple rectangle The pins however remain intact The ASCII format is used for conversion between 16 and 32bit systems This library may be converted back to binary format by choosing Macros Convert ASCII Library Convert ASCII Library Use Convert ASCII Library to convert an ASCII user library file created with the Save ASCII Library option to binary format CircuitMaker displays a file selector dialog box asking for the name of the ASCII user library file to be converted Then a second file selector dialog appears 11230 Chapter 11 Macros Menu asking for the name of the new binary file This option is provided for compatibility between 16 and 32bit systems Update Search List Use this feature to refresh the SEARCHDBDAT file Normally the SEARCHDBDAT file is updated automatically when necessary If for any reason the Device Search list seems incorrect or out of date you can create a new search list file by choosing Macros Update Search List Chapter 12 Options Menu 12231 Options Menu C H A P T E R 12 The Options menu contains commands which enable you to control various display editing and simulation options Auto Repeat This option lets you control how devices are selected from the library If Auto Repeat is checked as soon as a device is selected from the library and placed another identical device is automatically selected and made ready for placement This repeat placement process continues until you cancel it by pressing any key on the keyboard or by doubleclicking the mouse If Auto Repeat is not checked you must select and place each device separately Auto Refresh This option lets you control the refresh mode When Auto Refresh is on the screen refreshes automatically as the circuit is edited When it is disabled the screen must be refreshed manually while editing see the Refresh Screen option in the Edit menu Disabling this option lets you work more quickly on a slower computer system Quick Connect This option allows you to simply place a device pin on a wire or other device pin and CircuitMaker will automatically wire the parts together for you By default Quick Connect is enabled when you start CircuitMaker See Wiring in Chapter 4 Drawing and Editing Schematics for more details Device Designations CircuitMaker automatically assigns a designation to each device when it is placed Use the Device Designations dialog box pictured in Figure 121 to specify certain designation options 12232 Chapter 12 Options Menu Figure 121 Use this dialog box to specify designation options for new devices you place in the schematic Compare the Device Designations feature with the Set Designations feature which renumbers the designations of already placed devices To change device designation options 1 Choose Options Device Designations 2 Select Show Designation For New Devices to show the designation for all new devices that you place 3 Type a number in the Starting Designation Number text box The devices that you place hereafter use the number you specified as the starting number or the next available number after the specified starting number For example if the starting number is 10 and the schematic contains resistors R10 R11 and R12 then the next resistor placed would be assigned the designation R13 ArrowWire This option when checked allows you to initiate a wire by clicking once on a device pin with the Arrow Tool You can only use the Arrow Tool to initiate a wire on a device pin or to extend an existing wire You cannot initiate a wire from the middle of another wire using the Arrow Tool as you can with the Wire Tool This option can be used for both auto and manual routing Cursor Tools This submenu provides an alternate method of selecting the Arrow Wire Text Delete Zoom Probe and Help Tools Chapter 12 Options Menu 12233 Show Pin Dots This option allows you to control how connections between wires and devices are drawn If Show Pin Dots is checked connections between wires and devices will be shown by a small dot where the connection occurs If Show Pin Dots is not checked the connecting dots will not be drawn Dots showing where wires connect to other wires are always displayed Show Bus Labels This option displays bus labels numbers by putting a small numbered box at the end of each bus wire and also shows the number of each bus connection wire next to the corresponding bus connection Show Page Breaks This option displays the page divisions of a multipage circuit when it is sent to the printer The Show Page Breaks option is also useful when positioning a circuit on a single page The page breaks you see on your screen are based on the printer selection paper size and scaling factor Moveable Page Breaks Click and drag a page break to move it When the cursor is over a page break it will change to a doubleended arrow indicating which direction you can move the page break see Figure 125 for an example of the doubleended arrow page break cursor Move a horizontal page break up and down Move a vertical page break left and right Moving any page break changes the print scale both horizontally and verti cally When moving a page break the print scale is displayed where the schematic windows title usually appears Show Node Numbers This option displays the node number for each node in your circuit The number is shown at the center of the longest wire segment of each node The node numbers which are determined by CircuitMaker are used for simulation pur poses They correspond to the variable names used in the analog analysis windows and can be used as a reference when viewing waveforms 12234 Chapter 12 Options Menu Show Prop Delays Use Show Prop Delays to display the propagation delay of all devices in the circuit If Show Prop Delays is checked the delay values for each device will be shown within a rounded rectangle located at the center of each device Some devices pulsers LEDs macro devices etc do not have a delay so no value will be shown on them In the case of macro devices the delay is determined by the individual delay setting of each device contained within the macro If Show Prop Delays is not checked all devices will be drawn in normal form without the delay value being visible To change the propagation delay of one or more devices select Edit Set Prop Delays Device Display Data This feature pictured in Figure 122 allows you to quickly change the display settings of all selected devices If the display item is currently visible on some of the selected devices but not on others the check box will be gray Refer to Editing Devices in Chapter 4 Drawing and Editing Schematics for more information Figure 122 Use the Device Display Data dialog box to quickly change the display settings of all selected devices Circuit Display Data This feature as seen in Figure 123 allows you to tempo rarily override the display settings of every device in the entire circuit The buttons at the top of each column will quickly change the settings for the entire column or you can change individual items by clicking on the radio buttons The Default setting tells CircuitMaker to use the Visible settings of each individual device Refer to Editing Devices in Chapter 4 Drawing and Editing Schematics Chapter 12 Options Menu 12235 Figure 123 Use the Circuit Display Data dialog box to temporarily override the display settings of every device in the circuit Grid Use the Grid option to turn the alignment grid of the circuit window on or off see Figures 124 and 125 The grid is useful as an aid in precisely aligning objects Use Snap To Grid to place new devices devices not already in a circuit according to the specified grid It also lets you move old devices devices already in the circuit according to the selected grid relative to their original position Note When you place a device exactly on the grid it always remains on the grid regardless of scroll position However Snap To Grid does not guarantee alignment of component pins Figure 124 Use the Grid Setup dialog box to turn the alignment grid on or off 12236 Chapter 12 Options Menu Figure 125 Use the Border Grid Title Block options to enhance the appearance of your schematic Title Block Use the Title Block option see Figure 125 for an example to add a title box to the lower right corner of the page The title block contains the following fields Name Title Revision ID Date and Page The Name and Title fields expand in height to handle multiple rows of text If you leave the Name or Title fields blank CircuitMaker excludes them from the title block The title block also expands in width according to the amount of text that you enter You can print the title block on the first page on the last page or on all pages Grid Moveable Page Breaks Border Title Block Chapter 12 Options Menu 12237 Additionally you can print the full title block on the first page and a reduced title block that is one that does not include the Name and Title fields on subsequent pages Border Use this option to quickly locate devices by displaying a coordinate grid system around your schematic see Figure 125 for an example For example suppose you want to find a device that you know is located in the B5 grid square By drawing an imaginary line from the letter B and the number 5 on the margins of the schematic the intersection of these lines locates the grid square containing the device To add a border to your schematic drawing 1 Choose Options Border to display the dialog box pictured in Figure 126 2 Select Display Border On Screen to display a border that outlines the total allowed schematic area 3 Select Do Not Print if you dont want to print the border OR Select Print Around Entire Schematic to print the border so that it is only on the outside edges of the outside pages making a border around the entire schematic when the pages are arranged together OR Select Print Around Each Page to print the complete border on each page of your schematic Figure 126 Use the Border feature to add a coordi nate system border around your schematic for easily locating devices 12238 Chapter 12 Options Menu Chapter 13 View and Window Menus 13239 View Window Menus C H A P T E R 13 The View and Window menus contain features that give you control of various display options and windows If a check mark is shown beside an item then the item is currently enabled if a check mark is not shown beside an item it is not currently enabled The View Menu Toolbar Use the Toolbar option to display or hide the Toolbar For an overview of all Toolbar options see Chapter 2 Getting Started and Chapter 4 Drawing and Editing Schematics Colors The Colors feature Figure 131 lets you select the color associated with several functions low level and high level and items Logic Display color Hex and ASCII Key Cap color For example to change the color of individual LEDs follow these steps 1 Select one or more LEDs 2 Choose View Colors or doubleclick the LED 3 Change color for the SelLEDs item 13240 Chapter 13 View and Window Menus Figure 131 Use the Select Colors dialog box to change the color of different types of items The color you select in this example becomes the default LED color for all new LEDs You can change Logic Display colors by doubleclicking them You can also individually select the color of 7segment displays analog waveforms etc 4 Choose All Items in the Select Colors dialog box list to set everything except the background to the same color 5 Click Defaults to restore everything to its original color 6 Click Save Selections to save the selected colors even after quitting CircuitMaker Display Scale This feature lets you select the scale at which a circuit is displayed It also lets you select the Scale Step of the Zoom Tool See Figure 132 Figure 132 This dialog box controls the scale of the displayed circuit and the scale step of the Zoom Tool Chapter 13 View and Window Menus 13241 Normal SizePosition This feature changes the circuit display scale to 100 and moves the horizontal and vertical scroll bars to their home positions Fit Circuit to Window This feature will reduce or enlarge the circuit by changing the Display Scale and scroll bar positions so that the entire circuit can be displayed within the circuit window Refresh Screen Choose Refresh Screen to redraw the entire circuit Redraw ing may be desirable following a command or operation which causes parts of the screen to become messy Also see Auto Refresh in Chapter 12 Options Menu The Window Menu Cascade Windows This command will arrange all open windows in a cascaded stacked order Tile Windows This command will arrange all open windows in a tiled adjacent order Window Each window that is open or can be opened with the available simulation data is listed in this menu Selecting a window from this menu will open it and bring it to the front 13242 Chapter 13 View and Window Menus Chapter 14 Simulation Menu 14243 Simulation Menu C H A P T E R 14 The Simulation menu contains options that let you choose a simulation type and different kinds of analyses DigitalAnalog Mode This works just like the DigitalAnalog button on the Toolbar which is described in the simulation chapters 5 6 The name that is displayed in the menu is the simulation mode that is currently selected Analyses Setup Use the Analyses Setup dialog box to setup the SPICE analyses you want to perform as well as simulation options such as temperature tolerances etc For more information see Analyses Setup and Analog Options in Chapter 6 AnalogMixedSignal Simulation Digital Options Use this dialog box to control the size of a step when running the simulation in single step mode to set the conditions for break points and to set the simulation speed Refer to the section Digital Options in Chapter 5 Digital Logic Simulation Check Pin Connections Use Check Pin Connections to check the entire schematic and be informed of any devices that have unconnected pins Reset This works just like the Reset button in the Toolbar which is described in Chapter 5 Digital Logic Simulation and Chapter 6 AnalogMixedSignal Simulation 14244 Chapter 14 Simulation Menu Step This works just like the Step button in the Toolbar which is described in Chapter 5 Digital Logic Simulation Run This works just like the Run button in the Toolbar which is described in Chapter 5 Digital Logic Simulation and Chapter 6 AnalogMixedSignal Simulation Trace This works just like the Trace button in the Toolbar which is described in Chapter 5 Digital Logic Simulation Display Waveforms This works just like the Waveforms button in the Toolbar which is described in Chapter 5 Digital Logic Simulation and Chapter 6 AnalogMixedSignal Simulation Scope Probe This option when checked causes the logic levels detected by the Probe Tool to be displayed in the digital Waveforms window while running digital simulation Display Variable Names The Display Variable Names option replaces the A B C labels used on the analog analysis graphs with the variable names such as V8 etc This allows you to identify the various points in the circuit more consistently with those being graphed in analysis windows Chapter 15 SPICE Beyond the Basics 15245 SPICE Simulation Program with Integrated Circuit Emphasis This chapter discusses strategies for troubleshooting SPICE convergence SPICE option variables and SPICEs elemen tary devices Use this information as a companion and reference as you complete the tasks in Chapter 6 Analog MixedSignal Simulation Troubleshooting SPICE Convergence Berkeley SPICE3 uses simultaneous linear equations expressed in matrix form to determine the operating point DC voltages and currents of a circuit at each step of the simulation The circuit is reduced to an array of conduc tances which are placed in the matrix to form the equations G V I When a circuit includes nonlinear elements SPICE uses multiple iterations of the linear equations to account for the nonlinearities SPICE makes an initial guess at the node voltages then calculates the branch currents based on the conductances in the circuit SPICE then uses the branch currents to recalculate the node voltages and the cycle is repeated This cycle continues until all of the node voltages and branch currents fall within specified tolerances converge However if the voltages or currents do not converge within a specified number of iterations SPICE produces error messages such as singular matrix Gmin stepping failed source stepping failed or iteration limit reached and aborts the simulation SPICE uses the results of each simulation step as the initial guesses for the next step If you are performing a Transient Analysis that is time is being stepped and SPICE cannot converge on a solution using the specified timestep the timestep is automatically reduced and the cycle is repeated If the timestep is reduced too far SPICE displays a Timestep too small message and aborts the simulation Use the Analog Options dialog box to specify the tolerances and iteration limits for the various analyses C H A P T E R 15 SPICE Beyond the Basics 15246 Chapter 15 SPICE Beyond the Basics The Operating Point may fail to converge for various reasons For example the initial guesses for the node voltages may be too far off the circuit may be unstable or bistable there may be more than one solution to the equations there may be discontinuities in the models or the circuit may contain unrealistic impedances Use the following techniques to solve most convergence problems When you have a convergence problem first identify which analysis is causing the problem Keep in mind that the Operating Point analysis is generally performed automatically before each of the other analyses even if you have disabled Operating Point Analysis in the Analyses Setup dialog box Begin with step 1 then consider the recommendations as needed to solve the error Solving Operating Point Analysis Failures 1 Check the circuit topology and connectivity specifi cally Make sure the circuit is correctly wired Dangling nodes and stray parts are not allowed The RSHUNT option can be used to overcome these problems Dont confuse zeros with the letter O Use proper SPICE multipliers MEG instead of M for 1E6 Dont put a space between values and multipliers 10uF not 10 uF Every circuit must have a ground node and every node in the circuit must have a DC path to ground Make sure no sections of your circuit are isolated from ground by transformers capacitors etc Do not use series capacitors or current sources Do not use parallel inductors or voltage sources Make sure all devices and sources are set to their proper values Make sure all dependent source gains are correct Make sure your modelssubcircuits have been correctly entered Chapter 15 SPICE Beyond the Basics 15247 2 Increase ITL1 to 300 in the Analog Options dialog box This will allow the OP Analysis to go through more iterations before giving up 3 Add NODESET devices If the initial guess of a node voltage is way off the NODESET device can be used to set it to a more realistic value see NODESET later in this chapter 4 Add resistors and use the OFF keyword Specify the series resistance parameters of your models and increase the GMIN option by a factor of 10 Specify the initial condition of semiconductor devices especially diodes as OFF 5 Use initial conditions Enable the UIC check box for Transient Analysis in the Analyses Setup dialog box Place IC devices in your circuit or set the applicable initial conditions to assist in the initial stages of the Transient Analysis Solving DC Analysis Failures 1 Check the circuit topology and connectivity See the common mistakes listed under Step 1 of Solving Operating Point Analysis Failures earlier in this chapter 2 Increase ITL2 to 200 in the Analog Options dialog box This will allow the DC Analysis to go through more iterations for each step before giving up 3 Make the steps in the DC sweep larger or smaller If discontinuities exist in a device model perhaps between the linear and saturation regions of the model increas ing the step size may allow the simulation to step over the discontinuity Making the steps smaller will allow the simulation to resolve rapid voltagetransition discontinuities 4 Do not use DC Analysis Some problems such as hysteresis cannot be resolved by DC Analysis In such cases it is more effective to use Transient Analysis by ramping the appropriate power sources 15248 Chapter 15 SPICE Beyond the Basics Solving Transient Analysis Failures 1 Check the circuit topology and connectivity See the common mistakes listed under Step 1 of Solving Operating Point Analysis Failures earlier in this chapter 2 Set RELTOL to 001 in the Analog Options dialog box By increasing the tolerance from 0001 01 accuracy fewer iterations will be required to converge on a solution and the simulation will complete much more quickly 3 Increase ITL4 to 100 in the Analog Options dialog box This will allow the Transient Analysis to go through more iterations for each timestep before giving up 4 Reduce the accuracy of ABSTOLVNTOL if current voltage levels allow Your particular circuit may not require resolutions down to 1uV or 1pA You should allow at least an order of magnitude below the lowest expected voltage or current levels of your circuit 5 Realistically model your circuit Add realistic parasitics especially strayjunction capacitance Use RC snubbers around diodes Replace device models with subcircuits especially for RF and power devices 6 Increase the risefall times of the Pulse Generators Even the best pulse generators cannot switch instanta neously 7 Change the integration method to Gear Gear integration requires longer simulation time but is generally more stable than the trapezoidal method Gear integration may be particularly useful with circuits that oscillate or have feedback paths Chapter 15 SPICE Beyond the Basics 15249 SPICE Option Variables Use SPICE option variables to control certain aspects of a simulation such as iteration limits temperature etc To change the value of a SPICE option variable 1 Choose Simulation Analyses Setup Analog Options to display the Analog Options Spice Variables dialog box pictured in Figure 151 2 Select a variable and type the new value into the Option Value edit field 3 If you want to set a specific option to its default value type an asterisk in the Value edit field Figure 151 This dialog box lists the SPICE option variables which you can change An asterisk in the dialog box denotes default values for each option Following is a list of the options and their effect on the simulation See Setting Up AnalogSPICE Variables in Chapter 6 AnalogMixedSignal Simulation for informa tion about the other option in the Analog Options Spice Variables dialog box 15250 Chapter 15 SPICE Beyond the Basics Option What it Does ABSTOL Sets the absolute current error tolerance of the program Set ABSTOLRELTOL lowest current magnitude in the circuit Default1 picoamp CHGTOL Provides a lower limit on capacitor charge or inductor flux used in the LTE timestep control algorithm Default10e14 coulombs DEFAD Sets the MOS drain diffusion area Default00 meters2 DEFAS Sets the MOS source diffusion area Default00 meters2 DEFL Sets the MOS channel length Default1000 micrometer DEFW Sets the MOS channel width De fault1000 micrometer GMIN Sets the minimum conductance maximum resistance of any device in the circuit It also sets the value of the conductance that is placed in parallel with each pn junction in the circuit Default10e12 mhos Note Raising this value may help with simulation convergence in many circuits but might decrease accuracy ITL1 Sets the Operating Point Analysis iteration limit Default100 iterations Note This may need to be raised as high as 500 for many circuits ITL2 Sets the DC Analysis iteration limit Default50 iterations Note This may need to be raised as high as 200 for some circuits ITL3 Sets the lower Transient Analysis iteration limit Default4 iterations Note This is not implemented in Chapter 15 SPICE Beyond the Basics 15251 SPICE3 It is provided in CircuitMaker for compatibility in creating SPICE2 netlists ITL4 Sets the Transient Analysis timepoint iteration limit Default10 iterations Note Raising this value to 100 or more may help to eliminate timestep too small errors improving both convergence and simulation speed ITL5 Sets the Transient Analysis total iteration limit Default5000 iterations Note This is not implemented in SPICE3 It is provided in CircuitMaker for compatibility in creating SPICE2 netlists PIVREL Sets the relative ratio between the largest column entry in the matrix and an acceptable pivot value The value must be between 0 and 1 Default10e3 In the numerical pivoting algorithm the allowed minimum pivot is determined by EPSRELAMAX1PIVRELMAXVAL PIVTOL where MAXVAL is the maximum element in the column where a pivot is sought partial pivoting PIVTOL Sets the absolute minimum value for a matrix entry to be accepted as a pivot Default10e13 RELTOL Sets the relative error tolerance of the program The value must be between 0 and 1 Default is 0001 01 Larger values mean faster simulation time but less accuracy TEMP Sets the actual operating temperature of the circuit Any deviation from TNOM will produce a change in the simulation results Default27C Note TEMP can be overridden by a temperature specification on any temperature dependent instance 15252 Chapter 15 SPICE Beyond the Basics TNOM Sets the nominal temperature for which device models are created Default27C Note TNOM can be overridden by a specification on any temperature dependent device model TRTOL Used in the LTE timestep control algorithm This is an estimate of the factor by which SPICE overestimates the actual truncation error Default70 VNTOL Sets the absolute voltage tolerance of the program Set VNTOL RELTOL lowest voltage magnitude in the circuit Default1 microvolt BOOLL Sets the low output level of a boolean expression Default00V BOOLH Sets the high output level of a boolean expression Default45V BOOLT Sets the input threshold level of a boolean expression Default15V BADMOS3 Uses the older version of the MOS3 model with the kappa discontinuity DefaultNO dont use the older version KEEPOPINFO Retains the operating point informa tion when an AC Analysis is run Note This is particularly useful if the circuit is large and you do not want to run a redundant Operating Point Analysis DefaultNO run OP each time TRYTOCOMPACT Applicable to the LTRA model When specified the simulator tries to condense LTRA transmission lines past history of input voltages and currents DefaultNO dont com pact NOOPITER Skip directly to GMIN stepping algorithm DefaultNO dont skip Chapter 15 SPICE Beyond the Basics 15253 GMINSTEP Sets the number of steps in the GMIN stepping algorithm When set to 0 GMIN stepping is disabled making source stepping the simulators default DC operating point conver gence algorithm Default10 steps SRCSTEP Sets the number of steps in the source stepping algorithm for DC operating point convergence Default10 steps ACCT Causes accounting and runtime statistics to be displayed DefaultNO no display LIST Displays a comprehensive list of all elements in the circuit with connectiv ity and values DefaultNO no list OPTS Displays a list of all standard SPICE3 Option parameter settings DefaultNO no list BYPASS Enables the device bypass scheme for nonlinear model evaluation Default1 on MINBREAK Sets the minimum time between breakpoints Default0 seconds sets the time automatically MAXOPALTER Sets the maximum number of analog event alternations for DC operating point convergence Default0 MAXEVTITER Sets the maximum number of event iterations for DC operating point convergence Default0 NOOPALTER Enables DC operating point alterna tions DefaultNO RAMPTIME Controls turnon time of independent sources and capacitor and inductor initial conditions from zero to their final value during the time period specified Default00 seconds 15254 Chapter 15 SPICE Beyond the Basics CONVLIMIT Disables convergence algorithm used in some builtin component models DefaultNO CONVSTEP Sets the limit of the relative step size in solving for the DC operating point convergence for code model inputs Default025 CONVABSSTEP Sets the limit of the absolute step size in solving for the DC operating point convergence for code model inputs Default01 AUTOPARTIAL Enables the automatic computation of partial derivatives for XSpice code modules DefaultNO PROPMNS Sets scale factor used to determine minimum propagation delay when actual value is not specified in SimCode model Default05 50 of typical propagation delay PROPMXS Sets scale factor used to determine maximum propagation delay when actual value is not specified in SimCode model Default15 150 of typical propagation delay TRANMNS Sets scale factor used to determine minimum transition time when actual value is not specified in SimCode model Default05 50 of typical transition time TRANMXS Sets scale factor used to determine maximum transition time when actual value is not specified in SimCode model Default15 150 of typical transition time LOADMNS Sets scale factor used to determine minimum input loading maximum input resistance when actual value is not specified in SimCode model Chapter 15 SPICE Beyond the Basics 15255 Default15 150 of typical input resistance LOADMXS Sets scale factor used to determine maximum input loading minimum input resistance when actual value is not specified in SimCode model Default05 50 of typical input resistance DRIVEMNS Sets scale factor used to determine minimum output drive capacity maximum output resistance when actual value is not specified in SimCode model Default15 150 of typical output resistance DRIVEMXS Sets scale factor used to determine maximum output drive capacity minimum output resistance when actual value is not specified in SimCode model Default05 50 of typical output resistance CURRENTMNS Sets scale factor used to determine minimum supply current maximum internal resistance when actual value is not specified in SimCode model Default15 150 of typical internal resistance CURRENTMXS Scale factor used to determine maximum supply current minimum internal resistance when actual value is not specified in SimCode model Default05 50 of typical internal resistance TPMNTYMX Temporary global override for propagation delay index on SimCode devices 0default 1min 2typ 3max Default0 TTMNTYMX Temporary global override for transition time index on SimCode devices 0default 1min 2typ 3max Default0 15256 Chapter 15 SPICE Beyond the Basics LDMNTYMX Temporary global override for input loading index on SimCode devices 0default 1min 2typ 3max Default0 DRVMNTYMX Temporary global override for output drive capacity index on SimCode devices 0default 1min 2typ 3max Default0 IMNTYMX Temporary global override for supply current index on SimCode devices 0default 1min 2typ 3max Default0 SIMWARN A nonzero value indicates that SimCode warning messages can be displayed during run time SimCode warnings may include information concerning timing violations tsetup thold trec tw etc or indicate supply voltage dropping below device specifications Default0 RSHUNT Value in ohms of resistors added between each circuit node and ground helping to eliminate problems such as singular matrix errors In general the value of RSHUNT should be set to a very high resistance 1e12 Default0 no shunt resis tors ADCSTEP The minimum step size required to register an event on the input of the internal AD converters Default001 volts Chapter 15 SPICE Beyond the Basics 15257 SPICEs Elementary Devices Each device used in a circuit requires certain information for the SPICE simulation to run This section describes each type of device and information that each requires CircuitMaker provides this information to the SPICE netlist provided you properly draw and label the circuit See Editing Devices in Chapter 4 Drawing and Editing Schematics for more information The information provided here will help you better under stand how each of the components affects the simulation of the circuit Parameters that are enclosed in symbols are optional Refer to Chapter 16Creating New Devices for more information about the models mentioned here Resistors General Form RXXXXXXX N1 N2 VALUE Netlist Example R1 1 2 10K Spice Data Example D 1 2 V N1 and N2 are the two element nodes Value is the resistance in ohms and may be positive or negative but not zero If N1 is at a higher voltage than N2 the current flow through the resistor is positive If N2 is at a higher voltage than N1 the current flow is negative See Also Resistor Var Resistor example circuit ANALOGCKT Semiconductor Resistors General Form RXXXXXXX N1 N2 VALUE MNAME LLENGTH WWIDTH TEMPT Netlist Examples R1 1 2 10K R3 5 6 RMODEL L12u W1u Spice Data Example D 1 2 M TEMP100 15258 Chapter 15 SPICE Beyond the Basics This is the more general form of the resistor It allows modeling of temperature effects and calculation of the actual resistance value from strictly geometric information and the specifications of the process If VALUE is specified it overrides the geometric information and defines the resistance If MNAME is specified then the resistance may be calculated from the process information in the model MNAME and the given LENGTH and WIDTH If VALUE is not specified then MNAME and LENGTH must be speci fied If WIDTH is not specified then it is taken from the default width given in the model The optional TEMP value is the temperature at which this device is to operate and overrides the temperature specification in the Analog Options dialog box Capacitors General Form CXXXXXXX N N VALUE ICINCOND Netlist Example C2 13 0 01UF C5 7 0 10UF IC3V Spice Data Example D 1 2 V IC12V N is the positive node and N is the negative node VALUE is the capacitance in Farads The initial condition is the initial timezero value of the capacitor voltage Initial conditions only apply if the UIC option is enabled for the Transient Analysis If N is at a higher voltage than N the current flow through the capacitor is positive If N is at a higher voltage than N the current flow is negative SPICE uses perfect capacitors that is capacitors with no DC leakage Since all nodes in a circuit must have a DC path to ground you cannot simulate a circuit with capacitors in series as this would completely isolate the nodes that are between the capacitors One solution to this problem is to connect a largevalue resistor such as 1gigaohm in parallel with each capacitor to account for the leakage resistance of that capacitor Chapter 15 SPICE Beyond the Basics 15259 See Also Capacitor Polar Cap Var Capacitor example circuit 555CKT Semiconductor Capacitors General Form CXXXXXXX N N VALUE MNAME LLENGTH WWIDTH ICINCOND Netlist Example C2 13 0 01UF C5 7 0 10UF CMODEL L12u W1u Spice Data Example D 1 2 M L10U This is the general form of the Capacitor and allows calcula tion of the capacitance value from strictly geometric informa tion and the specifications of the process If VALUE is specified it defines the capacitance If MNAME is specified then the capacitance is calculated from the process informa tion in the model MNAME and the given LENGTH and WIDTH If VALUE is not specified then MNAME and LENGTH must be specified If WIDTH is not specified then it is taken from the default width given in the model Specify VALUE or MNAME LENGTH and WIDTH not both Inductors General Form LYYYYYYY N N VALUE ICINCOND Netlist Example L3 12 9 1UH L4 5 0 100UH IC123MA Spice Data Example D 1 2 V IC5MA N is the positive node and N is the negative node VALUE is the inductance in Henries Initial condition which applies only if UIC is enabled for Transient Analysis is the initial timezero value of the inductor current If N is at a higher voltage than N the current flow through the inductor is positive If N is at a higher voltage than N the current flow is negative 15260 Chapter 15 SPICE Beyond the Basics Inductors induce voltage across their coils based on the amount of magnetic flux consider them as voltage sources and therefore inductors in SPICE Dont connect them directly in parallel Solution connect a smallvalue resistor such as 0001 ohms in series with each inductor to account for the winding resistance of that inductor See Also Inductor Var Inductor Coil 3T Coil 5T see RESONANTCKT Coupled Mutual Inductors General Form KXXXXXXX LYYYYYYY LZZZZZZZ VALUE Netlist Examples K12 L4 L3 0999 KXFRMR L1 L2 087 Spice Data Example centertap inductor DA 1 2 50UH inductor A DB 2 3 50UH inductor B KD DA DB 85 inductive coupling LYYYYYYY and LZZZZZZZ are the names of two coupled inductors and VALUE is the coefficient of coupling K which must be greater than 0 and less than or equal to 1 Using the dot convention place a dot on the first node of each inductor indicating that the voltages at these node are in phase the voltages go up and down together If more than two inductors are being coupled SPICE data must be provided for each coupling For example a trans former with one primary coil L1 and two secondary coils L2 and L3 might be expressed as follows L1 5 0 10MH L2 6 7 1MH L3 8 9 1MH K12 L1 L2 093 K13 L1 L3 093 K23 L2 L3 097 The turns ratio for a given pair of windings can be deter mined by the following formula where LP and LS are the Note A transformer that is simulated in this manner will not reflect the impedance of the second ary winding back into the primary L1 L2 L3 5 0 6 7 8 9 Chapter 15 SPICE Beyond the Basics 15261 inductance of the primary and secondary windings respec tively Turns Ratio sqrtLSLP See Also Transformers example circuit VTPWRAMPCKT VoltageCurrent Controlled Switches General Form SXXXXXXX N N NC NC MODEL ONOFF WXXXXXXX N N VNAM MODEL ONOFF Netlist Examples S1 1 2 3 4 SVS1 VSwitch S2 5 6 3 0 SVS2 ON VSwitch W1 1 2 VS1 WIS1 ISwitch Spice Data Example D 1 2 3 4 M ON Nodes 1 and 2 are the nodes between which the switch terminals are connected ONOFF indicates the initial condition of the switch For the voltagecontrolled switch nodes 3 and 4 are the positive and negative controlling nodes respectively For the currentcontrolled switch the controlling current is that through the specified voltage source The direction of positive controlling current flow is from the positive node through the source to the negative node See Also ISwitch VSwitch example circuit SWITCHESCKT Independent Sources General Form VXXXXXXX N N DC VALUE AC MAG PHASE IYYYYYYY N N DC VALUE AC MAG PHASE 15262 Chapter 15 SPICE Beyond the Basics Netlist Examples VCC 10 0 DC 6 V Source ISRC 1 2 AC 3 45 SIN0 1 1MEG Signal Gen VMEAS 12 9 Ammeter Spice Data Example D 1 2 DC 0 SIN0 1 1k 0 0 AC 1 0 Signal Gen N is the positive node and N is the negative node Voltage sources need not be grounded Positive current is assumed to flow into the positive node through the source and out of the negative node A current source of positive value forces current to flow into the N node through the source and out of the N node Voltage sources in addition to being used for circuit excitation are the ammeters for SPICE that is zero valued voltage sources may be inserted into the circuit for the purpose of measuring current They of course have no effect on circuit operation since they represent shortcircuits VALUE is the DC operating point value or offset of the source If the source value is zero it may be omitted If the source is timeinvariant eg a power supply then the value can be preceded by the letters DC The letters AC indicate a smallsignal AC source MAG AC magnitude and PHASE AC phase are used for AC analysis only If MAG is omitted following the keyword AC a value of 1 is assumed If PHASE is omitted a value of 0 is assumed Any independent source can be assigned a timedependent value for Transient Analysis If a source is assigned a time dependent value the timezero value is used for DC operat ing point analysis There are five independent source functions pulse exponential sinusoidal piecewise linear and singlefrequency FM These are discussed in the Multifunction Signal Generator section of this chapter Note For SPICE simulation voltage sources cannot be placed directly in parallel and current sources cannot be placed directly in series See Also V V Source I Source Battery Signal Gen example circuit CEAMPCKT Chapter 15 SPICE Beyond the Basics 15263 Linear VoltageControlled Current Sources General Form GXXXXXXX N N NC NC VALUE Netlist Example G1 2 0 5 0 01MMHO Spice Data Example D 1 2 3 4 V N is the positive node and N is the negative node Current flow is from the positive node through the source to the negative node NC is the positive controlling node and NC is the negative controlling node VALUE is the transconductance in mhos Note For SPICE simulation current sources cannot be placed directly in series See Also VI Source example circuit 741CKT Linear VoltageControlled Voltage Sources General Form EXXXXXXX N N NC NC VALUE Netlist Example E1 2 3 14 1 20 Spice Data Example D 1 2 3 4 V N is the positive node and N is the negative node Current flow is from the positive node through the source to the negative node VALUE is the voltage gain Note For SPICE simulation voltage sources cannot be placed directly in parallel See Also VV Source 15264 Chapter 15 SPICE Beyond the Basics Linear CurrentControlled Current Sources General Form FXXXXXXX N N VNAM VALUE Netlist Example F1 5 17 VS2 05K Spice Data Example VD 3 4 DC 0V measures controlling current D 1 2 VD V current source N and N are the positive and negative nodes respectively Current flow is from the positive node through the source to the negative node VNAM is the name of a voltage source through which the controlling current flows The direction of positive controlling current flow is from the positive node through the source to the negative node of VNAM VALUE is the current gain Note You cannot place current sources directly in series for SPICE simulation See Also II Source Linear CurrentControlled Voltage Sources General Form HXXXXXXX N N VNAM VALUE Netlist Example H1 5 17 VS2 05K Spice Data Example VD 3 4 DC 0V measures controlling current D 1 2 VD V voltage source N and N are the positive and negative nodes respectively VNAM is the name of a voltage source through which the controlling current flows The direction of positive controlling current flow is from the positive node through the source to the negative node of VNAM VALUE is the transresistance in ohms Note You cannot place voltage sources directly in parallel for SPICE simulation See Also IV Source Example circuit 741CKT Chapter 15 SPICE Beyond the Basics 15265 Nonlinear Dependent Sources General Form BXXXXXXX N N IEXPR VEXPR Netlist Examples BSO1 0 1 ICOSV1SINV2 BVS1 0 1 VLNCOSLOGV122 34V2V1 Spice Data Example D 1 2 VL N is the positive node N is the negative node The values of the V and I parameters determine the voltages and currents across and through the device respectively If I is given then the device is a current source If V is given the device is a voltage source One and only one of these parameters must be specified for each source The expressions given for V and I may be any function of voltages and currents through voltages sources in the system eg V2 indicates the DC voltage at node 2 referenced to ground V34 indicates the voltage difference between nodes 3 and 4 and IVS2 indicates the DC current through the voltage supply VS2 The following functions of real variables are defined abs acos acosh asin asinh atan atanh cos cosh exp ln log sin sinh sqrt tan u uramp u is the unit step function with a value of one for argu ments greater than zero and a value of zero for arguments less than zero uramp is the integral of the unit step for an input x the value is zero if x is less than zero or if x is greater than zero the value is x These two functions are useful in synthesizing piecewise nonlinear functions though conver gence may be adversely affected The following standard operators are defined unary In addition the following boolean operators are defined Input threshold values BOOLT and output values BOOLL and BOOLH are universally defined in the Analog Options dialog box 15266 Chapter 15 SPICE Beyond the Basics AND OR XOR NOT Older versions of SPICE used a POLY function to describe nonlinear sources For example the following statements are all equivalent E1 19 0 POLY27 4 2 0 3 1 5 Spice2 E1 19 0 POLY27420315 Spice2 B1 19 0 V 3 1V74 5V20 Spice3 B1 19 0 V 3 1V74 5V2 Spice3 Each statement indicates that the voltage at node 19 will equal 3 volts plus 1 times the voltage across nodes 7 and 4 plus 5 times the voltage at node 2 using ground node 0 as a reference Many existing SPICE subcircuits contain this type of nonlinear source CircuitMaker automatically converts them to the SPICE3 format each time you run a simulation Note For SPICE simulation voltage sources cannot be placed directly in parallel and current sources cannot be placed directly in series See Also NLV Source NLI Source IMath VMath Example circuit 741CKT Lossless Transmission Lines General Form TXXXXXXX N1 N2 N3 N4 Z0VALUE TDVALUE FFREQ NLNRMLEN ICV1I1V2I2 Netlist Example T1 3 0 2 0 Z050 TD20NS Spice Data Example D 1 2 3 4 Z0V TD10NS Chapter 15 SPICE Beyond the Basics 15267 N1 and N2 are the nodes at port1 N3 and N4 are the nodes at port 2 Z0 is the characteristic impedance The length of the line may be expressed in either of two forms one form must be specified The transmission delay TD may be specified directly as TD10NS for example Alternately a frequency F may be given together with NL the normalized electrical length of the transmission line with respect to the wavelength in the line at the frequency F If a frequency is specified but NL is omitted 025 is assumed that is the frequency is assumed to be the quarterwave frequency The initial condition specification consists of the voltage and current at each of the transmission line ports Initial conditions only apply if the UIC option is enabled for the Transient Analysis The lossy transmission line described below with zero loss may be more accurate than the lossless transmission line due to implementation details See Also LossLessLine example circuit LLTRANCKT Lossy Transmission Lines General Form OXXXXXXX N1 N2 N3 N4 MNAME Netlist Example O2 3 0 2 0 OXLINE Spice Data Example D 1 2 3 4 M This is a twoport convolution model for singleconductor lossy transmission lines N1 and N2 are the nodes at port1 N3 and N4 are the nodes at port 2 Note that a lossy transmission line with zero loss may be more accurate than the lossless transmission line due to implementation details See Also LossyLine 15268 Chapter 15 SPICE Beyond the Basics Uniform Distributed RC Lines Lossy General Form UXXXXXXX N1 N2 N3 MNAME LLEN NLUMPS Netlist Example U1 1 2 0 UXLINE L50UM N6 Spice Data Example D 1 2 3 M L25u N1 and N2 are the two element nodes the RC line connects while N3 is the node to which the capacitances are con nected MNAME is the model name LEN is the length of the RC line in meters LUMPS if specified is the number of lumped segments to use in modeling the RC line if omitted a default value based on the model parameters will be used See Also URCLine Junction Diodes General Form DXXXXXXX N N MNAME AREA OFF ICVD TEMPT Netlist Example D3 2 10 D1N914 OFF D5 7 12 D1N4001 30 IC02 Spice Data Example D 1 2 M OFF IC6 TEMP70 N is the positive node and N is the negative node MNAME is the model name AREA is the area factor and OFF indicates an optional starting condition on the device for Operating Point Analysis The initial condition specifica tion using ICVD only applies if the UIC option is enabled for the Transient Analysis The TEMP value is the tempera ture at which this device is to operate and overrides the temperature specification in the Analog Options dialog See Also Diode Zener Diode example circuit PS1CKT Chapter 15 SPICE Beyond the Basics 15269 Bipolar Junction Transistors BJTs General Form QXXXXXXX NC NB NE NS MNAME AREA OFF ICVBE VCE TEMPT Netlist Example Q5 11 26 4 Q2N3904 IC06 50 Q3 5 2 6 9 QNPN 67 Spice Data Example D 1 2 3 M 67 OFF NC NB and NE are the collector base and emitter nodes respectively NS is the optional substrate node if unspeci fied the ground is used MNAME is the model name AREA is the area factor and OFF indicates an optional starting condition on the device for Operating Point Analysis The initial condition specification using ICVBE VCE only applies if you have enabled UIC for the Transient Analysis TEMP is the temperature at which this device operates and overrides the specification in the Analog Options dialog See Also NPN Trans PNP Trans example circuit CEAMPCKT Junction FieldEffect Transistors JFETs General Form JXXXXXXX ND NG NS MNAME AREA OFF ICVDS VGS TEMPT Netlist Example J2 6 3 21 J2N3819 OFF Spice Data Example D 1 2 3 M 67 ND NG and NS are the drain gate and source nodes respectively MNAME is the model name AREA is the area factor and OFF indicates an optional initial condition on the device for Operating Point Analysis The initial condition specification using ICVDS VGS only applies if you have enabled UIC for the Transient Analysis TEMP is the temperature at which this device operates and overrides the temperature specification in the Analog Options dialog See Also NJFET PJFET Example circuit CSJFAMPCKT 15270 Chapter 15 SPICE Beyond the Basics MOSFETs General Form MXXXXX ND NG NS NB MNAME LVAL WVAL ADVAL ASVAL PDVAL PSVAL NRDVAL NRSVAL OFF ICVDSVGSVBS TEMPT Netlist Example M6 23 16 0 17 MRF150 Spice Data Example D 1 2 3 3 M TEMP55 ND NG NS and NB are the drain gate source and bulk substrate nodes respectively MNAME is the model name L and W are the channel length and width in meters AD and AS are the areas of the drain and source diffusions in meters2 Note that the suffix U specifies microns 1e6 m and P sqmicrons 1e12 m2 If any of L W AD or AS are not specified default values are used The use of defaults simplifies input file preparation as well as the editing required if device geometries are to be changed PD and PS are the perimeters of the drain and source junctions in meters NRD and NRS designate the equivalent number of squares of the drain and source diffusions these values multiply the sheet resistance RSH specified in the model for an accurate representation of the parasitic series drain and source resistance of each transistor PD and PS default to 00 while NRD and NRS default to 10 OFF indicates an optional starting condition on the device for DC analysis The initial condition specification optional using ICVDS VGS VBS only applies if the UIC option is enabled for the Transient Analysis when a transient analysis is desired starting from other than the quiescent operating point See the IC device for a better and more convenient way to specify transient initial conditions The TEMP value optional is the temperature at which this device is to operate and overrides the temperature specifica tion in the Analog Options dialog The temperature specifi cation is ONLY valid for level 1 2 3 and 6 MOSFETs not for level 4 or 5 BSIM devices See Also NMOSFET 3T NMOSFET 4T PMOSFET 3T PMOSFET 4T Chapter 15 SPICE Beyond the Basics 15271 MESFETs GaAsFETs General Form ZXXXXXXX ND NG NS MNAME AREA OFF ICVDS VGS Netlist Example Z1 3 5 6 ZM2 OFF Spice Data Example D 1 2 3 M OFF ND NG and NS are the drain gate and source nodes respectively MNAME is the model name AREA is the area factor and OFF indicates an optional starting condition on the device for Operating Point Analysis The initial condition specification using ICVDS VGS only applies if the UIC option is enabled for the Transient Analysis See Also NMESFET PMESFET Subcircuits General Form XYYYYYYY N1 N2 N3 SUBNAM Netlist Example XU1 7 5 6 12 3 XLM741 Spice Data Example D 1 2 3 4 5 S Subcircuits are used in SPICE by specifying the device designation beginning with the letter X followed by the circuit nodes to be used in expanding the subcircuit followed by the subcircuit name See Also Subcircuits example circuit ANALOGCKT 15272 Chapter 15 SPICE Beyond the Basics SimCode TM Devices General Form AXXXXXXX NPI NGI NI1I NI2I NPO NI1O NI2O NO1O NO2O MNAME Netlist Example A2 6 8 4 7 9 5 2404B Spice Data Example D 4bi 2bi 1i 4bo 1o 2o M All nodes listed in a digital SimCode device are the digital nodes of the device NPI and NGI are the digital input nodes to the power and ground pins NI1I NI2I etc are the digital input nodes to the devices input pins NPO is the digital output node from the power pin NI1O NI2O etc are the digital output nodes from the devices input pins NO1O NO2O etc are the digital output nodes from the devices output pins Note the square brackets surrounding the input nodes and the output nodes In the Spice Data field the power and ground buses include the letter b to indicate that node numbers for these pins come from the Bus Data field See Also Digital SimCode Devices Example circuit Logic Probeckt See Chapter 17 Digital SimCode NODESET Statement General Form NODESET VNODNUMVAL VNODNUMVAL Netlist Example NODESET V7333 V1115 The Nodeset line helps the program find the dc or initial transient solution by making a preliminary pass with the specified nodes held to the given voltages The restriction is then released and the iteration continues to the true solu tion The NODESET line may be necessary for convergence on bistable or astable circuits In general this line should not be necessary See Also NODESET Chapter 15 SPICE Beyond the Basics 15273 IC Statement General Form IC VNODNUMVAL VNODNUMVAL Netlist Example IC V325 V41 V91 The IC line is for setting transient initial conditions It has two different interpretations depending on whether or not you have enabled the UIC parameter in the Transient Analysis Also dont confuse this line with the NODESET line The NODESET line is only to help DC convergence and does not affect final bias solution except for multi stable circuits The two interpretations of this line are as follows When you have enabled the UIC parameter in the Transient Analysis the node voltages specified on the IC control line are used to compute the capacitor diode BJT JFET and MOSFET initial conditions This is equivalent to specifying the IC parameter on each device line but is much more convenient You can still specify the IC parameter which takes precedence over the IC values Since no DC bias initial transient solution is computed before the Transient Analysis you should take care to specify all DC source voltages on the IC control line if you are going to use them to compute device initial conditions If you have not enabled the UIC parameter in the Transient Analysis the DC bias initial transient solution is computed before the Transient Analysis In this case the node voltages you have specified on the IC control line are forced to the desired values during the bias solution The Transient Analysis removes the constraint on these node voltages This is the preferred method since it allows SPICE to compute a consistent DC solution See Also IC example circuit 555CKT IC 15274 Chapter 15 SPICE Beyond the Basics Suggested Reading Tuinenga P W SPICE A guide to Circuit Simulation Analysis Using PSpice PrenticeHall Inc Englewood Cliffs NJ 1988 ISBN 0138346070 Library TK454T85 1988 6213192dc 19 Written as a supplement for electronic circuit design courses this book focuses on the design and analysis of analog circuits using PSpice a commercial variation of the industry standard Berkeley SPICE Through examples this book demonstrates what a simulator can and cannot do Although this book is written specifi cally for PSpice much of the information it contains can be applied directly to CircuitMaker Vladimirescu A The SPICE Book John Wiley Sons Inc NY 1994 ISBN 0471609269 Library TK454V58 1994 6213192028553dc20 Written as a tutorial and reference for electrical engi neering students and professionals just starting to use the SPICE program to analyze and design circuits This book explains how to use the SPICE program and describes the differences and similarities between the most popular commercial versions of it including SPICE3 the latest version from Berkeley which is used by CircuitMaker Kielkowski R Inside SPICE McGrawHill Inc NY 1994 ISBN 0070911525 Library TK 454K48 1994 6213192011353dc20 Written as a tutorial and reference for electrical engi neering students and professionals who are familiar with the SPICE program This book goes beyond the basics and covers the internal operation of the SPICE program to give the reader a solid understanding of how SPICE works It provides stepbystep coverage of how to overcome nonconvergence numerical integration instabilities and timestep control errors It also shows how to make simulations run faster and more efficiently by setting the OPTION parameters Chapter 16 Creating New Devices 16275 Creating New Devices C H A P T E R 16 The devices you can create in CircuitMaker fall into two major categories 1 nonfunctional device symbols that you simply want to represent schematically or export to a PCB netlist and 2 fully functional devices that will simulate Simulation functionality is achieved by attaching internal circuitry or a SPICE modelsubcircuit to a device symbol The term macro device is used loosely throughout this manual to refer to any device you create or modify Whats In This Chapter The following summarizes the information contained in this chapter Creating Device Symbols Learn how to use the Symbol Editor to create or edit custom device symbols Learn how to draw symbols freehand with the mouse create new symbols based on an existing symbol and quickly create a DIP LCC or QFP symbols Learn how pins are used as connection points for wires Also learn how to prepare the symbol for use in CircuitMaker by adding the default Device Data to the symbol Go through a stepbystep example to create your own device symbol Creating Macro Devices with Internal Circuitry Learn how to attach hidden internal circuitry to a custom device symbol Learn how this simple process can be used to expand the selection of simulatable devices in CircuitMaker Learn how macro devices can be nested for hierarchical construction of a circuit for simulation Go through a stepbystep example to attach circuitry to a symbol thus making a functional macro device Working with SPICE Models Learn about the three basic types of components in SPICE selecting a SPICE model for simulation modifying SPICE models and 16276 Chapter 16 Creating New Devices how to attach a new SPICE model to a device symbol Go through a stepbystep example to add a new SPICE model Creating New SPICE Models Using Parameter Passing Learn how to create a generic SPICE model which can be used to simulate any number of like components by passing parameters specific to each device into the generic model Editing Digital Model Parameters Learn about Digital Simcode devices their various parameters and how to modify them Creating Device Symbols You can create or modify device symbols in one or more of the following ways Drawing a symbol with the mouse Entering a description in the Element List Adding existing shapes Importing a Meta file Adding DIP LCC and QFP Packages To create a symbol for a new macro 1 Clear the drawing area by clicking the New button on the Toolbar 2 Click the Macro button on the Toolbar This is the same as choosing Macros New Macro 3 Enter a unique name for the macro of 13 characters or less The Macro Name is used to identify the macro device in the library 4 Specify how many of these parts would be found in a single IC package Macro Button Chapter 16 Creating New Devices 16277 Note The same symbol is used for each device in the package 5 Click OK to display the Symbol Editor Figure 161 Figure 161 Use the Symbol Editor to create or modify schematic symbols Think of the Symbol Editor as a drawing program The following sections describe the use of the Symbol Editor options Using Symbol Editor Display Controls Once you have placed a device symbol in the View window use the Symbol Editor options to control the view of the symbol You can click and drag device designations at any time to position them where you want Control What it Does Redraw Refreshes the picture Grid Displays or hides the currently defined grid in the View window We recommend a 9 point spacing for pin placement Note The Symbol Editor does not use the Snap To Grid feature See Chapter 12 Options Menu about grid setup and Chapter 13 View and Window Menus for information about changing the grid color 16278 Chapter 16 Creating New Devices Symbol Name Displays or hides the devices symbol name Pin Names Displays or hides the devices pin names Pin Designations Displays or hides the devices pin designations View Zoom in or out from 25800 to better view the device while you are working on it Trace Step through the Element List high lighting each element one at a time beginning with the currently selected element Select the first element in the list click the Clear button to erase the drawing window and then click the Trace button repeatedly This helps you identify elements that are hidden behind other elements etc Drawing a Symbol with the Mouse You can draw symbols or parts of symbols freehand with the mouse To draw a symbol element with the mouse 1 Select the color and fill Any enclosed element will be filled with either the element color or the background color 2 Select an element type by clicking its radio button You can draw the following element types Line 14 Arc 12 Arc Circle Ellipse Polyline Polygon Rectangle Round Rect and Pins Pins can point up down left or right and can have bubbles to indicate negative logic Pins with bubbles are indicated with a tilde Note Any device symbol you want to wire into a circuit must have pins as connection points for wires Chapter 16 Creating New Devices 16279 3 To place a line arc circle ellipse rectangle or pin hold down the left mouse button drag and release To place a polyline or polygon click and release the mouse to begin then singleclick to turn doubleclick to end Note After you place a pin a dialog box appears that lets you enter a pin name and designation Pin names and designations are required for circuit simulation and PCB netlist generation When you place an element its description is appended to the Element List The elements description and shape are also selected and highlighted which lets you easily move or delete elements that you have placed After you have placed an element the selected Element Type does not change until you select a new Element Type or click on a text line in the Element List Selecting Shapes To select single shapes 1 Choose the SelectMove option in the Element Type group box 2 Click the shape in the view window OR Click the description in the Element List To select multiple shapes 1 Select the SelectMove option in the Element Type group box 2 Drag a selection rectangle around the desired element shape in the view window OR Click and drag the cursor in the Element List OR Hold down the Shift key while clicking individual element shapes in the view window or element descrip tions in the Element List 16280 Chapter 16 Creating New Devices To delete elements 1 Select the elements you want to delete 2 Click the Delete button To move elements 1 Select the SelectMove option in the Element Type group box 2 Drag the element shape with the mouse while holding down the Left mouse button OR If you have selected multiple elements drag one of the elements with the mouse while holding down the Left mouse button To resize elements 1 Select the Resize option in the Element Type group box 2 Drag the end of a line the corner of a rectangle the side of a rounded rectangle or the side of an ellipse with the mouse while holding down the Left mouse button Note You must use the Element List or Element Buffer to change the size and shape of other elements See Element List and Edit Buffer later in this chapter for more information Adding an Existing Shape To make it easier to create a new device symbol you can use and modify existing device shapes as needed To add an existing shape 1 In the Symbol Editor dialog box click the Add Exist ing Shape dropdown list box 2 Select the name of the existing shape you want to add 3 If you want to include pins for the existing device check the Include Pins check box 4 If you want to change the size of the shape you are adding enter a value in the Scale edit box Chapter 16 Creating New Devices 16281 5 Click the Add Shape button 6 Press the r key or click the Right mouse button to rotate the shape 7 Press the m key to mirror the shape 8 Move the shape to the desired location in the Symbol Editors view window 9 Click the Left mouse button to place the shape or press the Spacebar to cancel Note Only the location not the size of included pins will be scaled Importing a Metafile Device The Symbol Editor can import device symbols pictures created in another drawing program only if that drawing program can copy the desired symbol to the Windows clipboard in the Metafile format To import a Metafile device 1 Copy the Metafile object onto the Windows clipboard 2 From the Symbol Editor select ClipboardWMF as the existing shape see Adding an Existing Shape earlier in this section Note Only the vector graphics shapes lines rect angles circles etc in the Metafile object will be converted Colors bitmaps and text will not be included Adding DIP LCC and QFP Packages Use the Symbol Editor to quickly create DIP Dual Inline Package LCC and QFP symbols LCC and QFP are square outlines with an equal number of pins on each side The LCC symbol has pin 1 on the center of the top side The QFP symbol has pin 1 on the top of the left side You can control the size of the package you are adding using the Scale value and the number of Pin name chars you enter You can specify the width of the DIP LCC and QFP symbols however DIPs cannot be scaled directly they can only be rotated and mirrored See Figure 162 for an example of the LCC symbol 16282 Chapter 16 Creating New Devices Figure 162 Use the Symbol Editor to quickly add DIP QFP and LCC symbols To add a DIP LCC or QFP symbol 1 From the Symbol Editor specify the number of pins in 2 pin increments in the Pins per Pkg field 2 Select the Scale 100 by default 3 Click the Add Pkg button 4 Move the package to the desired location Note You can press the Spacebar to cancel this operation 5 Click the Left mouse button to place the package Editing Pin Information Pin names and pin designations are required for circuit simulation and PCB netlist generation For compatibility with TraxMaker each pin designation should match the Pad Designation of the corresponding pad in the TraxMaker component To edit pin names and pin designations 1 In the Symbol Editor select the SelectMove option in the Element Type group box Chapter 16 Creating New Devices 16283 2 Rightclick a pin to display the dialog box pictured in Figure 163 3 Give each pin a name up to 15 characters and a designation up to 5 alphanumeric characters even if the names are not displayed Note For multipart packages one pin designation should be listed for each part in the package separated by commas Figure 163 Use the Symbol Pin dialog box to edit pin names and designations Element List and Edit Buffer As you add elements to the drawing they are also added to the Element List The Element List contains a text descrip tion of each element in the devices symbol The link between the drawing window and the Element List is interactive When you select an element in the drawing window it is highlighted in the Element List Likewise when you select an element in the Element List it is high lighted in the drawing window Elements at the beginning of the list are drawn first so they are in the back of the drawing bottom layer those at the end of the list are drawn last so they are in front top layer Use the Edit Buffer to add or edit the element text descrip tions contained in the Element List box Use the following buttons to edit and change the order of the elements Tip You can create barred pin names by entering braces around all or part of a pin name Barred pin names work correctly only with monospaced fonts such as Courier New CircuitMakers default font You can also orient pin names perpendicu lar or parallel to the pin 16284 Chapter 16 Creating New Devices Button What it Does Cut Removes the selected elements from the Element List and places them in the Edit Buffer Copy Places a copy of the selected elements in the Edit Buffer Replace Replaces the selected elements with the contents of the Edit Buffer Insert Inserts the contents of the Edit Buffer immediately before the selected element in the Element List Append Attaches the contents of the Edit Buffer to the end of the Element List Delete Removes the selected elements from the Element List When editing an element you must observe strict rules of syntax The definition for each element must state the element type attribute linefill color or pin name and a set of xy coordinates A more complete description of the syntax required for each element is given the Element Definitions section which follows Element Definitions When the pen color on an enclosed element is immediately followed by an asterisk for example LtBlue the fill color will be the same as the pen color otherwise the fill color will be the background color General Format element typeattribute x1y1 x2y2 x3y3 x4y4 pin numbers Line Attribute pen color x1y1 start point of the line x2y2 end point of the line x3y3 na x4y4 na Chapter 16 Creating New Devices 16285 Example Line Device 367 207 Polyline Attribute pen color x1y1 1st point of the polyline x2y2 2nd point of the polyline optional if Polyline x3y3 3rd point of the polyline optional x4y4 4th point of the polyline optional Note A preceding plus sign Polyline indicates that this is an extension to the preceding polyline element Examples Polyline Device 2446 4222 2435 or Polyline Device 5154 4623 3442 5332 Polyline Device 5319 Polygon Attribute pen color x1y1 1st point of the polygon x2y2 2nd point of the polygon optional if Polygon x3y3 3rd point of the polygon optional if Polygon x4y4 4th point of the polygon optional Note A preceding plus sign Polygon indicates that this is an extension to the preceding polygon element Example Polygon Device 3912 055 6175 or 16286 Chapter 16 Creating New Devices Polygon Device 3044 1244 29 21 156 Polygon Device 256 4216 Rect Attribute pen color x1y1 left top corner of the rectangle x2y2 right bottom corner of the rectangle x3y3 na x4y4 na Example Rect Device 2530 1528 RRect Attribute pen color x1y1 left top corner of the rounded rectangle x2y2 right bottom corner of the rounded rectangle x3y3 width and height of ellipse defining the corners x4y4 na Example RRect Device 5622 118 1010 EllipseCircle Attribute pen color x1y1 left top corner of the defining rectangle x2y2 right bottom corner of the defining rectangle x3y3 na x4y4 na Example Ellipse Device 4944 933 Chapter 16 Creating New Devices 16287 Arc 14 12 Attribute pen color x1y1 left top corner of the rectangle defining the complete ellipse x2y2 right bottom corner of the rectangle defining the complete ellipse x3y3 end point of line 1 whose start point is at the center of the ellipse x4y4 end point of line 2 whose start point is at the center of the ellipse Note The arc follows the outline of the ellipse and is drawn counterclockwise from line 1 to line 2 Example Arc Device 5113 1333 3213 5110 14 Arc Device 2811 545 517 2817 12 Text Attribute text color x1y1 bottom center location of text x2y2 na x3y3 na x4y4 na text string enclosed in single quote marks 15 characters max Example Text Device 025 symbol text PinUp PinDown PinLeft PinRight PinUp PinDown PinLeft PinRight Attribute pin name 16 characters max x1y1 point where pin attaches to package x2y2 na x3y3 na x4y4 na 16288 Chapter 16 Creating New Devices Examples of single part per package Pinleft P1 2627 1 Pinright P9 2636 9 Examples of two parts per package Pinleft P1 2627 12 Pinright P9 2636 910 Example of inverted pin Pinleft P7 2627 7 Note A pin is a connection point for wires Pins can have bubbles to indicate negative logic Pins with bubbles are indicated with the tilde Tutorial Creating a Device Symbol The following stepbystep example shows how to use the Symbol Editor to create macro circuits 1 Make a backup copy of the USERLIB file prior to creating or deleting a macro In case the library is damaged or altered in any undesir able way you will always have a copy of the library as a backup 2 Choose Macros New Macro or click the Macro button on the Toolbar to display the Define New Macro dialog box shown in Figure 164 Its possible that a message will appear asking if you want to include the present circuit inside the new symbol For this example you can click No Figure 164 The name you enter here is used later to select the device from the library 3 Enter a unique name up to 13 characters in length in the Macro Name text edit field For this example type ANDNOR Chapter 16 Creating New Devices 16289 4 Specify the number of parts per package For this example use the default of 1 part per package This refers to the number of devices found in the same chip For example a 7400 package contains 4 NAND gates and a 556 package contains 2 timers 5 Click OK to display the Symbol Editor For this example begin by placing an 8 Pin DIP package in the drawing window 6 Type 8 in the Pins Per Pkg field then click the Add Pkg button 7 Click the left mouse button to place the package in the center of the drawing window 8 Change the View to 200 by clicking the Up Arrow in the View group box The macro name ANDNOR displays in the center of the drawing window 9 Click and drag the name into position near the top of the DIP Notice that this device consists of 1 Rect 4 PinLefts and 4 PinRights You will remove 3 of the 4 PinRights 10 Click the top righthand pin in the drawing to select it and then click Delete Repeat for the 2 bottom right hand pins 11 Click the remaining righthand pin to select it and then click Copy to copy the pin from the Element List to the Edit Buffer 12 Change PinRight to PinRight and change P7 to O1 13 Click Replace to replace the selected pin with the new pin Notice that the pin in the drawing now has a bubble 14 Click the top lefthand pin to select it 15 Click Copy to copy the pin from the Element List to the Edit Buffer 16290 Chapter 16 Creating New Devices 16 Change P1 to I1 and then click Replace to replace the selected pin with the new pin Repeat for each remain ing pin naming them I2 I3 and I4 Compare your device with the one pictured in Figure 165 If there is a difference click Cancel and start over 17 Click OK in the Symbol Editor dialog box Figure 165 This is what the new symbol should look like after completing the steps so far After you click OK the new symbol you created displays and follows the mouse around the work area 18 Click the mouse to place the symbol in the workspace 19 Doubleclick the macro package 20 Click Netlist Any data you enter in the Device Data dialog box at this time will be there every time you select this macro from the library menus Now is a good time to add the default Package Auto Designation Prefix Spice Prefix Characters and Spice Data if required Note For compatibility with TraxMaker the Package field must match the name of the corresponding component in TraxMaker 21 If you are satisfied with your macro choose Macros Macro Utilities to display the Macro Utilities dialog box as pictured in Figure 166 Chapter 16 Creating New Devices 16291 22 To place the device in an existing Major or Minor Device Class click the appropriate items in the lists 23 To create a new Major or Minor Device Class type the Major or Minor Device Class name in the appropriate text edit fields 24 Finally click Save Macro Clicking Save Macro saves the new macro in the file USERLIB and clears the workspace To use the new macro simply select it from the device library and use it just as you would any other device Figure 166 You must specify the Major and Minor Device Classes under which your macro will be shown in the Device Selection dialog box Expanding an Existing Macro Device Expanding a macro device lets you modify the devices symbol the default netlist attributes and add or edit any internal circuitry 16292 Chapter 16 Creating New Devices To expand an existing macro device 1 Place the macro you want to expand in the drawing area 2 Select the macro by clicking it once with the Arrow Tool 3 Click the Macro button on the Toolbar or choose Macros Expand Macro OR Doubleclick the macro device Notice that the workspace clears and the dialog box shown in Figure 167 appears Figure 167 Use this dialog box to specify what part of the macro device you want to edit 4 If you want type a new name for the macro Saving a macro under a new name does not delete the old macro device 5 Use the Parts Per Package option to change the number of parts that would be found in a single IC package Note Use this option only when creating a new device 6 Click the Netlist button to display the Edit Device Data dialog box Depending on the macro device you are editing you might need to specify mandatory parameters for the device including LabelValue Package Auto Designa Chapter 16 Creating New Devices 16293 tion Prefix Spice Prefix and Spice Data 7 Click the Symbol button to display the Symbol Editor where you can edit the expanded macros schematic symbol 8 Click OK when you have finished drawing and specify ing parameters for the symbol Clicking OK returns you to the expanded macro where you can add or edit circuitry before the new device is saved See Creating Macro Circuits later in this chapter for the stepbystep procedure Creating Macro Devices with Internal Circuitry If you cannot find a device in CircuitMakers library of devices or elsewhere that performs a particular function you can create a functional macro device by attaching hidden circuitry to a custom symbol A macro device can contain internal circuitry that you can base on CircuitMakers library of existing devices You can also nest macro devices meaning that a macro can be used within another macro device letting you create building blocks and piece them together in order to create the final device When you save a macro all of the circuitry you have added to it is hidden within its symbol The new macro device functions according to the circuitry hidden within You can then use the new macro in any circuit To create a macro device with internal circuitry 1 Make a backup copy of the USERLIB file In case the library is damaged or altered in any undesir able way you will always have a copy of the library as a backup 2 Create a symbol as described earlier in this chapter see Creating Device Symbols earlier in this chapter 3 Place the symbol that you created in the drawing area and expand it by selecting it and then choosing Macros 16294 Chapter 16 Creating New Devices Expand Macro see Expanding an Existing Macro Device earlier in this chapter for more details 4 Construct the circuitry which performs the function your new macro device is to have For example suppose you want to build a device that performs an ANDNOR function You would construct something like the circuit shown in Figure 168 Figure 168 You can add functional circuitry such as this ANDNOR function 5 Select the Wire Tool from the Toolbar and connect wires from the macro symbols pins to the other points within the circuit Figure 169 shows an example of a completely wired macro device Figure 169 The functional circuitry is wired to the symbol to create a functional macro device 6 If default data was not added when the symbol was created then doubleclick on the macro symbol and click the Netlist button Add any necessary data such as Package and Auto Designation Prefix Data entered now in the Device Data dialog box will be there every Note If a macro device contains internal circuitry as well as SPICE data the SPICE data will be ignored Chapter 16 Creating New Devices 16295 time this macro device is selected from the library menus Note For compatibility with TraxMaker the Package field must match the name of the correspond ing component in TraxMaker 7 Save the Macro choose Macros Save Macro Working with SPICE Models SPICE is an industry standard program for simulating circuits In order to make devices work in analog simulation there must be SPICE data available for each device Using the Symbol Editor you can include SPICE model and subcircuit information with a new or existing device You can also edit SPICE information using an ASCII Text Editor Note If you intend to create new device symbols to export a PCB netlist or simply draw schematics you do not need to include SPICE information However even if you are going to simulate your circuit adding SPICE models from other sources is easy and beneficial To learn more about SPICE see Chapter 15 SPICE Beyond the Basics There are 3 basic types of components in SPICE Elementary components such as resistors capacitors power sources etc Models defining discrete devices such as BJTs JFETs MOSFETs etc Subcircuits which combine multiple items such as elementary components models and other subcircuits to create a more complex device SPICE models and subcircuits are available from many sources including component manufacturers engineering magazines and books You can also download them from the internet For example visit MicroCode Engineerings web page at wwwmicrocodecom Editing SPICE Models with a Text Editor Since SPICE models and subcircuits are text files see Figure 1610 they can be modified with a text editor such as Notepad If you edit this file with a word processor be sure to save the file in a TEXT ONLY format 16296 Chapter 16 Creating New Devices Figure 1610 You can open SPICE data into any text editor and edit it directly Editing SPICE Models in CircuitMaker When you doubleclick a device that has SPICE models associated with it the dialog box in Figure 1611 appears Figure 1611 This dialog box lets you select a diode model The currently selected model is highlighted in the list To select a different model click it with the mouse then click Select or just doubleclick on the model If any subcircuits are found in the MOD file they are indicated by an x as the first character in the description instead of a p To edit or view an existing model 1 Click on the name of the model you want to edit or view 2 Click on the Edit button to display the dialog box pictured in Figure 1612 Chapter 16 Creating New Devices 16297 Figure 1612Use the Diode Model Parameters dialog box to change the settings of a particular model The model parameters displayed are SPICE model param eters not data book parameters Unless you are familiar with SPICE modeling it is recommended that you do not modify the existing SPICE models The values listed for each parameter represent values defined for that specific device type Default SPICE model parameter values are indicated by an asterisk after the value To change the value of a SPICE parameter 1 Click the name of the SPICE parameter This selects the parameter and copies the parameters value into the Value edit box 2 Change the data in the Value box and click the Enter button If you want to set a specific parameter to equal that of the DEFAULT model type an asterisk in the Value edit field and press Enter 3 Click OK to save the model OR To save it under a new name type the new name into the Name field and then click OK Note Models created or modified in this manner are stored directly in the MOD linking file in place of the model reference 16298 Chapter 16 Creating New Devices The original LIB file remains unchanged When viewed in the Model Selections dialog box the first character of the device description will be an asterisk To remove an existing model 1 Select it by clicking it with the mouse 2 Click Delete This only removes the model reference from the linking file it does not remove the actual model from the library Adding New Models to an Existing Symbol When you obtain new models from an outside source they are generally provided in a single ASCII library file Note If you edit this file with a word processor be sure to save the file in TEXT ONLY format Use the Model Data button in the Macro Utilities dialog box to create a link to each model in the new library file The following steps illustrate an example of adding a new model To add a 2N5209 transistor to CircuitMaker 1 Choose Macros Macro Utilities 2 Select the symbol for an NPN transistor then click Model Data 3 Click Open and open the library file MCEBJTLIB in which the 2N5209 model resides All of the model and subcircuit names found in this library will be displayed in the list box on the left 4 Click 2N5209 5 Enter appropriate information about the model in the Description field for example Si 625mW 50V 50mA 30MHz Amp 6 In the Pkg Name field enter TO92B to match the name of the component pattern in TraxMaker 7 Enter pin numbers to match the pad designations of the component in TraxMaker On the TO92B in TraxMaker with the flat side facing you pin 1 is on the Note Normally you must copy the lib file that con tains the MODEL or SUBCKT data to the CircuitMaker Models directory For this 2N5209 example the MCEBJTLIB file is already in the Models directory Chapter 16 Creating New Devices 16299 right pin 2 is in the middle and pin 3 is on the left For the 2N5902 these pins correspond to the collector base and emitter respectively C1 B2 E3 8 Click Add to add the new reference You can now select the new model alphabetically from the list of npn transistors Adding Existing Models to New Macro Symbol To add an existing model to a new macro symbol 1 Create a new nonfunctional macro device symbol as described earlier in this chapter Be sure to place the pins in the same order as they are listed in the syntax for the corresponding model For example if you are creating a new symbol for a diode you should place the anode pin first then the cathode pin to correspond with the SPICE definition of a diode This is not required but it will be easier to understand when filling in the Spice Data field for the device To link the new symbol to an existing model file you must name the new symbol appropriately For example you may want to name the symbol DiodeA to link to the DIODEMOD file or SchottkyA to link to the SCHOTTKYMOD file 2 With the new macro expanded doubleclick the device and then click Netlist to view the Edit Device Data dialog box 3 Enter the following data Auto Designation Prefix for the device For example Q for transistors D or CR for Diodes etc Set the Spice Prefix Characters for this device to be representative of the type of device models you are using For example an NPN Bipolar Junction Transistor must have the prefix QN Refer to Chapter 4 Drawing and Editing Schematics for a listing of valid prefix characters 16300 Chapter 16 Creating New Devices Enter an appropriate SPICE instruction for this device into the Spice Data field Refer to Chapter 4 Drawing and Editing Schematics for more information 6 Click OK 7 Click Macros Save Macro to save the macro 8 After you have entered the appropriate data SPICE models can be linked to the new symbol by following the instructions under Adding New Subcircuits to an Existing Model later in this chapter Example To create a new device symbol for standard junction diodes 1 Create a new macro symbol for a diode using the Symbol Editor described in Creating a New Macro Device earlier this chapter 2 Name the new macro symbol DIODEA When placing pins on the new device place the first pin on the anode N and the second pin on the cathode N They should be placed in this order to match the syntax for the diode model 3 Expand the new macro symbol if it is not already expanded by clicking it once with the left mouse button and then click the Macro button in the Toolbar 4 Doubleclick on the device symbol and click on the Netlist button 5 Enter the following information in the Edit Device Data dialog box of the expanded macro to set the defaults for this macro device Auto Designation Prefix D Spice Prefix Characters D Spice Data field D 1 2 M 6 Save the macro see Save Macro in Chapter 11 Macros Menu for more information Chapter 16 Creating New Devices 16301 7 Follow the instructions in Adding New Subcircuits to an Existing Symbol later in this chapter Editing SPICE Subcircuits SPICE subcircuits fall into three basic categories Component models Macromodels Equivalent circuits A component model is basically a complete schematic of the chip simulated using discrete components This type of subcircuit is generally more accurate than a macromodel but requires more time to simulate The macromodel is more of a block diagram of the chip where inputs and outputs may be simulated using discrete components but the internal workings consist of simpler items such as gain blocks etc This type of subcircuit simulates rather quickly and in most cases is accurate enough that a component model is not needed Equivalent circuits may be needed to simulate discrete devices that have no SPICE model For example an SCR can be roughly equated to a pair of NPN and PNP transistors coupled together When you doubleclick a device that has subcircuits in the library the dialog box pictured in Figure 1613 appears Figure 1613 This device is made up of many subcircuits any of which you can select and edit The currently selected subcircuit is highlighted in the list To select a different subcircuit click on it with the mouse then click Select or just doubleclick it with the mouse 16302 Chapter 16 Creating New Devices To edit or view an existing subcircuit 1 Click it with the mouse 2 Click Edit to display the dialog box in Figure 1614 Figure 1614 Use this dialog box to edit or view an existing subcircuit This dialog box lists the subcircuit beginning with the description line and ending with the ENDS line Any changes you make to the subcircuit cause the modified subcircuit to replace the reference in the subcircuit linking file The original subcircuit remains unchanged in the library file but the reference to it will be lost Naming conventions for SUB files are discussed in Model and Subcircuit Linking Files later in this chapter Adding New Subcircuits to an Existing Symbol When you obtain new subcircuits from an outside source they are generally provided in a single ASCII library file Note If you edit this file with a word processor be sure to save the file in TEXT ONLY format Use the Model Data button in the Macro Utilities dialog box to create a link to each model in the new library file The following steps illustrate adding a new subcircuit to an existing symbol Chapter 16 Creating New Devices 16303 To add an LF412C operational amplifier 5pin subcircuit to CircuitMaker 1 Select Macros Macro Utilities 2 Select the symbol for the 5pin opamp OpAmp5 and then click Model Data 3 Click Open and open the library file MCEMODS2LIB in which the LF412C model resides All of the model and subcircuit names found in this library will be displayed in the list box on the left 4 Click on the LF412C 5 Enter appropriate information about the model in the Description field for example Dual LoOffset LoDrift JFET OpAmp 6 In the Pkg Name field enter DIP8 to match the name of the component pattern in TraxMaker 7 Enter pin numbers to match the pad designations of the component in TraxMaker Since the LF412C is a dual op amp you must enter pin numbers for both PART A and PART B click the Up or Down Arrow to switch between the two For PART A the pin numbers should be IN 3 IN 2 V 8 V 4 and Out 1 For PART B the pin numbers should be IN 5 IN 6 V 8 V 4 and Out 7 Note that the V and V power supply pins are the same for both op amps 8 Click Add to include the new reference You can now select the new subcircuit alphabetically from the list of 5pin op amps Adding Existing Subcircuits to New Macro Symbol To add an existing subcircuit to a new macro symbol 1 Create a new nonfunctional macro device symbol as Note Normally you must copy the lib file that con tains the SUBCKT data to the CircuitMaker Models directory For this LF412C example the MCEMODS2LIB file is already in the Models directory 16304 Chapter 16 Creating New Devices described earlier in this chapter Be sure to place the pins in the same order as they are listed in the corresponding subcircuit For example if you are creating a new symbol for a 5pin opamp you should place the Input pin first then the Input pin the Vsupply pin the Vsupply pin and finally the Output pin to correspond with the SPICE node connections for the 5pin opamp subcircuit This is not required but it will be easier to understand when filling in the Spice Data field for the device In order to link the new symbol to an existing subcircuit file you must name the new symbol appropriately For example you may want to name the symbol OpAmp5A to link to the OPAMP5SUB file Note Since CircuitMaker identifies pins by the order of placement in a device symbol for clarity make sure that the placement order of the pins matches the order of the nodes listed in the subcircuits The actual link between device symbol pins and SPICE subcircuits is controlled by the Spice Data field of the device where n refers to the nth pin in the element list For example in the Spice Data D 1 2 3 4 S the node number connected to the first pin placed on the device symbol is represented by 1 the second pin by 2 etc When used with a subcircuit which begins SUBCKT XMR9933A 21 23 6 15 node 21 in the subcircuit connects to the first pin on the device symbol etc 2 With the new macro expanded doubleclick on the device then click on the Netlist button to view the Edit Device Data dialog box Enter the following data Enter an appropriate Auto Designation Prefix for the device For example U or IC for integrated circuits etc Set the Spice Prefix Characters to X for subcircuit devices Chapter 16 Creating New Devices 16305 Place an appropriate SPICE instruction for this device into the Spice Data field Refer to Editing Devices in Chapter 4 Drawing and Editing Schematics for more information or refer to the examples provided with other devices 3 Click OK 4 Choose Macros Save Macro to save the macro 5 After you have entered the appropriate data SPICE subcircuits can be linked to the new symbol by follow ing the instructions in Adding New Subcircuits to an Existing Symbol earlier in this chapter Example To create a new device symbol for optoisolators 1 Create a new macro symbol for an optoisolator using the symbol editor described earlier in this chapter Name the new macro device symbol Opto IsolA When placing pins on the new device place the first pin on the anode N the second pin on the cathode N the third pin on the collector and the fourth pin on the emitter They should be placed in this order to match the syntax for the optoisolator subcircuits 2 Expand the new macro symbol if it is not already expanded by clicking on it once with the left mouse button then click on the Macro button in the Toolbar 3 Doubleclick the device symbol and click Netlist 4 Enter the following information in the Edit Device Data dialog box of the expanded macro to set the defaults for this macro device Auto Designation Prefix OP Spice Prefix Characters X Spice Data field D 1 2 3 4 S 5 Click OK then choose Macros Save Macro 16306 Chapter 16 Creating New Devices 6 Follow the instructions in Adding New Subcircuits to an Existing Symbol earlier in this chapter Model and Subcircuit Linking Files Model and Subcircuit data is stored in ASCII text files typically with the LIB extension You can edit these files directly with any ASCII text editor Each analog device symbol in CircuitMaker has a linking file associated with it In order to use SPICE models in CircuitMaker you must link the models to a corresponding device symbol by placing a reference to the model in the linking file To create a new link or to modify an existing link 1 Select Macros Macro Utilities 2 Select the symbol that you want to use for the specific model or subcircuit you are adding 3 Click Model Data to display the dialog box pictured in Figure 1615 Figure 1615 Use this dialog box to add modify and remove linking information Initially only the center list box will have anything in it This is a list of the devices in the linking file associated with Chapter 16 Creating New Devices 16307 the selected symbol Click one of the models to select it and the the description package and pinout information appears To modify this information 1 Select the name of the model or subcircuit you want to delete 2 Type in the desired changes 3 Click Modify To remove a reference from the linking file 1 Select the name of the model or subcircuit you want to delete 2 Click Delete To add new references to the linking file 1 Click Open and open the library file in which the actual model or subcircuit resides All of the model and subcircuit names found in this library will be displayed in the list box on the left If desired the list can be limited to only those devices which are compatible with the selected device symbol 2 Enter appropriate description package and pin informa tion for the model If there are multiple parts per package be sure to enter pin numbers for each of PART A PART B etc If the model is similar to another part that is already in the linking file it may be simpler to first select the similar part to fill in the blanks make any necessary correc tions then select the new model by changing the Show Model Type 3 Click Add to include the new reference The names of the linking files correspond to the device symbol names with the following exceptions Linking file names are limited to 8 characters so the device symbol name is truncated to 8 characters when searching for a match 16308 Chapter 16 Creating New Devices All spaces and punctuation characters are removed If the last 1 or 2 characters of a truncated device symbol name are numbers those numbers replace the last characters in the file name If a device symbol name includes a colon the colon and all characters after the colon are ignored For example the devices NPN Trans NPN TransA NPN TransB and NPN TransC are all associated with the linking file NPNTRANSMOD If CircuitMaker cannot find a linking file using the file name formed from the device symbol name and if that symbol can be simulated using simple SPICE models a default file name is used instead The default file name is based on the SPICE Prefix Characters Following is a list of the SPICE prefix characters and their corresponding default file names SPICE Prefix Default File Names C CAPMOD D DIODEMOD DZ ZENERMOD JN NJFETMOD JP PJFETMOD MN NMOSMOD MP PMOSMOD O LTRAMOD QN NPNMOD QP PNPMOD R RESISTORMOD S SWMOD U URCMOD W CSWMOD ZN NMESFETMOD ZP PMESFETMOD All others including subcircuitonly device symbols do not have a default file name Subcircuitonly device symbols Chapter 16 Creating New Devices 16309 symbols that cannot be simulated with a simple model must use linking files with the SUB extension Transistors are an example of when a default file name is used Since the file NPNTRANSMOD does not exist CircuitMaker looks in the default file NPNMOD for the model reference information MOD linking files contain references to a collection of SPICE models and subcircuits specific to a particular discrete device symbol in CircuitMaker In some cases it is desirable to replace a model with a subcircuit which will more accurately model a particular device For example some RF or Power Transistors are not modeled well by a simple SPICE model In such cases it is OK to reference the subcircuit in the MOD file just like it was a model For more information on using models see Working with SPICE Models earlier in this chapter SUB linking files contain references to a collection of SPICE subcircuits specific to a particular device symbol in CircuitMaker For more information on using subcircuits see Editing SPICE Subcircuits earlier in this chapter Under normal circumstances the linking files should not be edited directly The file format is described below for information only The general format for a reference in a linking file is Device Description pkgPACKAGE DVCC14DGND7 123 PARAM QXXXXXXXX FileFilenamlib where PACKAGE DVCC14DGND7 123 is the component name and pad designations in TraxMaker the bus data listed here is for digital component symbols that do not have external power and ground pins Q is the Spice prefix character for the specific device type XXXXXXXX is the model name and Filenamlib is the name of the library file in which the model or subcircuit actually resides There should be an appropriate description of the device on the line immediately before each PARAM line This line will be displayed as the description in the Model or Subcircuit Selections dialog box The first character of this description line must be an asterisk When you double 16310 Chapter 16 Creating New Devices click a device to select a model subcircuits that are found in the MOD file will also be displayed but the first character in the description will appear as an x instead of a p You should also include appropriate package and pin information at the end of the description line This information is required when creating a PCB netlist for TraxMaker The package name represents the component name that is to be used in TraxMaker The pin information indicates the pinout of the device in the package For example 500mW 40V 800mA pkgTO18 321 PARAM Q2N2222A FileMcebjtslib Note that the pin order is specified as 321 SPICE defines the pin order of a BJT as collector base emitter see Bipolar Junction Transistors BJTs in Chapter 6 Analog Mixed Signal Simulation In a TO18 package containing a 2N2222A transistor the emitter is connected to pin 1 next to the tab the base is connected to pin 2 and the collector is connected to pin 3 These pin numbers correspond to the pad designations in TraxMaker CircuitMaker identifies pins by the order of placement in a device symbol and TraxMaker identifies pads by their designation This information can be used to create a netlist linking one program to the other If the same device is available in different packages you may specify additional packages using an alias Notice the SPICE prefix character is replaced with the letter A and the file reference is removed 350mW 40V 800mA aliasQ2N2222A pkgTO92B 123 PARAM APN2222A If there are multiple devices in the same package the pins need to be specified for each device with a letter to indicate the designation extension Dual Op Amp pkgDIP8 A32841B56847 PARAM XMC1458 FileMcemodslib These two methods may be combined if you have multiple devices that are available in different packages Chapter 16 Creating New Devices 16311 Linking Inside Subcircuits Using an Alias Sometimes it is necessary to link two different devices to the same subcircuit This may be required when two devices contain identical internal circuitry but different package or pin information The best way to do this is to add an ALIAS to the subcircuit sub file using any text editing program like NotePadÒ WordPadÒ etc The file must be saved in standard text format Below is the general text format Description aliasXLINKSUBNAME pkgPackage Pins PARAM XNEWNAME Data Description Description Information about the nature of the device such as voltage current etc XLINK The name of the subcircuit to be referenced The first letter will always be the appropriate SPICE character followed by the subcircuit name Vertical bar separator NOTE There cannot be a space between the vertical bar separator and the XLINK or SUBNAME SUBNAME The name of the subcircuit file sub where the subcircuit to be referenced is located This will include the first 8 characters not including spaces Do not include the sub extension pkg The package name and pin numbers in appropriate format for export to a PCB layout program such as TraxMaker NOTE See different sub files for examples of this format XNEWNAME The new name of the device as seen in the parts list 16312 Chapter 16 Creating New Devices The following is an example of a subcircuit internal alias link Reference Instrumentation Amplifier LOW POWER pkgDIP8 32746518 PARAM XAD620A FileAnalogDlib New Device Data Creating New SPICE Models with Parameter Passing Parameter passing simplifies the task of creating new components It allows you to pass databook values directly into generic SPICE models or subcircuits using mathemati cal equations to create SPICE model parameters The generic model is placed in the linking file associated with the device symbol then referenced by an alias Devices created in this manner are selected and edited just like any other device model To edit the parameters being passed doubleclick the device then click Edit General Form Generic Model MNAMEDevice Title MNAMEP1P1 Description MinMaxDefault MNAMEP2P2 Description MinMaxDefault MNAMEPnPn Description MinMaxDefault P1Default P1Default PnDefault Desc pkgPackage Pins Generic MODEL or SUBCKT using P1 P2 etc in math expressions General Form Alias Desc aliasMNAME P1Val P2Val pkgPackage Pins PARAM ANAME Data Description MNAME The name of the generic model or subcircuit including the appropriate SPICE prefix character Instrumentation Amplifier LOW POWER aliasXAD620AINSTAMP pkgSMD8A 32746518 PARAM XAD620AR Chapter 16 Creating New Devices 16313 P1 P2 etc The names of the parameters being passed P1 Description etc The description of the parameters Min and Max Optional items which limit the value that can be entered for each param eter Default The default value for each parameter if no value is specified Desc A description of the device Package and Pins Information used for export to TraxMaker for PCB layout ANAME The alias name the name of the specific device Valid operators in the math expressions include Following is an example of a generic subcircuit for a crystal which can be used as a building block for creating other crystals XCRYSTALCrystal Subcircuit Parameters XCRYSTALFREQFundamental frequency 11MEG XCRYSTALRSSeries resistance 1750 XCRYSTALCXParallel capacitance 013pf XCRYSTALQQuality Factor 1010001000 FREQ1Meg RS750 C13pf Q1000 Generic 1MHz Crystalcrystal pkgXTAL1 12 SUBCKT XCRYSTAL 1 2 LS 1 2 QRS62831852FREQ IC05M CS 2 3 1Q62831852FREQRS RS 3 4 RS CX 1 4 CX ENDS XCRYSTAL aliasXCRYSTAL FREQ2E6 RS250 pkgXTAL1 12 PARAM A2000MHZ Since CX and Q are not passed in the alias parameter list the default values of 13pF and 1000 will be used 4 3 2 1 Ls Cs Rs Cx Crystal Subcircuit 16314 Chapter 16 Creating New Devices Editing Digital Model Parameters When you doubleclick a device that has digital simcode models associated with it Figure 1616 appears Figure 1616 Digital simcode devices are mixedsignal digital devices which you can simulate in analog mode using features of XSpice Digital simcode devices use eventdriven behavioral models created at MicroCode Engineering You cannot add new simcode models however simcode devices can be used in macro circuits to create new mixedmode digital devices While you cannot edit the model itself you can alter certain parameters of the model To do so click it with the mouse then click Edit to display the dialog box in Figure 1617 Figure 1617 Use the Digital Model Parameters dialog box to alter certain parameters of a model Chapter 16 Creating New Devices 16315 The radio buttons let you specify whether each of the parameters of the model will be minimum typical or maximum values for the selected devices Refer to Edit Items in Chapter 10 Edit Menu for information about changing the parameters of multiple devices The Default setting allows the parameter to remain unchanged All parameters can vary from pin to pin part to part and family to family Parameter Description Propagation Delays The time it takes for a signal change on an input to affect the data on the output Transition Times The rise and fall times of the outputs Input Loading The amount of load resistance that will be applied to the output of the driving device Output Drive The amount of output current available Device Current The amount of current drawn through the supply pin to ground User Defined This parameter does not affect digital models provided with CircuitMaker The edit fields let you enter specific values for certain parameters The values take precedence over family specific values Under normal conditions they should be left blank Parameter Description GND PWR These two parameters must be programmed as a pair if you set one you must also set the other Setting these voltages will override any other power and ground voltages specified for the selected devices VOL VOH These two parameters will override the family defaults VIL VIH These two parameters will override the family defaults 16316 Chapter 16 Creating New Devices WARN Flag When set to one 1 warning mes sages will be generated when there are timing or supply voltage viola tions on the device Chapter 17 Digital SimCode 17317 CircuitMaker PRO only Digital SimCode TM C H A P T E R 17 Digital SimCodeTM provides the means for the electronics professional to create andor modify digital components which operate in AnalogMixedSignal Simulation Digital SimCode cannot be used to create components for Digital Logic Simulation The functionality of devices for Digital Logic Simulation is builtin to CircuitMaker and you cannot add to it except by creating macro circuits Due to the complexity of digital devices it is generally not practical to simulate them using standard noneventdriven Spice instructions For this reason MicroCode Engineering has created a special descriptive language that allows digital devices to work in AnalogMixedSignal Simulation using and extended version of the eventdriven XSpice The digital devices included in the CircuitMaker library are modeled using the Digital SimCode language The Digital SimCode language does not provide the means to create digital devices with analog characteristics such as analog switches timedelayed oneshots etc nor can it be used to create new components for Digital Logic Simulation Digital SimCode is a proprietary language created specifi cally for use with CircuitMaker and devices created with it are not compatible with other simulators nor are digital components created for other simulators compatible with CircuitMaker Note Programming in the Digital SimCode language is not intended for the average CircuitMaker user It requires a basic understanding of standard programming techniques as well as a complete understanding of the characteristics of the device that you are trying to create These topics are not covered in this manual 17318 Chapter 17 Digital SimCode CircuitMaker PRO only Creating New SimCode Devices Digital SimCode used in conjunction with XSpice is what allows digital components to be simulated in AnalogMixed Signal Simulation mode To create a new digital SimCode device 1 Create a symbol to represent the device in your sche matic See Chapter 16 Creating New Devices for more detailed information about the process Note This step may not be necessary if you are creating a new device that has an equivalent function in another family For example if you are creating a 74F190 we recommend that you use the equivalent symbol for the 74190 for a couple of reasons First the function of the device is identical and the symbol has already been drawn Second if you want to use the component in Digital Logic Simulation mode the existing symbol will work New symbols that you create will not work in Digital mode unless they contain internal macro circuitry This internal macro circuitry would disable the Digital SimCode model in Analog mode 2 Create a MOD file to be used with the symbol The MOD file name must match the name of the symbol see Model and Subcircuit Linking Files in Chapter 16 Creating New Devices If you are using an existing symbol you must use the existing MOD file as well Just add the new model information see below into the existing MOD file Each Digital SimCode model declaration in a MOD file has two lines Line 1 is a comment line which contains information used by CircuitMaker Line 2 contains the model information that is used by WXSpice during simulation This example is followed by a brief descrip tion of each item Counter typedigital pkgDIP14 DVCC5DGND106723141118912 MODEL A74LS90 xsimcodefileMODELPATHLSSCB funcls90 mntymx Chapter 17 Digital SimCode 17319 CircuitMaker PRO only Line 1 What it Does Counter Describes the device typedigital Sets the devices Parameters field pkgDIP14 Sets the devices Package field DVCC5DGND10 Sets devices Bus Data field required if supply pins not on symbol 672314 Sets the devices Pin Data list Line 2 What it Does MODEL Declares the model statement A74LS90 Names the model digital SimCode models begin with the letter A xsimcode Model type for a digital SimCode model file Points to file containing the devices digital SimCode MODELPATH is a shortcut to the Models directory as specified in the CircuitMaker prefer ences func Names the devices digital SimCode function data Contains ASCII data for the READDATA function optional mntymx Passes the devices Digital Model Parameters into SimCode this must appear exactly as shown 3 Create a digital SimCode model for the device You can do this in any ASCII text editor such as Notepad If using a word processor be sure to save the file in text only format The file can be given any name and extension as long as it matches the file name listed in the file parameter in the MOD file Multiple digital SimCode device models can be placed in the same file The simplest process is to start by making a copy of an existing device preferably one which is similar in either function or characteristics and make modifications to the SimCode as needed Some examples of SimCode devices are included in a file called SIMCODETXT for your reference 4 Test the new device in CircuitMaker by creating a simple circuit to test its functionality Test only one new device at a time When you run the simulation the source code model is automatically compiled and the compiled code is placed in an ASCII text file called SIMLISTTXT in the same directory as WXSPICEEXE This file also contains a listing of the execution order of the source code model Refine the SimCode source model as needed and continue testing until youve completely debugged the model 5 Copy the compiled model file to your SimCode library Create a separate library file in which to place your compiled SimCode models It does not matter what you name this file but in order to be used you must set the file parameter in the MOD file to be the same as the file name of the compiled SimCode model library SimCode models are stored in two types of files The source models are stored in files with the TXT extension for example LStxt and Stxt and the compiled models are stored in files with the SCB extension for example Stdscb and Cmosscb The 74LS74 Example The following sections contain information about the 74LS74 Digital SimCode model example SimCode Function Identification See in the example on page 176 ls74 source identifies the beginning of the SimCode source function for the 74LS74 Data declarations See ⒉ the example This section consists of pin and variable declarations The INPUTS statement declares the names of the input pins VCC and GND pins are included in this statement The order of these pins must match the order of their corresponding pin declarations in the devices Spice Data field The OUTPUTS statement declares the names of the output pins Notice that the input pins are listed here as well but with the suffix LD The input pins must also be declared as outputs so that the device can provide a load on the driving circuitry VCC pins are included in this statement but not GND pins The order of these pins must match the order of their corresponding pin declarations in the devices Spice Data field The PWRGNDPINS statement declares which pins will be used for device power and ground and samples their voltage levels for use later in the SimCode SimCode Function Initialization See ⒊ in the example The IF initsim THEN section is executed only once at the beginning of the simulation In this section we set the device characteristics that are not subject to change due to outside influences such as databook specifications The outputs states should also be initialized here to their most likely state The EXIT command should be placed at the end of this section LOAD and DRIVE Statements See in the example These statements are used to declare the load and drive capabilities of the device pins Device Functionality See ⒌ in the example This section can vary dramatically from part to part In this example an EXTTABLE command has been used Other device models use a variety of IFTHEN STATEBIT NUMBER and other statements to define the logical function of the device Tests for Device Setup Violations See ⒍ in the example These tests warn of device setup violations which in the real world may cause a device not to function properly In the simulation the device will generally still function but warnings if enabled will be displayed Output DelaysPost Events See ⒑ in the example The DELAY statements occur at the end of the SimCode function These statements actually post the events to XSpice to let it know that something has changed and when these events are scheduled to occur relative to the rest of the simulation Timing propagation delay is assigned to each output based on the databook specifications input stimulus and the functionality of the device ⒈ ls74 source 12 74LS74 D flipflop Digital Simcode Model typical prop delay values from TI 1981 2nd edition data book INPUTS VCC GND PRE DATA CLK CLR OUTPUTS VCCLD PRELD DATALD CLKLD CLRLD QN Q INTEGER tblIndex REAL tsval tphlval tsval tval trecval ttval temptp clktwl clktwh preclrtwl rilval rihval riccval PWRGNDPINSVCCGND set pwrparam and gndparam values SUPPLYMINMAX475525 test for min supply475 and max supply525 VOLVOHMIN020401 volparamgndparam02vohparam04 VILVIHVALUE125135 set input threshold values vil and vih IOPAIRSPRELD DATADATALD CLKCLKLD CLRCLRLD IF initsim THEN BEGIN select prop delay setup hold and width times MESSAGEtime tPRE tCL tDATA tQN debug NOTE both ttlh and ttlh are the same value ttval MINTYPMAXtpparam NULL 5n NULL temptp PWLTABLEsimtemp 75 5n 125 5n tp temperature affect tphlval MINTYPMAXtpparam NULL 14n 25n temptp tphlval MINTYPMAXtpparam NULL 20n 40n temptp tsval 20n thval 5n trecval 5n clktwl 25n preclrtwl 20n ls stdout drive IOL max8mA VOL typ035Vrolparam 035V8mA4375 ls stdout drive IOL max8mA VOL max05V rolparam05V8mA625 ls stdout drive IOS min20mA VCC max525V rohparam525V20mA2625 ls stdout drive IOS max100mA VCC max525Vrohparam525100mA525 rohparamMINTYPMAXdrparam 625 4375 NULL ls input load ITH max20uA Vin27V ril 27volparam20uA125k rilvalMINTYPMAXldparam NULL NULL 125k Ls input load IIL max04mA Vin04Vrihvohparam0404mA105k rival MINTYPMAXldparam NULL NULL 105k Icc 5V 2500 4mA2 typical 1250 8mA2 max riccval MINTYPMAXiparam NULL 2500 1250 STATE Q ONE initialize output states STATE QN ZERO EXIT END DRIVE Q QN v0volparamv1vohparamttlhtvaltthtval LOAD PRELD DATALD CLKLD CLRLD v0volparamr0rilvalv1vohparamr1rihvali01e9tlp EXTTABLE tblIndex PRE CLR CLK DATA Q QN 0 1 X X H L 1 0 X X L H 0 0 X X H H 1 1 X DATA DATA 1 1 X Q Q MESSAGE sd d d d d d presenttimePRECLRCLKDATAQQN LOAD VCCLD v0gnparamr0riccvaltlp IF warnparam THEN BEGIN IF PRE CLR THEN BEGIN SETUPHOLDCLKLH DATA Ttsval Thhval CLKDATA RECOVERCLKLH PRE CLR Ttrecval CLKPRE or CLR WIDTHCLK Twlclktwl Twhclkth CLK WIDTHPRE CLR Twl preclrtwl PRE or CLR END END DELAY Q QN CASE TRANLH tplhval CASE TRANHL tplhval END EXIT Chapter 17 Digital SimCode 17323 17324 Chapter 17 Digital SimCode CircuitMaker PRO only Editing Device Data for SimCode Devices Each device symbol includes netlist information specific to the device found in the Edit Device Data dialog box For Digital SimCode devices the information required is slightly different from other analog devices For example the Spice Data field must contain data not found in other devices The node list in the Spice Data field is divided into two sections one for input nodes and one for output nodes Each of these sections is delimited by square brackets input nodes first followed by output nodes The nodes must be listed in the same order as the pins in the INPUTS and OUTPUTS statements in the SimCode The pin number used in the Spice Data field for example 1i 2i etc indicates the position of each pin in the devices Pin Data list If that pin number is followed by the letter b for example 14bi that indicates that the pin is found in the Bus Data field rather than on the symbol itself and repre sents the actual pin number on the package The i and the o specify the pin type as input or output For the 7474 12 device symbol the Spice Data field is set to D 14bi 7bi 1i 2i 3i 4i14o 1o 2o 3o 4o 5o 6o M When using these SimCode pin declarations INPUTS VCC GND PRE DATA CLK CLR OUTPUTS VCCLD PRELD DATALD CLKLD CLRLD QN Q the items in the Spice Data field have the following mean ings Item Meaning D Device Designation 14bi VCC pin 14 on the actual package declared in Bus Data field 7bi GND pin 7 on the actual package declared in Bus Data field 1i PRE input 1st pin in Pin Data list 2i DATA input 2nd pin in Pin Data list Chapter 17 Digital SimCode 17325 CircuitMaker PRO only 3i CLK input 3rd pin in Pin Data list 4i CLR input 4th pin in Pin Data list 14o VCCLD still pin 14 but acts as load on VCC supply 1o PRELD load applied by PRE input 2o DATALD load applied by DATA input 3o CLKLD load applied by CLK input 4o CLRLD load applied by CLR input 5o QN output 5th pin in Pin Data list 6o Q output 6th pin in Pin Data list M A74LS74 the name of the selected SimCode model Other information for the Edit Device Data dialog box includes Option Information Analog checkbox Enabled LabelValue 74LS74 Auto Designation Prefix U Spice Prefix Character A Bus Data DVCC14DGND7 Parameters typedigital 17326 Chapter 17 Digital SimCode CircuitMaker PRO only SimCode Language Definition The following items make up the Digital SimCode language The following pages described each of these items in detail INPUTS Input pins pins that monitor the circuit OUTPUTS Output pins pins that drive or load the circuit INTEGERS Integer variables and arrays REALS Real variables and arrays PWRGNDPINS Power and ground pins and record supply voltage IOPAIRS Inputoutput pin associations for input loading Device Setup Functions Use these functions to set certain characteristics of the device pins VILVIHVALUE Sets absolute VIL and VIH values VILVIHPERCENT Sets VIL and VIH values to a percent age of supply voltage VOLVOHMIN Sets VOH and VOL relative to power and ground Device Test Functions Use these functions to test for any device setup violations which may occur in the circuit These violations may not affect the simulation of the devices functionality ie the device may continue to function in simulation even with setup violations In order to know if any of these setup violations have occurred you must enable warnings SUPPLYMINMAX Tests supply pins for minmax supply voltage violations RECOVER Tests inputs for recovery time violations SETUPHOLD Tests inputs for setup and hold time violations Chapter 17 Digital SimCode 17327 CircuitMaker PRO only WIDTH Tests inputs for minimum pulse width violations FREQUENCYFMAX Tests inputs for minimum maximum frequency violation Output Pin Functions Use these functions to program the output pins of a device STATE Sets outputs to the declared logic state STATEBIT Sets outputs to binary weighted logic states LEVEL Sets the level of the output state STRENGTH Sets the strength of the output state TABLE Sets output logic states based on truth table EXTTABLE Sets output logic states based on extended truth table LOAD Declares loading characteristics of input pins DRIVE Declares drive characteristics of output pins DELAY Sets propagation delay to specified outputs NOCHANGE Leaves output state of IO pins unchanged EVENT Causes a digital event to be posted Expression Operations Use these operators and functions in expressions to manipulate data and to make comparisons which control program flow Expressions are always contained within parentheses Operator precedence is from left to right starting with the inner most parentheses Operators 17328 Chapter 17 Digital SimCode CircuitMaker PRO only Math Functions POW ABS SQRT EXP LOG LOG10 SIN COS TAN ASIN ACOS ATAN HSIN HCOS HTAN Expression Functions Use these functions various expressions PARAMSET Determines if a predefined SimCode param has been set PWLTABLE Returns value from interpolative lookup table SELECTVALUE Returns value from simple lookup table MINTYPMAX Returns value from MINTYPMAX lookup table NUMBER Returns number based on binary weighted pin states VALUE Returns state of the specified pin CHANGETIME Returns time when the specified pin last changed state WIDTHTIME Returns last pulse width encountered on specified pin INSTANCE Checks to see if this is the specified device instance CHANGEDxx Checks to see if the specified pin has changed state READDATA Reads data from an ASCII file into arrays Chapter 17 Digital SimCode 17329 CircuitMaker PRO only Program Control Use these statements to control the flow of the program xxxx source Identifies the beginning of the SimCode source function IF THEN Conditionally controls flow through the SimCode WHILE DO Conditionally controls looping in the SimCode GOTO Jumps to a new location in the SimCode GOSUB Jumps to a subroutine in the SimCode RETURN Returns from a subroutine in the SimCode EXIT Terminates SimCode execution Output Text Use these commands to display messages during simulation and debugging PROMPT Pause simulation and display a message MESSAGE Display a message without pausing Debug Use these commands to trace through the execution of the SimCode for debugging purposes STEPON Turn on the SimCode trace mode STEPOFF Turn off the SimCode trace mode 17330 Chapter 17 Digital SimCode CircuitMaker PRO only SimCode Language Syntax This section describes each of the language items in detail The following punctuations are used in describing the syntax italics reserved words or emphasis valuevariablepinexpression optional parameter selections you must choose ONE of these parameters xxxx source Identifies the beginning of the SimCode source function General Form func name source Parameters func name Name of the SimCode function Use This statement identifies the SimCode function so that it can be called when it is time to simulate this device It must be the first statement of each Digital SimCode device function Notes WXSpice has the ability to read either source code models or compiled code models The keyword source identifies this as a source code model to be compiled by WXSpice When the simulation is run the source code model is compiled and the compiled code is placed in an ASCII text file called SIMLISTTXT in the same directory as WXSPICEEXE Example MyDevice source INPUTS VCC GND IN1 IN2 OUTPUTS VCCLD IN1LD IN2LD OUT EXIT Chapter 17 Digital SimCode 17331 CircuitMaker PRO only CHANGETIME Returns time when the specified pin last changed state General Form CHANGETIMEpin Parameters pin Input or output pin name Use This function returns a real value that indicates the last time the specified input or output pin changed states Example T1 CHANGETIMEINA CHANGEDxx Checks if the specified pin has changed state General Form CHANGEDxxpin vartimevalue Parameters pin Input or output pin name vartimevalue Item to which pin is compared Use The CHANGEDxx function is used to determine if the specified pin has changed state The xx that follows the keyword CHANGED can be eliminated to indicate any type of change or the xx can be set to LH LX HL HX XL XH LZ ZL ZH ZX HZ or XZ to indicate a specific type of change The optional compare operator and vartimevalue would be included to check for a more specific change If they are not included the function will return 1 if the pin has changed at the current simulation step Examples IF CHANGEDLHCLK THEN IF CHANGEDDATA 10n THEN 17332 Chapter 17 Digital SimCode CircuitMaker PRO only DELAY Sets propagation delay to specified outputs General Form 1 DELAY output output delay General Form 2 DELAY output output CASE conditional exp delay CASE conditional exp delay CASE conditional exp delay END Parameters output Name ofvariable index to the output pin conditional exp Conditional expression that determines which delay is used delay Propagation delay time to the output pin Use The DELAY command is executed once for each pin listed and posts a propagation delay for each pin that has changed its level The CASE option allows more than one delay to be specified The conditional exp then determines which delay will be used If a delay is set for a pin that has not changed then the pin will be flagged as NOCHANGE and the delay will not be posted The delay can be a real constant a real variable or a real expression Notes The DELAY command must be executed exactly once for each output pin that is for each pin declared in the OUT PUTS statement which is not listed in the LOAD or NOCHANGE statements The order in which the delays are set is based on the order in which these pins are listed in the DELAY command ie first pin listed is set first Each conditional expression is evaluated in the order it is listed until one expression evaluates TRUE When this occurs the delay value associated with the TRUE expression is posted for the output being set When using the CASE option at least one conditional exp should evaluate as TRUE for each output pin listed If no conditional exp evaluates to TRUE the delay associated with the last CASE statement is posted Chapter 17 Digital SimCode 17333 CircuitMaker PRO only In addition to the standard expression functions the following terms apply only to the output pin being set and can be used in the conditional exp TRANLH lowtohigh TRANLX lowtoother TRANHL hightolow TRANHX hightoother TRANHZ hightotristate TRANXL othertolow TRANXH othertohigh TRANLZ lowtotristate TRANZL tristatetolow TRANZH tristatetohigh TRANZX tristatetoother TRANXZ othertotristate TRANXX othertodifferent If the delay value is less than or equal to 00 a runtime error message will be displayed Output pins can be speci fied by using the output pin name or by an integer variable the contains the index of an output pin Pin names and variables cannot be mixed in the same DELAY statement References to outputs must be either all pin names or all variable names Examples DELAY Q1 Q2 Q3 Q4 10n DELAY Q QN CASE TRANLH tplhval CASE TRANHL tphlval END data E01 CHANGEDD0 CHANGEDD1 DELAY Q1 Q0 CASE data TRANLH tplhDQ CASE data TRANHL tphlDQ CASE TRANLH tplhEQ CASE TRANHL tphlEQ END In this example if data is nonzero and Q1 is changing from High to Low the tphlDQ delay will be posted for Q1 Then if Q0 is changing from Low to High the tplhDQ delay will be posted for Q0 17334 Chapter 17 Digital SimCode CircuitMaker PRO only DRIVE Declares drive characteristics of output pins General Form DRIVE output output v0value v1value ttlhvalue tthlvalue Parameters output Name of or variable index to the output pin value Real value or variable v0 VOL for the output pin v1 VOH for the output pin ttlh Lowtohigh transition time for the output pin tthl Hightolow transition time for the output pin Use The DRIVE command is used to declare the output pins DRIVE characteristics When the output is set to a LOW state the output pin is connected to voltage value v0 through resistance rolparam When the output is set to a HIGH state the output pin is connected to voltage value v1 through resistance rohparam The lowtohigh transition time is set by ttlh and the hightolow transition time is set by tthl Notes Pin names and variables cannot be mixed in the same DRIVE statement References to outputs must be either all pin names or all variable names The values used for rolparam should be derived using the databook specs for VOL This value represents the total saturation resistance of the pulldown structure of the devices output A standard LS output in the LOW state for example sinking 8mA will not exceed 05V typically closer to 035V Therefore Chapter 17 Digital SimCode 17335 CircuitMaker PRO only for typ LOW state drive rolparam VOLtyp IOLmax rolparam 035V 8mA rolparam 4375 ohms for min LOW state drive rolparam VOLmax IOLmax rolparam 05V 8mA rolparam 625 ohms The values used for rohparam should be derived using the databook specs for IOS if available This value represents the total saturation resistance of the pullup structure of the devices output A standard LS output in the HIGH state with the output shorted to ground and Vcc525V will source at least 20mA but not more than 100mA Therefore for min HIGH state drive rohparam VCCmax IOSmin rohparam 525V 20mA rohparam 2625 ohms for max HIGH state drive rohparam VCCmax IOSmax rohparam 525V 100mA rohparam 525 ohms Example rolparam MINTYPMAXdrvparam 625 4375 NULL rohparam MINTYPMAXdrvparam 2625 NULL 525 DRIVE Q QN v0volparamv1vohparamttlhttlhval tthltthlval See Also LOAD 17336 Chapter 17 Digital SimCode CircuitMaker PRO only EVENT Causes a digital event to be posted General Form EVENT timeexpression Parameters time Time at which event should occur expression Expression indicating time at which event should occur Use In most cases a digital event is posted when one or more INPUT pins for a simcode model changes state When the event is processed the simcode for the specified event is called and run This instruction allows a simcode model to post a digital event at a specified time If the specified EVENT time is greater than the simulation time indicated by presenttime then a digital event will be posted If more than one EVENT is posted in a single call to a simcode model only the longest EVENT time will be used This function allows the creation of oneshots and other similar device models Notes If a digital event for a specific simcode model occurs before an EVENT time posted by that simcode the EVENT time must be posted again For example if 1 the present simulation time is 1us 2 a simcode model sets EVENT 2us and 3 an INPUT pin in the simcode model changes state at 15us then the 2us event must be posted again Example EVENT presenttime 1e6 return in 1us EXIT Terminates SimCode execution General Form EXIT Chapter 17 Digital SimCode 17337 CircuitMaker PRO only Use The EXIT statement is used to terminate SimCode execution Notes This is the last line of a SimCode model but it may also be placed at other locations to abort execution of remaining SimCode EXTTABLE Sets output logic states based on extended truth table General Form EXTTABLE line input pin input pin output pin output pin input state input state output state output state Parameters line Variable into which the line number used in the table is placed input pin Name of the input pin output pin Name of the output pin input state State of the individual inputs output state State of the individual outputs based on input conditions Use The EXTTABLE statement is an extended truth table function used to set the level and strength of the specified outputs Valid input states are 0 low input voltage is vilparam 1 high input voltage is vihparam lowtohightransition v hightolowtransition X dont care what input voltage is Valid output states are L ZERO set output level to volparam H ONE set output level to vohparam Z UNKNOWN set output level to v3sparam 17338 Chapter 17 Digital SimCode CircuitMaker PRO only It also allows INPUT andor OUTPUT pin names with optional prefixes to specify the output states Prefixes are State is the previous state State is the inverse of the state State is the inverse of the previous state Output state letters can be followed by a colon and a letter to indicate strength s STRONG set output to rolparam for L and rohparam for H z HIIMPEDANCE set output to r3sparam If a strength character is not specified after an output state then STRONG will be used for L and H states and HIIMPEDANCE will be used for Z states Notes Each row is tested sequencially from top to bottom until the input conditions are met The outputs are set for the first row to meet the input conditions line is set to the line number in the table that was used If no match was made then line is set to 0 Pin names used to specify output states do not need to be in the table heading Unlike the TABLE statement input variables are not allowed Example EXTTABLE tblIndex PRE CLR CLK DATA Q QN 0 1 X X H L 1 0 X X L H 0 0 X X H H 1 1 X DATA DATA 1 1 X X Q Q This example is representative of 12 of a 7474 D type flip flop If input pins PRE CLR and DATA are all high vihparam and CLK has a lowtohigh transition Q is set to high vohparam and STRONG rohparam QN is set to low volparam and STRONG rolparam and tblIndex is set to 4 See Also REALS STATE STATEBIT TABLE Chapter 17 Digital SimCode 17339 CircuitMaker PRO only FREQUENCY FMAX Tests inputs for minimum and maximum frequency violation General Form FREQUENCYinput input MINfrequency MAXfrequency message Parameters input Name of or variable index to the input pin under test MIN Minimum frequency allowed on the pin under test MAX Maximum frequency allowed on the pin under test message Text string that will be displayed if a warning occurs Use The FREQUENCY function compares the input period the time from one lowtohigh edge to the next lowtohigh edge with the reciprical of the specified frequency 1 freq If the time period for the input is smaller than the reciprical of the specified MAXfrequency or the time period for the input is greater than the reciprocal of the specified MINfrequency then a WARNING will be displayed An optional message string can be included in the FREQUENCY statement which will be output if a WARNING is displayed Notes Databook specifications should be used with this function Pin and variable names can be mixed in the same FRE QUENCY statement Only the first FREQUENCY failure for each pin listed will be reported Example FREQUENCYCLK MAX10MEG CLK check fmax only 17340 Chapter 17 Digital SimCode CircuitMaker PRO only GOSUB Jumps to a subroutine in the SimCode General Form GOSUB label Parameters label Location in SimCode where program flow resumes Use The GOSUB instruction is used to perform nonsequencial execution of the SimCode However unlike the GOTO statement SimCode execution will continue on the instruc tion following the GOSUB instruction when a RETURN instruction is encountered in the SimCode being run Example GOSUB ShiftLeft Exit ShiftLeft RETURN See Also RETURN GOTO Jumps to a new location in the SimCode General Form GOTO label Parameters label Location in SimCode where program flow resumes Use The GOTO instruction is used to perform nonsequencial execution of the SimCode Chapter 17 Digital SimCode 17341 CircuitMaker PRO only Notes Program flow resumes from the location where label appears in the SimCode label must being with an alpha character followed by any number of alphanumeric charac ters or the underscore character Where label appears in the code it must be followed immediately by a colon Example GOTO Shutdown Shutdown Exit See Also GOSUB IF THEN IF THEN Conditionally controls flow through the SimCode General Form 1 IF expression THEN BEGIN ELSE END General Form 2 IF expression THEN GOTO label Parameters expression Any expression that can be evaluated as true or false label Location in SimCode where program flow resumes Use The IF THEN statement is used to control the flow of the program based on whether expression evaluates to true or false Multiple IF THEN statements may be nested Notes When the BEGINELSEEND form of this statement is used and expression evaluates to true program flow resumes from the BEGIN statement and skips any optional SimCode between the ELSE and END statements If expression 17342 Chapter 17 Digital SimCode CircuitMaker PRO only evaluates to false program flow resumes from the optional ELSE statement if it exists or after the END statement if it does not exist When the GOTO form of this statement is used and expres sion evaluates to true program flow resumes from the location where label appears in the SimCode label must being with an alpha character followed by any number of alphanumeric characters or the underscore character Where label appears in the code it must be followed immediately by a colon Examples IF EN THEN BEGIN STATE Q0 UNKNOWN ELSE IF IN2 THEN BEGIN STATE Y2 ONE ELSE STATE Y2 ZERO END END IF x 2 THEN GOTO DoNeg2 DoNeg2 See Also GOTO WHILE DO INPUTS Declares input pins pins that monitor the circuit General Form INPUTS input pin input pin Parameters input pin Name of the input pin Chapter 17 Digital SimCode 17343 CircuitMaker PRO only Use The INPUTS data type is used to define the pins which monitor stimulus external to the device These generally include input io power and ground pins Notes Input pin names must begin with a letter and be defined before they are used Example INPUTS VCC GND PRE DATA CLK CLR See Also OUTPUTS IOPAIRS PWRGNDPINS INSTANCE Checks if this is the specified device instance General Form INSTANCEinstance name Parameters instance name Text string indicating instance name Use The INSTANCE function returns 1 if the present instance of the SimCode device matches the instance name specified Otherwise it returns 0 Notes A circuit may contain more than one of any given device During simulation it may be important to know if the device being simulated at this moment is the one you are interested in This would allow you for example to print messages for one specific NAND gate without having to wade through messages for all the other NAND gates as well The instance name is the device Designation preceded by its Spice Prefix Character the letter A Example IF INSTANCEAU23 THEN BEGIN MESSAGEU23Q0 d Q0 END 17344 Chapter 17 Digital SimCode CircuitMaker PRO only INTEGERS Declares integer variables and arrays General Form INTEGERS var var Parameters var Name of the variable Use The INTEGERS data type is used to define integer variables and arrays Notes Integer variables and arrays must begin with a letter and be defined before they are used Integer arrays are defined by following the array name with a left bracket an integer number which defines the size of the array and a right bracket Integer arrays can be set andor used in expressions The following are reserved SimCode integer variables which do not need to be declared The first six variables in this list are expected to have a value of 1 2 or 3 These values represent an index into the min typmax arrays Variable Use Digital Model Parameter Spice Option tpparam tplhhl index Propagation Delays TPMNTYMX ttparam ttlhhl index Transition Times TTMNTYMX ldparam LOAD index Input Loading LDMNTYMX drvparam DRIVE index Output Drive DRVMNTYMX iparam ICC index Device Current IMNTYMX userparam USER index User Defined USERMNTYMX warnparam Warning messages WARN flag SIMWARN initsim 1 during simcode init NA NA tranpin TRANxx pin index NA NA Chapter 17 Digital SimCode 17345 CircuitMaker PRO only Value Represent 1 Index to minimum value 2 Index to typical value 3 Index to maximum value The Digital Model Parameter can be set independently for each digital device in the Digital Model Parameters dialog box If a Spice Option parameter is set in the Analog Options dialog box that setting will globally override the Digital Model Parameter settings for all digital devices If the variable is set explicitly in the SimCode that setting will override all other settings warnparam can be set to any positive value to condtionally display warning messages for the device Different levels of warning could be created by the device programmer accessed by entering different positive values The value of initsim is set 1 during SimCode initialization otherwise it is set to 0 The value of tranpin is set to the index of the pin being set during a DELAY CASE statement This index is used to determine which pin the TRANxx instruction is applied to Example INTEGERS tblIndex count data64 See Also DELAY MINTYPMAX 17346 Chapter 17 Digital SimCode CircuitMaker PRO only IOPAIRS Declares inputoutput pin associations for input loading General Form IOPAIRS ipinopin ipinopin Parameters ipinopin Pin names of associated input and output pins Use The IOPAIRS statement defines which of the INPUTS pins are associated with which of the OUTPUTS pins This association is used by the LOAD statement Notes Each physical input pin on a device consists of both an ipin and an opin in SimCode The opin is required to provide input loading characteristics This statement can only be used once in the SimCode Power pins are not listed in the IOPAIRS statement Example IOPAIRS IN1IN1LD IN2IN2LD In this example IN1 and IN2 are INPUTS and IN1LD and IN2LD are OUTPUTS IN1 and IN1LD both refer to the same physical pin on the device See Also INPUTS OUTPUTS LOAD Chapter 17 Digital SimCode 17347 CircuitMaker PRO only LEVEL Sets the level of the output state General Form 1 LEVEL output output expression General Form 2 LEVEL output output ZEROONEUNKNOWN Parameters output Name of or variable index to the output expression Any expression compared to VOL or VOH Use The state of an output pin is determined by its level and its strength Use the LEVEL command to set the level of one or more output pins expression State Level volparam ZERO volparam vohparam ONE vohparam other UNKNOWN v3sparam Notes Output pins can be specified by using the output pin name or by an integer variable the contains the INDEX of an output pin Pin and variable names cannot be mixed in the same LEVEL statement References to outputs must be either all pin names or all variable names Examples LEVEL Q ONE LEVEL Q1 Q2 Q3 Q4 ZERO LEVEL OUT 123 In the last example OUT will be ZERO if vilparam 1 UNKNOWN if vilparam 1 and vihparam 1 ONE if vihparam 1 See Also REALS STATE STATEBIT STRENGTH 17348 Chapter 17 Digital SimCode CircuitMaker PRO only LOAD Declares loading characteristics of input pins General Form LOAD output output v0value r0value v1value r1value iovalue tvalue Parameters output Name of or variable index to the output pin value Real value or variable v0 Load voltage for HIGH state input r0 Load resistance for HIGH state input v1 Load voltage for LOW state input r1 Load resistance for LOW state input io Offstate load resistance for unused load t Time delay before the load will be applied Use The LOAD command is typically used with input or power pins to provide loading for the driving circuit Since only output pins can provide a load each input must have a corresponding output These are assigned using the IOPAIRS statement If different loads are required for different inputs multiple LOAD statements may be used Power pins should be placed in a separate LOAD statement which does not include the v1r1 load or io Power pins are not included in the IOPAIRS statement The IOPAIRS statement must be entered before any LOAD statements that contain io Notes An input load consists of a voltage and a resistance v0r0 or v1r1 The voltage level of the incoming signal deter mines which load will be used If the voltage level goes Chapter 17 Digital SimCode 17349 CircuitMaker PRO only below VIL and remains below VIH then the input is consid ered to be in the LOW state and the v1r1 is applied If the voltage level goes above VIH and remains above VIL then the input is considered to be in the HIGH state and the v0r0 is applied io is the input state off resistance The unused load is essentially removed from the circuit by changing its r value to the value specified for io The values for v0 r0 v1 and r1 can be either real constants or real variables The values for io and t must be real constants Pin names and pin variables cannot be mixed in the same LOAD statement References to outputs must be either all pin names or all variable names For input pins the values used for r0 should be derived using the databook specs for IIH A standard LS input for example will sink a maximum of 20uA at Vin27V Therefore if volparam 02V then for max HIGH state load r0 Vin volparam IIHmax r0 27V 02V 20uA r0 125k ohms The values used for r1 should be derived using the databook specs for IIL A standard LS input for example will source a maximum of 400uA at Vin04V Therefore if vohparam 46V then for max LOW state load r1 vohparam Vin IILmax r1 46V 04V 400uA r1 105k ohms For power pins the value used for r0 should be derived using the databook specs for ICC For a 74LS151 Icc typ is 6mA at Vcc5V and Icc max is 10mA at Vcc525V Therefore for Icc typ r0 5V 6mA 833 ohms for Icc max r0 525V 10mA 525 ohms If creating a multiplepartsperpackage device such as a 74LS00 quad NAND gate you should adjust the Icc load for the individual parts accordingly 17350 Chapter 17 Digital SimCode CircuitMaker PRO only Examples r0val MINTYPMAXldparam NULL NULL 125k r1val MINTYPMAXldparam NULL NULL 105k riccval MINTYPMAXldparam NULL 833 525 LOAD PRELD DATALD CLKLD CLRLD v0volparam r0r0val v1vohparam r1r1val io1e9 t1p LOAD VCCLD v0gndparam r0riccval t1p See Also IOPAIRS DRIVE MATH FUNCTIONS Function Description Example POW power X 12 POW3 ABS absolute value X ABS12 SQRT squareroot X SQRT2 EXP exponent X EXP10 LOG natural log X LOG01 LOG10 log base 10 X LOG1001 SIN sine X SIN01 COS cosine X COS01 TAN tangent X TAN01 ASIN arc sine X ASIN01 ACOS arc cosine X ACOS01 ATAN arc tangent X ATAN01 HSIN hyperbolic sine X HSIN01 HCOS hyperbolic cosine X HCOS01 HTAN hyperbolic tangent X HTAN01 See Also OPERATORS Chapter 17 Digital SimCode 17351 CircuitMaker PRO only MESSAGE Displays a message without pausing General Form MESSAGEmessage valuepin Parameters message Message string including formatting characters as needed value Variable or constant value pin Pin name or index to pin variable Use The MESSAGE statement is used to output the information specified by the message string It does not interrupt the simulation The message is displayed in the XSpice window during simulation Notes A format string in MESSAGE is similar to a format that may be used in a printf statement in C Valid formatting characters include but are not limited to tab new line r carraige return d Deciaml display for short variable or current input output state D Decimal display for short variable or old input output state x Hex display for short variable or current input output state X Hex display for short variable or old inputoutput state c Character display for short variable or current inputoutput state C Character display for short variable or old input output state 17352 Chapter 17 Digital SimCode CircuitMaker PRO only e Exponential display for real variable f Floating point engineering display for real variable g Short display e or f for real variable s String constant display The only valid string constants are INSTANCE The present SimCode device instance name FUNC The present SimCode device function name FILE The present SimCode device file name Examples MESSAGEtime CLK DATA Q QN MESSAGEdevice instance sINSTANCE MESSAGE3e d d d dpresenttimeCLKDATAQQN See Also PROMPT MINTYPMAX Returns value from MINTYPMAX lookup table General Form MINTYPMAXindex min typ max Parameters index Input variable index to select min typ or max values min Minimum databook value typ Typical databook value max Maximum databook value Use The MINTYPMAX function is similar to the SELECTVALUE function except that three 3 values variables must be entered The keyword NULL can be Chapter 17 Digital SimCode 17353 CircuitMaker PRO only substitued for one or two unknown values If a predefined integer variable see INTEGERS is used as the index unknown NULL values are calculated from the known values as follows Known Values Formula min max typical max min 2 min only typical min min scale factor maximum min min scale factor max scale factor typ only minimum typ min scale factor maximum typ max scale factor max only minimum max max scale factor min scale factor typical max max scale factor Notes If index is not one of the predefined variables listed below then min scale factor 05 and max scale factor 15 The min scale factor and max scale factor for each of these predefined variables can be changed in CircuitMakers Analog Options dialog box The min scale factor and max scale factors are reversed for ldparam drvparam and iparam because these parameters control a resistance value rather than a current value ie maximum load equates to minimum resistance Variable Spice Option Parameter Default tpparam PROPMNS min scale factor 05 tpparam PROPMXS max scale factor 15 ttparam TRANMNS min scale factor 05 ttparam TRANMXS max scale factor 15 ldparam LOADMNS min scale factor 15 ldparam LOADMXS max scale factor 05 drvparam DRIVEMNS min scale factor 15 drvparam DRIVEMXS max scale factor 05 iparam CURRENTMNS min scale factor 15 17354 Chapter 17 Digital SimCode CircuitMaker PRO only iparam CURRENTMXS max scale factor 05 vthparam VTHMNS min scale factor 05 vthparam VTHMXS max scale factor 15 userparam USERMNS min scale factor 05 userparam USERMXS max scale factor 15 Examples tplhval MINTYPMAXtpparam NULL 5n NULL In this example if we assume that PROPMNS and PROPMXS are set to their default values then if tpparam 1 then tplhval 25n if tpparam 2 then tplhval 5n if tpparam 3 then tplhval 10n ricchval MINTYPMAXiparam NULL 2500 1250 In this example if we assume that CURRENTMNS and CURRENTMXS are set to their default values then if iparam 1 then ricchval 5000 if iparam 2 then ricchval 2500 if iparam 3 then ricchval 1250 See Also INTEGERS SELECTVALUE Chapter 17 Digital SimCode 17355 CircuitMaker PRO only NOCHANGE Leaves output state of IO pins unchanged General Form NOCHANGE output output Parameters output Name of or variable index to the output pin Use Use the NOCHANGE function to indicate nochange for specified output pins Use this statement on bidirectional pins when the bidirectional pin is being treated as an input Notes Pin names and variables cannot be mixed in the same NOCHANGE statement References to outputs must be either all pin names or all variable names Example NOCHANGE Q1 Q2 Q3 Q4 NUMBER Returns number based on binary weighted pin states General Form NUMBERMSB pin pin LSB pin Parameters pin Name of or index to a pin Use The NUMBER function returns a short integer that repre sents the decimal value of the binary number represented by the list of pin Each bit represented by a pin is set to 1 if the pin is nonzero otherwise it is set to 0 Notes The first pin in the list represents the mostsignificantbit MSB and the last pin in the list represents the least significantbit LSB Example A NUMBERD3D2D1D0 In this example if D3 is HIGH and D2 D1 and D0 are LOW 10002 then A 8 17356 Chapter 17 Digital SimCode CircuitMaker PRO only OPERATORS Assignment Operator Equals sets a variable or output pin to a value or state Math Operators Add Subtract Multiply Divide Unary Operators Logical not Bitwise complement Logical Operators AND OR XOR Bitwise Operators AND OR XOR Shift left Shift right Relative Comparators Equal Not equal Less than Less than or equal to greater than greater than or equal to Use Operators are used to set and manipulate variables and expressions Chapter 17 Digital SimCode 17357 CircuitMaker PRO only Notes Expressions must enclosed within parenthases Expres sions are always evaluated from left to right within parenthases You should use parenthases to set precedence within an expression When using the Unary Operators on values variables expressions etc the values variables expressions etc must be in parenthases Examples clktwl 25n reg reg 1 vx volparam 10m C A B val xval 2 X A B Y X if X1 then YFFFFFFFE A X 1 if X1 then A1 if X2 then A0 B X 8 if X1 then B9 if X2 then B10 C X 2 if X1 then C0 if X2 then C0 D 2 X if X1 then D1 if X2 then D0 E X 2 if X1 then E4 if X2 then E8 F 2 X if X1 then F4 if X2 then F8 IF A B THEN IF A 2 B 3 THEN IF C 2 X 4 THEN See Also MATH FUNCTIONS OUTPUTS Declares output pins pins that drive or load the circuit General Form OUTPUTS output pin output pin Parameters output pin Name of the output pin Use The OUTPUTS data type is used to define the pins which affect the operation of circuitry external to the device These generally include input output IO and power pins Input and power pins are included in this list because their presence contitutes a load on the driving circuitry Notes Output pin names must begin with a letter and be defined before they are used 17358 Chapter 17 Digital SimCode CircuitMaker PRO only Example OUTPUTS VCCLD PRELD DATALD CLKLD CLRLD QN Q See Also INPUTS IOPAIRS PWRGNDPINS PARAMSET Determines if a predefined SimCode param has been set General Form PARAMSETparam var Parameters param var SimCode model definition parameter Use The PARAMSET function is used to determine if a param eter in the SimCode model definition has been set It returns 1 if the specified parameter was set eg vilparam08 otherwise it returns 0 Notes See INTEGER and REAL declarations for a list of SimCode model definition parameters and their associated variable names Example A PARAMSETldparam IF PARAMSETvohparam THEN See Also INTEGERS REALS Chapter 17 Digital SimCode 17359 CircuitMaker PRO only PROMPT Pauses simulation and displays a message General Form PROMPTmessage valuepin Parameters message Message string including formatting characters as needed value Variable or constant value pin Pin name or index to pin variable Use The PROMPT statement is used to stop simulation and display the information specified by the message string The message is displayed in the XSpice window during simulation The user must click on a button to continue execution of the SimCode Notes A format string in PROMPT is similar to a format that may be used in a printf statement in C Valid formatting characters include but are not limited to tab new line r carraige return d Deciaml display for short variable or current input output state D Decimal display for short variable or old input output state x Hex display for short variable or current input output state X Hex display for short variable or old inputoutput state c Character display for short variable or current inputoutput state 17360 Chapter 17 Digital SimCode CircuitMaker PRO only C Character display for short variable or old input output state e Exponential display for real variable f Floating point engineering display for real variable g Short display e or f for real variable s String constant display The only valid string constants are INSTANCE The present SimCode device instance name FUNC The present SimCode device function name FILE The present SimCode device file name Example PROMPTinputd timef devices D1 t1 INSTANCE See Also MESSAGE Chapter 17 Digital SimCode 17361 CircuitMaker PRO only PWLTABLE Returns value from interpolative lookup table General Form PWLTABLE IN var IN1OUT1IN2OUT2OUTnOUTn Parameters IN var input variable integer or real INx input compare value OUTx output value at INx Use This piecewiselinear function is essentially a lookup table The value of IN var is used to look up an entry in the table which consists of pairs of values The first value in each pair is an input compare value and the second value is the corresponding output value If the IN var value is less than the first IN value the first OUT value is returned If the IN var value is greater than the last INn value then the last OUTn value is returned Linear interpolation is done between enteries according to the formula value OUTAOUTBINAINBIN varINAOUTA where IN var falls between the input compare values INA and INB The actual output value will fall between output values OUTA and OUTB Notes Two or more INOUT data value pairs must be entered and the IN values must be entered in assending order There is no limit to the maximum number of INOUT data pairs that can be entered Example twh PWLTABLEvar 5180n10120n1580n In this example if var 10 then twh 120n and if var 12 then twh 104 See Also SELECTVALUE 17362 Chapter 17 Digital SimCode CircuitMaker PRO only PWRGNDPINS Declares power and ground pins records supply voltage General Form PWRGNDPINS pwrpin gndpin Parameters pwrpin name of the power pin gndpin name of the ground pin Use The PWRGNDPINS statement defines which of the INPUTS pins are power and ground and sets the Power and Ground parameters of the device to absolute voltages as follows pwrparam voltage on pwrpin gndparam voltage on gndpin Notes This statement can only be used once in the SimCode Only one pin can be defined for power and one for ground Example PWRGNDPINSVCC GND See Also INPUTS OUTPUTS REALS VILVIHPERCENT SUPPLYMINMAX Chapter 17 Digital SimCode 17363 CircuitMaker PRO only READDATA Reads data from an ASCII file into arrays General Form READDATAarray array Parameters array Name of the array into which the value is placed Use The READDATA function opens the file specified by the data parameter in the devices MODEL statement and reads ASCII text data The number and type integerreal of the values per line that will be read is based on the number and type of array variables that are specified in the function call The number of data lines read is determined by the number of data lines in the specified file andor the size of the smallest array in the function call The READDATA function returns the number of lines read A negative number is returned if an error is encountered 1 Invalid file name 2 Cant find file 3 Invalid array 4 Illegal array access 5 Data type 6 Expected data value Notes Multiple values per line in the data file must be seperated by commas The real values in the data file must be in scientific notation The devices MODEL statement which contains the data parameter must be placed in the device symbols MOD file 17364 Chapter 17 Digital SimCode CircuitMaker PRO only Example MYDEVICEMOD file MODEL AMYDEVICE XSIMCODEfileMODELPATHMYDEVICESSCB funcMyDevice dataMODELPATHMYDEVICEDAT mntymx MYDEVICEDAT file 8 8E6 9 9E6 10 1E5 11 11E5 MyDevice SimCode nlines READDATAintarray realarray This example opens a filed called MYDEVICEDAT in the Models directory It reads 2 columns of data from the file where the first column contains integer values and the second column contains real values If the arrays are declared as intarray3 and realarray5 then only the first 3 data lines will be read and nlines will be set to 3 REALS Declares real variables and arrays General Form REALS var var Parameters var name of the variable Use The REALS data type is used to define real variables and arrays Notes Real variables and arrays must begin with a letter and be defined before they are used Real arrays are defined by following the array name with a left bracket an integer number which defines the size of the array and a right bracket Real arrays can be set andor used in expres sions Chapter 17 Digital SimCode 17365 CircuitMaker PRO only The following are reserved SimCode real variables which do not need to be declared The Digital Model Parameter can be set independently for each digital device in the Digital Model Parameters dialog box If the variable is set explicitly in the SimCode that setting will override all other settings The values of pwrparam and gndparam are set each time the PWRGNDPINS statement is executed The value of presenttime and previoustime are set each time the time step changes The value of simtemp is the current operat ing temperature of the circuit which can be set from the Spice Option TEMP Example REALS tplhval tphlval riccval vbias values64 See Also PWRGNDPIN VILVIHVALUE VILVIHPERCENT VOLVOHMIN Variable Use Digital Model Parameter vilparam low input state value VIL value vihparam high input state value VIH value volparam low output state value VOL value vohparam high output state value VOH value v3sparam tristate output state value NA rolparam low output strength value NA rohparam high output strength value NA r3sparam tristate output strength value NA pwrparam voltage on power pin PWR value gndparam voltage on ground pin GND value presenttime present simulation time NA previoustime previous simulation time NA simtemp circuit operating temperature NA Spice Option TEMP 17366 Chapter 17 Digital SimCode CircuitMaker PRO only RECOVER Tests inputs for recovery time violations General Form RECOVERclk input LHHL mr input mr input TRECtimeTRECLtime TRECHtime message Parameters clk input Name of or index to the input clock reference pin under test mr input Name of or index to the input setreset pin under test TREC Recovery time for both low and high going mr pin TRECL Recovery time for low going mr pin TRECH Recovery time for high going mr pin message Text string that will be displayed if a warning occurs Use The RECOVER function compares the time difference between a level change LH or HL on the clk input and a level change on the mr input to a specified test time RECOVER test times are specified jointly using TRECtime which sets TRECL and TRECH to the same value or individually using TRECLtime and TRECHtime If the compare time is less than the speci fied time a warning will be displayed during simulation An optional message string can be included in the RECOVER statement which will be output if a warning is displayed Notes Databook specifications should be used with this function TRECLtime and TRECHtime can be entered in the same RECOVER test The RECOVER test will be made only if the state of the mr input matches the time parameter TRECLLOW TRECHHIGH when the clk input makes the specified transition LH or HL For example if clk input LH and TRECL is specified then the mr input must be LOW when the clk input goes from LOW to HIGH for a RECOVER test to be made Pin names and variables can be mixed in the same RECOVER statement Chapter 17 Digital SimCode 17367 CircuitMaker PRO only Example RECOVERCLKLH PRE CLR TRECtrecval CLKPRE or CLR RETURN Returns from a subroutine in the SimCode General Form RETURN Use The RETURN instruction is used to return program flow to the instruction that followed the last GOSUB instruction See Also GOSUB SELECTVALUE Returns value from simple lookup table General Form SELECTVALUE index valpinvar valpinvarvalpinvar Parameters index input variable index to valpinvar valpinvar output value pin or variable Use The SELECTVALUE function returns the value of the number or variable indicated by the value of the index variable Notes The number of values andor variables used is not limited Example A SELECTVALUEB 16 8 4 2 1 In this example if B 2 then A 8 the 2nd value See Also PWLTABLE MINTYPMAX 17368 Chapter 17 Digital SimCode CircuitMaker PRO only SETUPHOLD Tests inputs for setup and hold time violations General Form SETUPHOLDclk input LHHL data input data input TStimeTSLtime TSHtime THtimeTHLtime THHtime message Parameters clk input Name of or index to the input clock reference pin under test data input Name of or index to the input data pin under test TS Setup time for both low and high going data input TSL Setup time for low going data input TSH Setup time for high going data input TH Hold time for both low and high going data input THL Hold time for high going data input THH Hold time for low going data input message Text string that will be displayed if a warning occurs Use The SETUPHOLD function compares the time difference between a level change LH or HL on the clk input and a level change on the data input to a specified test time SETUP test times are specified jointly using TStime which sets TSL and TSH to the same value or individually using TSLtime and TSHtime HOLD test times are specified jointly using THtime which sets THL and THH to the same value or individually using THLtime and THHtime If the compare time is less than the specified time a WARNING will be displayed An optional message string can be included in a SETUPHOLD statement which will be output if a WARNING is displayed Chapter 17 Digital SimCode 17369 CircuitMaker PRO only Notes Databook specifications should be used with this function TSLtime TSHtime THLtime and THHtime can be entered in the same SETUPHOLD statement The SETUP andor HOLD test will be made only if the state of the data input matches the time parameter TSL or THLLOW TSH or THHHIGH when the clk input makes the specified transition LH or HL For example if clk inputLH and TSL is specified then the data input must be LOW when the clk input goes from LOW to HIGH for a SETUP test to be made Pin names and variables can can be mixed in the same SETUPHOLD statement Example SETUPHOLDCLKLH DATA Tstsval Ththval CLKDATA STATE Sets outputs to the declared logic state General Form 1 STATE output output expression General Form 2 STATE output output ZEROONEUNKNOWN Parameters output Name of or variable index to the output pin expression Any expression to be compared to VIL or VIH Use The state of an output pin is determined by its level and its strength The STATE command sets the level and strength for one or more output pins or variables If expression is less than or equal to vilparam the output will be set to ZERO If expression is greater than or equal to vihparam the output will be set to ONE Otherwise the output will be set to UNKNOWN The level and strength values are set according the the state 17370 Chapter 17 Digital SimCode CircuitMaker PRO only expression State Level Strength volparam ZERO volparam rolparam vohparam ONE vohparam rohparam other UNKNOWN v3sparam r3sparam Notes Output pins can be specified by using the output pin name or by an integer variable that contains the index of an output pin Pin and variable names cannot be mixed in the same STATE command References to outputs must be either all pin names or all variable names Examples STATE Q ONE STATE Q1 Q2 Q3 Q4 ZERO STATE OUT 123 In the last example OUT will be ZERO if vilparam 1 UNKNOWN if vilparam 1 and vihparam 1 ONE if vihparam 1 See Also REALS STATEBIT LEVEL STRENGTH TABLE EXTTABLE Chapter 17 Digital SimCode 17371 CircuitMaker PRO only STATEBIT Sets outputs to binary weighted logic states General Form STATEBIT output output expression Parameters output name of or variable index to the output pin expression any expression which can be bitwise matched with the listed outputs Use The state of an output pin is determined by its level and its strength The STATEBIT command is used to set the level and strength for one or more output pins based on the value of the expression The state of the first pin listed is set according to the first leastsignificantbit of the expressions value the state of the second pin listed is set according to second bit of the expressions value and so on The level and strength values are set by the bits value Bit Value State Level Strength 0 ZERO volparam rolparam 1 ONE vohparam rohparam Notes Output pins can be specified by using the output pin name or by an integer variable that contains the index of an output pin Pin and variable names cannot be mixed in the same STATEBIT statement References to outputs must be either all pin names or all variable names The maximum number of output pinsvars is limited to 16 Example STATEBIT Q1 Q2 Q3 Q4 internalreg In this example if internalreg 11 1011 binary then Q1 LSB ONE Q2 ONE Q3 ZERO and Q4 MSB ONE See Also REALS STATE LEVEL STRENGTH TABLE EXTTABLE 17372 Chapter 17 Digital SimCode CircuitMaker PRO only STEPOFF Turns off the SimCode trace mode General Form STEPOFF Use The STEPOFF statement turns off the SimCode TRACE mode See Also STEPON STEPON Turns on the SimCode trace mode General Form STEPON Use The STEPON statement turns on the SimCode TRACE mode This causes the SimCode to display the Program Counter PC number and each SimCode instruction before it is executed See Also STEPOFF Chapter 17 Digital SimCode 17373 CircuitMaker PRO only STRENGTH Sets the strength of the output state General Form 1 STRENGTH output output expression General Form 2 STRENGTH output output STRONGHIIMPEDANCE Parameters output Name of or variable index to the output pin expression Any expression to be used directly as a strength Use The state of an output pin is determined by its level and its strength Use the STRENGTH command to set the strength of one or more output pins Value State Strength STRONG ZERO rolparam STRONG ONE rohparam HIIMPEDANCE NA r3sparam expression NA expression Notes Output pins can be specified by using the output pin name or by an integer variable the contains the index of an output pin Pin and variable names cannot be mixed in the same STATE statement References to outputs must be either all pin names or all variable names See Also REALS STATE STATEBIT LEVEL 17374 Chapter 17 Digital SimCode CircuitMaker PRO only SUPPLYMINMAX Tests supply pins for min and max supply voltage violations General Form SUPPLYMINMAXmin value max value Parameters min value Minimum recommended power supply voltage max value Maximum recommended power supply voltage Use The SUPPLYMINMAX function checks the voltage difference between the power and ground pins defined in PWRGNDPINS If the WARN flag is set in the Digital Model Parameters dialog box and the voltage difference pwrparam gndparam is less than min value or greater than max value a warning will be displayed during simulation Notes Databook specifications should be used with this function PWRGNDPINS must be defined to use this function Example SUPPLYMINMAX475 525 See Also INTEGERS PWRGNDPINS Chapter 17 Digital SimCode 17375 CircuitMaker PRO only TABLE Sets output logic states based on truth table General Form Parameters line Variable into which the line number used in the table is placed input Name of the input pin or variable index to the input pin output pin Name of the output pin input state State of the individual inputs output state State of the individual outputs based on input conditions Use The TABLE statement operates like a truth table to set the level and strength of the specified outputs Valid input states are 0 low input voltage is vilparam 1 high input voltage is vihparam X dont care what input voltage is Valid output states are L ZERO set output level to volparam H ONE set output level to vohparam Z UNKNOWN set output level to v3sparam Output state letters can be followed by a colon and a letter to indicate strength s STRONG set output to rolparam for L and rohparam for H z HIIMPEDANCE set output to r3sparam TABLE line input input output pin output pin input state input state output state output state 17376 Chapter 17 Digital SimCode CircuitMaker PRO only If a strength character is not specified after an output state then STRONG will be used for L and H states and HIIMPEDANCE will be used for Z states Notes Each row is tested sequencially from top to bottom until the input conditions are met The outputs are set for the first row to meet the input conditions The line is set to the line number in the table that was used If no match was made then line is set to 0 Input pin and variable names cannot be mixed in the same TABLE statement References to inputs must be either all pin names or all variable names Example TABLE tblIndex INA INB OUT 0 0 H 0 1 H 1 0 H 1 1 L This example is representative of 14 of a 7400 2input NAND gate If input pins INA and INB are both high vihparam OUT is set to ZERO volparam and STRONG rolparam and tblIndex is set to 4 See Also REALS STATE STATEBIT EXTTABLE VALUE Returns the value of the specified pin General Form VALUEpin Parameters pin Name of or index to a pin Use The VALUE function returns a real number that indicates the voltage level of the specified pin Example v VALUED3 Chapter 17 Digital SimCode 17377 CircuitMaker PRO only VILVIHPERCENT Sets VIL and VIH values to a percentage of supply voltage General Form VILVIHPERCENT vil vih Parameters vil Percentage of the suppy voltage which defines vil vih Percentage of the suppy voltage which defines vih Use VIL and VIH do not use a mintypmax array to select their values but must be declared explicitly for each digital device The VILVIHPERCENT statement sets the VIL and VIH parameters of the device to a percentage of the supply voltage as follows vilparam pwrparam gndparam vil vihparam pwrparam gndparam vih Notes PWRGNDPINS must be defined to use this function The values must be greater than 0 and less than 100 The vilparam and vihparam values set by VILVIHPERCENT are overridden by any values set for VIL value and VIH value in the Digital Model Parameters dialog box Example VILVIHPERCENT33 67 See Also REALS PWRGNDPINS VILVIHVALUE 17378 Chapter 17 Digital SimCode CircuitMaker PRO only VILVIHVALUE Sets absolute VIL and VIH values General Form VILVIHVALUE vil vih Parameters vil Absolute voltage level which defines vil vih Absolute voltage level which defines vih Use VIL and VIH do not use a mintypmax array to select their values but must be declared explicitly for each digital device The VILVIHVALUE statement sets the VIL and VIH parameters of the device to absolute voltages as follows vilparam vil vihparam vih Notes In order to more accurately model the actual switching characteristics of a digital input VIL and VIH are not generally set to their specified databook values The exception is the case of devices with a specified hysteresis such as the 74LS14 Typically the hysteresis of a digital device is small in the order of 100mV but never 0V The vilparam and vihparam values set by VILVIHVALUE are overridden by any values set for VIL value and VIH value in the Digital Model Parameters dialog box Example VILVIHVALUE125 135 See Also REALS VILVIHPERCENT Chapter 17 Digital SimCode 17379 CircuitMaker PRO only VOLVOHMIN Sets VOH and VOL relative to power and ground General Form VOLVOHMIN vol offset voh offset min vohvol Parameters vol offset Voltage offset which must be applied to ground pin voltage to get vol voh offset Voltage offset which must be applied to power pin voltage to get voh min vohvol Minimum allowed difference between voh and vol Use VOL and VOH do not use a mintypmax array to select their values but must be declared explicitly for each digital device The VOLVOHMIN statement sets the VOL and VOH parameters of the device as follows volparam gndparam vol offset vohparam pwrparam voh offset Notes In order to more accurately model the actual characteristics of a digital output VOH is not generally set to its specified databook value The reason for this deviation is that databook values for VOH are specified for maximum IOH load In digital SimCode VOL and VOH represent an unloaded output voltage PWRGNDPINS must be defined to use this function The volparam and vohparam values set by VOLVOHMIN are overridden by any values set for VOL value and VOH value in the Digital Model Parameters dialog box These are offset values rather than absolute voltages The voh offset is negative so that when added to pwrparam the resulting VOH will not be greater than pwrparam If the difference between the resulting volparam and vohparam is less than min vohvol then volparam will be set to the value of gndparam and vohparam will be set to gndparam min vohvol 17380 Chapter 17 Digital SimCode CircuitMaker PRO only Example VOLVOHMIN02 04 01 In this example 1 If gndparam 0V and pwrparam 50V then volparam 02V and vohparam 46V 2 If gndparam 0V and pwrparam 05V then volparam 00V and vohparam 01V See Also REALS PWRGNDPINS WHILE DO Conditionally controls looping in the SimCode General Form WHILE expression DO BEGIN END Parameters expression Any expression that can be evaluated as true or false Use The WHILE DO statement is used to loop through a section of SimCode until expression evaluates to false Notes Program flow will remain in a loop between the BEGIN and END statements until expression evaluates to false then program flow resumes after the END statement Examples i 1 WHILE i 5 DO BEGIN datai datai 1 i i 1 END See Also IF THEN Chapter 17 Digital SimCode 17381 CircuitMaker PRO only WIDTH Tests inputs for minimum pulse width violations General Form WIDTHinput input TWLtimeTWHtime message Parameters input Name of or variable index to the input pin under test TWL Width of a low going pulse TWH Width of a high going pulse message Text string that will be displayed if a warning occurs Use The WIDTH function compares the pulse width on each ipin to the specified test WIDTH times A low level test time is specified using TWLtime while a high level test time is specified using TWHtime If the compare time is less than the specified time a WARNING will be dis played An optional message string can be included in the WIDTH statement which will be output if a WARNING is displayed Notes Databook specifications should be used with this function The input pins can be input pin names andor integer variables that contain an index value to an input pin Pin names and variables can be mixed in the same WIDTH statement Examples WIDTHCLK TWLclktwl TWHclktwh CLK WIDTHPRE CLR TWL preclrtwl PRE or CLR 17382 Chapter 17 Digital SimCode CircuitMaker PRO only WIDTHTIME Returns last pulse width encountered on specified pin General Form WIDTHTIMEinput Parameters input Name of or index to an input pin Use This function returns a real value that indicates the last pulse width encountered on the specified input Example PW WIDTHTIMECP2 Index 383 Index Symbols xxxx source 174 176 1713 1714 pathfilenameext 429 430 B 429 D 429 178 I 429 L 428 M 429 179 N 428 number 430 P 429 pinorder 178 S 429 V 428 X 429 V 427 66 V selecting a 34 CKT 23 CKT files basic management of 29 opening 210 reverting to previously saved 210 starting 29 DAT 23 IC 153 1529 IC device selecting 310 INCLUDE 429 LIB 23 MOD 23 NET file and XSpice for Windows 645 NODESET 153 RAW file 647 648 analysis data saved in 648 and XSpice for Windows 645 SRP 23 SUB 23 10X Amplifier Circuit example 314 16bit macro libraries updating 14 3State changing color of 131 32bit macro libraries updating 13 7segment changing color of 131 A ABS 1712 1734 ABSTOL 154 156 AC Analysis AC Sweep decibels 320 log 320 running 620 setting up 620 show wave grid 320 tutorial 317 Access faults 85 Accessing a project 18 ACCT 159 ACOS 1712 1734 ADCSTEP 1512 Adding existing models to new macro symbol 1625 existing shapes 166 new models to existing symbols 1624 new subcircuits to existing symbol 1628 text to schematic 42 ADDSHUNTS 152 Agreement Software License iii Alias models 1636 parameter passing 1638 subcircuits 1637 Always Set Defaults 618 Ammeter 650 Analog Analyses AC 620 and test points 67 DC 619 DC Operating Point 622 Fourier 629 Index 384 Impedance Plot 641 in fault simulations 88 Monte Carlo 636 Noise 632 Parameter Sweep 626 setting up 618 setting up tutorial 316 Sweep Trace Labels 628 Temperature Sweep 635 Transfer Function 630 Transient 623 tutorial 37 Analog only devices 52 62 179 analog check box 63 editing 425 showing 48 Analog simulation definition 61 running 611 tools 63 using Digital Simcode devices 320 AnalogDigital devices 52 62 AnalogSPICE variables setting up 647 Analysis Probe Name 430 Analysis Windows displaying waveforms 612 using 611 Angle of bus connection wire changing 419 Arcs drawing in Symbol Editor 164 element definition 1613 Arrow Tool activating 42 ArrowWire option 122 flipping switches 42 moving items 42 selecting 42 selecting items with 42 selecting other tools 42 using 42 wiring with 122 ASCIIOUTPUT 646 647 ASIN 1734 Assigning new HotKeys 49 Assignment operator 1740 ATAN 1712 1734 Auto designation prefix 179 Auto Refresh 121 Auto Repeat 412 121 Auto Wire Routing 414 97 AUTOPARTIAL 1510 Autoplacement controlling from CircuitMaker 714 B Background changing color of 131 Background required user 11 BADMOS3 158 BEGIN 176 1725 1764 Bill of Materials excluding from 431 exporting 71 Binary output 647 Bitwise operators 1740 BJTs 1525 Black Box 113 Board size 714 Bode plotter 620 Boolean expressions 158 1521 BOOLH 158 1521 BOOLL 158 1521 BOOLT 158 1521 Breakpoints 58 59 Breaks on page moving 123 showing 123 Browsing devices 47 Bus connection wires 418 changing angle 419 show bus labels 419 specifying number for 418 wiring together by number 419 Index 385 Bus Data 426 429 66 178 editing 426 terminal devices 420 Bus Data B 429 Bus labels showing 123 Bus wires 106 changing color of 131 cutting 418 extending 418 joining 418 showing bus labels 419 specifying number for 418 working with 417 Buttons on Toolbar introduction 24 BYPASS 159 Bypass capacitors 67 C Cadnetix PCB format 711 Calay 90 PCB format 711 Calay PCB format 711 Calling Technical Support 18 Capacitors 1514 Cascade Windows 133 CASE 177 1716 CHANGETIME 1712 1715 CHANGEDxx 1712 1715 1717 Changing device labels 421 waveform order 57 Check Pin Connections 141 CHGTOL 156 Circles drawing in Symbol Editor 164 Circuit Display Data 124 Circuit faults 84 managing 86 CircuitMaker conventions 23 drawing window 22 files 23 installing 12 introduction 11 preferences 28 required user background 11 simulation windows 22 starting 21 task overview 24 updating from previous version 13 what is 11 windows 22 workspace 21 CircuitMaker files CKT 23 DAT 23 LIB 23 MOD 23 SRP 23 SUB 23 CircuitMaker to TraxMaker 713 Circuits analysis tutorial 38 changing background color 131 changing labels of 421 creating macro 1619 drawing 41 drawing tutorial 31 exporting as graphics 434 78 labeling 421 simulating tutorial 38 simulating analogmixedsignal 61 simulating digital 51 wiring 414 wiring tutorial 35 Closing a CKT file 29 Close command 92 Colors 52 changing 131 text 42 Compiling Simcode 174 Component noise measuring 632 Index 386 Connecting connection area 97 connectivity definition 22 single click 96 Connectors input 419 output 419 wiring with 419 CONVABSSTEP 1510 Conventions CircuitMaker 23 User Manual 19 Convert ASCII Library 117 CONVLIMIT 1510 CONVSTEP 1510 Copying circuits 102 Copy command 101 disable for instruction 87 waveforms 102 Copyright ii COS 1712 1734 Coupled mutual inductors 1516 Current sources 1517 Currentcontrolled current sources 1520 switches 1517 voltage sources 1520 CURRENTMNS 1511 1737 CURRENTMXS 1511 1738 Cursors 615 Curve tracer 619 Cut 101 disabling for instruction 87 Cutting wires 43 416 D Dashed lines drawing with the Wire Tool 42 Data Sequencer 511 109 selecting 321 start address 511 stop address 511 user external clock 511 DC Analysis DC Sweep running 619 setting up 619 troubleshooting failures 153 tutorial 316 warnings 153 Debug 1713 DEFAD 156 DEFAS 156 Default Font 95 Default Test Points description 68 Defaults 94 restoring 28 DEFL 156 DEFW 156 DELAY 176 177 1711 1716 Delete Macro 115 Delete Tool activating 42 cutting or dividing wire 43 deleting items 42 deleting wires 42 disabling for instruction 87 using 42 using tutorial 310 Deleting items 102 shapes and elements 166 tutorial 310 with Delete key 43 with Delete Tool 42 Dependent sources 1521 Description in spice data string I 429 label 424 Designation 423 429 105 changing tutorial 314 device designations 121 in spice data string D 429 prefix 424 renumbering new device 121 Index 387 Device Dependent Bitmap 77 Device Display Data 124 Device faults 83 84 adding 83 enabling 83 labelvalue 83 Device Independent Bitmap 77 Device library 47 and fault simulations 88 using tutorial 31 Device replacement disabling for instruction 87 fault simulations 87 Device Symbol 48 DevicePlot Font 95 DEVICEDBDAT file 98 Devices analog only 52 62 analogdigital 52 62 browsing 47 changing color of 131 changing labels of 421 creating macro 1619 creating new 161 creating symbols 162 designation 423 digital only 52 62 editing 422 elementary SPICE 1513 expanding macro 1617 filtering list of 48 flipping 44 moving when wires connected 417 naming 422 nudging 413 placing 412 renumbering designations of 121 repeating placed 121 rotating in 90 degree increments 43 schematic symbol only 52 62 searching for 410 selecting from library 47 selecting in schematic 412 symbol 33 DGND 66 648 Digital digital options 57 model parameters 1749 options for fault simulation 88 SimCode devices 171 SimCode example 174 SimCode language 171 Digital devices editing 425 showing 48 Digital instruments data sequencer 511 pattern editor 512 pulser 510 Digital logic simulation debugging with Trace feature 55 definition 51 digital options 58 measuring wire states 54 observing operation of circuit 55 openingclosing waveforms 55 performing 52 resetting the simulation 53 running 54 Step button 54 stopping 54 tutorial 36 types of devices permitted in 52 using the DigitalAnalog button 53 using Trace feature 52 what is 51 Digital model parameters editing 1640 Digital only devices 52 62 Digital options 58 breakpoint 58 conditions 58 setting up breakpoints 59 simulation speed 58 step size 58 x magnification 58 Digital Oscilloscope 623 Index 388 Digital SimCode devices 1528 using in analog simulation mode 320 DigitalAnalog Button 64 activating 53 toggling 53 using 53 using tutorial 38 Diodes 1524 DIP packages adding in Symbol Editor 167 Directories and Files 98 Disclaimer iv Display data of circuit showing 124 Display hints 85 87 89 Display Variable Names 614 142 Displaying waveforms 612 Dividing a wire 43 Dots changing color of 131 showing pin 123 Drawing a schematic 31 DRIVE 175 1711 Drive capacity 1511 1512 1728 DRIVEMNS 1511 1737 DRIVEMXS 1511 1737 drvparam 176 1728 1737 DRVMNTYMX 1512 Duplicate 102 DVCC 66 648 DVDD 66 648 E Edit Buffer in Symbol Editor 169 using 1610 Edit Bus Connection 106 Edit Bus Wire Number 107 Edit Data Sequencer 109 Edit device data 422 178 Edit InputOutput 109 Edit menu Copy 101 Copy Circuit 102 Copy Waveforms 102 Cut 101 Delete Items 102 Duplicate 102 Edit Bus Connection 106 Edit Bus Wire Number 107 Edit Data Sequencer 109 Edit Device Data 107 Edit Digital Params 107 Edit InputOutput 109 Edit Multimeter 109 Edit PROMRAM 108 Edit Pulser 108 Edit RunTime Test Point 107 Edit ScopeProbe Name 1010 Edit Signal Generator 1010 EditSelect Spice Model 107 Font 1011 Group Items 1010 Move 101 Paste 101 Place Selected Labels 104 Rotate 90 103 Select All 103 Set Auto Designation 105 Set Prop Delays 104 Straighten Selected Wires 104 Undo 101 Edit Multimeter 109 Edit PROMRAM 108 Edit Pulser 108 Edit ScopeProbe Name 1010 Edit Selected Item 106 Edit Signal Generator 1010 Editing digital model parameters 1640 macros 111 pin information 168 SPICE models in CircuitMaker 1622 SPICE models with text editor 1621 SPICE subcircuits 1627 symbols 163 Editing devices 422 Index 389 analog 425 bus data 426 description 424 designation 423 device name 422 digital 425 labelvalue 423 package 424 parameters 426 spice data 428 Element definitions 1610 Arc 1613 circle 1612 ellipse 1612 line 1610 PinDown 1613 PinDown 1613 PinLeft 1613 PinLeft 1613 PinRight 1613 PinRight 1613 PinUp 1613 PinUp 1613 polygon 1611 polyline 1611 rect 1612 rrect 1612 Text 1613 Element List in Symbol Editor 169 Elementary devices of SPICE 1513 Ellipses drawing in Symbol Editor 164 element definition 1612 ELSE 1725 END 177 1725 1764 Enlarging the circuit 43 Errors 646 711 EVENT 1711 Example of using SPICE data 430 Exclude from Bill of Materials 431 Exclude from PCB 431 Exclusive Test Points placing 68 placing multiple 69 removing 69 EXIT 175 177 1713 EXP 1712 1734 Expand Macro 112 115 Expanding macro devices 1617 Exponential Data editing 656 Export Options setting up 77 Exporting Bill of Materials 71 circuits as graphics 434 78 entire circuit 433 PCB netlist 710 SPICE netlist 79 SPICE subcircuit 79 TraxMaker PCB netlist 713 waveforms as graphics 78 EXTTABLE 175 177 1711 1721 Extending wires 416 F Factory defaults restoring 28 Failures DC Analysis DC Sweep 153 of Operating Point Analysis 152 Transient Analysis 154 Faults 433 81 managing circuit 86 password protecting 810 FETs 1525 File management CKT files 29 File menu Close 92 Merge 91 New 91 Open 91 Preferences 94 Index 390 Print Circuit 94 Print Setup 93 Print Waveforms 94 Reopen 91 Revert 92 Save 92 Save As 92 Files introduction to CircuitMaker 23 Filtering devices by name 48 Find and Select 103 Finding devices 410 Fit Circuit To Window 133 using tutorial 318 Fit to Page 94 Flipping a device 44 FM Signal 654 655 Fonts 1011 changing 42 default 95 deviceplot 95 Fourier Analysis running 629 setting defaults 624 setting up 629 FREQUENCY FMAX 1711 1723 G GaAsFETs 1527 Gates changing color of 131 Gaussian distribution 637 Gear Integration 648 154 GMIN 153 156 GMINSTEP 159 GND 66 gndparam 1749 GOSUB 1713 1724 GOTO 1713 1724 1725 Graphics exporting circuits as 434 78 exporting waveforms as 78 Grid 44 125 changing color of 131 in Symbol Editor 163 snap to 44 125 turning on or off 44 125 Ground 427 selecting tutorial 34 Ground and Vcc 66 Group Items 1010 Groups of items selecting 412 H Hardware keys installing 12 HCOS 1712 1734 HIIMPEDANCE 1757 HIGH 81 89 High changing color of 131 Hints 84 87 88 hide from students 87 HOTKEYDBDAT file 98 HotKeys 49 assigning 49 introduction 27 reassigning 410 unassigning 410 using to select a device tutorial 32 HSIN 1712 1734 HTAN 1712 1734 I II Source 1520 ISwitch 1517 IV Source 1520 IO Pins 1739 iparam 177 1728 1737 Icc 1733 IF THEN 416 175 176 1713 1725 IMNTYMX 1512 1728 Impedance Plot Analysis running 641 setting up 641 Index 391 Importing and simulating SPICE netlist 92 Metafile devices 167 Include File pathfilenameext 429 Independent sources 1517 Inductors 1515 initsim 1728 Initial conditions 624 153 Input 109 Input loading 1510 1512 1728 Input noise measuring 632 INPUTS 174 175 176 178 1726 Installing Circuitmaker 12 hardware hw keys 12 multiuser projects 16 INSTANCE 1712 1727 Instrument changing color of 131 INTEGERS 176 1710 1728 Integration method 648 Internal highlow 84 Interpolative lookup table 1745 io 177 1732 IOPAIRS 176 1710 1730 1732 Items changing color of all 131 grouping 1010 selecting 412 selecting all 413 selecting groups of 412 selecting multiple 412 ITL1 153 156 ITL2 153 156 ITL3 156 ITL4 154 157 ITL5 157 J JFETs 1525 Joining wires 416 Junction diodes 1524 K Keep out layer controlling from CircuitMaker 714 KEEPOPINFO 158 Key cap changing color of 131 Keys HotKeys 27 shortcut 27 L Label L 428 LabelValue 428 179 changing 423 changing tutorial 314 changing for resistor tutorial 35 changing for transistor tutorial 35 of device faults 83 Labeling circuits changing labels 421 with text tool 421 Labels Bus showing 123 Lamp changing color of 131 LCC packages adding in Symbol Editor 167 ldparam 176 1728 1737 LDMNTYMX 1512 1728 LED changing color of 131 LEVEL 1711 1731 Library of devices selecting from 32 47 License Agreement iii Lines Index 392 drawing in Symbol Editor 164 element definitions 1610 Linking files 116 172 model and subcircuit 1632 LIST 159 Listing devices 47 LOAD 175 177 1711 1730 1732 Loading 1510 1512 1728 LOADMNS 1510 1737 LOADMXS 1511 1737 Locking macros 113 LOG 1712 1734 LOG10 1712 1734 Lossless Transmission Lines 1522 Lossy Transmission Lines 1523 LOW 81 810 Low changing color of 131 M Macro circuits creating 1619 Macro Copier 116 Macro devices creating 1619 expanding 1617 Macro libraries updating 16bit 14 updating 32bit 13 Macro Lock 810 113 Macro symbols adding existing models to 1625 adding existing subcircuits to 1629 Macro Utilities 114 Class Selected Device 115 Delete Macro 115 Expand Macro 115 Model Data 116 Macros changing color of 131 creating new 111 editing 111 expanding 112 saving 112 114 Macros menu Convert ASCII Library 117 Expand Macro 112 Macro Copier 116 Macro Lock 113 Macro Utilities 114 Save ASCII Library 117 Save macro 114 Update Search List 118 Magnifying the circuit 43 Major Device Class 32 48 114 Managing circuit faults 86 Manual routing 415 Manual wire routing 415 MATH FUNCTIONS 1734 MAX 1723 MAXEVTITER 159 MAXOPALTER 159 Measurement cursors using 615 Merge Command 91 MESFETs 1527 MESSAGE 176 177 1713 1735 Metafile devices importing into Symbol Editor 167 Metafile for Windows 77 MIN 1723 MINTYPMAX 176 1712 1736 MINBREAK 159 Minor Device Class 32 48 Mirror Button activating 44 disabling for instruction 87 using 44 using m key instead 44 Mirroring devices 48 MixedSignal simulation example tutorial 320 in Analog mode 61 Model M 429 Model Data 116 Model linking files 116 172 Model parameters Index 393 editing digital 1640 MODELPATH 172 Models adding to existing symbols 1624 adding to new macro symbols 1625 and subcircuits linking files 1632 updating from previous version 15 working with SPICE 1621 Models SPICE creating new with parameter passing 1638 editing in CircuitMaker 1622 editing with text editor 1621 Monte Carlo Analysis distribution 637 gaussian distribution 637 overriding with specific tolerances 640 running 636 seed 637 setting up 636 simulation runs 636 specifying default tolerances 640 uniform distribution 637 worst case distribution 637 MOSFETs 1526 Mouse usage 26 Move 101 Moveable page breaks 123 Moving devices with connected wires 417 elements and shapes 166 Multiuser project installations 16 Multifunction Signal Generator 650 Multimeter 109 using 649 Multiple projects setting up 16 Multiple shapes selecting in Symbol Editor 165 Multipliers 428 152 N Name 428 Named Subcircuit X 429 Netlists definition 710 definition of nets 710 exporting PCB 710 exporting SPICE 79 importing and simulating 92 loading and running TraxMaker 714 requirements 710 Nets definition 710 definition of netlist 710 New Command 91 New Macro 111 NLI Source 1521 NLV Source 1521 NOCHANGE 1711 1739 Node number 430 Node numbers 430 88 showing 123 NODESET 153 1528 Noise Analysis running 632 setting up 632 Nonlinear Sources 1521 NOOPALTER 159 NOOPITER 158 Normal SizePosition 133 Nudging devices 413 NULL 176 NUMBER 175 1712 1739 Number of bus wire specifying 418 Numbers of nodes showing 123 Numerical Integration 648 Index 394 O Objects changing color of 131 Offsetting waveforms 615 Ohmmeter 650 ONE 177 1731 1753 1755 Online Help using 110 Online tutorial watching 111 OPEN 82 810 Open Command 91 Opening a CKT file 210 Operating Point Multimeter Analysis running 622 setting up 622 troubleshooting failures 152 OPERATORS 1740 Option variables of SPICE 155 Options menu ArrowWire 122 Auto Refresh 121 Auto Repeat 121 Circuit Display Data 124 Cursor Tools 122 Device Designations 121 Device Display Data 124 Grid 125 Quick Connect 121 Show Bus Labels 123 Show Node Numbers 123 Show Page Breaks 123 Show Pin Dots 123 Show Prop Delays 124 Title Block 126 OPTS 159 OrCad PCB II format 711 Oscilloscope 623 Output 109 Output Drive Capacity 1511 1512 Output noise measuring 632 OUTPUTS 175 176 178 1710 1741 P Package 424 429 Package P 429 PADS PCB format 711 Page breaks moving 123 showing 123 Page Down using to zoom out 43 Page Up using to zoom in 43 PARAMSET 1712 1742 Parameter passing creating new SPICE models 1638 Parameter Sweep Analysis running 626 setting up 626 Parameters 426 179 editing device 426 Partial derivatives 1510 Parts Button 32 47 accessing device library 47 using 47 Parts list see Bill of Materials 71 Password 84 810 Paste 101 disabling for instruction 87 Pattern Editor 512 PCB netlists 427 67 Cadnetix format 711 Calay 90 format 711 Calay format 711 exporting 710 exporting to popular formats 711 OrCAD PCB II format 711 PADS format 711 Protel format 711 requirements 710 Tango format 711 TraxMaker 712 Persistent waveform 617 PieceWise 658 1745 Pin Data 178 Pin dots Index 395 changing color of 131 showing 123 PinDown 1613 PinDown 1613 PinLeft 1613 PinLeft 1613 PinRight 1613 PinRight 1613 Pins changing color of 131 designations in Symbol Editor 164 drawing in Symbol Editor 164 editing information about 168 names in Symbol Editor 164 names of 431 numbers of 431 433 Pins shorted together 82 PinUp 1613 PinUp 1613 PIVREL 157 PIVTOL 157 Place Labels 104 Placing devices 412 POLY 1522 Polygons editing in Symbol Editor 164 element definition 1611 Polylines editing in Symbol Editor 164 element definition 1611 Position 133 POW 1712 1734 Power Bus 420 Power devices 154 Pre50 digital circuits updating for analog simulation 15 Preferences 94 changing 28 introduction 28 restoring factory defaults 28 Prefix 424 presenttime 177 1749 Previous version updating from 13 previoustime 1749 Printing adjusting print size 433 circuits 94 Fit to Page 94 print setup 93 the circuit 433 waveforms 94 Probe Tool 53 57 activating 54 current I 310 definition of states 54 high state 54 low state 54 meaning of letters in 65 power P 310 pulse state 54 selecting 65 tristate 54 unknown state 54 using 65 612 voltage V 39 Projects accessing 18 installing multiuser 16 setting up multiple 16 PROM 108 PROMPT 1713 1743 Prompt to save 96 Propagation delays 104 1510 1511 17 6 1728 in Digital mode 56 showing 124 PROPMNS 1510 1737 PROPMXS 1510 1737 Protel PCB format 711 Pulse data editing 657 Pulse waveform 657 Pulser 59 510 108 PWL 658 PWLTABLE 176 1712 PWRGNDPINS 175 176 1710 1746 pwrparam 1749 Index 396 Q QFP packages adding in Symbol Editor 167 Quick Connect wiring 416 121 R r0 1732 r1 1732 r3sparam 1749 RAM 108 RAMPTIME 159 READDATA 173 1712 1747 REALS 176 1710 1748 Recalling waveforms 616 RECOVER 177 1710 1750 Rectangles drawing in Symbol Editor 164 element definition 1612 Reducing the circuit 43 Reference Point setting new 65 613 Refresh Screen 133 automatically 121 Registered Trademarks ii Relative comparators 1740 Relative values 628 RELTOL 154 157 Renumbering new devices 121 Reopen Command 91 Repeating devices 412 121 Replace device 87 89 Replacement status 87 Requirements for exporting netlists 710 user background 11 Reset Button 53 64 in waveform window 617 using in Digital mode 53 Resistors 1513 changing labelvalue tutorial 35 selecting tutorial 33 Resizing elements and shapes 166 Restoring factory defaults 28 RETURN 1713 Revert 92 to previously saved file 210 RF devices 154 rohparam 176 1718 1749 rolparam 176 1718 1749 Rotate 90 Button 48 activating 43 disabling for instruction 87 using 43 using tutorial 314 using r key instead 43 Rotate 90 Command 103 Rotating a device 43 a resistor tutorial 33 Round rectangles drawing in Symbol Editor 164 element definition 1612 Routing auto wire 414 97 manual wire 415 RSHUNT 1512 Rubberband effect see Connectivity 22 Run TraxMaker and load netlist 714 RunTime Test Points 643 adding multiple 610 description 68 placing 69 placing tutorial 317 removing 610 RunStop Button using 54 64 using tutorial 39 Running a simulation tutorial 317 S Save As Command 92 Save ASCII Library 117 Save Command 92 Save Macro 112 114 Index 397 Saving a CKT file 29 circuit 88 prompting before 96 Scale 132 Scale Factors 1737 Scale step size effect on Zoom Tool 43 Scaling waveforms 613 Schematic anatomy of 23 drawing tutorial 31 Schematic symbol only 52 62 SCOPE 53 57 1010 Scope Probe 55 57 142 Searching devices 410 Select All 103 SELECTVALUE 1712 1751 Selected items changing color of 131 Selecting IC device 310 a V and ground device 34 a device symbol 33 a resistor 33 a single item 412 a transistor tutorial 33 all items 413 colors 131 devices 412 devices tutorial 31 devices from library 47 groups of items 412 items 412 multiple items 412 shapes in Symbol Editor 165 switches 412 Semiconductor capacitors 1515 Semiconductor resistors 1513 Set Prop Delays 104 Setting up AC Analysis AC Sweep 620 analog analyses 618 analogSPICE variables 647 analysis of a circuit 316 breakpoints in a circuit 59 DC Analysis DC Sweep 619 DC Operating Point Analysis 622 export options 77 Fourier Analysis 629 Impedance Plot Analysis 641 Monte Carlo Analysis 636 multiple projects 16 Noise Analysis 632 Parameter Sweep Analysis 626 sweep trace labels 628 Temperature Sweep Analysis 635 Transfer Function Analysis 630 Transient Analysis 623 Setup button in waveform window 615 SETUPHOLD 177 1710 1752 Shapes adding existing 166 selecting in Symbol Editor 165 SHORT 810 Show Bus Labels 419 123 Show LEDLAMP display state setting up for exporting 77 Show Node Numbers 88 123 Show Page Breaks 433 123 Show Pin Dots 123 Show Prop Delays 56 124 Showing devices by analog 48 by digital 48 by symbol 48 Shunt resistors 1512 Signal Generator 88 1010 1518 AC analysis 315 editor 651 magnitude 315 phase 315 using tutorial 315 Signal Selection 88 simtemp 176 1749 SimCode devices 1528 171 Index 398 SIMLISTTXT file 174 Simulating a digital circuit tutorial 36 a mixed mode circuit tutorial 320 a simple AC circuit tutorial 312 Simulation Analog Mode 51 61 before you do a 62 Digital Mode 51 61 errors 646 running a 317 setting up analog 316 stop 320 warnings 646 Simulation menu 141 Analyses Setup 141 Check Pin Connections 141 Digital Options 141 DigitalAnalog Mode 141 Display Variable Names 142 Display Waveforms 142 Reset 141 Run 142 Scope Probe 142 Step 142 Trace 142 SIMWARN 1512 1728 SIN 1712 1734 Sine wave data editing 652 Single Click Connect 96 effect on wiring 415 Singular matrix error 1512 Size 133 SmartWires 416 Snap to Grid 44 125 and nudging devices 413 Software License Agreement iii Sound changing color of 131 SPICE creating new models with parameter passing 1638 data 175 178 default filenames 1634 editing subcircuits 1627 elementary components 1621 elementary devices 1513 errors 646 exporting as netlist 79 exporting as subcircuit 79 Gmin stepping failed 151 iteration limit reached 151 models 1621 multipliers 428 152 netlist importing and simulating 92 option variables 155 options 1728 1737 1749 prefix characters 179 prefixes 1634 singular matrix 151 source stepping failed 151 subcircuits 1621 suggested reading 1530 troubleshooting convergence 151 warnings 646 working with models 1621 SPICE Data 428 Analysis Probe Name 430 Bus Data B 429 Description I 429 Designation D 429 editing 428 example of using 430 Include File pathfilenameext 429 Label L 428 Model M 429 Name N 428 Named Subcircuit X 429 Node number 430 Package P 429 Subcircuit S 429 Value V 428 SQRT 1712 1734 SRCSTEP 159 Starting Index 399 a CKT file 29 CircuitMaker 21 TraxMaker from CircuitMaker 713 STATE 177 1711 1753 State of Probe Tool I current 310 65 N noise 65 P power 310 65 R input or output resistance 65 V voltage 39 65 Z impedance 65 STATEBIT 175 1711 1755 Step Button using 54 STEPOFF 1713 1756 STEPON 1713 1756 Stopping a simulation 320 64 Storing waveforms 616 Straighten Wires 104 STRENGTH 1711 Strength 1754 1755 STRONG 1757 Student use disabling circuit options 86 displaying access faults 85 fault password 84 hint message 84 managing circuit faults 86 Subcircuit S 429 Subcircuit Linking Files 116 Subcircuits 429 1527 adding to exiting symbol 1628 adding to new macro symbols 1629 and model linking files 1632 editing SPICE 1627 exporting SPICE 79 linking files 172 plotting internal variables 613 Suggested readings for SPICE 1530 Supply current 1511 1512 Supply voltage 646 1512 SUPPLYMINMAX 176 1710 1758 Support getting Technical 18 Sweep trace labels using 628 Switching between digitalanalog mode 38 Symbol Editor adding DIP packages 167 adding existing shape 166 adding LCC packages 167 adding QFP packages 167 deleting shapes and elements 166 drawing symbols with mouse 164 Edit Buffer 169 editing pin information 168 element definitions 1610 Element List 169 Grid 163 importing Metafile devices 167 moving shapes and elements 166 pin designations 164 pin names 164 Redraw 163 resizing elements 166 selecting multiple shapes 165 selecting shapes 165 Symbol Name 164 Trace 164 tutorial 1614 using display controls 163 View 164 SYMBOLDBDAT file 98 Symbols adding new models to existing 1624 adding new subcircuits to 1628 changing color of 131 changing text color 131 creating device 162 creating device tutorial 1614 drawing with mouse 164 naming 164 showing 48 Index 400 T t 177 1732 TABLE 1711 1759 TAN 1712 1734 Tango PCB format 711 Task overview of CircuitMaker 24 Technical support 18 TEMP 157 1749 Temperature Sweep Analysis running 635 setting up 635 Terminal Device 420 427 Test Points 65 67 646 648 default 68 exclusive 68 runtime 68 types 68 Text adding to schematic 42 changing font of 1011 Text Tool activating 42 changing color of text 42 changing text font 42 resizing text in rectangle 42 using 42 TH 1752 THEN 1725 THold 646 1512 Tile Windows 133 Timestep too small 157 Timing violations 646 1512 Title Block 45 126 TNOM 158 Toolbar displaying 131 introduction 24 tpparam 1728 1737 TPMNTYMX 1511 1728 Trace 88 Symbol Editor 164 Trace Button activating 55 using 55 Trace mode 1756 tranpin 1728 TRANxx 1717 1728 TRANMNS 1510 1737 TRANMXS 1510 1737 Transfer Function Analysis running 630 setting up 630 Transient Analysis 97 Preferences defaults 97 running 623 setting defaults 624 setting up 623 setting up tutorial 316 troubleshooting failures 154 using tutorial 319 warnings 154 Transistors 1525 changing labelvalue tutorial 35 selecting tutorial 33 Transition time 1510 1511 1728 Transmission lines 1522 Trapezoidal integration 648 154 TraxMaker 427 67 loading netlist from CircuitMaker 714 PCB netlist format 712 running from CircuitMaker 714 TREC 1750 TRec 646 1512 Troubleshooting SPICE convergence 151 TRTOL 158 TRYTOCOMPACT 158 TS 1752 TSetup 646 1512 ttparam 176 1728 1737 tthl 177 1718 ttlh 177 1718 TTMNTYMX 1511 Tutorial watching online 111 TW 1765 Tw 646 1512 Index 401 U US Government Restricted Provisions v UIC 624 153 Unassigning HotKeys 410 Undo 101 Uniform distribution 637 UNKNOWN 1731 1753 Update Search List 118 Updating 16bit macro libraries 14 32bit macro libraries 13 from previous versions 13 model libraries 15 pre50 digital circuits for simulation 15 URC lines 1524 User background required 11 User Manual about 19 USERLIB 116 USERLIB file 98 userparam 1728 1738 USERMNS 1738 USERMNTYMX 1728 USERMXS 1738 Using Online Help doubleclicking Help file 110 from a dialog box 110 from the Help menu 110 V VI Source 1519 VSwitch 1517 VV Source 1519 v0 177 1718 1732 v1 177 1718 1732 v3sparam 1749 VALUE 1712 1760 Value 423 Value 428 Variables for SPICE 155 Vcc 1758 Vcc and Ground 66 Version updating from previous 13 View menu Cascade Windows 133 Fit Circuit To Window 133 Normal SizePosition 133 Select Colors 131 Tile Windows 133 Windows 133 Viewing symbols 164 vihparam 1749 vilparam 1749 VILVIHPERCENT 1710 1761 VILVIHVALUE 176 1710 1762 Virtual instruments Bode plotter 611 Curve tracer 611 data sequencer 511 Digital oscilloscope 611 logic analyzer 57 multimeter 611 Visible check box using 423 VNTOL 154 158 vohparam 177 1749 volparam 177 1749 VOLVOHMIN 176 1710 1763 Voltage sources 1517 Voltagecontrolled current sources 1519 switches 1517 voltage sources 1519 Voltmeter 650 vthparam 1738 VTHMNS 1738 VTHMXS 1738 W WARN flag 1728 warnparam 1728 Warning messages 646 1512 1728 Watching online tutorial 111 Wave Button of Signal Generator using tutorial 315 Waveforms 53 57 Index 402 changing color of 131 changing order digital 57 copying to clipboard 102 displaying 612 editing 613 exporting as graphics 78 offsetting 615 plotting subcircuit internal variables 613 recalling stored 616 scaling 613 storing for future reference 616 using measurement cursors 615 using Setup button 615 viewing multiple 65 613 Waveforms Button activating 55 selecting 66 using 55 66 WHILE DO 1713 1764 WIDTH 177 1711 1765 WIDTHTIME 1712 Window menu Cascade Windows 133 Tile Windows 133 Windows metafile 77 Wire Tool 42 87 activating 42 disabling for instruction 87 drawing bus wires 42 drawing dashed lines 42 using 42 using tutorial 312 Wires auto routing 414 bus connection 418 bus working with 417 changing color of 131 cutting 416 extending 416 joining 416 moving devices with connected 417 routing manually 415 straightening 104 using SmartWires feature 414 Wiring 414 a circuit 414 a circuit tutorial 35 auto wire routing 414 manual wire routing 414 with ArrowWire Tool 122 with connectors 419 with QuickConnect 414 416 with the Wire Tool 42 Word Generator 511 see also Data Sequencer 659 Workspace introduction 21 Worst case distribution 637 Wrong value 82 X XSpice for Windows 171 176 NET file output 645 RAW file output 645 about 643 using 643 Z ZERO 177 1731 1753 1755 Zoom Tool 132 activating 43 magnifying the circuit 43 reducing the circuit 43 setting the scale step 43 using 43 using page down key instead 43 using page up key instead 43