Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Passing a text string to a .SUBCKT in Spice

Status
Not open for further replies.

kkeeley

Member level 3
Joined
Jul 29, 2009
Messages
59
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Australia
Activity points
2,872
Hi,

I am still learning how to use LTspice for simulation. I wish to create my own sub circuit for a diode brdge created by using 4 seperate diodes . I can do this with the following Spice commads. This is then saved as a .lib file and referenced from my main scchematic via my own symbol.

.SUBCKT DiodeBridge 1 2 3 4
D1 1 3 1N4001
D2 3 2 1N4001
D3 1 4 1N4001
D4 4 2 1N4001
.ENDS

I have been able to create and use other SUBCKT's that allow me to pass a numerical value that is then used to set something like a resistor value.

What I would like to do is be able to pass a string to the SUBCKT that will allow me to change the type of Diodes being used without having to create multiply subckts.

Can this be done in LTspice and if so how.

Thanks
Kenneth
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top