Creating Subcircuits from Spice Models with TINACloud: .MODEL format

Creating Subcircuits from Spice Models with TINACloud: .MODEL format

In TINACloud you can create your own components from any Spice models given in .MODEL format that you have made or downloaded from the Internet.

Watch our tutorial video

to see how to create a  TINA macro component using a BC846 NPN Bipolar transistor downloaded previously from the web.

Creating Subcircuits from Spice Models with TINACloud: .MODEL format
Creating Subcircuits from Spice Models with TINACloud: .MODEL format
 Download the FREE trial demo of TINA Design Suite and get:
  1. One year free access to TINACloud (the cloud-based, multi-language, installation-free online version of TINA now running in your browser anywhere in the world.)
  2. An immediate 20% discount from the offline version of TINA
  3. Free license for your second computer, laptop etc.
Click here to download the FREE trial demo of TINA

www.tina.com

You can also find below the script of the video:

Creating Subcircuits from Spice Models with TINACloud: .MODEL format

In TINACloud you can  create your own components from any Spice models given in .MODEL format that you have made or downloaded from the Internet.

Some device models are stored in Spice .MODEL format.

Let’s download one from the internet and add the model to TINACloud

Here is the model of the BC846 NPN Bipolar transistor

Let’ save this model

In Google Chrome click the right mouse button.

In other browsers find the Save as command

Select Save as

Switch the Save as type into All files

and Save it as a .cir file, as this is one of the extensions that TINACloud expects.

Start TINACloud

To invoke the Schematic Editor

Select New from the File menu

The Schematic Editor appears

Click the Insert button denoted by a  green + sign to invoke the Insert menu

Select Upload macro

Let’s name the new Macro as BC846

Switch into From File from Current Circuit

then Click Choose Files

Enter BC846.cir into the file name field , then click Open

Now click Upload

In the dialog box the following message appears: Macro uploaded.

Click OK

You can simularly add any Spice models in Spice .MODEL format.

Let’s check how to insert the new model into TINACloud.

Select Insert macro from the Insert (+) menu

Now select BC846 then press OK

The new component will appear attached to your cursor and you can place it anywhere on the workspace by moving the mouse and clicking the left mouse button.

Now let’s create the following test circuit by adding a few more components to test the new model.

Select the Resistor from the Basic Toolbar

Use the Rotate left or Rotate right icon then hold the left-mouse button down while moving it and connect it to the Transistor

Repeat this procedure for R2 & R3

Double click the Resistances (R1 & R2) and in their Properties window set the parameters as shown

R2=47k; R3=3k

click OK

Now select the Ground and connect it to the Transistor

Next add the remaining parts and the wires

then Click the Save button to save the file

Let’s save it under the name BC846_test.tsc

Let’s test this circuit using DC Interactive mode.

Press the DC button

The model works as expected.

Creating Subcircuits from Spice Netlists with TINACloud

Creating Subcircuits from Spice Netlists with TINACloud

In TINACloud you can create your own components from any Spice subcircuit that you have made or downloaded from the Internet.

Watch our tutorial video

 to see how to create a  TINA macro component using a THS4121 Spice Subcircuit downloaded previously from the web.

Creating Subcircuits from Spice Netlists with TINACloud
Creating Subcircuits from Spice Netlists with TINACloud

Download the FREE trial demo of TINA Design Suite and get:

  1. One year free access to TINACloud (the cloud-based, multi-language, installation-free online version of TINA now running in your browser anywhere in the world.)
  2. An immediate 20% discount from the offline version of TINA
  3. Free license for your second computer, laptop etc.
Click here to download the FREE trial demo of TINA

 

www.tina.com

 

You can also find below the script of the video:

Creating Subcircuits from Spice Netlists with TINACloud

In TINACloud you can create your own components from any Spice subcircuit that you have made or downloaded from the Internet.

In this tutorial we will present how to create a TINA macro component using a THS4121 Spice Subcircuit downloaded previously from the web.

Note that TINA and TINACloud use the same macro components.

Start TINACloud.

To invoke the Schematic Editor

Select New from the File menu

The Schematic Editor appears

Click the Insert (+) button to invoke the Insert menu

Select Upload macro

Let’s name the new macro as THS4121

Switch into From File from Current Circuit

then Click Choose Files

In the Downloads folder Enter ths4121.cir into the file name field

then Click OPEN

click Upload

Now you have to specify the name of the macro pins and also, if you wish, you can place them anywhere around the box.

To move VSS/?, select it by holding down the left-mouse button & moving the mouse, then press the right mouse button & select Cut.

Now move your mouse to the place where you would like to insert the text and select Paste from the Pop-up menu.

The ? must be replaced by the macro pin name, so write VSS/VSS

Repeate this procedure for all items where it is needed.

Click OK

To check the newly created macro select Insert macro from the Insert (+) menu

Select THS4121 from the Dialog Window of the User macros then press OK

The newly created macro will be attached to your cursor and you can place it wherever you wish on the workspace

To check its content double-click the macro.

then press … (Details) in the SubCkt (Content) line

Note that the Netlist also contains an auxiliary subcircuit

Click OK

Now you can create an application circuit by adding other components.

Let’s create the circuit like the one on this sample schematic

Double-click the component

then in the Property dialog enter the required component value & press OK

Save this circuit as THS4121_test_circuit.TSC

Let’s test the DC operation by pressing the interactive DC button.

The model works as expected.

Creating Subcircuits from Schematics with TINACloud

Creating Subcircuits from Schematics with TINACloud

In TINACloud you can convert any schematic diagram into a subcircuit called a Macro.

Watch our tutorial video  

to see how to create a Macro in TINACloud:

creatingsubcircuitsfromschematicswithtc-voiceover-yt

Download the FREE trial demo of TINA Design Suite and get:

  1. One year free access to TINACloud (the cloud-based, multi-language, installation-free online version of TINA running in your browser anywhere in the world.)
  2. An immediate 20% discount from the offline version of TINA
  3. Free license for your second computer, laptop etc.
Click here to download the FREE trial demo of TINA.

 

www.tina.com

You can also find below the script of the video:

Creating Subcircuits from Schematics with TINACloud

In TINACloud you can simplify schematics and hide clutter by turning portions of the schematic into subcircuits.

TINACloud automatically represents these subcircuits as a rectangular block on your schematic.

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.

Let’s see how to create a Macro in TINACloud

Load the Half Adder (Half_Add.tsc) example from the TINA Examples folder of TINACloud

To invoke the Schematic Editor Select Schematic Editor… from the Tools menu or double-click an empty spot on the workspace.

The Schematic Editor appears

Delete the diagram and the text. Click the object you want to delete, then press the Delete key or click the X button on the toolbar.

Let’s convert the Half Adder example into a Macro

Delete the old terminals and replace them by subcircuit terminals called Macro Pins in TINACloud

To select the portion of the circuit (terminals) click the Multiple Selection button first then the corner of the the area you want to select, hold down the left mouse button then move the mouse and release the left mouse button at the opposite corner.

Click the X button on the toolbar

Release the Multiple Selection Button

Click the Macro Pin on the Special Toolbar

The Macro Pin will be attached to the cursor and you can move it anywhere on the screen.

You can Rotate the Pin using the Rotate Left or Rotate Right buttons

Connect the Macro Pin to the circuit

When you place the Macro Pins, their label is automatically set to Pin1, Pin2 etc.

Double-click the labels then in the Property window set the label field as shown

Reposition some labels

Next create and save the new Macro.

Press the Insert (+) button

Select Upload macro…

In the Diagram window set the Macro name (in this case: HA)

then click the Upload button

In the pop-up window the following message appears: Macro uploaded.

Click OK

Now, let’s see how to insert a Macro into a schematic and use it

Click the Insert (+) button then select Insert Macro

Select the Macro HA, then press OK.

The newly created macro will be attached to your cursor and you can place it in the usual way.

Let’s modify the name and content of the macro

Create the modified macro under the name HA Circuit

then insert it

The Macro has been already uploaded, but you may save this circuit if you wish. Let’s save under the name HALFADDERModified

Let’s check with an analysis the operation of the new Macro we’ve created

Load the original HALF_ADD tsc. into the

Schematic Editor of TINACloud without the diagram and text in the way as previously shown.

Let’s make more place by using the Zoom out command

Pan the circuit by holding down the left mouse button while moving the mouse.

Insert the newly created HA Circuit Macro

Using Copy and Paste, add the Generators and Outputs of Half_Add.TSC to the Macro.

To draw the wires, click the first connection point, then draw the wire by moving the mouse and finally click the second connection point.

Save the circuit under the name HALF_ADDModified

If you click the macro and press the button in the SubCkt (Content) line you can see the schematic stored in the macro

Finally let’s check with the Digital Analysis the newly created macro

Run Analysis

Digital

You can easily check that the new Macro provides the same result

Creating Subcircuits from Spice Models with TINA: .MODEL format

Creating Subcircuits from Spice Models with TINA: .MODEL format

In TINA you can also create your own components from any Spice models given in .MODEL format that you have made or downloaded from the Internet.

Watch our tutorial video 

to see how to create a  TINA macro component using a BC846 NPN Bipolar transistor downloaded previously from the web.

 .MODEL format
Creating subcircuits from Spice Models with TINA

Download the FREE trial demo of TINA Design Suite and get:

  1. One year free access to TINACloud (the cloud-based, multi-language, installation-free online version of TINA now running in your browser anywhere in the world.)
  2. An immediate 20% discount from the offline version of TINA
  3. Free license for your second computer, laptop etc.
Click here to download the FREE trial demo of TINA

 

www.tina.com

You can also find below the script of the video:

Creating Subcircuits from Spice Models: .MODEL format

In TINA you can also create your own components from any Spice models given in .MODEL format that you have made or downloaded from the Internet.

Some device models are stored in Spice .MODEL format. Let’s download one from the internet and add the model to TINA

Here is the model of the BC846 NPN Bipolar transistor

Let’ save this model

In Google Chrome click the right mouse button.

In other browsers find the Save as command

Select Save as…

Save it as a .mod file, as this is the extension that TINA expects

Let’s see how to add this model to TINA after starting the program

Click the Tools menu

Select the New Macro Wizard

Enter the name of the model BC846

Change the Settings from Current circuit to From file

Click the Open icon

Select the Downloads folder where the BC846.mod file is saved

Switch the Files of type into (*.CIR; *.LIB; *.MOD), then enter the file name BC846.mod

Click Open

Now click Next

Note that into the TINA Macros folder you can save with Administrator rights only.

So select User Macros

then click Save

In the New Macro Wizard dialog box now the following message appears:

The macro file is ready for use, it can be inserted by selecting Insert Macro or by pressing the Insert button below.

Now click the Insert button

the Macro will be attached to your cursor and you can place it wherever you wish on the workspace

Double-click the Macro & click Enter macro to see its content

A small schematic design inside the macro appears

Double-click the Transistor

then press the … button in the Type line

Here you can see the detailed description of the model which has been downloaded from the internet

Let’s close the Model Parameters window

Click the Close icon on the Toolbar if you wish to close the Macro and go back to the Schematic Editor of TINA

You can also Insert the new model using the Insert Macro command.

Select Macro from the Insert menu

From the Macrolib folder select BC846.TSM and press Open.

The new model will appear attached to your cursor and you can place it anywhere on the workspace.

This how you can add a device model in .MODEL format. You can similarly add any Spice models, diodes, transistors, MOSFETS etc. which are defined by the standard Spice .MODEL format.

You can also add such models to TINACloud.

Note:

It is of course not necessary to add devices with .MODEL definition one by one. You can also add a number of such devices in one step using the Library Manager of TINA. This process will be demonstrated in a separate video and also described in chapter 5.3 of the Users Manual of TINA. However if you need to add just one or two new models then the procedure outlined in this video might be simpler.

Creating Subcircuits from Schematics in TINA offline version, part 2: Macro in Macro

In TINA you can convert any schematic diagram into a subcircuit called a Macro.

Watch our tutorial video 

to see how to create a Macro in Macro in TINA:

 creating-subcircuits-from-schematics-part2voiceover-blog

Download the FREE trial demo of TINA Design Suite and get

  1. One year free access to TINACloud (the cloud-based, multi-language, installation-free online version of TINA now running in your browser anywhere in the world.)
  2. An immediate 20% discount from the offline version of TINA
  3. Free license for your second computer, laptop etc.
Click here to download the FREE trial demo of TINA
 

www.tina.com

 

You can also find below the script of the video:

Creating Subcircuits from Schematics, part 2: Macro in Macro

Tina allows a hierarchical macro structure; that is, macros can contain other macros inside, and so on.

Note: The macros inside a macro can contain not only schematics but also Spice netlist and HDL code such as VHDL, Verilog, Verilog AMS and more. We will demonstrate the creation of such macros in other videos.

Let’s use our half adder macro created in our previous tutorial- Creating Subcircuits from Schematics, part 1 – to create a full adder Macro containing 2 half adder Macros

Insert the newly created Half Adder twice into a new circuit

then add the additional components and wires as shown on the picture

then add the additional components and wires as shown on the picture

Rename the labels as required

Add the OR Gate

Now create and save the new Macro with the New Macro Wizard from the Tools menu

Note: Although the automatic symbol creation is very convenient, you can also create your own schematic-symbols with TINA’s Schematic Symbol Editor and assign macros to them.

Let’s use this feature with an existing symbol.

We will show the creation of such a symbol in another video.

Select New Macro Wizard from the Tools menu

Enter the macro name: Full Adder

Select the suggested symbol from the library, then set the file name and press Save

Finally let’s insert the newly created Macro & its content.

If you double-click the Macro and press Enter Macro you can see and edit the content of the macro

Full Adder content