Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Implementing a switch in HSPICE

Status
Not open for further replies.

sharas

Member level 4
Joined
Jun 7, 2005
Messages
76
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
 

eecs4ever

Full Member level 3
Joined
Jan 31, 2006
Messages
179
Helped
28
Reputation
56
Reaction score
10
Trophy points
1,298
Location
Analog Environment
Activity points
2,852
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:
http://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

vbhupendra

Full Member level 4
Joined
May 11, 2005
Messages
235
Helped
15
Reputation
30
Reaction score
8
Trophy points
1,298
Location
GOA, INDIA
Activity points
3,219
eecs4ever is correct E element is different as i suggested previously. its G element.
 

    sharas

    points: 2
    Helpful Answer Positive Rating

sharas

Member level 4
Joined
Jun 7, 2005
Messages
76
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,965
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?
 

eecs4ever

Full Member level 3
Joined
Jan 31, 2006
Messages
179
Helped
28
Reputation
56
Reaction score
10
Trophy points
1,298
Location
Analog Environment
Activity points
2,852
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 :
http://www.seas.upenn.edu/~jan/spice/spice.overview.html#Piecewise
2. the Pulse Function:
http://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

yaxazaa

Advanced Member level 4
Joined
Nov 13, 2004
Messages
118
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Activity points
902
In Hspice there is a element called voltage controled resistance. This could be modeling a switch
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top