¿ªÔÆÌåÓý

Designing components/Reading .lib/.sub files


hisotaso
 

Hello, I am looking for a guide or list of all LTSpice/Spice syntax for designing components. Of course I would like to keep this as a reference, but I would also like to be able to read a library file and be able to interpret it. For example one of my professors has created a library with several components in it, including edge detectors, but I don't know what some of the syntax means.

Ex.:

* first_cross_detect
.subckt first_cross_detect in out ref
.params vtrig=0 scale=1meg tholdoff=1u tripdt=10p tripdv=10u td=10n
A1 shi 0 clk 0 0 0 sho 0 SAMPLEHOLD vhigh=10g tripdt={tripdt}
B1 shi 0 V=(time)*{scale}
B2 clk 0 V=if ((time < {tholdoff} | v(gate) > 0), 1k, v(in) - v(ref) - {vtrig} + 0.5) tripdt={tripdt} tripdv={tripdv}
B3 gate 0 V=delay(v(sho), {td})
B4 out 0 v=v(sho)/{scale}
.ends cross_detect

In the above syntax, I do not know what scale=1meg, tholdoff=1u, td=10n etc. mean. Perhaps these are industry or Spice standard terms, but I can't seem to find any information or a guide on creating my own components with all the syntax commands listed. Any help would be appreciated

Join [email protected] to automatically receive all group messages.