refactor source code
[ob-spice.git] / README
bloba04f909bb2bb7670558f91db2cd2399133346fb4
1 * History
3 This source code is from [[https://github.com/tiagoweber][tiagoweber]].
5 - The first version is from [[http://tiagoweber.github.io/blog/entry1.html][here]].
6 - The second version is from [[http://tiagoweber.github.io/blog/entry4.html][here]].
8 * Usage
10 ** Example
12 #+BEGIN_SRC org
13 ,#+BEGIN_SRC spice  :results drawer :exports both :var file="data/images/spice-example"
14 ,*Virtual Ground Test: opamp gain = 1000
15 vin in 0 dc 0V sin(0 0.1 100Hz)
16 r1 in inn 10k
17 r2 inn out 10k
18 EOpamp out 0 0 inn 1000
19 .tran 0.1ms 0.05s
20 .print tran v(in)
21 .meas tran vtest find v(in) at=0.04e-3
22 .end
23 .control
24 run
25 set gnuplot_terminal=png
26 gnuplot $file v(in) v(out) v(inn)
27 .endc
28 ,#+END_SRC
30 ,#+RESULTS:
31 :RESULTS:
32 ,#+ATTR_HTML: :width 600px
33  [[file:./data/images/spice-example.png]]
34 :END:
36 #+END_SRC