Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/Schottky.m4

raw
1 .PS
2 # Schottky.m4
3 # 4-input positive NAND: the Schottky option for transistors (TI TTL data book)
4 cct_init
5
6 tic = dimen_/4
7 rlen = dimen_*3/4
8
9 E1: dot; line up_ tic
10 Q1: bi_trans(,,dEBCBUS) with .E at Here; line left tic from Q1.B; B1: Here
11 resistor(up_ rlen from Q1.C); llabel(,\SI{3}{\kilo{}})
12 B2: dot; line right_ tic
13 Q2: bi_trans(up_ dimen_,,dEBCBUS) with .B at Here
14 line from Q2.E to (Q2.E,E1); dot
15 Gnd: "GND" ljust at Here+(dimen_/2,0)
16 dot(at Q2.C)
17 { line to (Gnd,Here); "Y" ljust }
18 line to (Q1.C,Here); dot
19 resistor(up_ rlen); llabel(,\SI{4}{\kilo{}}); B4: dot; line right_ tic; up_
20 Q4: bi_tr with .B at Here
21 line from Q4.E to Q2.C
22 line up_ tic from B4
23 Q5: bi_trans(,,dEBCBUS) with .E at Here; line left_ tic from Q5.B; B5: dot
24 line from Q5.C to (Q4.C,Q5.C); dot
25 { line to Q4.C }
26 resistor(up_ rlen); llabel(,iflatex(120,"120")); dot
27 Vcc: "Vcc" ljust at (Gnd,Here)
28 dot(at (B5,Vcc))
29 resistor(to (Here,Q5.C)); llabel(,\SI{8}{\kilo{}})
30 diode(from (B4,Q2.C) to (B5,Q2.C),Z)
31 line to (Here,Q5.C)
32 diode(from B4 to (Here,B4),Z); dot
33 line left_ tic; up_
34 Q3: bi_trans(,,dEBCBUS) with .C at Here; line left_ tic from Q3.B; B3: Here
35 line from Q3.E to (Q3.E,B2); dot
36 dot(at (B1,Here)); resistor(down_ to (Here,Q1.C)); rlabel(,\SI{1.5}{\kilo{}}); line to B1
37 resistor(down_ from B3 to (B3,B2)); rlabel(,\SI{12}{\kilo{}}); line to B2
38 line from Vcc to (B3,Vcc); resistor(down_ to (Here,Q5.C))
39 rlabel(,\SI{20}{\kilo{}})
40 line to B3
41 ground(at (Q3.C,Gnd),,F); dot
42
43 for i=0 to 3 do {
44 dot(at (B3+(0,tic*i)))
45 line left_ tic*i; diode(left_ dimen_,Z); dot
46 {line down_ dimen_; reversed(`diode',down_ dimen_,Z); line to (Here,Gnd)
47 if i==3 then { line to Gnd } else { dot }}
48 line left_ tic*(4-i); ifpostscript(,`sprintf("\char%g",64+(4-i)) rjust')
49 }
50
51 .PE