LTspice syntax problem

Flyback

Well-Known Member
Hi,
How do i make the time of a "Pulse" source equal to the voltage of a node in LTspice?
The attached LTspice wont work. Do you know how to solve?
 

Attachments

  • LTspice syntax.png
    21.2 KB · Views: 189
  • volt.asc
    780 bytes · Views: 179
It is unlikely that you will be able to do what you want in that way. The fields in the pulse source must be numbers or parameters that can be resolved into a number BEFORE the beginning of the simulation. If you are trying to create a PWM signal with a fixed frequency and a variable duty cycle that will respond to a control voltage, there are better ways to accomplish that.
 
Using two interpolated pulses to make two sawtooths with 1000:1 T ratio = 10ms:10us compared with an arbitrary IF statement to make a PWM signal.




For those curious why I use Win7 x64 16GB instead of Win 10/11, it's because I like lean and fast on my 10 yr old PC.

 

Attachments

  • pwm_sawtooth.asc
    1.2 KB · Views: 164
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…