1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
|
%%
%% This is file `cicirc.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% circ.dtx (with options: `csycirc')
%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
%%
%% This program is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program; if not, write to the Free Software
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
%%
%% For error reports concerning UNCHANGED versions of this file no
%% more than one year old, see CIRC.DVI after installation.
%% If installation fails search thru this file for 'bug'.
input csym;
designsize:=2lLE#;
fontdimen10: .4gat_ht#;
fontdimen11: .65gat_lt#;
fontdimen12: .5pin_lt#;
fontdimen13: pin_spc#;
fontdimen14: .5ios_wd#+.5pin_lt#;
fontdimen15: mid_wd#+ios_wd#;
fontdimen16: ios_wd#;
fontdimen17: out_spc#;
def defcircleabout(expr p, rad)=
z[p]=.5[z[p+1],z[p+3]]=.5[z[p+2],z[p+4]];
y[p+1]=y[p+3];
x[p+2]=x[p+4];
x[p]=lft(x[p+1])-rad;
y[p]=top(y[p+4])+rad;
enddef;
def gate=
charic:=.5pin_spc#;
z0=(0,0);
x20=x15=x1=x6=x7= x0+pin_lt;
y8=y6=-y7= y0+.5gat_ht;
x8=x9=x10= x1+gat_lt-2pin_lt;
y15=-y20= y0+.5pin_spc;
x25-x0= gat_lt;
y9=y7; y25=y10=y1=y0;
x0=x26=x27;
y26=y15; y27=y20;
pickup pencircle scaled thickline;
defcircleabout(1,inv_rad);
defcircleabout(10,inv_rad);
defcircleabout(15,inv_rad);
defcircleabout(20,inv_rad);
enddef;
def segment =
z0=(0,0);
x1-x0=pin_lt; y0=y1;
defcircleabout(1,inv_rad); % z2 z3 z4 z5 defined
z1=.5[z6,z7]; x6=x7=x8;
y7-y6=pin_spc;
y8-y1=out_spc;
x9-x8=ios_wd; y8=y9;
enddef;
def topbotsegs(expr fc, myht, mydp) =
beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8--z9;
endchar;
beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8--z9;
pickup pensquare scaled normalline;
draw z0--z1;
endchar;
beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z5;
draw z3--z8--z9;
pickup pencircle scaled normalline;
draw fullcircle scaled 2inv_rad shifted z1;
pickup pensquare scaled normalline;
draw z0--z4;
endchar;
beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8--z9;
pickup pensquare scaled normalline;
draw z0--z1;
pickup pencircle scaled normalline;
draw z3--z2--z5;
endchar;
enddef;
def midsegs(expr fc, myht, mydp) =
beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8;
endchar;
beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8;
pickup pensquare scaled normalline;
draw z0--z1;
endchar;
beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z5;
draw z3--z8;
pickup pencircle scaled thickline;
draw fullcircle scaled 2inv_rad shifted z1;
pickup pensquare scaled normalline;
draw z0--z4;
endchar;
beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp);
pickup pensquare scaled thickline;
segment
draw z6--z8;
pickup pensquare scaled normalline;
draw z0--z1;
pickup pencircle scaled normalline;
draw z3--z2--z5;
endchar;
enddef;
"obere Segmente Eing"&ditto&"ange";
topbotsegs(0,out_spc#,.5pin_spc#);
"obere Segmente Ausg"&ditto&"ange";
{{
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
topbotsegs(16,out_spc#,.5pin_spc#);
}}
"mittlere Segmente Eing"&ditto&"ange";
midsegs(32,.5pin_spc#,.5pin_spc#);
"mittlere Segmente Eing"&ditto&"ange";
{{
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
midsegs(48,.5pin_spc#,.5pin_spc#);
}}
"untere Segmente Eing"&ditto&"ange";
{{
addTF(reflectedabout(left,right));
topbotsegs(64,.5pin_spc#,out_spc#);
}}
"untere Segmente Ausg"&ditto&"ange";
{{
addTF(reflectedabout(left,right));
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
topbotsegs(80,.5pin_spc#,out_spc#);
}}
"oberes Zwischensegment";
beginchar(96,mid_wd#,out_spc#,.5pin_spc#);
pickup pensquare scaled thickline;
draw (0,out_spc)--(mid_wd,out_spc);
endchar;
"Zwischensegment";
beginchar(97,mid_wd#,.5pin_spc#,.5pin_spc#);
endchar;
"unteres Zwischensegment";
beginchar(98,mid_wd#,.5pin_spc#,out_spc#);
pickup pensquare scaled thickline;
draw (0,-out_spc)--(mid_wd,-out_spc);
endchar;
"Gatter: Eingang, Ausgang";
beginchar(128,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z6--z8--z9--z7--cycle;
pickup pensquare scaled normalline;
draw z0--z1;
draw z10--z25;
endchar;
"Gatter: Eingang negiert, Ausgang";
beginchar(129,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z3--z6--z8--z9--z7--z5;
pickup pencircle scaled thickline;
draw fullcircle scaled 2inv_rad shifted z1;
pickup pensquare scaled normalline;
draw z0--z4;
draw z10--z25;
endchar;
"Gatter: Eingang, Ausgang negiert";
beginchar(130,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z14--z9--z7--z6--z8--z12;
pickup pencircle scaled thickline;
draw fullcircle scaled 2inv_rad shifted z10;
pickup pensquare scaled normalline;
draw z0--z1;
draw z11--z25;
endchar;
"Gatter: zwei Eing"&ditto&"ange, Ausgang";
beginchar(131,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z6--z8--z9--z7--cycle;
pickup pensquare scaled normalline;
draw z15--z26;
draw z20--z27;
draw z10--z25;
endchar;
"Gatter: zwei Eing"&ditto&"ange, Ausgang negiert";
beginchar(132,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z14--z9--z7--z6--z8--z12;
pickup pencircle scaled thickline;
draw fullcircle scaled 2inv_rad shifted z10;
pickup pensquare scaled normalline;
draw z15--z26;
draw z20--z27;
draw z11--z25;
endchar;
"Gatter alt AND: zwei Eing"&ditto&"ange, Ausgang";
beginchar(133,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z1--z6{right}..z10{down}..{left}z7--cycle;
pickup pensquare scaled normalline;
draw z15--z26;
draw z20--z27;
draw z10--z25;
endchar;
"Gatter alt NAND: zwei Eing"&ditto&"ange, Ausgang";
beginchar(134,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z1--z6{right}..z10{down}..{left}z7--cycle;
pickup pensquare scaled normalline;
draw z15--z26;
draw z20--z27;
draw z10--z25;
pickup pencircle scaled 2inv_rad;
drawdot z10;
endchar;
"Gatter alt OR: zwei Eing"&ditto&"ange, Ausgang";
beginchar(135,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
z30=5[z26,z15];
z31=5[z27,z20];
z32= (z26--z30) intersectionpoint (z6{right}..{down}z10);
z33= (z27--z31) intersectionpoint (z10{down}..{left}z7);
pickup pensquare scaled thickline;
draw z1--z6{right}..z10{down}..{left}z7--cycle;
pickup pensquare scaled normalline;
draw z26--z32;
draw z27--z33;
draw z10--z25;
endchar;
"Gatter alt NOR: zwei Eing"&ditto&"ange, Ausgang";
beginchar(136,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
z30=5[z26,z15];
z31=5[z27,z20];
z32= (z26--z30) intersectionpoint (z6{right}..{down}z10);
z33= (z27--z31) intersectionpoint (z10{down}..{left}z7);
pickup pensquare scaled thickline;
draw z1--z6{right}..z10{down}..{left}z7--cycle;
pickup pensquare scaled normalline;
draw z26--z32;
draw z27--z33;
draw z10--z25;
pickup pencircle scaled 2inv_rad;
drawdot z10;
endchar;
"Gatter alt EQ: zwei Eing"&ditto&"ange, Ausgang";
beginchar(137,gat_lt#,.5gat_ht#,.5gat_ht#);
gate;
pickup pensquare scaled thickline;
draw z1--z6{right}..z10{down}..{left}z7--cycle;
pickup pensquare scaled normalline;
draw z15--z26;
draw z20--z27;
draw z10--z25;
x30=x31=x34=.2[x2,x13];
y30=.7[y16,y2]; y30=y32;
y31=.7[y21,y2]; y31=y33;
x32=x33=x35=.8[x2,x13];
y35=y34=y2;
pickup pencircle scaled normalline;
draw z30--z32;
draw z31--z33;
draw z34--z35;
endchar;
"box symbol empty";
beginchar(250,box_wd#,.5box_wd#,.5box_wd#);
z0=(0,0);
x0=x1=x2; x3=x4;
y0=.5[y2,y1];
y1=y3; y2=y4;
y2-y1=x3-x1=box_wd;
pickup pensquare scaled thickline;
draw z1--z2--z4--z3--cycle;
endchar;
"box symbol cutted by line";
beginchar(251,box_wd#,.5box_wd#,.5box_wd#);
z0=(0,0);
x0=x1=x2; x3=x4;
y0=.5[y2,y1];
y1=y3; y2=y4;
y2-y1=x3-x1=box_wd;
pickup pensquare scaled thickline;
draw z1--z2--z4--z3--cycle;
pickup pencircle scaled normalline;
draw z1--z4;
endchar;
"Black Box analog";
beginchar(252,bba_wd#,.5bba_ht#,.5bba_ht#);
z0=(0,0); x1=x0=x2;
z0=.5[z1,z2];
y1-y2=y3-y4=bba_ht; y1=y3;
x3=x4=x0+bba_wd;
pickup pensquare scaled thickline;
draw z1--z2--z4--z3--cycle;
endchar;
"Black Box digital";
beginchar(253,bbd_wd#,.5bbd_ht#,.5bbd_ht#);
z0=(0,0); x1=x0=x2;
z0=.5[z1,z2];
y1-y2=y3-y4=bbd_ht; y1=y3;
x3=x4=x0+bbd_wd;
pickup pensquare scaled thickline;
draw z1--z2--z4--z3--cycle;
endchar;
"OPV";
beginchar(254,opv_lt#,opv_ht#,opv_ht#);
charic:=opv_dis#;
numeric pl;
pl:=pin_lt;
z0=(0,0);
z1=z0+(pl,opv_dis);
z2=z0+(pl,opv_ht);
z3=z0+(pl+opv_frc*2opv_ht,0);
x4=x2; y4=-y2;
x5=x1; y5=-y1;
z6=z1-(pl,0);
z7=z5-(pl,0);
z8=z0+(opv_lt,0);
z9=z5+(3pt,0);
z10=z9+(4pt,0);
z11=z1+(3pt,0);
z12=z11+(4pt,0);
z13=z11+(2pt,2pt);
z14=z11+(2pt,-2pt);
pickup pensquare scaled thickline;
draw z2--z3--z4--cycle;
pickup pensquare scaled normalline;
draw z9--z10;
draw z11--z12;
draw z13--z14;
draw z6--z1;
draw z7--z5;
draw z3--z8;
endchar;
"OPV";
beginchar(255,opv_lt#,opv_ht#,opv_ht#);
charic:=opv_dis#;
numeric pl;
pl:=pin_lt;
z0=(0,0);
z1=z0+(pl,opv_dis);
z2=z0+(pl,opv_ht);
z3=z0+(pl+opv_frc*2opv_ht,0);
x4=x2; y4=-y2;
x5=x1; y5=-y1;
z6=z1-(pl,0);
z7=z5-(pl,0);
z8=z0+(opv_lt,0);
z9=z1+(3pt,0);
z10=z9+(4pt,0);
z11=z5+(3pt,0);
z12=z11+(4pt,0);
z13=z11+(2pt,2pt);
z14=z11+(2pt,-2pt);
pickup pensquare scaled thickline;
draw z2--z3--z4--cycle;
pickup pensquare scaled normalline;
draw z9--z10;
draw z11--z12;
draw z13--z14;
draw z6--z1;
draw z7--z5;
draw z3--z8;
endchar;
end;
%%
%%
%% End of file `cicirc.mf'.
|