Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育You are right. 24.1.8 has not installed
itself. On 2025-05-06 07:17, Mathias Born via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: CD4000 Library Additions
开云体育On 06/05/2025 09:02, N4 via groups.io
wrote:
I have randomly found this topic while searching for CD4026 library for LTS. Would you still be able to share your extended library??I guess you didn't search the Files section of the group's website. If you had searched for "CD4000 library" (in the top-right corner), you would have seen 18 hits. The most recent model libraries: CD4000.lib - for the "standard" model library CD4000_v.lib - for a slightly modified version where the actual logic levels tracks the actual voltage on the VDD net, which must be present. ..and: CD4000.zip - symbols for the above models. Use these, instead of making your own, as they properly define the required parameters. -- Regards, Tony |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
That's not the 24.1.8 help, then. You must have looked at an older version.
?
On Tue, May 6, 2025 at 12:22 AM, John Woodgate wrote:
|
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育Very possibly. I think that the new feature of .PARAM, to pass strings, needs to be clearly explained in the .PARAM Help, as, for example: ?.PARAM can be used in two ways: 1. To pass a numerical value [Some text] 2. To pass a string [Some text] On 2025-05-05 23:38, Andy I via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
On Mon, May 5, 2025 at 06:22 PM, John Woodgate wrote:
There is some chance that statement is still correct as it stands, though maybe confusing. ?
Evaluating a parameter's value from its formula would apply only to parameters and formulas that can evaluate to numbers.? If a parameter holds a text string, then I think it does not need to be evaluated because the string itself IS the value.? Enclosing such a parameter inside curly braces feels like it is unnecessary and should not be done.
?
OTOH, if you can build expressions that use non-numerical parameters (e.g., ModelName+".sub"), then curly braces might be needed, and then that Help statement should be modified.
?
?
? |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育Well, it's hardly hidden away. It's the third short paragraph in the .PARAM help: To invoke parameter substitution and expression evaluation, enclose the expression in curly braces. The enclosed expression will be replaced with the floating-point value. On 2025-05-05 23:00, Andy I via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
On Mon, May 5, 2025 at 05:38 PM, John Woodgate wrote:
It would not surprise me if they did not catch every instance in the Help that needed to be changed. ?
You ought to point out where you saw that in the Help.
?
Andy
?
? |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
On Mon, May 5, 2025 at 03:30 PM, John Woodgate wrote:
It was OK.? But it probably was not clear exactly what was going on, at first glance.? We are so accustomed to seeing only top-level schematics that we forget there are other kinds, in LTspice-land. ?
Per's .ASC schematic file is a lower-level hierarchical schematic.? It is not meant to be run by itself.? It is meant to be "called" by a higher-level schematic.
?
The .ASY symbol file that accompanies it is the symbol that represents that lower-level schematic.? Symbols for lower-level blocks are supposed to have no Attributes, no simulation commands, and maybe no power supplies.? In that regard, everything appears to have been done correctly.
?
?
? |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
On Mon, May 5, 2025 at 01:03 PM, Per wrote:
Then it appears you know how to add .PARAMs to your symbol already.? That wasn't clear, because the uploaded symbol does not have any parameters added to it yet. ?
However, if you are using anything before the latest versions of LTspice, parameter values must be numeric only, so attempting to do a parameter assignment "MOS=IPB107N20N3" will fail, unless IPB107N20N3 is another parameter whose value is numeric.? The rest of this message is for people who are not running the latest version of LTspice.
?
You can still use PARAMs to change or set the model of a transistor, by defining the transistor models with numeric names.? For example:
?
.SUBCKT IPB107N20N3_L0 drain gate source ...
...
.ENDS
...
.SUBCKT AnotherFET drain gate source
...
.ENDS
?
.model 1 AKO: IPB107N20N3_L0
.model 2 AKO: AnotherFET
.model 3 AKO: ...
...
.PARAM MOS=1
?
But don't forget that both NMOS symbols inside your "bimos.asc" schematic must have their Prefix values changed from "MN" to "X", to make them work with that Infineon SPICE model which is a .SUBCKT model.? Also, if you use the Infineon model named just "IPB107N20N3", that model requires a special MOSFET symbol with 5 pins.? I hope you are aware of how those models are supposed to work.
?
Andy
?
? |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育Well, I now have 24.1.8, but the Help still says: The enclosed expression will be replaced with the floating-point value. On 2025-05-05 22:24, John Woodgate
wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育OK, so it's MY Help that needs to be updated.
I will see. On 2025-05-05 22:02, Mathias Born via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
It's already in there. In great detail.
?
On Mon, May 5, 2025 at 10:36 PM, John Woodgate wrote:
|
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育So the Help needs to be updated, ASAP. On 2025-05-05 20:37, Mathias Born via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育NOW It does, but not all are running the latest version(s) ? From: [email protected] <[email protected]>
On Behalf Of Mathias Born via groups.io
Sent: Monday, May 05, 2025 12:38 PM To: [email protected] Subject: EXTERNAL: Re: [LTspice] Passing a Mosfet Value as a parameter to a hierarchical subcircuit ? Not quite. LTspice also knows string parameters, which were introduced extactly for the purpose discussed here. ? Best Regards, Mathias ? On Mon, May 5, 2025 at 07:16 PM, John Woodgate wrote:
|
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
Not quite. LTspice also knows string parameters, which were introduced extactly for the purpose discussed here.
?
Best Regards,
Mathias
?
On Mon, May 5, 2025 at 07:16 PM, John Woodgate wrote:
|
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育I've never heard of that procedure. Let's see
what others say. On 2025-05-05 20:22, Per wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
Thanks for the reply. That's a big not going to happen then. :-(
?
As an aside the .asc file is 'linked' to the .asy file. It does not need a simulation directive. You drop the .asy on the schematic and off you, don't, go. Yes you could have internal supplies but otherwise you would link them in hopefully with net labels or pins/ports.
?
Either I am wrong or I think you know that one. |
Re: Passing a Mosfet Value as a parameter to a hierarchical subcircuit
开云体育.PARAM can only be used to pass numbers. From the Help: To invoke parameter substitution and expression evaluation, enclose the expression in curly braces. The enclosed expression will be replaced with the floating-point value. Your .ASC is incomplete, anyway. There are
no supply voltages and no simulation directive. Your.ASY has no
attributes. Maybe that is OK, but maybe not. On 2025-05-05 18:03, Per wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |