Debian Codegraph @

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

raw
1 .PS
2 # `fet.m4'
3 cct_init
4 #.PS
5 ## `fetMan.m4'
6 #cct_init
7
8 textht = 0.1
9
10 dnl `IRF4905(linespec,R)'
11 define(`IRF4905',
12 `[ ifelse(`$1',,,`eleminit_(`$1')')
13 Q: mosfet(,`$2',dMdPzEDSQdB,) ifelse(`$1',,`
14 S: Q.tr_xy(-4,-2); line from Q.tr_xy(-2,-2) to S
15 D: Q.tr_xy( 4,-2); line from Q.tr_xy(2,-2) to D',
16 `with .Diode.c at last line.c
17 S: last line.start; D: last line.end; line from S to D ')
18 G: Q.G
19 circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')
20
21 # Wrappers for `mosfet'(...), drawing direction right
22 define(`GSD',
23 `"$G$" at J.G rjust above; "$S$" at J.S rjust; "$D$" at J.D ljust ')
24
25 Row1: [ J: j_fet
26 { "{\tt j\_fet}" at J.s+(0,-0.05) below; GSD }
27 J: j_fet(right_ dimen_,,P,E) with .S at J.D+(0.5,0)
28 { "{\tt j\_fet(right\_}" "{\tt dimen\_,{,}P,E)}" at J.s+(0,-13bp__) below;GSD}
29 J: e_fet with .S at J.D+(0.5,0)
30 { "{\tt $\;$ e\_fet}" at J.s+(0,-0.05) below; GSD }
31 J: e_fet(,,P) with .w at J.e+(0.5,0)
32 { "{\tt $\;$ e\_fet(,{,}P)}" at J.s+(0,-0.2) below; GSD }
33 J: e_fet(,,P,S) with .w at J.e+(0.5,0)
34 { "{\tt $\;$ e\_fet(,{,}P,S)}" at J.s+(0,-0.05) below; GSD }
35 J: c_fet with .w at J.e+(0.5,0)
36 { "{\tt $\;$ c\_fet}" at J.s+(0,-0.2) below; GSD }
37 J: c_fet(,,P) with .w at J.e+(0.5,0)
38 { "{\tt $\;$ c\_fet(,{,}P)}" at J.s+(0,-0.05) below; GSD }
39 ]
40
41 Row2: [
42 J: d_fet
43 { "{\tt d\_fet}" at J.s+(0,-0.05) below; GSD }
44 J: d_fet(,,P) with .S at J.D+(0.5,0)
45 { "{\tt d\_fet(,{,}P)}" at J.s+(0,-0.2) below; GSD }
46 J: d_fet(,,P,S) with .S at J.D+(0.5,0)
47 { "{\tt d\_fet(,{,}P,S)}" at J.s+(0,-0.05) below; GSD }
48 J: g_fet with .G at J.G+(0.65,0)
49 { "{\tt g\_fet}" at J.s+(0,-0.1) below; GSD }
50 J: g_fet(up_ dimen_,,P) with .D at J.G+(0.85,0)
51 { "{\tt `g\_fet'(up\_$\;\;$}" at last [].s below
52 "{\tt $\;\;$dimen\_,{,}P)}" at last [].s + (0,-12bp__) below
53 "{\sl G}" at last [].G rjust
54 "{\sl S}" at last [].S + (0,2bp__) ljust
55 "{\sl D}" at last [].D + (0,2bp__) ljust below }
56 right_
57 J: Fe_fet with .G at J.D+(0.55,0)
58 {`"{\tt $\;$ Fe\_fet}"' at J.s+(0,-0.05) below; GSD }
59 J: Fe_fet(,,TEDQSuB) with .S at J.D+(0.5,0)
60 {`"{\tt $\ldots$(,{,}TEDSQuB)}"' at J.s+(0,-0.2) below; GSD
61 thinlines_
62 arrow <- down .05 left .18 from (J.G.x,J.G.y-0.1)
63 "\tt T" rjust
64 thicklines_ }
65 move right_ 0.6
66 up_
67 Q6: IRF4905 with .c at Here
68 {`"\tt IRF4905"' at Q6.s+(0,-0.0) below
69 "$G$" at Q6.G rjust
70 "$D$" at Q6.D ljust above
71 "$S$" at Q6.S ljust
72 }
73 ] with .nw at Row1.sw+(0,-0.1)
74 #.PE
75 #.PS
76 # `fetcompMan.m4' slightly modified
77 #cct_init
78
79 define(`elbox',`{R: box wid 4*m4_U ht 7*m4_U outlined "lightgray" thick 0.4 \
80 `$1'}')
81
82 # The `mosfet' components
83 Row3: [
84 movewid = 1mm__
85 right_
86 elbox
87 Q: mosfet with .S at R.sw; {`"\tt mosfet$\;\;$"' at R.s below}
88 elbox(with .w at R.e+(0.15,0))
89 Q: mosfet(,,uS) with .S at R.sw; {`"\tt uS"' at R.s below}
90 dx = 0.10
91 foreach_(`opt',
92 `elbox(with .w at R.e+(dx,0))
93 Q: mosfet(,,opt) with .S at R.sw; {`"\tt 'opt`"' at R.s below}',
94 D,dB,E,F,uG,dH,M,uM,dM,M1,uM2,M1Z,Q,R,dT,X)
95 foreach_(`opt',
96 `elbox(with .w at R.e+(dx,0))
97 Q: mosfet(,,opt) with .S at R.sw; {`"\tt 'opt`"' at Q.s below}',
98 K,OPy)
99 ] with .nw at Row2.sw+(0,-0.1)
100
101 Row4: [
102 linewid = linewid*1.2
103 Q1: mosfet(,,dGSDF)
104 {"\tt `mosfet'(,{,}dGSDF)" wid 1.25 with .nw at last [].sw+(-0.2,-0.1)
105 thinlines_
106 arrow <- down .05 left .15 from (Q1.G.x,Q1.G.y-0.05)
107 "\tt dG" rjust
108 arrow <- down .10 left .30 from Q1.Channel.start+(.15,0)
109 "\tt F" rjust
110 arrow <- down .05 left .15 from (Q1.S.x,Q1.S.y+0.05)
111 "\tt S" rjust
112 arrow <- down .05 right .15 from (Q1.D.x,Q1.D.y+0.05)
113 "\tt D" ljust
114 thicklines_ }
115
116 move right_ 0.5
117 Q2: mosfet(,,uHSDF)
118 {"\tt `$\ldots$'(,{,}uHSDF)" at last [].s+(0,-0.18) below
119 thinlines_
120 arrow <- down .05 left .15 from (Q2.G.x,Q2.G.y-0.05)
121 "\tt uH" rjust
122 thicklines_ }
123
124 move right_ 0.5
125 J: mosfet(,,dMEDSQuB,)
126 {"\tt `$\ldots$'(,{,}dMEDSQuB)" at last [].s+(0,-0.05) below
127 thinlines_
128 arrow <- down .05 left .15 from (J.G.x,J.G.y-0.05)
129 "\tt dM" rjust
130 arrow <- down .13 left .30 from J.Channel.start+(.12,0)
131 "\tt E" rjust
132 arrow <- down .05 left .10 from J.S+(.06,0)
133 "\tt Q" rjust
134 arrow <- down .08 right .24 from (J.B.x,J.B.y+0.175)
135 "\tt uB" ljust
136 thicklines_ }
137
138 move right_ 0.5
139 J: mosfet(,,uMEDSuB)
140 {`"{\tt $\ldots$(,{,}uMEDSuB)}"' at last [].s+(0,-0.18) below
141 "$G$" at last [].G rjust
142 "$S$" at last [].S rjust
143 "$D$" at last [].D ljust
144 "$B$" at last [].B below
145 }
146 move right_ 0.6
147 J: mosfet(,,dBSDFQM1,E) with .w at J.e+(0.5,0)
148 "$G0$" at J.G0 above rjust
149 "$G1$" at J.G1 above ljust
150 {"\tt $\ldots$(,{,}dBSDFQM1,E)" at last [].s below }
151 J: mosfet(,,dBSDFQuM1) with .nw at J.ne+(0.4,0)
152 { "$G0$" at J.G0 ljust
153 "$G1$" at J.G1 rjust
154 "\tt ...(,{,}dBSDFQuM1)" wid 1.25 with .n at last [].s+(0,-0.25) }
155 move right_ 0.4
156 Q5: mosfet(,,ZSDFdT)
157 {"\tt `$\ldots$'(,{,}ZSDFdT)" at last [].s below
158 thinlines_
159 arrow <- down .08 left .08 from (Q5.S.x,Q5.S.y+0.12)
160 "\tt Z" rjust
161 arrow from last arrow.end to Q5.Channel.c+(0.05,0)
162 arrow from last arrow.start to (Q5.D.x,Q5.D.y+.05)
163 arrow <- down .08 right .24 from (Q5.G.x,Q5.G.y-0.02)
164 "\tt dT" ljust
165 thicklines_ }
166 mosfet(,,SDFdT) with .w at last [].e+(0.4,0)
167 {"\tt $\ldots$(,{,}SDFdT)" at last [].s+(0,-0.15) below}
168 ] with .nw at last [].sw
169
170 .PE