Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to add subcurcuit into LTspice?

Status
Not open for further replies.

victous

New Member
Hello,

I want to simulate a circuit using LTspice and (unfortunately!) cannot find out how to add subcurcuit to my design. I know how to use file with .model but with subcurcuit it's somehow different, I guess.
When I need to use model file - for example this one below, called IRF840.txt (it describes IRF840 MOSFET):

-------------------------------------------------------------------------
.model IRF840 NMOS(Level=3 Gamma=0 Delta=0 Eta=0 Theta=0 Kappa=0.2 Vmax=0 Xj=0
+ Tox=100n Uo=600 Phi=.6 Rs=6.382m Kp=20.85u W=.68 L=2u Vto=3.879
+ Rd=.6703 Rds=2.222MEG Cbd=1.415n Pb=.8 Mj=.5 Fc=.5 Cgso=1.625n
+ Cgdo=133.4p Rg=.6038 Is=56.03p N=1 Tt=710n)
* Int'l Rectifier pid=IRFC440 case=TO220
* 88-08-25 bam creation
-----------------------------------------------------------------------

then I simply copy this file into working directory where my circuit is saved, then rename my device into IRF840 and add spice directive:

.include IRF840.txt

and simulation works!

But when my model has a line

.SUBCKT 'something' (for example .SUBCKT LM741)

how I can use this file so that it would work correctly?

Thank you. :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top