90 likes | 247 Vues
Esercitazione 9/3/07 (…e precedenti). 1) Bistabile con Opamp. bistabile con opamp .SUBCKT OPAMP1 INP INM OUT PARAMS: VUMP=10 VUMM=-10 AD=400K E1 OUT 0 VALUE={MAX(MIN(AD*V(INP,INM),VUMP),VUMM)} .ENDS R1 1 0 1k R2 1 2 1k R3 3 4 2k R4 3 2 1k XAMP 3 1 2 OPAMP1 PARAMS: AD=500k
E N D
1) Bistabile con Opamp bistabile con opamp .SUBCKT OPAMP1 INP INM OUT PARAMS: VUMP=10 VUMM=-10 AD=400K E1 OUT 0 VALUE={MAX(MIN(AD*V(INP,INM),VUMP),VUMM)} .ENDS R1 1 0 1k R2 1 2 1k R3 3 4 2k R4 3 2 1k XAMP 3 1 2 OPAMP1 PARAMS: AD=500k VIN 4 0 DC 0 PWL (0,0) + (1u,0) (1.001u,-5) (1.021u,-5) (1.022u,0) + (3u,0) (3.001u,4) (3.021u,4) (3.022u,0) + (4.5u,0) (4.501u,-3) (4.521u,-3) (4.522u,0) + (6u,0) (6.001u,-5) (6.021u,-5) (6.022u,0) * condizione iniziale per far partire l'opamp in SAT+ .IC V(3)=7 .TRAN 1n 7u 0 1n .PROBE V(2) V(VIN) .END
2) Trigger di Schmidt MOS Trigger di Schmidt .MODEL PMOD PMOS LEVEL=1 VTO=-0.7 KP=100u .MODEL NMOD NMOS LEVEL=1 VTO=0.7 KP=250u MP1 2 in 3 3 PMOD W=25u L=0.35u MP2 out in 2 2 PMOD W=25u L=0.35u MP3 0 out 2 2 PMOD W=25u L=0.35u MN1 1 in 0 0 NMOD W=10u L=0.35u MN2 out in 1 1 NMOD W=10u L=0.35u MN3 3 out 1 1 NMOD W=10u L=0.35u COUT out 0 0.3P IC=3.3 VDD 3 0 DC 3.3 * per visualizzare la caratteristica statica Vout / Vin VIN in 0 DC 0 PWL (0,0) (75n,3.3) (150n,3.3) (225n,0) (300n,0)
* per visualizzare il funzionamento da comparatore con isteresi * commentare il VIN precedente e de-commentare il seguente * VIN in 0 DC 0 PWL * + (0,3) (20n,3) (40n,0.8) (60n,0.8) (80n,2.3) (100n,2.3) * + (120n,1.3) (140n,1.3) (160n,2.8) * + (200n,2.8) (220n,0.7) (240n,2.7) (260n,0.6) (280n,2) .TRAN 1n 300n 0 100p .PROBE V(VIN) V(cout) .END
3) Monostabile Monostabile con formatore di impulsi; visualizzare V(1) V(2) Vout Vp Vm .SUBCKT OPAMP INP INM OUT PARAMS: VUMP=10 VUMM=-10 AD=400K E1 OUT 0 VALUE={MAX(MIN(AD*V(INP,INM),VUMP),VUMM)} .ENDS .MODEL DMOD D R1 Vout Vp 5k R2 Vp 0 5k RR Vm Vout 10k CC Vm 0 150n D1 Vm 0 DMOD XAMP Vp Vm Vout OPAMP PARAMS: AD=500k Vpulse 2 0 DC 0.5 PWL (0,0) (1m,0) (1.001m,-10) (1.011m,-10) (1.012m,0) +(11m,0) (11.001m,-10) (11.011m,-10) (11.012m,0) D2 Vp 1 DMOD R4 1 0 50 C4 1 2 10n .TRAN 1m 13m 9m 100n .PROBE .END
4) Astabile con OpAmp Astabile con Opamp; visualizzare V(Vout), V(1)-V(Vout), I(CCAP) .PARAM B1=-2.6759 .SUBCKT OPAMP INP INN OUT PARAMS: VUMP=10 VUMN=-10 A=10K EAMP OUT 0 VALUE={MAX(VUMN,MIN(A*V(INP,INN),VUMP))} .ENDS XAMP 1 2 Vout OPAMP RRA 2 0 1K RRB 2 Vout 1K RR 1 4 1767.6 V1 4 0 DC {B1} CCAP Vout 1 113N .TRAN 10u 5m 0 0.1u .IC V(1,Vout)=1 .PROBE .END
5) Oscillatore Colpitts GC Oscillatore di Colpitts GATE COMUNE .MODEL NMOD NMOS LEVEL=1 VTO=0.6 KP=50u MN 3 0 2 2 NMOD W=2.78u L=1u C1 2 1 50p C2 3 2 50p L3 4 3 113u R 2 1 7k VDD 4 0 DC 2.5 VSS 1 0 DC -2.5 .IC V(2)=-2.5 .TRAN 1n 200u 0 1n .PROBE V(0,2) .END
5) Oscillatore Colpitts GC Oscillatore di Colpitts GATE COMUNE .MODEL NMOD NMOS LEVEL=1 VTO=0.6 KP=50u MN 3 0 2 2 NMOD W=2.78u L=1u C1 2 1 50p C2 3 2 50p L3 4 3 113u R 2 1 7k VDD 4 0 DC 2.5 VSS 1 0 DC -2.5 .IC V(2)=-2.5 .TRAN 1n 200u 0 1n .PROBE V(0,2) .END
6) Oscillatore Sinusoidale OSCILLATORE sin .SUBCKT OPAMP IN OUT E1 OUT 0 VALUE={ IF(V(IN)<-1, -20/3, IF( V(IN)>1,20/3, 10*V(IN)-10/3*PWRS(V(IN),3)))} .ENDS .SUBCKT FILTRO IN OUT PARAMS: Q=5 F0= 100K AMAX =0.1066 ZIN=1k .PARAM PI=3.1415926535 .PARAM R1={ZIN*(1-AMAX)} .PARAM R2={ZIN*AMAX} .PARAM L1={Q*ZIN/(2*PI*F0)} .PARAM C1={1/(Q*ZIN*2*PI*F0)} R1 IN 1 {R1} L1 1 2 {L1} C1 2 OUT {C1} R2 OUT 0 {R2} .ENDS XAMP 1 2 OPAMP XFILTRO 2 1 FILTRO PARAMS: Q=5 F0=100K AMAX=0.1066 ZIN=1k .IC V(1)=1p .TRAN 100u 50.02m 50m 100n .PROBE V(1) V(2) .END