Installing and using LTspice IV (now including LTXVII), From beginner to advanced

AX tech editor
Joined 2002
Paid Member
Hi Ian, yes I did something similar, but don't know how to get 'kHz' on the X-axis instead of 'kV'. Not critical, but would be nice ;-)
I also changed the FM input source to a PWL wave; using a Pulse here feels a bit awkward.

I'm setting the X-axis to V(swpend)*1kHz/1000V and it will show the frequency correctly.

Jan
 

Attachments

  • sweep.PNG
    sweep.PNG
    15.1 KB · Views: 137
Last edited:
Here is a potentiometer, can be used with constants, or stepped, or voltage controlled as here.

v10 = psu
rr = potentiometer percentage as a voltage 0...100%
rt() formula for resistor at top
rb() formula for resistor at bottom
the formula input parameters are r=resistance, p=percentage
bt = resistor at top
bb = resistor at bottom
the resistors are created by using a current source, where i=v/r
tt, tc and tb are trimmer top, center and bottom

Have fun,
Just remember, Ohm's law solves most of your problems

p.s. the if(...) statement in .func rt(r,p) {(r/100)*if(p==0,1u,p)}
and .func rb(r,p) {(r/100)*if(p==100,1u,100-p)}
prevents zero Ohm as a value by substituting it (zero) with 1u
 

Attachments

  • Pot.png
    Pot.png
    64 KB · Views: 116
  • Pot.asc
    957 bytes · Views: 44
Last edited: