TINA 7.0 Manual
TINA 7.0 Manual
TINA 7.0 Manual
TINA
Design Suite v7
The Complete Electronics Lab for Windows
QUICK START
MANUAL
DesignSoft
www.designsoftware.com
i-1
Contents
COPYRIGHTS
Copyright 1990-2006 DesignSoft, Inc. All rights reserved. All programs recorded on the original release CD of TINA and the accompanying documentation are copyrighted. TINA is provided under a License Agreement and may be used or copied only in accordance with its terms and conditions.
LIMITED LIABILITY
TINA, together with all accompanying materials, is provided on an as is basis, without warranty of any kind. DesignSoft, Inc., its distributors, and dealers make no warranty, either expressed, implied, or statutory, including but not limited to any implied warranties of merchantability or fitness for any purpose. In no event will DesignSoft Inc., its distributor or dealer be liable to anyone for direct, indirect, incidental or consequential damages or losses arising from the purchase of TINA or from use or inability to use TINA.
TRADEMARKS
IBM PC/AT, PS/2 are registered trademarks of International Business Machines Corporation Windows, Windows 9x/ME/NT/2000/XP are trademarks of Microsoft Corporation PSpice is a registered trademark of MicroSim Corporation Corel Draw is a registered trademark of Corel Inc. TINA is a registered trademark of DesignSoft, Inc.
i-2
Contents
TABLE OF CONTENTS
1.
INTRODUCTION
1-1
1.1 What is TINA and TINA Design Suite? ............. 1-1 1.2 Available Program Versions ............................. 1-6 1.3 Optional supplementary hardware ................... 1-7
1.3.1 TINALab II High Speed Multifunction PC Instrument .......................................
1-7
2.
2-1
2.1 List of new features in TINA 7.0 ............................. 2-1 2.2 List of new features in TINA PRO 6 ........................ 2-3 2.3 List of new features in TINA PRO 5.5 ............... 2-4
3.
3.1
3.1.1
3-1
3-1
i-3
Contents
3.1.2 3.1.3 3.1.4
3-3 3.1.5 Entering User Information .......................................... 3-3 3.1.6 Choose Destination Location ..................................... 3-4 3.1.7 Selecting a Setup Type .............................................. 3-5 3.1.7.1 Typical ........................................................................... 3-5 3.1.7.2 Compact ........................................................................ 3-6 3.1.7.3 Custom .......................................................................... 3-6 3.1.8 Selecting the Program Folder .................................... 3-6 3.1.9 Selecting the Symbol Set .......................................... 3-6 3.1.10 Final check and copying the files ............................... 3-7 3.1.11 Completing the Setup ................................................ 3-7 3.2 Uninstalling TINA ............................................. 3-8 3.3 Network Installation ......................................... 3-8 3.4 Copy Protection ............................................... 3-10
3.4.1 3.4.2 Copy Protection by Software ..................................... 3-10 Copy Protection by Hardware (dongle) ....................... 3-10
3.5 Starting Up ....................................................... 3-10 3.6 Experimenting with Example Circuits, avoiding common problems .......................................................... 3-11
4.
GETTING STARTED
4-1
4.1 Schematic Editing Using the Mouse ................ 4-1 4.1.1 Using the right mouse button ..................................... 4-1
4.1.2 Using the left mouse button ....................................... 4-2
i-4
Contents
4.2 Measurement Units .......................................... 4-4 4.3 The Basic Screen Format ................................ 4-4 4.4 Placing the Circuit Components ...................... 4-11
4.4.1 4.4.2 Wire ........................................................................... 4-12 Input and Output ........................................................ 4-13
4.5
4.5.1
4.6
4.6.1 4.6.2
4.6.2.1
Analysis of SMPS circuits ......................................... Stress Analysis ......................................................... Network Analysis ....................................................... Analyzing a Digital Circuit with TINAs Digital Engine ............................................................. Analyzing a Digital Circuit using Digital VHDL Simulation ....................................................... Testing Your Circuit with Virtual and Real Time Instruments ........................................
i-5
Contents
5.
5-1
5.4 5.5
5.5.1 5.5.2 5.5.3
schematic ......................................................... 5-1 Making a Macro from a Spice subcircuit ............................................... 5-8 Using and extending Manufacturers Spice model catalogs in TINA .......................... 5-10 Using the Library Manager ......................................... 5-10 Adding S-parameter models ............................ 5-25 Creating a VHDL macro from a .vhd file ........... 5-27 Placing a VHDL macro in the schematic editor .......... 5-29 Testing a VHDL macro ............................................... 5-30 Changing the pin arrangement of a VHDL macro ........ 5-31
6.
6.1 6.2 6.3 6.4
6-1
Schematic Symbol Editor ................................. 6-1 IC Wizard in the Schematic Symbol Editor ....... 6-4 Footprint Editor ................................................ 6-6 IC Wizard in the Footprint Editor ...................... 6-10
i-6
Contents
7. 8.
7-1 8-1
ADVANCED TOPICS
i-7
Introduction
CHAPTER 1
INRTODUCTION
INTRODUCTION
1.1
1-1
Introduction
Schematic Capture. Circuit diagrams are entered using an easy to use schematic editor. Component symbols chosen from the Component bar are positioned, moved, rotated and/or mirrored on the screen by the mouse. TINA's semiconductor catalog allows the user to select components from a user-extendible library. An advanced rubber wire tool is provided allowing easy modification of the schematic diagrams. You can open any number of circuit files or subcircuits, cut, copy and paste circuit segments from one circuit into another, and, of course analyze any of the currently open circuits. TINA gives you tools to enhance your schematic by adding graphics elements such as lines, arcs, arrows, frames around the schematic, and title blocks. You can also draw non-orthogonal (diagonal) components such as bridges and 3-phase networks. PCB Design. TINA v7 includes only circuit simulation, while TINA Design Suite v7 includes TINAs advanced PCB designer. This fully integrated layout module has all the features you need for advanced PCB design, including Multilayer PCBs with split power planes, powerful autoplacement & autorouting, rip-up and reroute, manual and follow-me trace placement, DRC, forward and back annotation, pin and gate swapping, keep-in and keep-out areas, thermal relief, fanout, plane layers, 3D view from any angle, Gerber file output and much more. Electrical Rules Check (ERC) will examine the circuit for questionable connections between components and display the results in the Electrical Rules Check window. ERC is invoked automatically, so missing connections will be brought to your attention before analysis begins. Schematic Symbol Editor. In TINA, you can simplify a schematic by turning portions of it into a subcircuit. In addition, you can create new TINA components from any Spice subcircuit, whether created by yourself, downloaded from the Internet, or obtained from a manufacturers CD. TINA automatically represents these subcircuits as a rectangular block on your schematic, but you can create any shape you like with TINA's Schematic Symbol Editor. Library Manager. TINA has large libraries containing Spice- and S-parameter models provided by semiconductor manufacturers such as Analog Devices, Texas Instruments, National Semiconductor, and others. You can add more models to these libraries or create your own Spice- and S-parameter library using TINA's Library Manager (LM).
INRTODUCTION
1-2
Introduction
Parameter Extractor. Using TINA's Parameter Extractor you can also create component models that more closely represent actual real world devices by converting measurement or catalog data into model parameters. Text and Equation Editor. TINA includes a Text and Equation Editor for annotating schematics, calculations, includes graphic output, and measurement results. It is an invaluable aid to teachers preparing problems and examples. The circuit diagrams and the calculated or measured results can be printed or saved to files in standard Windows BMP, JPG and WMF format. These output files can be processed by a number of well known software packages (Microsoft Word, Corel Draw etc.). Netlists can be exported and imported in Pspice format and also to drive popular PCB packages such as ORCAD, TANGO, PCAD, PROTEL, REDAC and other programs. DC analysis calculates the DC operating point and the transfer characteristic of analog circuits. The user can display the calculated and/ or measured nodal voltages at any node by selecting the node with the cursor. For digital circuits, the program solves the logic state equation and displays the results at each node step-by-step. Transient analysis. In the transient and mixed mode of TINA you can calculate the circuit response to the input waveforms that can be selected from several options (pulse, unit step, sinusoidal, triangular wave, square wave, general trapezoidal waveform, and user-defined excitation) and parameterized as required. For digital circuits, programmable clocks and digital signal generators are available. Fourier analysis. In addition to the calculation and display of the response, the coefficients of the Fourier series, the harmonic distortion for periodic signals, and the Fourier spectrum of non-periodic signals can also be calculated. Digital Simulation. TINA also includes a very fast and powerful simulator for digital circuits. You can trace circuit operation step-bystep, forward and backward, or view the complete time diagram in a special logic analyzer window. In addition to logic gates, there are ICs and other digital parts from TINA's large component library. VHDL simulation. TINA now includes an integrated VHDL simulator to verify VHDL designs both in digital and mixed-signal analog-digital environments. It supports the IEEE 1076-1987 and
INRTODUCTION
1-3
Introduction
1076-1993 language standards and IEEE standards 1164 (standard logic). Your circuits can contain editable VHDL blocks from TINAs library, FPGAs & CPLDs, or VHDL components created by yourself or downloaded from the Internet. You can edit the VHDL source of any VHDL component and see the result instantly. TINA includes a wide range of PIC microcontroller models which you can test, debug and run interactively. The built in MCU assembler allows you to modify your assembler code and see the result promptly. Other MCU models including 8051 and AVR; more are coming soon. With the optional external VHDL simulator, you can develop and debug your VHDL code both externally and inside TINA. The VHDL simulator includes Waveform Display, Project Management and Hierarchy Browser, and 64-bit time. AC analysis calculates, complex voltage, current, impedance, and power can be calculated. In addition, Nyquist and Bode diagrams of the amplitude, phase and group delay characteristics of analog circuits can be plotted. You can also draw the complex phasor diagram. For non-linear networks, the operating point linearization is done automatically. Network analysis determines the two-port parameters of networks (S, Z, Y, H). This is especially useful if you work with RF circuits. Results can be displayed in Smith, Polar, or other diagrams. The network analysis is carried out with the help of TINAs network analyzer. The RF models of the circuit elements can be defined as SPICE subcircuits (SPICE macros) which contain parasitic components (inductors, capacitors) or as an S-parameter model defined by its S (frequency) function. S functions are normally provided by the component manufacturers (based on their measurements) and can be downloaded from the Internet and inserted into TINA either manually or by using TINAs library manager. Noise analysis determines the noise spectrum with respect to either the input or the output. The noise power and the signal-to-noise ratio (SNR) can also be calculated. Symbolic analysis produces the transfer function and the closed form expression of the response of analog linear networks in DC, AC, and transient modes. The exact solution, calculated through the symbolic analysis, can also be plotted and compared to the numerically calculated or measured results. The built-in interpreter can evaluate and plot arbitrary functions.
INRTODUCTION
1-4
Introduction
Monte-Carlo and Worst-case analysis. Tolerances can be assigned to the circuit elements for use in Monte-Carlo and/or worst-case analyses. The results can be obtained statistically, and their expected means, standard deviations and yields can also be calculated. Optimization. TINAS enhanced optimization tool can tweak one or more unknown circuit parameters to achieve a predefined target response. The target circuit response (voltage, current, impedance, or power) must be monitored by meters. For example, you can specify several working point DC voltages or AC transfer function parameters and have TINA determine the values of the selected components. Post-processor. Another great new tool of TINA is its post-processor. With the post-processor, you can add new curves of virtually any node and component voltage or current to existing diagrams. In addition, you can post-process existing curves by adding or subtracting curves, or by applying mathematical functions to them. You can also draw trajectories; i.e., draw any voltage or current as a function of another voltage or current. Presentation. With TINA you can make quality documents incorporating Bode plots, Nyquist, Phasor, Polar and Smith diagrams, transient responses, digital waveforms and other data using linear or logarithmic scales. Customize presentations easily using TINAs advanced drawing tools-you can print your plots directly from TINA, cut and paste them into your favorite word processing package, or export them to popular standard formats. Customization includes complete control over texts, axes, and plot style; e.g., setting line width and color, fonts in all sizes and color, and automatic or manual scaling for each axis. Interactive mode. When everything is in order, the ultimate test of your circuit is to try it in a real life situation using its interactive controls (such as keypads and switches) and watching its displays or other indicators. You can carry out such a test using TINAs interactive mode. You can not only play with the controls, but you can also change component values while the analysis is in progress. In addition, you can assign hotkeys to component values and switches to change them simply by pressing a key. You will immediately see the effect of the change. You can also test MCU applications in TINAs interactive mode. You can not only run and test them using the several lifelike interactive controls e.g., keyboards. but you can also debug them while the MCU executes ASM code step by step, And displays the
INRTODUCTION
1-5
Introduction
register contents and TINAs outputs in each step. If necessary you can modify the ASM code on the fly and test your circuit again without using any other tool. Virtual instruments. In addition to standard analysis presentations such as Bode and Nyquist plots, TINA can present its simulation results on a wide range of high-tech virtual instruments. For example, you can simulate the time response of your circuit using a virtual square wave generator and a virtual oscilloscope. Using TINAs virtual instruments is a good way to prepare for the use of real test and measurement equipment. Of course it is important to remember that the measurement results obtained with virtual instruments are still simulated. Real-time Test & Measurements. TINA can go beyond simulation when supplementary hardware is installed on the host computer. With this hardware, TINAs powerful tools can make real-time measurements on real circuits and display the results on its virtual instruments. Training and Examination. TINA has special operating modes for training and for examination. In these modes, under TINAs control, the students solve problems assigned by the teacher. The solution format depends on the types of problems: they can be selected from a list, calculated numerically, or given in symbolic form. The interpreter providing a number of solution tools - can also be used for problem solving. If the student cannot solve the problem, he/she can turn to the multilevel Advisor. The package includes all the tools needed to produce educational materials. A collection of examples and problems worked out by teachers is also part of the package. Another special educational function of TINA is the software or hardware simulation of circuit faults to practice troubleshooting. Using TINA, you can transform existing PC classrooms into contemporary electronics training labs at low cost.
INRTODUCTION
1.2
1-6
Introduction
Both versions are available with the following features:
INRTODUCTION
1.3
1.3.1
1-7
Introduction
generator it is at your fingertips with a click of the mouse. In addition TINALab II can be used with the TINA circuit simulation program for comparison of simulation and measurements as a unique tool for circuit development, troubleshooting, and the study of analog and digital electronics. TINALab II includes a DC to 50MHz bandwidth, 10/12 bit resolution, dual-channel Digital Storage Oscilloscope. Due to its advanced equivalent-time sampling technology, TINALab can acquire any repetitive signal with up to 4GS/s equivalent sampling rate, while in single shot mode the sampling rate is 20 MS/s. The full scale input range is 400V, with 5mV to 100V/div ranges. The synthesized Function Generator provides sine, square, ramp, triangle and arbitrary waveforms from DC to 4MHz, with logarithmic and linear sweep, and modulation up to 10V peak to peak. Arbitrary waveforms can be programmed via the high level, easy to use language of TINAs Interpreter. Working automatically in conjunction with the Function Generator, the Signal Analyzer measures and displays Bode amplitude and phase diagrams, Nyquist diagrams, and also works as Spectrum Analyzer. Digital I/O for the high-tech Digital Signal Generator and Logic Analyzer instruments allow fast 16-channel digital testing up to 40MHz. The optional Multimeter for TINALab II allows DC/AC measurements in ranges from 1mV to 400V and 100 mA to 2A. It can also measure DC resistance in ranges from 1W to 10MW. You can also plug Experimenter Modules into the slot on the front of TINALab II, allowing you to simulate, measure, and troubleshoot virtually the whole range of analog and digital electronics. Using TINALab II with TINA gives you the unique capability to have circuit simulation and real time measurements in the same integrated environment. This provides an invaluable tool for troubleshooting and brings your designs to life by comparing simulated and measured results.
INRTODUCTION
1-8
New features
CHAPTER 2
NEW FEATURES IN
NEW FEATURES
TINA
This chapter describes the new features and changes in the latest TINA v7 version and also in the previous 6.0 and v5.5 of TINA. Many of them were suggested by TINA users, while others were created by DesignSofts team of software and electrical engineers. We are sure you will share our excitement about these new features.
2.1
2-1
New features
SMPS (Switching Mode Power Supply) design support (Steady State Solver) Control of interactive mode from the new Interactive menu Stress Analysis Advanced integrated PCB design Multi-layer PCBs Autoplacement Autorouting Rip-up and reroute Follow-me trace placement DRC Forward and back annotation Pin/Gate swapping Keep-in/out areas Thermal relief, Fanout Gerber file output Copper pour Split planes Footprint editor with multi-pin footprint wizard 3D view of PCB boards Support to design multi-pin schematic symbols More advanced Logic Design (simplification) tool IF statement allowed in Spice netlists More advanced file export (EMF, BMP, JPG) (File/Export) More advanced file import (EMF, WMF, BMP, JPG) (Insert/ Graphics)
NEW FEATURES
2-2
New features
Copy and Paste of any Windows dialogs (captured by Alt Prt Scr) into the Schematic Editor. Extended virtual instrument for real-time XY-recording, with average value, RMS calculation and recording vs. time
NEW FEATURES
2.2
2-3
New features
Many more components: VCO, BSIM 3.3, communication circuits, 74121, 74122, and much more Component searching and listing tool Optional VHDL analysis Embedding faults into circuit files for advanced troubleshooting
NEW FEATURES
2.3
2-4
Installation
CHAPTER
3.1
3.1.1
Installation Procedure
Minimum hardware and software requirements
IBM PC AT/486DX or compatible (Pentium or better recommended) 64 MB of RAM A hard disk drive with at least 100 MB free space CD-ROM Mouse VGA adapter card and monitor Microsoft Windows 9x / ME / NT / 2000/ XP Novell Netware version 3.12 or later or MS Windows NT/ 2000/ XP Server or later for the Network versions If the program is copy protected by a hardware key, the minimum hardware configuration includes also a parallel printer or USB port.
3-1
Installation
3.1.2
INSTALLATION
D:SETUP (Enter) (where D represents your CD-ROM drive). The setup program will start.
NOTE: This software may come with copy protection. For further details see the Copy Protection and the Network Installation sections.
3-2
Installation
3.1.3
INSTALLATION
3.1.4
NOTE: By clicking on Yes you are agreeing fully with DesignSofts Terms and Conditions for using this software.
3.1.5
3-3
Installation
3.1.6
INSTALLATION
IMPORTANT NOTE: If you are installing TINA for Windows to a hard disk that already has an earlier version of TINA, you must be sure to use a new directory name for TINA for Windows, such as the suggested directory, C:\Program Files\DesignSoft\Tina 7, or the working files you have already created will be overwritten and lost. If uncertain, exit setup, copy your TINA files safely to another hard disk directory or to floppy disks, then resume setup.
3-4
Installation
3.1.7
NOTE:
INSTALLATION
The detailed settings for the Compact installation are made after you select Compact and click on Next.
3.1.7.1 Typical
The commonly used components are installed. This includes Program Files, Samples and Utilities (i.e. Exam Manager, Spice Library Manager).
3-5
INSTALLATION
3.1.7.3 Custom
You will be able to decide which components are to be installed. The default settings are similar to those of the Typical installation. Deselect the unwanted components or select the missing ones.
NOTE: If you wish to install the TINALab Card, TINALab II or other third party supplementary hardware, you must select the Custom installation option at the time of installation and check the appropriate device driver on the list.
3.1.8
3.1.9
3-6
Installation
You can read the latest information in the file again at any time by selecting Read Me from the Tina 7 Start Menu Entries. You can also get the latest information about changes or new features by visiting our Web Site, www.tina.com.
3-7
Installation
3.2
Uninstalling TINA
You can uninstall TINA at any time. Note that this will not delete files you have created. 1. To begin Uninstallation choose Tina 7 from the TINA 7 Start Menu Entries.
INSTALLATION
2. In the Window that appears, double-click on Uninstall Tina. 3. Click on Yes if you are positive you want to uninstall TINA . After all the files have been removed successfully, an OK Button appears. Click on it and uninstallation is complete.
3.3
Network Installation
To install the Network version of TINA, you must logon to your server machine as a user with administrative privileges (Novell 3.x: supervisor, Novell 4.x: admin, Windows NT: Administrator). Then execute the procedure for the Hard Disk Installation on a disk volume, that is accessible from the network. Now carry out the following additional steps: Make all files in the program and user directories sharable: Novell 3.x: FLAG *.* S SUB Novell 4.x: FLAG *.* +SH /S Windows NT/2000/XP: Depending on the setup of your system, you can give the rights to a group (<groupname>) whose members will then have the appropriate rights automatically.
3-8
Installation
Next make sure that the clients have a mapped drive set to the network drive containing the TINA program folder. To assign (map) a drive letter to a network computer or folder do the following: 1. Open Windows Explorer 2. On the Tools menu, click Map Network Drive. 3. In Drive, select a drive letter e.g. G: 4. In Path (Win9x/Me/ or Folder (NT/2000/XP), select from the drop-down list or type in the network drive (server and share name) or folder name to which you want to assign (map) a Drive letter. Note, that share name refers to a shared folder on the server. On Windows NT/2000/XP you can use Browse to find the network computer, drive and folder. 5. Set the Reconnect at Logon checkbox. 6. Press OK 7. Examples: Drive: G: Folder: \\servername\sharename or \\MyServer\Volume1 \\MyServer\Volume1\Public After you have set everything up on the Network disk according to the instructions above, you must run the setup program on each Novell workstation where you want to run TINA . Using the Run command, start NSETUP from the Tina 7\NWSETUP directory. Note, do not doubleclick on the NSETUP icon, but use the Run command instead to start the program. When you run NSETUP you must specify the working directory which should be located on a local drive of the workstation. The working directory can be on the network; however in this case the path of this directory must be different on every work station. After you've specified the working directory, you may install the optional measurement hardware for TINA (e.g TINALab). After running
INSTALLATION
3-9
Installation
NSETUP, you will be able to run TINA simultaneously on any number of workstations, just as though each workstation had a single user version.
3.4
3.4.1
Copy Protection
Copy Protection by Software
If your version of TINA is copy-protected by software, at the first run the program, a message box appears showing your initial authorization status. You will normally have 31 similar, full featured sessions to provide you enough time obtain the authorization. If your program comes with an Order number the best it to press the Authorize button on the message box and enter your Order number into the Order number field of the Authorize dialog appearing and press OK. Note that you must be on-line on the Internet when you enter your Order number. For more information refer to the programs Authorization Help by pressing the Help button, read the CD insert or the Registration and License Control manual. In some cases the program comes with a Serial number, which needs to be entered during installation. When entering the serial number you do not need an active internet connection.
INSTALLATION
3.4.2
NOTE: If you have a dongle protected version under NT/2000/XP you should install TINA in Administrator mode and restart the computer after installation.
3-10
Installation
3.5
Starting Up
After successfully installing TINA, you can start the program by simply double-clicking the TINA icon on your Desktop or by choosing Tina from the Tina 7 Start Menu Entries.
3.6
INSTALLATION
3-11
CHAPTER
GETTING STARTED
In this chapter, we present TINAs screen format and menu structure. A step by step introduction is given using examples.
GETTING STARTED
4.1
4.1.1
Last Component: Return to the last component and reposition it. Wire: Switch to wire-drawing mode. In this mode, the cursor turns
into a pen and you can draw a wire. For more details, see the Wire paragraph below.
Delete: Delete selected component(s). Rotate Left, Rotate Right, Mirror: Rotate or mirror the
component currently selected or being moved. You can also rotate a selected component by pressing the Ctrl-L or Ctrl-R keys.
4-1
Using the Mouse Buttons Properties: Use this command to edit the properties (value, label)
of the component currently selected or being moved. From the Properties menu, you can set all parameters of a component (before it is placed). This lets you place multiple copies of the component, all with the properties just entered. While you are in the component property editor, the right mouse button has another function. When you are editing the field of any component parameter other than the label field, you can copy that field to the label field by pressing the right mouse button and then selecting the Copy to Label command. You can accomplish the same thing by pressing [F9].
GETTING STARTED
4.1.2
Selection of all objects: Press Ctrl+A to select all objects. Moving objects: A single object can be moved by dragging it
(Position the cursor on the object, press and hold the left button, and move the mouse.) Multiple objects can be moved by first selecting them (see above), then clicking the left button while the cursor is over one of the selected objects, holding the left button down, and dragging.
4-2
Using the Mouse Buttons Parameter modification: Double-clicking on an object will bring
up its parameter menu so that you can modify its parameters (if it has any).
4-3
Measurements Units
4.2
Measurement Units
When setting parameters for electronic components or specifying numerical values, you may use standard electronic abbreviations. For example, you can enter 1k (ohm) for 1000 (ohm). The multiplier abbreviations should follow the numeric value, e.g., 2.7k, 3.0M, 1u, etc. The following characters indicate multiplier factors:
GETTING STARTED
NOTE:
Upper and lower cases must be carefully distinguished (e.g., M = m), and the selected letter must follow the numeric characters without a space (e.g., 1k or 5.1G), or TINA will indicate an error.
4.3
4-4
Screen Format
GETTING STARTED
The Menu bar The Cursor or pointer: This is used to select commands and to edit schematics. You can move the cursor only with the mouse. Depending on the mode of operation, the cursor assumes one of the following forms: An arrow, when a command selection is required in the edit window. A component symbol (accompanied by an arrow and small box), when inserting that component onto the circuit in the schematic window. Until the position of the component on the schematic is chosen, its movement is controlled by the mouse. A pen, when defining the endpoint of a wire. An elastic line, when defining the endpoint of a wire or the second node of an input or output. An elastic box, when defining a block after fixing its first corner. A dashed line box, when positioning a component label or a text block.
A magnifying glass, when defining a zoom window.
4-5
Screen Format The Schematic window: This shows the circuit schematic
currently being edited or analyzed. The schematic window is actually a window onto a larger drawing area. You can move the screen window over the full drawing area using the scroll bars at the right and bottom of the screen. When selecting the New command on the File menu, the system automatically aligns the origin of the editor window with the center of the entire editor drawing area. The same is true when an existing circuit file is loaded, as this is the default window position. You can think of TINAs schematic as existing on several layers. In addition to the primary layer that holds components, wires, and text, there are two other drawing layers, which you can turn on or off individually. It is generally convenient to have these two layers on. View|Pin Markers On/Off: Displays/hides component pin ends. A grid of closely spaced dots covering the entire drawing area may be made visible or invisible in the schematic window, depending on the current state of the grid button of the Grid On/Off switch on the View menu. At some schematic zoom levels, you will not see the dots of the grid; nevertheless, all component pins and connecting wires will be on the grid. These dots represent the only available interconnecting points. Component symbols are positioned on the drawing area horizontally and vertically. These symbols are rigid patterns with predefined pin positions and are handled as single units. This permits the software to unambiguously recognize the network nodes. View|Grid On/Off: Displays/hides the grid.
GETTING STARTED
The Tool Bar: You can select most of the editor commands (e.g., select, zoom, wire etc.,) from this tool bar. Lets summarize the most important commands on the Toolbar. You can find more detailed information in TINAs Help system. Note that most commands on the toolbar can also be found under the drop down menus, and can often be activated by Hotkeys. We show the menu name separated from the command name by a dot (Menu name.Command name ).
(File.Open) Opens a schematic circuit file (.TSC or .SCH) or macro (.TSM) The .TSC is extension used in TINA v7, and v6, .SCH is used in earlier versions.
4-6
(Edit.Copy) Copy a selected part of the circuit or text to the clipboard. (Edit.Paste) Paste Clipboard contents into the schematic editor. Note that the content may come from the schematic editor itself, TINAs diagram window, or any other Windows program. Selection mode. If this button is pressed you can select and drag components with the cursor. To select a component (part), wire or text, just click on it with the cursor. You can also select several objects by holding down the Shift key and clicking on the objects one-by-one; or by clicking at one corner of the area, holding down the left mouse button, moving to the opposite corner and then releasing the mouse button. Selected objects will turn red. You can drag the selected objects by dragging one of them. Click and hold the left mouse button when the cursor is over one of the selected objects and move them with the mouse. You can unselect all selected object(s) by clicking on an empty area. One or more selected objects can be deleted while leaving the others still selected by holding the Shift key down and left-clicking the mouse. (Insert.Last component) Retrieves the last component inserted, for a new insertion of another copy, with the same parameters as the previous insertion. (Insert.Wire) Use this icon for inserting (adding) wires to the schematic design. (Insert.Text) Add comments into schematics and analysis results.
4-7
Switches On/Off the grid. I.e.makes the grid visible or invisible. Explicitly zoom in on a selected portion of the current view. It will also zoom out a portion if you just click with the icon into the middle of the area you want to zoom out. Select zoom ratio from a list from 10% to 200%. You can also select Zoom All which will zoom the effective drawing to full screen. Interactive modes, see also on the Interactive menu: DC mode AC mode Continuous transient mode Single shot transient mode, the time is the same as set at Analysis Transient Digital mode VHDL mode With this listbox you can select the analysis and the Interactive Mode Options dialog.
4-8
GETTING STARTED
4-9
Screen Format The Component bar: Components are arranged in groups, named
by the tabs on the Component bar. Once you have selected a group, the available component symbols appear above the tabs. When you click on the desired component (and release the button), the cursor changes to that component symbol and you can move it anywhere in the drawing area. You can also rotate the component by pressing the + or - keys (on your computers numeric keypad) or mirror it by pressing the asterisk (*) key (also on your computers numeric keypad). Once you have selected the parts position and orientation, press the left button of the mouse to lock the symbol in place.
GETTING STARTED
Find component tool: This tool helps you find by name any
component in the TINA catalog. See more details above at the toolbar description.
Open files tab: You can have several different circuit files or
different parts (macros) of a circuit open in the schematic editor at the same time. Clicking on a tab brings that circuit page up in the editor.
The TINA Task bar: TINAs Task bar appears at the bottom of
the screen and provides speed buttons for the various tools or T&M instruments currently in use. Each tool or instrument operates in its own window and can be made active by clicking on its speed button (icon of the tool). Once the cursor is over the speed button, a brief hint appears. Note that the first button (furthest to the left), the Lock schematic button, has a special function. When the Lock schematic button is pressed, the schematic window is locked in place as a background behind other windows, so that it can never cover a diagram or virtual instruments. When the schematic window is not locked and it is currently selected, you will always see the entire schematic window with any other windows hidden behind.
The Help line: The Help line, at the bottom of the screen,
provides short explanations of items pointed to by the cursor.
4-10
4.4
GETTING STARTED
NOTE:
Press the Help button on the component dialog box to invoke TINA's HTMLbased help resource. You will find the parameters and mathematical model of the selected component. You can also access Component help from the help menu.
TINA will automatically assign a label for each component you place on the schematic. It will also display the numerical value of the main component parameter (for example: R4 10k). Note that the value is shown only if the Values option of the View menu is checked. For files from the older versions of TINA, the Values option is turned off by default. The first part of the label, e.g., R4, is required for symbolic analysis modes. You can also display the units of the capacitors and inductors (for example: C1 3nF) if both the Values and the Units options of the View menu are checked.
4-11
Wire
4.4.1
Wire
A wire establishes a simple short (zero ohm connection) between two component pins. To place a wire, move the cursor to the component terminal point where you want to begin. The cursor will change into a drawing pen. Depending on View.Options settings you can draw a wire in two different ways: Select the starting point of the wire with a left mouse click, then move the pen with the mouse while TINA draws the wire along the path. While drawing the wire, you can move in any direction and the wire follows. At the end point of the wire, click the left button of the mouse again. This drawing mode is the default setting in version 6 of TINA. Hold down the left mouse button while positioning the pen; release it at the end point. The actual wire-drawing mode depends on the editor options settings in View.Options. TINA by default uses the first method, but the program will remember that you have changed wire-drawing mode. While drawing a wire, you can delete previous sections by moving backwards on the same track. By pressing the Ctrl key while drawing you can move the last horizontal or vertical section.
GETTING STARTED
1)
2)
You can easily modify existing wires by selecting and dragging sections or edges. For short wire sections, you may need to hold down the shift key while drawing.
You can also invoke the Wire-drawing tool by the Insert|Wire command (hotkey: [Space]). You can start drawing the wire at any place by clicking the left button of the mouse. When you have completed wiring, use the popup menu, press the right mouse button, or press the Esc key to terminate the wiring mode. Be sure not to leave any component nodes unconnected. If there are unconnected components or terminals, TINAs Electric Rule Check tool (ERC) will issue a warning (unless you have disabled it).
4-12
4.4.2
GETTING STARTED
4-13
4.5
Exercises
These exercises will help you build upon and integrate what youve learned from the manual so far.
4.5.1
GETTING STARTED
4-14
GETTING STARTED
Select the Signal menu line and then press the button, a new dialog box with the graphics icons of available voltage generator signals will appear. When you select one of them (in this case, click on the Cosinusoidal button), the associated curve comes up with some default parameters. In the case of the Cosine signal, these are:
4-15
GETTING STARTED
After setting all parameters, click OK. Your cursor will turn into the resistor with the frame of the label. Position it as required and press the left mouse button to drop it. Continue circuit entry with the L and C components as indicated in the figure above. Set the parameters to L = 1 m and C = 1 n. Note the default values of the parallel resistive losses for the capacitor and the series resistive losses of the capacitor. Add the Voltage Pin (chosen from the Meters component group) on the upper pin of the capacitor (or you can add a volt- meter in parallel with the capacitor). Note that even though all the computed voltages, currents and signals are available after running an analysis (see below in this chapter and also in the Post-processing analysis results section), you still need to define at least one output. Place a ground below the generator and connect the generator and capacitor as shown in the figure. To do this, move the
4-16
GETTING STARTED
4-17
Analyses
4.6
Analyses
TINA has a variety of analysis modes and options: The analysis method is analog when a circuit contains only analog components; then the components are modeled with their analog models. The analysis method is mixed when a circuit contains both analog and digital components; then the components are modeled with their analog models. The analysis method is digital mode when a circuit contains only digital components; then the components are modeled with their fast digital models.
GETTING STARTED
4.6.1
4-18
AC Analysis
GETTING STARTED
Now select AC Analysis|AC Transfer Characteristic... from the main menu. The following dialog box appears:
By default Amplitude & Phase will be calculated. Select Amplitude and Nyquist in addition. Modify the Start frequency to 10k and then press OK. A progress bar will appear while the program is calculating. After the calculations are finished, the Bode amplitude characteristic will appear in the Diagram Window. You can easily switch to Nyquist or Amplitude & Phase diagrams by using the Tabs at the bottom of the Diagram Window. You can read exact input/output values by enabling one or more of the cursors. Note that in any representation you can get and place the formula of the transfer function using Symbolic Analysis and selecting AC Transfer or Semi Symbolic AC Transfer. The formula will appear in the Equation Editor Window and you can place it either on the Diagram or the Schematic window as described above.
4-19
AC Analysis
GETTING STARTED
Using TINAs graphic facilities, you can add more useful information to your diagram. As an example, lets add markers, a special annotation, and the circuit schematic itself to the diagram. To add markers to a curve move the cursor over the curve, find a position when the cursor changes into a + shape and click on the curve at this position. When the curve becomes selected, it turns red. Now you can either double-click on it or press the right button of the mouse and select Properties on the popup menu. A dialog box will appear and you can set the curves parameters: Color, Line width, Marker. Select Marker Type: Square and click on OK. To add some text, click on the text icon. When the Text editor appears, type in Resonance. Note that using the font icon of the editor you can select any font, style, size and color. Click on OK and place the text in the neighborhood of the resonance peak. Now click on the pointer icon, then on the text, and finally on the peak of the curve. Note that the cursor turns into a + when you are at the right position. You have just entered a line and arrow that will always point from the text to the curve, even if you drag the text into another position or make other changes. Now place the schematic itself on your diagram. Click the schematic editor Window and select Edit|Select All. Copy this selection into the clipboard by selecting Edit|Copy or clicking on the Copy icon or using the Ctrl C hotkey. Click on the Diagram Window and use Edit|Paste,
4-20
Transient Analysis
or click on the Paste icon, or use the Ctrl V hotkey. The frame of the circuit diagram will appear. Position and drop it at the left corner of your diagram. Now you can still modify this picture by dragging or double-clicking on it and changing its size, frame or background. Now perform a transient analysis. First, make sure your cursor is the selection arrow, then double-click on the voltage generator and change the wavefor m to the default unit step. After selecting Analysis|Transient Analysis, the following dialog box appears:
GETTING STARTED
Change the End Display parameter to 30 u then press OK. In a separate window the transient response will appear. As expected, the RLC circuit exhibits a response of damped oscillation. Exact input/output data pairs can be read by enabling the a and/or b graphic cursors. Now select Analysis|Symbolic or Analysis|Semi-symbolic Transient from the menu. The closed form expression of the circuit response appears in the Equation Editor window. Click on the Copy icon of the Equation Editor Window, then switch to the Schematic window and select the Paste icon. The frame of the formula will appear. Move the frame to the desired location and press the left mouse button to place the formula. Note that you can reposition it by dragging to any position and you can edit it by double-clicking on it.
4-21
Symbolic Analysis
GETTING STARTED
Now go back to the equation editor and click on the Interpreter icon (small calculator) on the toolbar. The expression shown in the equation editor is then transferred to the Interpreter window. The actual definition of the time function is at the top of the window, followed by drawing preferences and the Draw command. Press the run button to draw the function in the diagram window on a new page. This curve can then be copied and pasted into the same transient function diagram, where all of the results can be seen simultaneously. To add more analysis curves to our diagram, press the Add more curves button on the toolbar or call the Add more curves command in the Edit menu. The post-processing dialog appears on the screen. Note; in order to use this feature, you must check "Save all analysis results" in the Analysis.Options dialog The available curves listbox on the left side shows all the curves that have already been calculated.
4-22
Post-processing
GETTING STARTED
The symbols V_label[i,j] and I_label[i,j] denote the voltage and current respectively of the labeled components between the nodes i and j. The symbol VP_n denotes the nodal voltage of node n. To add the voltage of the coil to the list of curves to insert, select V_L[3,2] and press the Add>> button. Pressing OK inserts this curve into the current diagram page.
4-23
Fourier Spectrum
You can do a lot more with TINAs post-processing tool. For example, you can create curves of new functions created by adding or subtracting curves, or by applying mathematical functions on them. For a more detailed description, refer to the Post-processing analysis results section in the Advanced Topics chapter. To demonstrate a more advanced feature of TINA, examine the Fourier Spectrum of the nonperiodic transient response just obtained. First, select the damping output signal by moving the cursor over the curve and pressing the left mouse button when the cursor assumes a + form. The selected curve will change to red. Now press the right mouse button and select Fourier Spectrum from the popup menu. The Fourier Spectrum dialog box will appear. Set the Maximum frequency to 200k and press OK. The Fourier spectrum of the transient response will appear. (You will get a finer curve if you repeat the transient analysis with 500us End Display value). Using the zoom icon zoom into the spectrum between 100kHz and 200kHz. Note that you can also change settings by double-clicking on the coordinate axes. The result is a continuous frequency spectrum shown in the figure below. As expected, the frequency where the Fourier Spectrum shows a maximum is the resonant frequency of the circuit. The Fourier spectrum and the Fourier series dialog box can also be obtained directly from the Analysis.Fourier Analysis menu. This way you do not need to calculate the transient function manuallyTINA will automatically do it before generating the Fourier series or spectrum.
GETTING STARTED
4-24
Fourier Spectrum
GETTING STARTED
NOTE:
You might be surprised that the unit of the frequency spectrum is in Vs (volts times seconds). That is because the continuous Fourier spectrum is a density function versus frequency. If you want to know the approximate amplitude in a narrow frequency band, you multiply the average amplitude (given in [Vs]) in the band with the bandwidth (given in [1/s]).
Fortunately, Fourier analysis is not so complicated for periodic signals. Periodic signals can be represented by Fourier Series or in other words as a sum of cosine and sine waves at the base (fundamental) frequency and integer multiples of the base frequency. To try out this kind of Fourier analysis in TINA, load AMPLI.TSC from the EXAMPLES folder.
4-25
Fourier Series
GETTING STARTED
Run a transient analysis and then select the output curve with the largest amplitude. Press the mouse right button and select Fourier Series from the popup menu: the dialog box of the Fourier series will appear. Note that you can access this dialog directly from the Analysis. Fourier Analysis menu. Set Sampling start time to 1ms and the Number of samples to 2048. Note that for best accuracy, it is very important to set the starting time for the Fourier Series analysis to after the initial transient has died away. Now press Calculate. The list of Fourier components will appear.
4-26
Creating an Op-Amp circuit If you press Draw you can also draw a diagram showing the amplitudes in V (volts) at integer multiples of the base frequency.
4.6.2
GETTING STARTED
If you just opened TINA and wish to create your own circuit, you can start adding components right away. The circuit file name in the top line is set to Noname by default, indicating that a new circuit file Noname.TSC is being edited. If you already have a circuit loaded in the editor, for example, our previous RLC circuit, you can start a new one with the File|New command. You can switch between multiple circuits by clicking the Tabs at the bottom of the screen. Now start adding components. Left click on the voltage generator icon then release the mouse button. The cursor will change into the generator symbol. Position it using the mouse (or by pressing the [+]/[Ctrl-R] or [-]/[Ctrl-L] key for rotation] or the [*] key for mirroring) somewhere in the middle of the screen, then press the left mouse button to drop the component into the schematic. We still need to set the properties of this generator. Double-click on the generator and the following dialog box will appear:
4-27
GETTING STARTED
Leave the DC level, and the IO state parameters unchanged. Note that by accepting Input for the IO state parameter you have selected the output of this generator to be the input for this analysis (a Bode diagram in this example). Click on the Signal menu line. The dialog box will change as shown below:
Press the
available voltage generator signals will appear. When you select one of them (in our case, click on the Square Wave button), the associated curve comes up with some default parameters. In the case of the Square Wave signal, these are:
4-28
To find the IC we want, scroll down the list until you find OPA121E. You can narrow the list if you select the manufacturer (Texas Instrument in our example) from the Manufacturer listbox. You can also simply type OPA121E and the list will automatically jump to the IC (press the Delete button on the keyboard and try again if you make a typing error). Click on the line (OPA121E) and press the OK button. (Alternatively you can double-click on that line). The schematic symbol of this opamp will appear and be attached to the cursor. By moving the mouse, position the opamp as shown on the schematic at the beginning of the section and then press the left mouse button to place the opamp into your schematic. You can also select a part using the Find Component tool at the top-right corner of the Schematic Editor. If you type the part number into the Component to find field and press the Search button, the list of available component(s) will appear. (You can enter just part of the name if you are not sure of the entire name). Press the Insert button to place the component. With the List Component button you can create the list of all available components in a textfile.
4-29
GETTING STARTED
Note that other types of ICs are available under the buttons next to the Operational Amplifiers: Difference Amplifiers, Fully-Differential Amplifiers, Comparators, Voltage Regulators, Buffers, Current Shunt Monitors, and Other Components). You can bring all of these various components into the dialog box for any of the buttons if you set the Show All Components checkbox. In addition to selecting an IC on the list, you can also find it by clicking on any item on the list and then typing in the name of the IC. Now click on the Basic tab on the Component bar and click the Resistor icon. The resistor symbol will be attached to the cursor. Move the resistor to the position of the R1 resistor on the sample schematic diagram at the beginning of this section and press the left mouse button to place this resistor into the schematic. Double-click on the resistor and the following dialog box will appear:
4-30
GETTING STARTED
NOTE: If you have several opamps you may want to simplify their connection to thepower supply. This can be done using the Jumper component, which you can find at the first place on the Special toolbar.
All jumpers with the same label are considered as electrically connectedcomponents in TINA. Therefore, if you connect a jumper called VCC with the positive power supply of the opamp, it is enough to connect jumpers with the same VCC label to the positive power supply pins of the opamps. As an example, you can load and study OPAMP2.TSC from TINAs EXAMPLES\PCB folder, also shown below.
4-31
GETTING STARTED
Note that even though all the computed voltages, currents and signals are available after running an analysis (see below in this chapter and also in the Post-processing analysis results section), you still need to define at least one output. We have placed the parts into the schematic but they are still unconnected. To connect devices, move the cursor over an appropriate pin node until a small drawing pen icon appears. When this pen appears, click the left button of the mouse, draw the wire, and left click again at its endpoint. Finally, add the title to the schematic. using the icon on the toolbar.
Lets check the circuit we have just built and run ERC from the Analysis menu. If everything is OK, the following dialog will appear:
If there is a problem with the circuit, a list of warnings or error messages will appear in the dialog box. If you click on a warning or error message, the related part or wire will be highlighted in the circuit diagram.
4-32
Op-Amp DC Transfer
Set the Start value to 7.5, the End value to 7.5, and then press OK. After a short running time, a Diagram Window will appear as shown below. This displays the circuits transfer curve-output voltage vs. input voltage.
GETTING STARTED
4.6.3
4-33
SMPS Circuits
Using the Steady State Solver The most time consuming part of an analysis of an SMPS circuit is to reach its steady state, when the DC level of the output voltage does not change and the output waveform has only a small periodic ripple. To find this state automatically, TINA has a Steady State Solver under the Analysis menu. To demonstrate this tool, lets Load the UC3842 Boost Converter 5_12V Steady State.TSC circuit file from TINAs EXAMPLES/SMPS folder.
GETTING STARTED
Select the Steady State Solver from the Analysis menu. The following dialog will appear:
4-34
SMPS Circuits
The new parameters compared to the Transient Analysis dialog box areas follows Max searching time: The solver will try to find the steady state solution for max 10ms. After this, the analysis will discontinued whether or not a solution was found.. Final checking time: After the steady state search is done, there is a final check for the length specified here. You should have a stationary waveform for this time interval. Final accuracy: the maximum DC level change allowed. When the change is below this, the analysis will end. Note that the 100m in the example above means 0.1% Method: You can select the method used for finding the steady state: Transient: The steady state is searched by using transient analysis. Finite-Difference Jacobian, Broyden update Jacobian: The steady state is searched by the methods described in the paper, Automated steady-state analysis of switching power converters by Dragan Maksimovic. Note that these last two methods may get to the steady state faster, but they do not go through the normal transient states, so the resulting waveform between the initial and final state does not reflect the real process (but rather the mathematical path of the methods to get there). Now lets run the Solver. After a few minutes of running (approximately 3 minutes on a 3GHz Pentium computer) well get the following resulting waveform:
GETTING STARTED
4-35
SMPS Circuits
These waveforms show the detailed transient from switching on until reaching the steady output voltage. If you zoom out on the waveform, you can see that the period of the switching is around 100kHz and the time needed to arrive at the steady state is 2 milliseconds. Therefore, we need to calculate at least hundreds or sometimes thousands of periods if we want to see the whole transient waveform. This is why finding the steady state is such a time consuming process. The reason for this problem is the long start-up time of SMPS circuit compared with their switching frequency. The start-up time is basically determined by the filter capacitors on the output. The larger these capacitors are, the longer the start-up time.
NOTE: In some cases you can accelerate the Steady State Search using the FiniteDifference Jacobian and Broyden update Jacobian methods, however they do not always converge and the intermediate waveforms provided by these methods do not reflect the real waveforms of the transient process.
GETTING STARTED
Accelerating SMPS simulation using initial values As we mentioned in the previous section, the long analysis time needed for reaching the steady state of SMPS circuits is mostly used for charging the output filter and some capacitors. If we start the analysis using initial values for larger capacitors and inductors, the analysis time can be significantly reduced. In TINA, the Steady State Solver will automatically place initial values into the model of larger capacitors and inductors and so the following Transient Analysis can be run significantly faster (assuming that we do not make changes which will need significantly different initial values). For example, if you want to study the effect of changing the output filter capacitor, it will not significantly change the output voltage DC level. Therefore, starting the new analysis with an initial value calculated by the steady state solver for another output capacitor, will result in a much faster analysis. You can accelerate the analysis of input and load changes in the same way.
4-36
SMPS Circuits
To demonstrate this feature, lets run a transient analysis for our example. Selecting the Transient command from the Analysis menu, the following dialog box appears.
GETTING STARTED
Note that Use initial conditions is set in the dialog. Press OK to start Transient analysis. You should see that analysis runs very fast compared to the previous steady state analysis. The output waveform is shown in the picture below. Why did the analysis run faster? Transient analysis was already preceded by the Steady State Analysis and the main capacitors initial values (called Initial DC voltage in the Capacitor property box) was already set to the final DC voltage. For example , if you double-click on the C3 capacitor, you will see that the Initial DC voltage is already set to 11.875 V. Similarly, all the larger capacitors initial values are set.
4-37
SMPS Circuits
Trigger Use this to determine the starting and ending times of the switching period. You can find this component on the Meters toolbar of TINA. You should connect it to the oscillator frequency control pin of the SMPS/ PWM controller IC, but any node where the oscillator waveform of the IC is present will do. If you double-click on the Trigger component you can set its parameters.
GETTING STARTED
Trigger voltage level: the threshold voltage for the trigger event Hysteresis width: hysteresis value for the trigger event. This value defines a region within which the trigger voltage is allowed to oscillate without generating a trigger event. Trigger State: Rise/Fall The direction of the voltage change required for a trigger event Trigger Count: you can take several periods for the waveform analysis. This is useful in case of very slowly changing output signals. The only electric parameter of the Sensor component is End Value: Voltage|Not Used
4-38
SMPS Circuits
Using the Max. no. of saved TR. points parameter in the Analysis/ Analysis parameters dialog, you can limit the maximum number of points placed in the Diagram. This is useful for large analyses to accelerate diagram drawing. By increasing this parameter, you can refine the diagrams but the drawing time will be slower. Once you have checked the initial transient and the steady state waveform and SMPS circuit the next thing you normally want to know is how it behaves when the input voltage or the load changes. This is realized by the Input step and the Load step analyses. Sensor The purpose of this component is to set the target voltage(s) to be watched during the steady state search. You can add more than one sensor to a circuit. By adding sensors, you can significantly accelerate the steady state search. You can make the search even faster if you can give the final voltage at a certain node.
GETTING STARTED
Using the Max. no. of saved TR. points parameter in the Analysis/ Analysis parameters dialog, you can limit the maximum number of points placed in the Diagram. This is useful for large analyses to accelerate diagram drawing. By increasing this parameter, you can refine the diagrams but the drawing time will be greater. The only electric parameter of the Sensor component is End Value: Voltage|Not Used Once you have checked the initial transient, the steady state waveform, and SMPS circuit, the next thing you normally want to know is how it behaves when the input voltage or the load changes. This is realized by the Input step and the Load step analyses.
4-39
SMPS Circuits
NOTE: Using the Max. no. of saved TR. points parameter in the Analysis/Analysis parameters dialog you can limit the maximum number of point placed in the Diagram. This is useful for large analyses to accelerate diagram drawing. By increasing this parameter you can refine the diagrams but the drawing time will be slower.
GETTING STARTED
Input step analysis One of the standard analyses for SMPS circuits is the calculation of the response to an input change to test the capability of the SMPS design to regulate the output with step changes in the input line. This can be accomplished by adding a pulse to the input voltage and checking the output and other voltages. Since the input change is relative to the steady state, we can start it from the steady state initial values calculated by TINAs steady state solver.
Load the example UC3842 Boost Converter (5_12V Input Step.TSC file in the SMPS folder). The schematic design is the same as above. To see the input step waveform, double-click on the VG1 voltagegenerator on the left. The following dialog box will appear:
4-40
SMPS Circuits
GETTING STARTED
According to this, the input line voltage is 5V. This is converted by theSMPS circuit to 12V. Now click on the Signal line of the above dialog and then the button. The following signal in the Signal Editor will appear:
According to the waveforms, the input voltage will decrease from 5V to 4V for a T2=400us time; and the starting edge (T1) and the ending edge (T3) of the pulse are 1us. To see the response of the circuit, lets invoke and run the Transient analysis from the Analysis menu.
4-41
SMPS Circuits
Load step analysis Another standard analysis is to determine the SMPS response to a fast load change. Using simulation, the response to load changes is obtained by adding a current pulse to the load and analyzing the output and other voltages. Since the load change is relative to the steady state we can start it from the steady state initial values calculated by TINAs steady state solver. Now load the example UC3842 Boost Converter. Find and load the file 5_12V Load Step.TSC file from TINAs SMPS. The schematic design is the same as above , except for the ILoad Current generator on the output.
GETTING STARTED
If you double-click on the ILoad generator and check its waveform, you will see that the DC part is 100mA while the pulse is
4-42
Stress Analysis
is 100mA in amplitude and 500us in width. Accordingly, the 100mA load current will rise to 200mA and then decrease to 100mA again. Note that the output current is shown through the ALoad current arrow at the output. Lets run Transient from the Analysis menu and see the result.
GETTING STARTED
4.6.4
Stress Analysis
Stress Analysis can check parts for stress conditions such as maximum power dissipation and maximum voltage and current limits. You can set these parameters in the property window of the parts or in the catalog. This kind of analysis is also called Smoke analysis, because overloaded parts often emit smoke. You can also run Stress Analysis by setting the Stress Analysis Enabled checkbox in the Analysis | Option dialog or on the Analysis menu. When running DC or Transient Analysis from the Analysis menu, a list of components will appear, along with the parameters exceeding maximum limits. If you click a component in the list, the corresponding component on the schematic diagram will be selected and turned red.
4-43
Network Analysis
The maximum values of the components can be set in the component property dialogs or in the component catalog parameter dialogs. Both can be entered by double-clicking on the components. Before running an analysis, check and set the maximum values of the components in your circuit. As an example of Stress Analysis, open the file Stress Analysis.TSC from TINAs EXAMPLES folder and run DC.Calculate Nodal Voltages and Transient Analysis from the Analysis menu or the corresponding interactive modes. In the following figure, you can see the result of Stress Analysis in DV interactive mode.
GETTING STARTED
Apparently the power dissipation of T1, T2 and R1 exceed maximum limits allowed for these parts.
4.6.5
Network Analysis
TINA helps you perform network analysis and determine the twoport parameters of networks (S, Z, Y, H). This is especially useful if you work with RF circuits. Results can be displayed in Smith, Polar, or other diagrams. You can assign the two ports needed for Network Analysis with the Network Analyzer component to be found on the Meters component toolbar. As an example open the circuit EXAMPLES\RF\SPAR_TR.TSC.
4-44
Digital Circuits
To analyze this circuit run Analysis/AC Analysis/Network Analysis. The amplitude diagram is as follows:
GETTING STARTED
Note that we have added the labels to the curves using the
Auto
label tool of the diagram window. For more details on the Network Analysis see the Network Analysis and S-parameters chapter of the advanced topics manual.
4.6.6
4-45
Digital Circuits
GETTING STARTED
Now lets examine the transient behavior of the circuit. Selecting the Analysis|Digital Timing Analysis command, brings up this menu:
4-46
Digital Circuits
GETTING STARTED
You could also select Transient... instead of Digital Timing Analysis, in which case the program would carry out an analog analysis, giving the detailed continuous waveforms and voltages instead of idealized logic levels. Note that circuits which contain only digital components can be analyzed by both digital and analog methods. Circuits containing both analog and digital components, on the other hand, can only be analyzed by the analog method. Next, load the file EXAMPLES\HALFADMX.TSC. Because this circuit has two passive parts (a resistor and a capacitor), TINA must use analog (or mixed-mode) Transient analysis. The result is the following time response.
4-47
Digital Circuits
GETTING STARTED
NOTE:
You can set the order of the curves by simply appending a colon (:) character and a number to the output name. This is particularly important when presenting the results of digital analysis, where each output is displayed as a separate diagram. For example, if you have outputs named OutA, OutB, Carry, and Sum, you can ensure that they will be displayed in the order given by using the labels OutA:1, OutB:2, Carry:3, and Sum:4. The results of a purely analog analysis normally appear in one diagram: however, you can force TINA to display the results as separate diagrams, in the order you desire, by using the labeling method described above. You must use the View | Separate Curves command in the Diagrams window to separate the curves. If you dont use this labeling method, TINA presents the curves in alphabetical order.
4-48
VHDL Simulation
4.6.7
GETTING STARTED
4-49
VHDL Simulation
GETTING STARTED
This circuit is a combination of two VHDL half adder blocks (macros) and a discrete OR gate. If you doubleclick on either of the HALF adder blocks and then press the Enter Macro button, the following window will appear:
4-50
VHDL Simulation
Note that the essential VHDL code of the half adder is at the bottomand it is only
S C < = ( N5 AND N6 ) AFTER 23 ns; < = ( A AND B ) AFTER 23 ns; N 6 < = NOT ( C ) AFTER 18.5 ns;
At first glance, the code may look a bit strange, but it in fact is a machine translation of our half adder, assembled from gates in 4.6.1. Introducing the node names N5 and N6 as shown on the figure below, it is clear that
GETTING STARTED
and therefore
S < = ( N5 AND N6 ) AFTER 23 ns;
You might find it odd that in the VHDL code in the box, S appears to be calculated from N5 and N6 even before N5 and N6 have been calculated. This is valid, however, because VHDL is a concurrent language and the order of the lines does not mean the order of execution. The delays are taken from the given discrete gates, but they will be replaced by the synthesizer program if the circuit is realized on an FPGA chip. Now select Digital VHDL Simulation from the Analysis menu and press OK. The following diagram will appear:
4-51
GETTING STARTED
A great feature of TINAs VHDL is that you can not only view the VHDL code of each component, but you can edit and run them immediately. Let us replace the 4 line VHDL code S C < = ( N5 AND N6 ) AFTER 23 ns; < = ( A AND B ) AFTER 23 ns; N 6 < = NOT ( C ) AFTER 18.5 ns; N 5 < = ( A OR B ) AFTER 18.5 ns;
This is easier to understand. In fact, if one of the A or B inputs are true, the sum S is True, while if both are true, S is False. (A xor B), while in this case the Carry bit is True. (A and B). After editing the content of the VHDL blocks, they should look like this:
4-52
GETTING STARTED
toolbar, select Digital VHDL Simulation from the Analysis menu, and press OK. The diagram that is drawn will be practically identical to the previous diagram.
NOTE: In TINA of course you can make your own VHDL macros. This is decribed in chapter 5 under 5.5 Adding VHDL macros to TINA.
4.6.8
4-53
GETTING STARTED
To start with virtual measurements, load the circuit AMPLIOPT.TSC from the examples directory. Select the T&M menu and place a Multimeter, Function Generator, and an Oscilloscope on screen. Press Run in the Oscilloscope panel. A distorted sine curve will appear on the oscilloscope screen. Click on the multimeter = button. The multimeter will show only about 0.7 V volts at the collector (Out) this is the reason for the distortion. Now double-click on the Rb1 resistor. The dialog box of resistor properties will appear. Click on the Resistance field and then change the value with the arrows on the right hand side of the dialog box until the multimeter shows about 6V. You can change the step size of the buttons by entering it into the edit box under the down arrow. You can also define a hotkey to the up and down arrow by selecting it from the upper and lower listboxes. Note that while the interactive mode is On, and once a hotkey is defined, the value of the resistor can be changed directly by pressing the appropriate key without opening the property dialog. You can assign hotkeys to
4-54
Interactive Mode
most component values in TINA, including switches. To avoid accidental changes, the hotkeys for component values will only work while TINA is in the interactive mode. Switch positions, however, can be changed before activating the interactive mode in order to set their initial position. Once the collector voltage reaches 6V, close the property editor dialog box (if it is still open) and press Run on the oscilloscope. Set the vertical position to -6 V and use the horizontal and vertical settings to scale the curve for best appearance. The distortion will no longer be visible. Press the Ampl.-button on the generator. The last amplitude value will appear in the large numeric display field of the generator. Use the vertical arrows beside the display to change the amplitude. You will see the sine wave become distorted again as you increase the amplitude, with the maximum input at about 500mV. Now change the waveform from sinusoidal to triangle and then to square wave. Vary the frequency of the function generator to explore the frequency domain over which the circuit performance is acceptable.
NOTE: The virtual instruments under the T&M menu are not to be confused with the virtual instrument components on the Meters component toolbar. Some of the virtual instrument components are used in the interactive mode of the program, discussed in the next section. They are also used to assign outputs for the various analysis modes under the Analysis menu. The Oscilloscope and Signal Analyzer virtual instrument components have a small screen and their purpose main function is to be used with our 3D circuit analyzer program, EDISON.
GETTING STARTED
4.6.9
4-55
Interactive Mode
interactive mode is also very useful for educational and demonstration purposes, for tuning circuits interactively and for interactive circuits which you cannot test otherwise, e.g., circuits with switches, relays, or microcontrollers. First select the interactive mode required (DC, AC, TR, DIG or VHDL) with the button, then press the button. XX can be DC, AC, TR, VHD etc. depending on the mode, set by the button. You can also select the required interactive mode with the DC, AC, Transient, VHDL commands of the Interactive menu. You can start the interactive simulation with the Start command of the Interactive menu and stop it with the Stop command (The Start command will turn into Stop when the interactive simulation is started). Now the displays and indicators in your schematic will reflect whatever you do with the controls. In addition to displays, TINA has special multimedia components (light bulb, motor, LED, switch, etc.) which respond with light, motion and sound. Lets see a few examples.
GETTING STARTED
4-56
Interactive Mode
NOTE: 1) You can also select the Digital interactive mode with the Digital command of the Interactive menu. You can start the interactive simulation with the Start command of the Interactive menu and stop it with the Stop command. 2) TINA can store the last Interactive mode in circuit files, so most likely the DIG mode is already set.
Now you can play with the keypad and watch as the 7 segment display shows the setting of the keypad. If you have a soundcard on your PC, you will even hear the key clicks of the pad.
GETTING STARTED
Press key A or click the On push button (Wait until the cursor turns into a vertical arrow) to turn on the light. The Thyristor will turn on and remain on even after the push button is released. So will the light. You can turn off both the Thyristor and the light bulb by pressing the key S on the keyboard or clicking on the push button S. In both states of the circuit, you will see the currents shown by the two ammeters.
4-57
Interactive Mode
Initially the red LED will light. If you click on the START button (click when the cursor changes into a vertical arrow), OCR1 will close and stay closed (since the current flowing through OCR1 will keep magnetizing the relay coil CR). Now the green LED will light, OCR2 will open, and the red LED will turn off. If you now click on the STOP button, you will break the self holding circuit and the relay CR will release, the red LED will light again, and the green LED will turn off. You can make it easier to operate switches if you assign them to hotkeys on the keyboard (your PCs keyboard). Double-click on a switch when the cursor has turned into a hand symbol. To assign a hotkey, select a letter or number on the list at the Hotkey field of the property dialog of the switch.
GETTING STARTED
4-58
GETTING STARTED
This is a special calculator circuit controlled by the Opcode keypad. For the Operation codes 1, 2 , 3 and 4, it realizes a basic four function calculator, complete with +, -, /, and * basic arithmetic operations. Further operations can be added through modifying the VHDL code inside the Control unit. First press the button; as the Opcode is 1, you should see 4+2=6 on the LCD display. Try the other Opcodes with different settings on KeyPad1 and KeyPad2. Now lets implement the operation to be assigned to Opcode 5. Double-click on the Control box and press Enter Macro. The VHDL code of the component will appear.
4-59
GETTING STARTED
The actual calculations are made in the CASE statement at the end of the VHDL code. Lets modify the code like this:
CASE c1 IS WHEN 1 => o1 := a1 + b1; WHEN 2 => o1 := a1 - b1; WHEN 3 => o1 := a1 / b1; WHEN 4 => o1 := a1 * b1; WHEN 5 => o1 := (a1 + b1)/2; WHEN OTHERS => o1 := 0; END CASE;
button. Set 5 at
the Opcode keypad and you should see the average of KeyPad1 and KeyPad2 settings on the LCD Display.
4-60
GETTING STARTED
4-61
GETTING STARTED
Click on the last MCU File name line and press the The following dialog will appear:
to proceed.
Here you can see and edit the ASM code in the MCU, select another ASM code file, or create a New ASM directly in the editor that will appear when you press the New ASM button. If, however, you switch to the Use HEX/Lst file option, you can select the binary (HEX) file you want to run and the LST file to be used for debugging, as shown in the dialog below.
NOTE: The HEX and LST files should be generated by an appropriate compiler (normally provided free by the MCU manufacturer. However, TINA has a built in compiler for all supported MCUs, so you can directly use your ASM source code.
4-62
GETTING STARTED
This circuit is simply counting forward one count at a time. Press the button to see how it works. The display should step forward one-by one.
4-63
GETTING STARTED
4-64
GETTING STARTED
Press the Edit ASM button. The ASM code of the MCU will appear in the MCU Source code editor. Now lets make the following change in the code. Change the instruction (selected above) in line 25 (you can see the line number in the right bottom corner of the code editor window) from
addlw 01H
to
addlw 02H
Save the changed code by pressing the MCU windows. If you press the will be 2!
Note that the changed code will be automatically saved in the TINA.TSC file.
4-65
GETTING STARTED
4-66
GETTING STARTED
Here is a short description of the MCU debugger dialog. On the top line there are the following controlling icons: New. Clear the debugger. You can enter, automatically compile, debug
and run new code. This icon appears only when the MCU code is given in ASM source format. (Use ASM file only option in the MCU input file selection dialog available from the MCU code line MCU property dialog)
Save the actual code into the TINA TSC file. Note that you can
edit the code in the Debugger. After editing, it is automatically recompiled (after requesting confirmation). This icon appears only when the MCU code is given in ASM source format.
Save the ASM file (source code) of the MCU code. This icon
appears only when the MCU code is given in ASM source format.
4-67
GETTING STARTED
4-68
GETTING STARTED
increment the COUNTER, and copy it to PORT A. The output will now be 1. After this, the program will return to the infinite loop at PT1.
will be 2 at each Low-High change of the switch. You can also check the circuit in the Debuggers continuous Running mode by pressing the button. Even though the debugger will
4-69
Editing Breakpoints
run fast, you can still see the infinite cycle and the jump to the Interrupt server routine ( INT_SERV: ) when you change the switch.
GETTING STARTED
Toggle
statement. Now you can resume execution either step by step with the Run command again. examples in
or
the
4-70
4.7
GETTING STARTED
original schematic file schematic file backannotated ( after pin/gate swapping and renumbering ) design parameters set, components placed pcb file net properties set and routed pcb file optionally pin/gate swapped and renumbered, routed, silkscreen adjusted, documentation layers finalized pcb file
4-71
4.7.1
GETTING STARTED
The most important thing in PCB design is that every part in your schematic must have a physical representation with exact physical size. This is accomplished through so called footprintsdrawings showing the outline and the pins of the parts. TINAs footprint naming uses as a starting point the IPC-SM-782A (Surface Mount Design and Land Pattern Standard) and the JEDEC standard JESD30C (Descriptive Designation System for Semiconductor-Device Packages). (See http://www.jedec.org/download/search/ jesd30c.pdf.) In TINA, we have already assigned default footprint names to all parts which represent real components.
NOTE: Some parts used for theoretical investigations ( for example, controlled sources) do not represent real physical parts so you cannot place them on a PCB. If your design contains such components, you should replace them with real physical parts.
4-72
Of course there is no guarantee that the default physical representatives of the parts are the same as those needed by your design There are two ways to check this. 1) You can use TINAs Footprint name editor which you can invoke from the Tools menu. In this dialog you see all of TINAs components and the corresponding footprint names.
GETTING STARTED
Clicking on the footprint name fields, you can select from the available footprint names. In the dialog, components that do not already have a footprint name association will be denoted by red characters and also by ??? in the footprint name field.
4-73
GETTING STARTED
2) Alternatively you can double-click on each part and check the Footprint Name of the component property dialog.
the PCB information dialog where you can select from the available footprint names. You can also see the 3D view of the different parts via the 3D package view field of the dialog.
4-74
GETTING STARTED
If you find the footprint name you want on the list, click on it and press OK: you will be returned to the component property dialog with the selected footprint name in the Footprint name line. To confirm the change, press OK on the component property dialog again. If you do not find the footprint name you want, you can add a new footprint using the Add buttons of the PCB information dialog. Press the Help button for more information. When everything looks good, you can make a final check by clicking the 2D/3D view button or by simply pressing the F6 key. The 3D view of those components for which a physical representation has already been added will appear.
4-75
4.7.2
GETTING STARTED
Select Start New Project, Autoplacement and Use board template. With the Browse button find and select the 2layer_A.tpt template files from TINAs Template. The settings are appropriate for a double-sided PCB. If you use a template, you should set the level of manufacturing complexity. The following three levels of manufacturing technology are defined by the IPC-2221 generic standard.
Level A : General Design Complexity Level B : Moderate Design Complexity Level C : High Design Complexity
The template file specifies the number of layers and their properties: system grid size, autorouter settings, spacing and track width. The following templates are included with PCB Designer:
4-76
You can choose PCB template based on technology, density and package pitch. Finally, you can set the size of the PCB board in inches or mm depending on the measurement unit settings in the View/Options dialog of TINA. When everything is set properly, press the OK button and the PCB layout design will appear with all the components automatically placed on the PCB board.
GETTING STARTED
Now click and drag the parts to new positions as, shown on the figure below. (Find opamp2 placed.tpc to check your results.)
4-77
GETTING STARTED
Press F4 to invoke the Net Editor and set nets routing width. First, click on Modify all and enter 12.5 into the Track width field. Then select power nets (Ground, VCC, -VCC) and set their widths to 25mil.
To automatically route the netlist, press the F5 button or select Autoroute board command from the Tools menu. The following screen will appear:
4-78
GETTING STARTED
To see if everything is routed correctly, press F7 or select DRC (Design Rule Check) from the Tools menu. The following message will appear:
To finish our first simple design, lets add a text box to the silkscreen/ assembly layer. To do this, click the T button on the toolbar. The following message will appear:
Enter the text into the empty upper field and press the OK button. The text will be attached to the cursor. Move it to the place shown on the picture below and press the left mouse button.
4-79
GETTING STARTED
Finally, you can check your design in full 3D. To do this, press F3 or select 3D View from the View menu. After some calculation the following window will appear.
4-80
4-81
Schematic Macros
CHAPTER 5
5.1
schematic
Using TINAs macro facility, you can simplify schematics and hide clutter by turning portions of the schematic into a subcircuit. TINA automatically represents these subcircuits as a rectangular block on your schematic, but you can create any shape you like with TINAs Schematic Symbol Editor. You can convert any schematic diagram into a subcircuit - called a Macro in TINA - simply by adding the terminals and saving the new circuit in the special (*.tsm) format.
5-1
Schematic Macros
Now lets see how to create a macro in TINA through an example. Load the Half Adder example (Half_add.tsc) from the Examples folder of TINA and convert it into a macro.
SCHEMATIC MACROS
Delete the old terminals and replace them with subcircuit terminals, called Macro Pins in TINA. You can find and select the Macro Pins under the Special component toolbar.
5-2
Schematic Macros
When you place Macro Pins, labels (such as Pin1, Pin2 etc.) are pre-filled in. Double click the Macro Pin and type in the new name in the label field. You can also drag the component with the mouse, or rotate it with the [+] and [-] keys or the buttons. Next, create and save the new macro. Select the New Macro Wizard from the Tools menu. Set the Name to Half Adder (this will be displayed in the macro box that opens automatically), and set the Label to HA. This label will be displayed as the component label above the component. Note that you can leave this field blank if you dont want a component label.
SCHEMATIC MACROS
When done, press OK. A Save dialog box will appear. Set Half Adder as the File name and press Save. Note that there is already a macro with a similar name (Half_add.tsm). This has the same content as the one we just created, and is included for reference. You can also use it in the next section.
5-3
Schematic Macros
Now lets see how to insert a macro into a schematic and use it. Clear the circuit with File|New or by restarting TINA. Select Insert|Macro, then our newly created Half adder.tsm, and click Open.
SCHEMATIC MACROS
Our new macro will appear as a cursor. Move it to the center of the screen and click the left mouse button. The full symbol of the new macro will appear. Note that a rectangular schematic symbol has been automatically created, the macro name we specified is inside the rectangle, and the label name is above it. Now you can add more components to the circuit, connecting them to the newly created macro, and start analysis as with any other circuit. To check the content of the macro, double click on the symbol and TINA will display the model. To return to the main circuit, click the Leave Macro button on the screen at the upper left, use the File/Leave Macro command, or the right click popup menu. TINA allows a hierarchical macro structure; that is, macros can contain other macros inside, and so on. Let us use our half adder macro to create a full adder macro containing two half adder macros.
5-4
Schematic Macros
SCHEMATIC MACROS
To do this, insert the newly created Half Adder twice into a new circuit and then add the additional components and wires as shown in the following picture.
5-5
Schematic Macros
Now create and save the new macro with the New Macro Wizard from the Tools menu. At this point let us note that although the automatic symbol creation is very convenient, you can also create your own schematic symbols with TINAs Schematic Symbol Editor and assign macros to them. Let us use this feature with an existing symbol. The creation of such a symbol will be described later in detail. Set the Name to Full Adder and set the Label to FA (this will be displayed as the component label above the shape). Uncheck the Auto generated checkbox and press the button next to it. The list of available symbols will appear as shown below.
SCHEMATIC MACROS
Note that in order to see the predefined symbols, the Macro Pin Label names must exactly match the names in the symbol. In our example, they must be (A, B, Ci, Co, S). If you do not see the symbol shown in the figure above, check the terminal names or try to recreate the symbol as shown later at Making your own schematic symbols. Click the schematic symbol with the large summation sign and press OK. The name of the schematic symbol will appear in the shape field of the New Macro Wizard dialog box. Finally, click OK and save the macro under the name of Full adder.tsm.
5-6
Schematic Macros
To see our newly created full adder macro, select Macro from the Insert menu and then select Full adder.tsm and click Open.
SCHEMATIC MACROS
Double click on the symbol and the schematic inside the circuit will appear, showing two of our previous half adder macros. You can then double click on either of the macros to see the schematic inside. Return to the Full Adder and the main circuit by clicking the Leave Macro button.
5-7
Spice Macros
5.2
SPICE MACROS
5-8
Spice Macros
Select the triangular opamp symbol and press OK. A Save dialog box will appear. Save the new Spice macro under the name UA741.CIR. Now lets insert the new subcircuit into a schematic and check its contents. Select the Macro command of the Insert menu. Click the UA741.tsm file and then press Open. Now the new macro will be attached to the cursor. Position it on the screen and drop it by clicking the left mouse button. Double click the symbol to see its content. The netlist editor will appear, showing the macro in detail. Note that you can modify this netlist, and the modified netlist will be saved with your circuit. However this will have no affect on the original macro; it remains unchanged.
SPICE MACROS
NOTE: It is very important that the connection names in the Spice macro match the pin names of the component symbols. The pin names of the opamp symbols predefined in TINA are shown below. You can check the pin names of a component symbol in TINA by moving the cursor above the pin. The pin name will be displayed at the left side of the bottom status line. Double-clicking the symbol will present the netlist, where you can check the connection names in the Spice subcircuit.
5-9
Spice Macros
5.3
SPICE MACROS
5.3.1
5-10
Spice Macros
First, start the Library Manager program. Use the Windows 95 Start menu to locate the TINA folder and double click on its icon. Select Collect subcircuits and models from the File menu. Find the EXAMPLES\SPICE folder in the dialog box, click the SPICE folder where our example subcircuit -a ua741 amplifier- has already been placed, and press Next.
SPICE MACROS
A new dialog box will appear with the list of available files on the left side. Note that the file you select must be a proper Spice subcircuit. Click UA741 and then press the > button. The UA741 model you have selected will appear on the list of selected files. In a similar way, you can select more files or even all the files by pressing the button.
5-11
Spice Macros
Press the Next button to continue. The following dialog box will appear.
SPICE MACROS
With this dialog box you can make changes in the subcircuit or model name. This might be necessary to avoid conflicts among different subcircuits or model versions with the same name. To differentiate the new model, you can add the file name as a suffix to the subcircuit name or add any text as a suffix to the name using the Other option. Lets add the suffix my to the subcircuit name and then press the Next button. The contents of the new library file will appear.
5-12
Spice Macros
NOTE: The new name of the subcircuit has the suffix my: UA741_my.
SPICE MACROS
Using File|Save As, save this library in the SPICELIB folder to be found in the main TINA folder (e.g., TINA 7\SPICELIB), with the name myspicelib.lib. Now select Create TINA Library Description from the File menu. The following dialog box will appear.
5-13
Spice Macros
Here you specify a name for your new library. You can also specify some search options for determining the pinout description of the Spice model. The default setting is usually satisfactory. Press the Help button for more information. The description (directory) of the new catalog will be displayed in a new window.
SPICE MACROS
Finally, save the library directory as myspicelib.tld in TINAs Spicelib folder. Note that the Save As command applies to the active (selected) windows only..
5-14
Spice Macros
Next time you start TINA, select Spice Macros, and then Operational Amplifiers, and you will find the new component library in the list of Manufacturers. Your subcircuit will appear on the list invoked either by selecting My Spice Library or All. In the previous example, you added a component described by a Spice subcircuit. You can also add diodes, transistors and other devices by simply using .MODEL instructions. These devices are normally placed in a file containing many .MODEL instructions. In TINA, there are two such sample libraries, called diodes.lib and transistors.lib First, open the diodes.lib file from the EXAMPLES\SPICE folder using the File/Open File command or the corresponding icon on the toolbar. The following window listing the contents of the file appears:
SPICE MACROS
Do not change the other settings. Press OK. A description listing models in the new TINA library will appear:
5-15
Spice Macros
Do not change the other settings. Press OK. A description listing models in the new TINA library will appear:
SPICE MACROS
The file contains 3 normal and 3 Zener diodes. In the Spice language, there is no difference between normal, Zener, LED, Schottky, Varicap, and other diodes. However, in TINA, you can assign different schematic symbols to these types. To do this, select Categorize Components from the Edit menu. The following dialog box will appear:
5-16
Spice Macros
Select the Zener diodes (the last 3 items on the list) by clicking them one by one while holding the Ctrl key. Then press the Zener button. <D> and [D] identifiers will change to <DZ> and [DZ] ensuring the use of the Zener diode symbols in TINA. Press OK and save both library files in the SPICELIB folder in the main TINA folder. To verify the new diodes, restart TINA, select diodes or Zener diodes from the toolbar, drop the diode onto the schematic, and double click on it. Press the button at the type line and select the "my diodes" library using the drop down menu of the Library field at the left top corner of the Catalog Editor dialog box.
SPICE MACROS
5-17
Spice Macros
You will also find your new "normal" diodes under the Diodes category of the toolbar. Note that you can add new diodes to any existing manufacturer catalog if you select a library name already in the drop down menu (e.g., Motorola.). In a similar way, you can try adding transistors given by .MODEL Spice commands to TINA using the transist.lib library. There is no need to categorize these components since the NPN and PNP transistors have different notations in Spice. In many cases, adding models to TINA is as easy as described above, but in some cases TINA cannot make the connection between the Spice models and their graphic symbols automatically. Fortunately, TINA's latest Library Manager provides an easy to use tool to solve this problem. Let's the add the library "SPICETST.LIB" from the EXAMPLES\SPICE folder to TINA. First, start the Library Manager as described above. Open the "SPICE TEST.LIB" file using the Open icon or the Open command from the File menu. Use the "Create TINA Library Description/for Spice Models and Subcircuits" Command as described above. You will see the following window.
SPICE MACROS
Looking at the lines of the "spice test.tld" file containing the library description, it seems that the first model, xMAX4200, was recognized automatically, since both the graphic symbol and the category were found.
5-18
Spice Macros
For the second model, the xMAX4147, no graphic symbol was assigned and its category was not recognized; however, the program recognized its terminals. Finally for the last model, the xmoc223, nothing was recognized. Note that even if the program does not recognize a model, it is placed in an automatically generated box (autoshape) and still can be used. If you want to add an appropriate graphic symbol to such a part, you should do the following: Select the "Edit/TLD Editor for Subcircuits" command. The following dialog box will appear:
SPICE MACROS
TINA presents the graphic symbol with the names of the terminals in the top left corner. In the top right corner, you can see the list of terminal nodes and the associated terminal name of the graphic symbol. You can move the graphic terminal names up or down by simply dragging them or by using the Move Up and Move Down buttons. In the top right corner, TINA displays the category, which you can also change. Next, the SPICE code of the selected component is shown, while below that in the "TINA Library Description" field appears the content of the actual line of the .TLD. With the buttons First/Previous/ Next/Last you can move among the models in the library.
5-19
Spice Macros
Verify that all entries for the first model are correct and jump to the second model by pressing the Next button. In the dialog box, the MAX4147 model will appear.
SPICE MACROS
The first things you should notice are the missing graphic symbol (Shape) at the top-right corner and the red TLD line at the bottom. These indicate that the Library Manager could not fully understand the model. Press the vertical button at the right side of the Shape window and see a list of the available symbols appear. Move down with the scroll bar until you see the <Comparator8DO> "totem pole" symbol.
5-20
Spice Macros
Click the <Comparator8DO> "totem pole" symbol. This symbol will be inserted into the Shape window.
SPICE MACROS
Check the list showing the connection between the Shape nodes and the Spice terminals. It should be correct since the Library Manager did not give an error message for the Spice comments. If there had been a discrepancy, you would have seen an error message in the TLD line: "No processable comments". Change the Category at the top right corner to <Comparator >. Click the Next button again to bring in the last model in this library. The following window will appear:
5-21
Spice Macros
SPICE MACROS
Note the "No processable comments" message at the bottom line. This means that the Library Manager could not identify the Spice terminals from the comments in the Spice model. We will have to make the connection between the graphic shape and the Spice terminals manually.
5-22
Spice Macros
First select the <Optodar> shape as described above. You will see the following window: Note that the Spice terminal nodes and the Shape terminals are not properly mapped. The first node in the list, node 4, is associated with the Collector of the transistor while according to the comments in the Spice code it should be connected with A, the Anode of the input LED. Click on A and drag A to the top of the list (to Node 4) , then drag K to Node 5, and finally drag E to node 3. Check the remaining two nodes, which in this case must be correct. Change the Category at the top right corner to <Optocoupler >. This completes are editing of the various models. Press OK to close the TLD editor. The SPICE TEST.TLD window should be updated and look like this:
SPICE MACROS
Using the File|Save As command, save both the SPICE TEST.TLD and the SPICE TEST.LIB files in the TINA 7\SPICELIB folder. It is important to use this folder and not the EXAMPLES/SPICE folder, otherwise TINA will not see the changes. Finally, use the File|Create TINA Library command to register the changes for TINA. Close the Library Manager.
5-23
Spice Macros
When you restart TINA, you can find the new models by selecting "Spice Test" as Manufacturer at any category of the Spice Macro Models component bar and by setting the "Show all components" checkbox.
SPICE MACROS
You can also find these new models by looking in the appropriate category (Comparators, Buffers, and Optocouplers). These new parts will be at the end of the list, since the names of the new models start with X.
Of course, you can also set the Manufacturer in the appropriate category to "Spice test" to see the newly added components.
5-24
S-parameters
5.4
S-PARAMETERS
5-25
S-parameters
Click on s_bfp405.s2p and then press the > button. The s_bfp405.s2p model you have selected will appear in the list of selected files. In a similar way, you can select more files or even all the files by pressing the >> button. A dialog appears. With this dialog box you can change the model name. This might be necessary to avoid conflicts among different modelversions with the same name. To differentiate the new model, you can create a model name from the file name or from one of the first 8 lines, or you can add a prefix or suffix to the model names. Lets just use the file name as a model name. Press the Next button and the contents of the new library file will appear. Using File|Save As, save this library in the SPICELIB folder found in the main TINA folder (e.g., TINA PRO\SPICELIB), using the name myslib.lib. Now select Create TINA Library Description...|...for S parameter models from the File menu. The following dialog box will appear: Here you specify a name for your new library, e.g., My S Parameter Library. You could specify the name of the manufacturer as a library name, but note that if there already is a library in TINA with the same name (e.g., Siemens), then your new model will be added to this library. The library descriptor file of the new catalog will be displayed in a new window. However, in the case of S parameter files, you must always categorize the models (unless you want them to appear among the mixed components with a default shape). To do this, select Categorize Components from the Edit menu. The following dialog box will appear: Press the ICs & other unrecognized components tab. Select one or more models from the list, then press a Move to page ... button (pick the button for the model type of the selected model). In our case, press Move to page Transistors, then click on the Transistors tab. Now select the appropriate category, which for this model is NPN. Save the library descriptor file as mysplib.tld in TINAs SPICELIB folder. (Both Spice and S parameter libraries are stored in this folder.) Note that the Save As command applies to the active (selected) windows only.
S-PARAMETERS
5-26
VHDL Macros
Finally, use the File|Create TINA Library command to register the changes for TINA. Next time you start TINA, select RF components, and then NPN RF Bipolar Transistors and you will find the new component library in the list of Manufacturers. Your S parameter model will appear on the list invoked either by selecting My S Parameter Library or All.
5.5
S-PARAMETERS
In this case the A,B ports will appear on the left side and the S,C ports will appear on the right side. Lets see how to do a macro from the following VHDL code (a half adder):
LIBRARY ieee, tina; use ieee.std_logic_1164.all; use std.textio.all; USE tina.primitives.all; entity section ENTITY e_Half_add_entity IS PORT(
5-27
VHDL Macros
A : IN std_logic; S : OUT std_logic; C : OUT std_logic; B : IN std_logic ); END e_Half_add_entity; architecture section ARCHITECTURE a_Half_add_arch of e_Half_add_entity I S constant delay : time := 20 ns; BEGIN S <= (A xor B) after delay; C <= (A and B) after delay; END a_Half_add_arch;
1. Select Tools/New Macro Wizard... 2. Check Generate VHDL Component, uncheck Current Circuit. 3. Type a name for the new macro.
S-PARAMETERS
4. Click on the
and navigate to EXAMPLES/VHDL in the TINA program folder. You should see the half_adder.vhd file in the open dialog. Select this file and press Open. 5. Now the New Macro Wizard dialog should appear looking like this:
5-28
VHDL Macros
6. Press OK to save the macro, and save the macro into the default Macrolib folder.
5.5.1
S-PARAMETERS
5-29
VHDL Macros
To see the content of the macro double-click on it and press the Enter Macro button on the property dialog that appears. The VHDL content of the macro will be displayed:
S-PARAMETERS
5-30
VHDL Macros
5.5.3
line, the ports before the first semicolon (;) are placed on the left while the rest are placed on the right side of the macro box. For example, if you change the ports line to
ports:A,B,S;C;
S-PARAMETERS
and add the whole changed header to the original VHDL file (which had no header) we get the following file (you can also load it from the EXAMPLES/VHDL/half_adder31.vhd.)
TINA VHDL Macro Description Begin entity_name:e_Half_add_entity; arch_name:a_Half_add_arch; ports:A,B,S;C; TINA VHDL Macro Description End LIBRARY ieee, tina; use ieee.std_logic_1164.all; use std.textio.all;
5-31
VHDL Macros
USE tina.primitives.all; entity section ENTITY e_Half_add_entity IS PORT( A : IN std_logic; S : OUT std_logic; C : OUT std_logic; B : IN std_logic ); END e_Half_add_entity; architecture section ARCHITECTURE a_Half_add_arch of e_Half_add_entity I S BEGIN S <= (A xor B); C<= (A and B); END a_Half_add_arch;
Converting this into a new macro called Half_adder_VHDL31.TSM and then inserting it again we will see the revised pinout version::
S-PARAMETERS
5-32
CHAPTER 6
6.1
6-1
The first symbol on the list (an Ammeter) will appear in the editor window. Try the Dir: control at the bottom of the screen. Using this control, you can provide different shapes for symbols at each rotational orientation by designing each of them individually. Now click on the NAND symbol at the right side of the screen and press the button. The NAND gate symbol will appear in the editor window. Try the Standard: control to see the US and European versions of the part shape. You can design symbol versions for each standard, if necessary. If the symbols are identical in the two standards, you need create only one version. Now lets create a symbol for the full-adder circuit that was used above in our example of creating a half adder macro. First clear the editor window by pressing the button or by selecting the actual symbol in the editor window and pressing the Del button. Now draw a rectangle as the body of the component. First press the button then click on any point in the drawing area, hold the mouse button, and move the mouse until the rectangle is properly sized.
6-2
Fill the rectangle with a color by right-clicking on the palette at the lower left corner of the window. Note that a left-click will change the foreground color (FG), in our case the border of the rectangle.
Now add the terminals. Select the desired terminal type from the Terminal-Toolbar in the upper left corner of the window and move the cursor into the rectangle you just drew. Position it using the mouse or pressing the [+] or [-] key for rotation and click to locate the terminal. Be sure the small red x, indicating the pin end, is outside the body. Continue this process until every terminal is positioned.
6-3
Press the Device Properties button, set the Name of the symbol to Full Adder, and press OK. Finally, copy the new symbol into the symbol library with the button (it appears now at the end of the list), and use the File|Save command to save the now extended devices.ddb file in the TINA main directory.
6.2
6-4
The wizard offers two options. Generic If you select this option, the Wizard creates a rectangular-shaped IC with a DIP-style pin layout. The total number of pins must be specified. For example, if you enter 14 pins in this field, you get the following pin layout:
Vendor specified pin list In this case the Wizard creates a shape based on a file where each line defines a terminal as Pin number, Name, Electric type separated by commas:
6-5
Footprint Editor
For example:. 1,RA2,INPUT 2,RA3,INPUT 3,RA4/T0CKI,INPUT 4,MCLR,INPUT 5,VSS,POWER etc. The electrical type can be INPUT, OUTPUT, INOUT, BUFFER and POWER. For example, if you read in the PIC16F84A.CSV file from TINAs EXAMPLES\PCB folder, the Wizard generates the next IC:
When the Wizard is finished, the shape can be further edited with the tools described above.
6.3
Footprint Editor
Using the Footprint Editor, you can create new footprint symbols that you can add to the footprint library. You can start the footprint editor from the Tools menu of TINAs PCB Designer by selecting the Footprint Editor command.
6-6
Footprint Editor
If you want to create a new footprint, you can build it by placing various primitive drawing elements and symbols, including lines, rectangles, arcs, text and pads. Well recreate a simple resistor footprint already included in the system. First clear the editor window by selecting the New Footprint command from the Footprint menu. Then set the position of the origin by double clicking on the cross symbol with the little arrows. Enter 1300, 1000 in the X and Y fields respectively. Check the Use Relative Coordinates checkbox, and press OK.
Now select the rectangle symbol on the toolbar and draw a rectangle around the origin. To do this, click on one corner, hold down the mouse left button, and drag the cursor to the opposite corner. Release the mouse button. If you create a footprint, you should be very careful with the dimensions. You must define the exact dimensions according to the manufacturers data sheet, especially of the pads: otherwise the parts cannot fit on the board. To set the shape precisely, it is better to use coordinates rather than drawing with the mouse. To set the size of our rectangle using coordinates, move the mouse over one of its edges and when the cursor changes into a hand symbol, double click at one edge of the rectangle. The Rectangle Property dialog will appear.
6-7
Footprint Editor
Now enter 0, 0 in the CenterX and CenterY fields; 840, 300 into Width and Height; and 5 into the Line Width fields.. In the Rectangle Property dialog of the shape you can change the layer settings, too. By default, a rectangle shape resides on the Silkscreen Top and Assembly Drawing Top layers. Pressing the down arrow invokes the layer configuration editor. The layers can be turned on/off by double-clicking on the grey square next to the layer name. In our example, the default layer configuration is good, so dont change it. Close the property editor by pressing OK.
YOUR OWN SCHEMATIC SYMBOLS
Now add 2 lines to our footprint. Select the line symbol and draw 2 horizontal lines next to the rectangle on both sides. Double click on the lines and modify the parameters as follows: Line1: -460, 0, -420, 0, 5 (Point1 X, Point1 Y, Point2 X, Point2 Y and Line width) Line2: 420, 0, 460, 0, 5 (Point1 X, Point1 Y, Point2 X, Point2 Y and Line width)
6-8
Footprint Editor
Finally, add two through hole pads to the footprint symbol. Select the pad symbol from the toolbar. Move the pad next to Line1. Now activate the property editor of the pad, by moving the mouse over it and double-clicking when the mouse changes into a hand symbol. Enter - 500, 0 in the Center X and Center Y fields. The Drill parameter is 37. Now click on the down arrow. By default the pad resides on the Top, Bottom, Power, Ground, Solder Mask Top, Solder Mask Bottom, Drill Drawing and Drill Tape layers. The default layer configuration could have been changed in a way similar to what weve seen in the rectangle example. Though the default layer configuration is good, we have to change the dimensions of the pad. Double click on the size field and enter 58 in the Diameter field on the Top, Bottom, Solder Mask Top and Solder Mask Bottom layers, enter 78 on the Power and Ground layers and 37 on the Drill Drawing and Drill Tape layers. Its important to enter the package pin number into the name field.
YOUR OWN SCHEMATIC SYMBOLS
Now pick up the next pad and move to Line2. We have only one parameter to change, Center X, which should be 500.
6-9
The footprint symbol is ready to save into a library. Open the package.fpl file, select the resistor group (or define a new group) and press the add footprint button.
6.4
6-10
6-11
When the wizard is finished, the footprint can be further edited and saved in the library.
6-12
Parameter Extractor
CHAPTER
PARAMETER EXTRACTOR
Using TINAs Parameter Extractor you can create component models that more closely represent actual real world devices by converting measurement or catalog data into model parameters.
Use the Windows Start menu to locate the TINA PRO folder. Start the Parameter Extractor by double-clicking its icon. To create a new transistor, which can be added to TINAs transistor catalog later, select File|New Library|NPN Transistor.
7-1
Parameter Extractor
The dialog allows you to enter data from measurements, from manufacturers catalog data, or from TINAs default values (use the Template-ComboBox for this).
PARAMETER EXTRACTOR
Click on each tab at the bottom of the screen and fill in all the transistor parameters. Select the default values or enter your own. Note: be sure to fill in all data, since missing data may lead to incorrect results.
7-2
Parameter Extractor
Next select Calculate|Current component. To check how well TINAs transistor model matches the input data, you can walk through the tabs to see the calculated graphs and numeric values for every parameter. Finally, lets insert the new transistor into the source file for TINAs transistor catalog by selecting File|Catalog Manager. To be able to use the new catalog, you must recompile the modified source files and link them together into the CLCC.CAT catalog file. Locate and open a component-file compatible with your component (e.g., if adding a bipolar transistor, choose a bipolar catalog, bipol_x.crc). Click on the Browse-Button and select the file from the File Open Dialog. All component-files delivered with TINA are placed in the CLCC subdirectory of the TINA directory (by default C:\Program Files\Designsoft\TINA7).
PARAMETER EXTRACTOR
7-3
Parameter Extractor
Move your component into the library by selecting it, clicking on the button and then the OK button. After Pressing OK, TINA will prompt you and ask if you want to recompile the catalog source files and create a new updated catalog. If you answer "Yes," TINA will create the new catalog and you can use it after restarting TINA. You can also recompile the catalog using the "Compile TINA Catalog" command in the File menu. This may be necessary if a previous attempt at compiling failed, e.g., due to insufficient hard disk space.
PARAMETER EXTRACTOR
In a similar fashion you can calculate magnetic core parameters. You should enter the upper ( A ) and lower ( B ) curve of the hysteresis and the geometric parameters of the core. Run an example with the default parameters ( load Default from the Template listbox ) to see typical values.
7-4
Advanced Topics
CHAPTER
ADVANCED TOPICS
8.1
Introduction
In the previous chapters, we have introduced TINAs main features and how they can be accessed. Our demonstration, however, is far from complete, for TINA contains many other useful and advanced features for designing, testing and teaching electronics and electronic circuits. These include S-parameter models, network analysis, details of Fourier series and Fourier spectrum analysis, symbolic analysis, post-processing of analysis results, creation of phasor diagrams, Nyquist diagrams, the built-in interpreter, multiparameter optimization, creation of multilayer PCBs and other topics. The detailed description of these topics is not included in the printed Quick Start manual; they are published only in electronic form. They can be found on the TINA install CD and on the web at www.tina.com in the Documentation section ( www.tina.com/support.htm ).
ADVANCED TOPICS
8-1
Advanced Topics
8.2
Table of Contents
Parameter Stepping DC Transfer Characteristic and Parameter Sweeping Phasor Diagram Nyquist Diagram Noise Analysis Network Analysis and S-parameters Symbolic Analysis Post-processing Analysis Results Optimization Fourier Series and Fourier Spectrum Interpreter TINA PCB Design Manual We are continuously adding new topics and examples to this chapter, so please check back regularly to the Documentation section of our website www.tina.com for the latest version.
ADVANCED TOPICS
8-2