Switchercad und LM358

Hi Leute, ich habe gerade versucht, das Spice Modell vom LM358 (von National) in Switchercad einzubinden. Ich bin bisher gescheitert: Too many parameters vor subcircuit "lm358" (instance:x§u2)

Was mache ich falsch?

Hier das asy-File: Version 3 SymbolType CELL LINE Normal -8 8 8 16 LINE Normal -8 24 8 16 LINE Normal -8 8 -8 24 LINE Normal -7 12 -5 12 LINE Normal -7 20 -5 20 LINE Normal -6 21 -6 19 LINE Normal 0 8 0 12 LINE Normal 0 24 0 20 LINE Normal 1 11 3 11 LINE Normal 2 10 2 12 LINE Normal 1 21 3 21 WINDOW 0 4 8 Left 0 WINDOW 3 4 24 Left 0 SYMATTR Prefix X SYMATTR SpiceModel Private\lm358.lib SYMATTR Value LM358 SYMATTR Value2 LM358 SYMATTR Description Single supply OPV PIN -8 20 NONE 0 PINATTR PinName In+ PINATTR SpiceOrder 1 PIN -8 12 NONE 0 PINATTR PinName In- PINATTR SpiceOrder 2 PIN 0 8 NONE 0 PINATTR PinName V+ PINATTR SpiceOrder 3 PIN 0 24 NONE 0 PINATTR PinName V- PINATTR SpiceOrder 4 PIN 8 16 NONE 0 PINATTR PinName OUT PINATTR SpiceOrder 5

Und das lib.File:

*//////////////////////////////////////////////////////////////////////
  • (C) National Semiconductor, Inc.
  • Models developed and under copyright by:
  • National Semiconductor, Inc.

*/////////////////////////////////////////////////////////////////////

  • Legal Notice: This material is intended for free software support.
  • The file may be copied, and distributed; however, reselling the
  • material is illegal

*////////////////////////////////////////////////////////////////////

  • For ordering or technical information on these models, contact:
  • National Semiconductor's Customer Response Center
  • 7:00 A.M.--7:00 P.M. U.S. Central Time
  • (800) 272-9959
  • For Applications support, contact the Internet address:
  • snipped-for-privacy@galaxy.nsc.com

*//////////////////////////////////////////////////////////

*LM358 DUAL OPERATIONAL AMPLIFIER MACRO-MODEL *////////////////////////////////////////////////////////// *
  • connections: non-inverting input
  • | inverting input
  • | | positive power supply
  • | | | negative power supply
  • | | | | output
  • | | | | |
  • | | | | |
.SUBCKT LM358 1 2 3 4 5 * *Features: *Eliminates need for dual supplies *Large DC voltage gain = 100dB *High bandwidth = 1MHz *Low input offset voltage = 2mV *Wide supply range = +-1.5V to +-16V * *NOTE: Model is for single device only and simulated
  • supply current is 1/2 of total device current.
  • Output crossover distortion with dual supplies
  • is not modeled.
* ****************INPUT STAGE**************
  • IOS 2 1 5N
*^Input offset current R1 1 3 500K R2 3 2 500K I1 3 4 100U R3 5 4 517 R4 6 4 517 Q1 5 2 4 QX Q2 6 7 4 QX *Fp2=1.2 MHz C4 5 6 128.27P * ***********COMMON MODE EFFECT***********
  • I2 3 4 75U
*^Quiescent supply current EOS 7 1 POLY(1) 16 49 2E-3 1 *Input offset voltage.^ R8 3 49 60K R9 49 4 60K * *********OUTPUT VOLTAGE LIMITING******** V2 3 8 1.63 D1 9 8 DX D2 10 9 DX V3 10 4 .635 * **************SECOND STAGE**************
  • EH 3 98 3 49 1 G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459
*Fp1=7.86 Hz R5 98 9 101.2433MEG C3 98 9 200P * ***************POLE STAGE*************** * *Fp=2 MHz G3 98 15 9 49 1E-6 R12 98 15 1MEG C5 98 15 7.9577E-14 * *********COMMON-MODE ZERO STAGE********* * *Fpcm=10 KHz G4 98 16 3 49 5.6234E-8 L2 98 17 15.9M R13 17 16 1K * **************OUTPUT STAGE**************
  • F6 4 3 POLY(1) V6 300U 1 E1 3 23 3 15 1 R16 24 23 17.5 D5 26 24 DX V6 26 22 .63V R17 23 25 17.5 D6 25 27 DX V7 22 27 .63V V5 22 21 0.27V D4 21 15 DX V4 20 22 0.27V D3 15 20 DX L3 22 5 500P RL3 22 5 100K
* ***************MODELS USED**************
  • .MODEL DX D(IS=1E-15) .MODEL QX PNP(BF=1.111E3)
  • .ENDS
*$

Gruß Michael

Reply to
Michael R?big
Loading thread data ...

"Michael R?big" schrieb im Newsbeitrag news: snipped-for-privacy@posting.google.com...

Hallo Michael, irgendiwe hatte ich dein Posting übersehen. Deshalb die späte Antwort.

Das Symbol ist ok. Dann hast du den LM358.mod File editiert. Dort mußt du nur den Namen in der .subckt-Zeile ändern, da dein Symbol nur LM358 sucht. Ob der File .mod oder .lib heißt ist egal. Hauptsache er heißt so wie es im Symbol steht.

.SUBCKT LM358/NS 1 2 99 50 28

ersetzen durch

*.SUBCKT LM358/NS 1 2 99 50 28 .SUBCKT LM358 1 2 99 50 28

Die Netznamen(nummern) nicht verändern. Das wäre unnötige Arbeit. Es kommt nur auf die Reihenfolger der Namen(Nummern) an. Die Reihenfolge muß gleich sein im Symbol.

*LM358 DUAL OPERATIONAL AMPLIFIER MACRO-MODEL *////////////////////////////////////////////////////////// *
  • connections: non-inverting input
  • | inverting input
  • | | positive power supply
  • | | | negative power supply
  • | | | | output
  • | | | | |
  • | | | | |
*.SUBCKT LM358/NS 1 2 99 50 28 .SUBCKT LM358 1 2 99 50 28 *

Das heißt, im Symbol muß folgende Reihenfolge stehen:

In+ 1 In- 2 V+ 3 V- 4 Vout 5

Das ist bei deinem Symbol der Fall. Damit ist das Symbol in Ordnung.

Gruß Helmut

Anhang: Der neue Modell-File "LM358.lib".

*//////////////////////////////////////////////////////////////////////
  • (C) National Semiconductor, Inc.
  • Models developed and under copyright by:
  • National Semiconductor, Inc.
*/////////////////////////////////////////////////////////////////////
  • Legal Notice: This material is intended for free software support.
  • The file may be copied, and distributed; however, reselling the
  • material is illegal
*////////////////////////////////////////////////////////////////////
  • For ordering or technical information on these models, contact:
  • National Semiconductor's Customer Response Center
  • 7:00 A.M.--7:00 P.M. U.S. Central Time
  • (800) 272-9959
  • For Applications support, contact the Internet address:
  • snipped-for-privacy@galaxy.nsc.com
*////////////////////////////////////////////////////////// *LM358 DUAL OPERATIONAL AMPLIFIER MACRO-MODEL *////////////////////////////////////////////////////////// *
  • connections: non-inverting input
  • | inverting input
  • | | positive power supply
  • | | | negative power supply
  • | | | | output
  • | | | | |
  • | | | | |
*.SUBCKT LM358/NS 1 2 99 50 28 .SUBCKT LM358 1 2 99 50 28 * *Features: *Eliminates need for dual supplies *Large DC voltage gain = 100dB *High bandwidth = 1MHz *Low input offset voltage = 2mV *Wide supply range = +-1.5V to +-16V * *NOTE: Model is for single device only and simulated
  • supply current is 1/2 of total device current.
  • Output crossover distortion with dual supplies
  • is not modeled.
* ****************INPUT STAGE**************
  • IOS 2 1 5N
*^Input offset current R1 1 3 500K R2 3 2 500K I1 99 4 100U R3 5 50 517 R4 6 50 517 Q1 5 2 4 QX Q2 6 7 4 QX *Fp2=1.2 MHz C4 5 6 128.27P * ***********COMMON MODE EFFECT***********
  • I2 99 50 75U
*^Quiescent supply current EOS 7 1 POLY(1) 16 49 2E-3 1 *Input offset voltage.^ R8 99 49 60K R9 49 50 60K * *********OUTPUT VOLTAGE LIMITING******** V2 99 8 1.63 D1 9 8 DX D2 10 9 DX V3 10 50 .635 * **************SECOND STAGE**************
  • EH 99 98 99 49 1 G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459
*Fp1=7.86 Hz R5 98 9 101.2433MEG C3 98 9 200P * ***************POLE STAGE*************** * *Fp=2 MHz G3 98 15 9 49 1E-6 R12 98 15 1MEG C5 98 15 7.9577E-14 * *********COMMON-MODE ZERO STAGE********* * *Fpcm=10 KHz G4 98 16 3 49 5.6234E-8 L2 98 17 15.9M R13 17 16 1K * **************OUTPUT STAGE**************
  • F6 50 99 POLY(1) V6 300U 1 E1 99 23 99 15 1 R16 24 23 17.5 D5 26 24 DX V6 26 22 .63V R17 23 25 17.5 D6 25 27 DX V7 22 27 .63V V5 22 21 0.27V D4 21 15 DX V4 20 22 0.27V D3 15 20 DX L3 22 28 500P RL3 22 28 100K
* ***************MODELS USED**************
  • .MODEL DX D(IS=1E-15) .MODEL QX PNP(BF=1.111E3)
  • .ENDS
*$
Reply to
Helmut Sennewald

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.