Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Implementing a switch in HSPICE

Status
Not open for further replies.

sharas

Member level 4
Member level 4
Joined
Jun 7, 2005
Messages
74
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,965
Hi,

Does anybody know how to implement a switch that switches as a function of time in HSPICE?

I would be gratefull,

Thanks,

Sharas
 

You can used a voltage controlled resistor.
in the syntax below, phi1 is the control signal
and the switch connects 2 nodes, vin and vout.
the resistance between the 2 nodes is 100G ohms when phi1 is 0 volts.
When phi1 reaches 5 volts, the resistance is 1 mOhm = 0.001 ohm.


G1 vin vout VCR PWL(1) phi1 0 0,100G 5,1m

you can also refer here:
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Switches

Good luck.
 
  • Like
Reactions: elec_hi

    sharas

    Points: 2
    Helpful Answer Positive Rating

    elec_hi

    Points: 2
    Helpful Answer Positive Rating
eecs4ever is correct E element is different as i suggested previously. its G element.
 

    sharas

    Points: 2
    Helpful Answer Positive Rating
eecs4ever said:
You can used a voltage controlled resistor.
in the syntax below, phi1 is the control signal
and the switch connects 2 nodes, vin and vout.
the resistance between the 2 nodes is 100G ohms when phi1 is 0 volts.
When phi1 reaches 5 volts, the resistance is 1 mOhm = 0.001 ohm.


G1 vin vout VCR PWL(1) phi1 0 0,100G 5,1m

you can also refer here:
h**p://www.seas.upenn.edu/~jan/spice/spice.overview.html#Switches

Good luck.
Thanks,

but Isn't there a way to do a time controlled resistor?
 

You can make a voltage waveform that depends on time. Call this signal phi1, and use this voltage to control the value of the resistor.

now you have a time dependent resistance.

To make a voltage waveform that depends on time,
you have multiple options.

1. the PWL function :
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Piecewise
2. the Pulse Function:
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Pulse

If the behavior is periodic, then its probably easier to use the Pulse function.

good luck!
 

    sharas

    Points: 2
    Helpful Answer Positive Rating
In Hspice there is a element called voltage controled resistance. This could be modeling a switch
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top