File: rcsq.sp

package info (click to toggle)
gwave 20190116-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,588 kB
  • sloc: ansic: 9,361; sh: 4,183; lisp: 1,226; makefile: 104; perl: 91
file content (16 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
* RC circuit driven by square wave 
* Run with command: SPICE_ASCIIRAWFILE=1 ngspice  -r rcsq.raw -b rcsq.sp

* unlike modern spices, GND and node 0 are not aliases for each other.
vgnd 0 GND 0

R1 A B 50
C1 B GND 100pf

Va A GND PWL (0 0 50n 0 51n 5 100n 5 101n 0 200n 0)

.tran 0.5n 200n
.plot tran v(A) V(B)
.option POST=1 PROBE

.end