Setting values for LTspice digital device models?

Discussion in 'Digital Circuit Design' started by Alec_t, Jul 2, 2016.

  1. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    7,104
    1,482
    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?
     
  2. crutschow

    Expert

    Mar 14, 2008
    16,532
    4,453
    Are you referring to the generic digital models in LTspice?
     
  3. eetech00

    Active Member

    Jun 8, 2013
    819
    148
    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.
     
  4. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    7,104
    1,482
    Yes.
    Perfect sense. Thanks. I'll give that a go. I had a feeling the values had to be determined before the sim run, but was hoping there was some trick to get round that limitation.
     
  5. Bordodynov

    Well-Known Member

    May 20, 2015
    1,110
    335
    See

    Draft303.png
     
Loading...