Home> >

006_Logical_Operator : Logical output level

006_Logical_Operator : Logical output level

006_Logical_Operator : Logical output level

Minimum Versions: SmartSpice 4.6.5.R

The
inputdeck shows how to use an E element (VCVS) with a logical condition to set the output level given a variation in input
level between the voltage sense connections. In this example the threshold is set at 2.5v so when the input difference
exceeds this value the output switches from 0 to 5v. This is a useful element to control startup reset and logic gate functionality.
The
log
shows the data printed in the output window of SmartSpice. The
plot
of the output waveform shows the input and switched level at the output of the source.

Graphics

LogicalOperator_output.png
LogicalOperator.png

Input Files

LogicalOperator.in

* Test logical operator in VCVS expression

V1 in 0 pwl(0 0V 10ns 5V)
R1 in 0 1k

E2 1 0 vol='(v(in)>=2.5)*5'
R2 1 0 1k

.tran 1n 10n

.option nomod

.print v(in) v(1)

.end

Related Articles