Setting values for LTspice digital device models?

Thread Starter

Alec_t

Joined Sep 17, 2013
15,103
I would like to set a Vhigh or Vt value for a buffer or other model in the LTspice 'Digital' folder, so that the value is ratiometric with the supply voltage Vdd, e.g. Vt=Vdd/2.
If I know Vdd in advance it is simple to set Vt=2.5 (say). But what if Vdd is unknown or varying? How is Vt set then?
 

eetech00

Joined Jun 8, 2013
4,704
I would like to set a Vhigh or Vt value for a buffer or other model in the LTspice 'Digital' folder, so that the value is ratiometric with the supply voltage Vdd, e.g. Vt=Vdd/2.
If I know Vdd in advance it is simple to set Vt=2.5 (say). But what if Vdd is unknown or varying? How is Vt set then?
Hi

The digital "A" device parameters only accept values that are evaluated before a simulation run.
but you can use a B device to compute a value so it scales to the value that is set for the A device parameter.

For example, say your digital device should support an input range of 3-15 volts. You could leave Vhigh set to its default of 1v, then configure a resistor as an input pin to ground, label the input pin "in". Then use a BV device with its output connected to the input of the digital device. The value of the BV device would then be set to V=if(V(in)>3&V(in)<15,1,0).

Hope that makes sense.
 
Top