Questions on SwitcherCad III (aka LTSpice) - diyAudio
Go Back   Home > Forums > General Interest > Everything Else

Everything Else Anything related to audio / video / electronics etc) BUT remember- we have many new forums where your thread may now fit! .... Parts, Equipment & Tools, Construction Tips, Software Tools......

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 30th September 2002, 12:31 AM   #1
diyAudio Member
 
Join Date: Sep 2002
Location: Sweden
Default Questions on SwitcherCad III (aka LTSpice)

I know some of you out there are also using SwitcherCAD III.
There are a few things I have difficulties with, and I wonder if
any of you know if it is possible to get around these problems
and in that case how?

1) If I have previously done one type of simulation, eg.
operation point, and then want to do for instance a transient
analysis, then I have to click "Edit simulation cmd" and fill in
the parameters. However, when trying to run the analysis, the
parameters are lost, so I have to enter them again. Do you have
the same problem, or am I doing something the wrong way?

2) All subcircuits in the library are stored in a compiled form, but
if I understand the help info correctly, it should be possible to
add ordinary subcircuit definitions. I have not managed to do
so, however. I can edit a symbol file to get a symbol for a new
opamp, for instance, but I cannot figure out where to place the
subcircuit definition file. It should reasonably go in the sub
directory, but putting it there doesn't work.

3) What about transistors that are modelled as subcircuits? I
suppose they have to be handled the same way as ICs, and so
suffer from the same problem as point 2 above. It would be nice
to be able to put them in the appropriate BJT/MOS/JFET libraries,
but it seems not possible to do so.

4) It seems the whole library hierarchy is hardcoded, so it is not
possible to change the structure, adding subdirectory for new
classes of devices, having hierarchys of sublibrarys for opamps
for instance. Has anybody found a way to modify the structure?

Most of these problems can of course be handled by inserting
the models as text directly into the circuit file, but it would be
nicer to be able to expand the librarys, although I can understand
if LT wants to make it difficult to use non-LT products.
  Reply With Quote
Old 1st October 2002, 08:57 AM   #2
mirlo is offline mirlo  United States
diyAudio Member
 
Join Date: Jul 2002
Location: San Diego
Quote:
1) If I have previously done one type of simulation, eg.
operation point, and then want to do for instance a transient
analysis, then I have to click "Edit simulation cmd" and fill in
the parameters. However, when trying to run the analysis, the
parameters are lost, so I have to enter them again. Do you have
the same problem, or am I doing something the wrong way?
Unless I misunderstand the problem you state, if you use the rightmost button to place a spice directive on the schematic, you can edit it later. If you place multiple spice directives this way, when you run a simulation it will ask you which one to actually run, and change the leading "." to a ";" in all the others, but the parameters will be remembered. Then you can right-click to edit one of them go back to the "." to run that simualtion type.

If you find out how to edit the libraries, please let me know. It's almost enough to get me to put linux on my PC so I can get ahold of more free cad tools. But so far I'm laazy ... and too bust at work.

Good luck,


-- mirlo
  Reply With Quote
Old 1st October 2002, 09:17 AM   #3
sonnya is offline sonnya  Denmark
diyAudio Member
 
sonnya's Avatar
 
Join Date: Oct 2001
Location: Denmark
i have a solution to add new parts... But i will get back later!

Sonny
  Reply With Quote
Old 1st October 2002, 10:32 AM   #4
diyAudio Member
 
Join Date: Sep 2002
Location: Sweden
Thanks mirlo.

Incidentallt, I found this out as late as last night, but I didn't think
of the possibility to have several of the same type of simulation
commands. That seems very useful.

Sonnya,

I'm looking forward to your solution. BTW, I have also considered
running Linux, not primarily because of Spice, but Spice almost
brought me there until I found winspice and SwCAD. I should
get Linux running some day anyway, since I have never liked
the Windows way of doing things, but that's another story.
  Reply With Quote
Old 3rd October 2002, 07:39 AM   #5
sonnya is offline sonnya  Denmark
diyAudio Member
 
sonnya's Avatar
 
Join Date: Oct 2001
Location: Denmark
okay know we are going to do a little exercise in SWCAD III

The important folders is :
\programfiles\ltc\swcadIII\lib\cmp
\programfiles\ltc\swcadIII\lib\sym
\programfiles\ltc\swcadIII\lib\sub

the 'cmp' folder is where you put in you simple models.... Like the BJT's, diodes, jfet with the exception from mosfet's as they start to be build as subcircuits.. We will get back to this later...

When you want's to add a bjt you have to do this....

1. start swcadiii up
2. Choose 'open' in the 'file' menu.
3. select the directory : \programfiles\ltc\swcadIII\lib\cmp
4. set the filetypes to 'discrete'
5. choose the 'standard.*' * = bjt,dio,mos,jft,cap,res,ind ...
6. also open the model you got from a compenent supplier ..
This could be a *.mod for bjt you got from fairchild semi in you
e-mail box.
7. copy the contents of this file into the standard.bjt
***** Important *****
the syntax of the model is :
.model modelname npn(parameters .... )
example :
.model Q2sc2240 NPN(Is=99.13f Xti=3 Eg=1.11
Vaf=422.2 Bf=352.8 Ise=1.179p Ne=1.782 Ikf=.4704
Nk=.9631 Xtb=1.5 Var=100 Br=1.663 Isc=555.1p
Nc=1.796 Ikr=5.85 Rc=.2032 Cjc=7.561p Mjc=.2472
Vjc=.3905 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=10n
Tf=1.295n Itf=1 Xtf=0 Vtf=10)

Do not forget spaces between the parameters even if
you change line!!! If not the model does not work!!!

************************************************** **

the folder : \programfiles\ltc\swcadIII\lib\sym
stores the symbols used in your diagram.
the symbols can also be stored in another directory as there placement is not important.

A symbol file could look like this :

Version 3
SymbolType CELL
LINE Normal 12 12 12 24
LINE Normal 4 20 12 20
LINE Normal 10 12 12 12
LINE Normal 4 12 10 11
LINE Normal 4 12 10 13
LINE Normal 10 11 10 13
LINE Normal 4 2 4 6
LINE Normal 4 10 4 14
LINE Normal 4 18 4 22
LINE Normal 0 20 2 20
LINE Normal 2 4 2 20
LINE Normal 12 4 4 4
LINE Normal 12 0 12 4
WINDOW 0 14 8 Left 0
WINDOW 3 14 18 Left 0
SYMATTR Prefix X
SYMATTR SpiceModel irf610.ckt
SYMATTR Value irf610
SYMATTR Value2 irf610
SYMATTR SpiceLine *
SYMATTR SpiceLine2 *
SYMATTR Description N-Channel MOSFET transistor
PIN 0 20 NONE 0
PINATTR PinName G
PINATTR SpiceOrder 2
PIN 12 0 NONE 0
PINATTR PinName D
PINATTR SpiceOrder 1
PIN 12 24 NONE 0
PINATTR PinName S
PINATTR SpiceOrder 3

**** important *****
SYMATTR Prefix X - the prefex should never be changed!!!!

SYMATTR SpiceModel irf610.ckt

this line point's to the file in which your subcircuit rests (could also be zvn3310.mod). If no path is given the default directory is : \programfiles\ltc\swcadIII\lib\sub

SYMATTR Value irf610
SYMATTR Value2 irf610

Those two lines speaks for the self.

on to something very important ... if you look in the subcircuit file from the provider you will see a remark of the order of the i/o's. This should comply with your symbol file ....

PIN 0 20 NONE 0 - location of your pin.
PINATTR PinName G - speaks for it selfs.
PINATTR SpiceOrder 2 - where the swcadIII should find the i/o in the subcircuit file.
PIN 12 0 NONE 0
PINATTR PinName D
PINATTR SpiceOrder 1
PIN 12 24 NONE 0
PINATTR PinName S
PINATTR SpiceOrder 3

that is all for know.... Should this be in the wiki??
  Reply With Quote
Old 3rd October 2002, 08:59 AM   #6
diyAudio Member
 
Join Date: Sep 2002
Location: Sweden
Thanks Sonnya,

That was much more details than I needed actually, but I am sure
others will find it very helpful, so why not in the Wiki? (BTW you
can also edit the files using your favourite text editor, which is
usually much simpler and faster, especially for the ordinary
component files.)

It seems the problem has to do with the SpiceModel attribute,
as I suspected. The problem is, I still can't get it to work. I have
tried both file extensions (ckt and mod). If there is no matching
file in the sub dir, I get an appropriate error message that the
file cannot be opened, so the file is obviously found otherwise.
However, when the file is found I still get an error message "Unknown subcircuit xu1 ....."

Could you, perhaps, either post or mail me some small subcircuit
file that works for you, so I can check if I've done som stupid
mistake there, or if there is something special required by SwCAD?

Thanks in advance
  Reply With Quote
Old 3rd October 2002, 09:36 AM   #7
sonnya is offline sonnya  Denmark
diyAudio Member
 
sonnya's Avatar
 
Join Date: Oct 2001
Location: Denmark
what is your mail address?

okay look at this three files in the zip file.

irf610-1.asy - symbol file.
irf610.txt - working subcircuit
irf610.spi - the original one from IR.

Sonny
Attached Files
File Type: zip swciiispice.zip (2.3 KB, 147 views)
  Reply With Quote
Old 3rd October 2002, 10:17 AM   #8
diyAudio Member
 
Join Date: Sep 2002
Location: Sweden
Thanks for your patience Sonnya. I found the problem at once.
I used a very simple subcircuit I "designed" for my previous
attempts to avoid problems with the subcircuit itself. It turned
out I had made a stupid syntax error in it. Well, the simplest
and most obvious errors are often the most difficult ones to
find.

I don't want to publish the email address for spam reasons,
but I suppose the email button should work. Otherwise, if you
want my email address I can mail you.
  Reply With Quote
Old 3rd October 2002, 10:48 AM   #9
diyAudio Member
 
Join Date: Sep 2002
Location: Sweden
Well, now when I have got the subcircuits working it turned out
one can actually reorder the library hierarchy. So I guess all my
questions in the original post are now answered. In case
somebody else is interested, this is how to reorder the structure.

All subcircuit definitions, that is the actual netlist files, are stored
in the directory lib/sub and there is not distinction here between
opamps, comparators etc.

The directory lib/sym on the other hand describes what the
library structure should look like. Note that all .asy files for
opamps are in the sublibrary opamps etc. The component
selection menu just mirrors the directory structure here.
If you want to add a new class of components, for instance,
regulators, then just add a directory called regulators and put
the .asy files for all voltage regulators there. If you want a
more manageable list of opamps, but do not want to throw
away any of those provided, then you can add one (or
several) subdirectory/ies in the opamp directory. Then, just move
all opamps you never or rarely use into this subdirectory. Or
you may wish to only have subdirectories like AD, BB, LT etc.

Ordinary components cannot be structured in a hierarchy since
they are stored into files with hardcoded names (as far as I
know) like component.bjt. However, one can add new
components, and reorder the components within a file, for
instance, placing the most commonly used BJTs first in the BJT
file.
  Reply With Quote
Old 30th August 2006, 09:55 AM   #10
neo79 is offline neo79  Singapore
diyAudio Member
 
Join Date: Aug 2006
Default a further question on switcher cad

Hi, i have another question regarding this switcher cad software.

i am using it as a schematic and netlist software for IC simulation purpose.

I would like to know is there any way to generate the AD, PD, AS,PS parameters to the netlist automaticlly with known information of W and L? of course i know the formula for AD,.. etc but just dont know how to generate them.


Thanks a lot.
neo
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SwitcherCAD richie00boy Everything Else 4 24th September 2006 09:00 AM
IRF610 & switchercad strangeness Rescue Toaster Pass Labs 8 10th August 2006 08:40 AM
SwitcherCAD .wav file I/O I_Forgot Everything Else 4 19th May 2006 01:04 PM
Switchercad symbols Bas Horneman Tubes / Valves 10 24th July 2004 03:54 AM
Strange Switchercad behavior capslock Solid State 2 17th April 2003 01:07 AM


New To Site? Need Help?

All times are GMT. The time now is 05:01 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2