I have to design a Flyback SMPS (15v , 6A) output. NCP1217 is the control IC being used to regulate the output power.

-->I downloaded the ".lib" file for the spice model from ON Semiconductor's website for NCP1217.

-->Opened this in my LTSpice console.

-->Right clicked on the

".SUBCKT NCP1217 skip FB CS GND DRV VCC HV params: Fswitch=65k Conso=960u"

and generated a sybmbol for it.

-->Thereafter I made all the connections, using the above symbol and tried to simulate it. But LTSpice generated an error saying :- "Cant find definition of model "N971-KN-1-0-20R18" ".

Please tell me what is going wrong here ? Is it not possible to use entire third party IC's in LTSpice ?

Please refer the link below and have a look at NCP1217's library files. There are multiple ".SUBCKT" lines present here. Which one should I use ? (I am using a switching frequency of 65kHz).

Kindly download the ".lib" file from here.

Link:- http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&rpn=NCP1217


1 Answer 1


The first thing to do with any spice simulation problem is check your netlist, which is the easiest way to debug with graphical spice packages. If you don't have a .lib and the name of your downloaded package then you have a problem. (you can do this in view->spice netlist)

The second thing is you need to get your paths straight. If you do have a .lib statement, then the path of your .subckt file needs to follow the .lib statement. Example: if your .subckt file was named NCP1217.cir (or whatever its extension is, they are all text files anyway) was located in C:\LTC\libraries then the spice command that needs to show in the spice netlist is:

.lib c:\LTC\libraries\NCP1217.cir

If you put your file in the LTspice\lib\sub folder you don't need to provide the entire path.

There are ways through the attributes list (in your symbol files, .asy to be more specific) to include the .lib statement.

The last thing is you need your X line in the netlist to have the appropriate nodes, double check each node of the lt spice netlist and make sure it matches up with the netlist in your 3rd party model. Then if you have multiple devices, the last thing should be the name of the subcircuit.

Here is an example:
XU1 posrail negrail posterminal negterminal output DEV1376

Keep in mind that no spice model will even come close to the real world, most all models are simplified in spice to model selected parameters in the datasheet by the manufacturer and only approximate the real world. (after all if they really did a transistor model of each device, all you would have to do to create a copy of the device is download the spice file) Some models will give some kind of disclaimer as to what the model can and can't do.

  • \$\begingroup\$ As you said, I checked my netlist file and saw a .lib statement at the end. I got the following statement:- ".lib C:\users\khilav\Desktop\HHPE_Project\LTspice Simulation\Test 2\tl431.lib" However, I am not able to locate the subcircuit file. How do I find the subcircuit file ? All I did was to open the downloaded ".lib" file of the NCP1217, locate the line ".SUBCKCT" line in ".lib" , right click on ".SUBCKCT", make a symbol and then use this symbol in the schematic. My all my files, i.e. ".asy" file for schematic, the downloaded ".lib" file and ".net" file are in the same folder. \$\endgroup\$
    – Khilav
    Commented Feb 22, 2017 at 5:29
  • \$\begingroup\$ Open it in a text editor, like notepad++ One thing I forgot to mention, I usually just copy out the subckct section and put it in its own file, that way I don't have to worry about the multiple subckcts. \$\endgroup\$
    – Voltage Spike
    Commented Feb 22, 2017 at 6:16
  • \$\begingroup\$ Oh if you like the answer, mark and upvote \$\endgroup\$
    – Voltage Spike
    Commented Feb 22, 2017 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.