chiark / gitweb /
undo broken deletion
[trains.git] / spice / opmodmac.cir
diff --git a/spice/opmodmac.cir b/spice/opmodmac.cir
new file mode 100644 (file)
index 0000000..b53bc63
--- /dev/null
@@ -0,0 +1,28 @@
+OPAMP MACRO MODEL, SINGLE-POLE 
+* connections:      non-inverting input    gnd
+*                   |   inverting input    |    vcc 
+*                   |   |   output         |    |
+*                   |   |   |              |    |
+.SUBCKT OPAMP1      1   2   6              20   40
+*3     4
+* INPUT IMPEDANCE
+RIN     1       2       10MEG
+* DC GAIN=100K AND POLE1=100HZ
+* gain, centralise and clamp
+rclah  40      30      10k
+rclal  30      20      10k
+ecent  31      30      1 2      30k
+.model diode d
+vclamph        40      39      1.5
+vclampl 21     20      1.5
+dclamph        31      39      diode
+dclampl 21     31      diode
+
+* first pole: UNITY GAIN = DCGAIN X POLE1 = 10MHZ
+epole   3 0    31 0     1
+RP1     3       4       10
+CP1     4       0       1.5915UF
+* OUTPUT BUFFER AND RESISTANCE
+EBUFFER 5 0     4 0    1
+ROUT    5       6       10
+.ENDS