Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/dpv/TimerDPV.m4

raw
1 .PS
2 # TimerDPV.m4
3 cct_init(svg_font(sans-serif,10.5bp__))
4
5 define(`ic555DIP',`[Chip: box ht boxwid wid boxwid "555"
6 P7: "7" ljust at 1/6<Chip.sw,Chip.nw>
7 P6: "6" ljust at 1/2<Chip.sw,Chip.nw>
8 P2: "2" ljust at 5/6<Chip.sw,Chip.nw>
9 P4: "4" below at 1/3<Chip.nw,Chip.ne>
10 P8: "8" below at 2/3<Chip.nw,Chip.ne>
11 P3: "3" rjust at Chip.e
12 P1: "1" above at Chip.s
13 ]')
14
15 define(`elen_',`linewid')
16 Vs: dot
17 down_
18 variable(`resistor(,E); llabel(,svg_norm(1 M`'svg_ohm))');
19 resistor(,E); llabel(,svg_norm(100 k`'svg_ohm))
20 capacitor(,E); llabel(svg_norm(220 svg_micro`'F))
21 Zero: dot
22
23 dot(at Vs+(elen_*4/3,0))
24 resistor(,E); llabel(,svg_norm(33 k`'svg_ohm))
25 line to (Here,Zero) chop 0 chop elen_
26 C2: capacitor; llabel(svg_norm(0.1 svg_micro`'F))
27 dot
28
29 IC1: ic555DIP with .P7 at C2.start + (elen_,0)
30 line from IC1.P4 to (IC1.P4,Vs); dot
31 line from IC1.P8 to (IC1.P8,Vs); dot
32 line from IC1.P1 to (IC1.P1,Zero); dot
33 line from IC1.P2 to (C2,IC1.P2); dot
34 crossover(from IC1.P7 to (Zero,IC1.P7),R,C2); dot
35 line from IC1.P6 left elen_/2 then down IC1.P6.y-IC1.P7.y; dot
36 line from IC1.P3 right elen_*2/3
37 R: dot
38 line right_ elen_/3
39 B: buzzer(,,C) with .In3 at Here
40 line from B.In1 to (R,B.In1)
41 reversed(`diode',to (Here,Vs),LE); "red" at last line.c+(elen_/2,0)
42 resistor(down_ elen_ from R,E); llabel(,svg_norm(470 svg_ohm))
43 diode(to (Here,Zero),LE); {"green" wid 0.4 at last line.c+(elen_*2/3,0)}
44 line to Zero chop 0 chop -elen_
45 line up_ (Vs.y-Here.y)/3
46 battery(up_ (Vs.y-Here.y)/3); rlabel(,,svg_norm(9 V))
47 switch(to (Here,Vs),,D)
48 line to (R,Vs)
49
50 command "</g>" # end font
51 .PE