diode circuit example, dc analysis * a line that begins with a * is a comment in Spice * * set width of printed output to 80 columns .width out=80 * rs 2 3 135.78 r1 4 0 709.2 ro 3 5 311.5 * * when specifying a diode, we also need to specify a model * that describes the diode. in this case, the model name is m1 * d1 5 6 m1 d2 6 7 m1 d3 7 0 m1 d4 1 2 m1 d0 3 4 m1 * * specify the dc power supply * vsup 1 0 dc 3 * .model m1 D(is=1.0e-12 n=1.05 cjo=10p m=0.5 vj=0.8 ) * * request an operating point analysis from Spice * .op * * request an ac analysis over 5 decades in frequency * * * specify printed output (ac voltage across the diode) * .print ac v(2,0) * * make a plot of the ac voltage across the diode vs. frequency * * * must have an .end line * .end