home *** CD-ROM | disk | FTP | other *** search
/ Hacker Chronicles 2 / HACKER2.BIN / 506.DCINSTAL.EXE / DC.DOC < prev    next >
Text File  |  1993-06-19  |  83KB  |  1,594 lines

  1.                             DC CIRCUIT ANALYSIS
  2.                           Version 1.2, June 1993
  3.                       Copyright 1991, Arthur Tanzella
  4.                             All Rights Reserved
  5.  
  6. The "DC Circuit Analysis" program is intended as an educational tool for
  7. introducing the user to the concepts of Direct Current (DC) circuits in
  8. general, and digital computer circuits in particular.  Circuits can be
  9. created and evaluated on the computer screen.  This program is not intended
  10. to be a design tool, and as such does not properly handle some analog
  11. circuits, such as operational amplifiers.  This documentation can function as
  12. a tutorial to learn about semiconductors, logic, and digital computer
  13. circuits.  Numerous sample circuits are used throughout this documentation
  14. and can be displayed and evaluated using this program.
  15.  
  16. ACKNOWLEDGEMENTS
  17.  
  18. I would like to take this opportunity to thank the following people who are
  19. my good friends, and have contributed significantly to this program.  Their
  20. contributions were in the testing of the program and in the form of their
  21. suggestions to make this program and this documentation easier to use and
  22. read.
  23.  
  24.                 Warren Cella
  25.                 Ken Hanawalt
  26.                 Art Silverstein 
  27.                 Mike Weisfield
  28.  
  29. LICENSE AGREEMENT
  30.  
  31. DC Circuit Analysis is a "Shareware Program" and is provided at no charge to
  32. the user for a one week evaluation period.  Feel free to share it with your
  33. friends, but please do not give it away altered or as part of another system. 
  34. The essence of "user-supported" software is to provide personal computer
  35. users with quality software without high prices, and yet to provide incentive
  36. for programmers to continue to develop new products.  If you find this
  37. program useful and continue to use the program after the one week evaluation
  38. period, you are requested to send a registration payment of $15 to:
  39.  
  40.                 Arthur Tanzella
  41.                 4613 Clubvue Drive
  42.                 Pittsburgh, PA 15236-4803
  43.  
  44. Print out and fill in the "REGISTER.DOC" file.  Send it with the $15
  45. registration fee to the above address to register this program.
  46.  
  47. The $15 registration fee will license one copy for use on any one computer at
  48. any one time.  You must treat this software just like a book.  An example is
  49. that this software may be used by any number of people and may be freely
  50. moved from one computer location to another, so long as there is no
  51. possibility of it being used at one location while it's being used at
  52. another.  Treat the software just like a book that cannot be read by two
  53. people in two different locations at the same time.
  54.  
  55. Users of DC Circuit Analysis must accept this disclaimer of warranty: "DC
  56. Circuit Analysis is supplied as is.  The author disclaims all warranties,
  57. expressed or implied, including, without limitation, the warranties of
  58. merchantability and of fitness for any purpose. The author assumes no
  59. liability for damages, direct or consequential, which may result from the use
  60. of DC Circuit Analysis."
  61. Commercial users of DC Circuit Analysis must register and pay for their
  62. copies of DC Circuit Analysis within 30 days of first use or their license is
  63. withdrawn.  Site-License arrangements may be made by contacting Arthur
  64. Tanzella at the above address.
  65.  
  66. Anyone distributing DC Circuit Analysis for any kind of remuneration must
  67. first contact Arthur Tanzella at the address above for authorization. This
  68. authorization will be automatically granted to distributors recognized by the
  69. Association of Shareware Professionals (ASP) as adhering to its guidelines
  70. for shareware distributors, and such distributors may begin offering DC
  71. Circuit Analysis immediately.  However, Arthur Tanzella must still be advised
  72. so that the distributor can be kept up-to-date with the latest version of the
  73. DC Circuit Analysis program.
  74.  
  75. You are encouraged to pass a copy of DC Circuit Analysis along to your
  76. friends for evaluation.  Please encourage them to register their copy if they
  77. plan to continue using it.  All registered users will receive a copy of the
  78. latest version of the DC Circuit Analysis program when they register.  If you
  79. have any comments or problems with this program, you can contact me at the
  80. address above.  Support will be provided to all registered users for a
  81. minimum of three months from the time they registered.
  82.  
  83. ASP OMBUDSMAN
  84.  
  85. This program is produced by a member of the Association of Shareware
  86. Professionals (ASP).  ASP wants to make sure that the shareware principle
  87. works for you.  If you are unable to resolve a shareware-related problem with
  88. an ASP member by contacting the member directly, ASP may be able to help. 
  89. The ASP Ombudsman can help you resolve a dispute or problem with an ASP
  90. member, but does not provide technical support for members' products.  Please
  91. write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send a
  92. CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536.
  93.  
  94. GETTING STARTED
  95.  
  96. The DC Circuit Analysis program contains over 100 files occupying
  97. approximately 800 Kb of disk space, and is compressed into a single self-
  98. extracting file called "DCINSTAL.EXE."  This file was created using the LHarc
  99. version 2.11 program, which is a copyright reserved freeware program written
  100. by Haruyasu Yoshizaki.
  101.  
  102. To run the program requires an EGA or VGA graphics adapter with 256 Kb of RAM
  103. installed, and a color monitor.  It also requires between 300 Kb and 350 Kb
  104. of available RAM after DOS, drivers and Terminate and Stay Resident (TSR)
  105. program are loaded.  The actual amount of RAM required depends on the
  106. complexity of the circuit.  If Expanded Memory (EMS) is installed, only
  107. 300 Kb of RAM is required.  You can use the CHKDSK command to determine if
  108. you have enough available RAM to run this program.
  109.  
  110. To start the DC Circuit Analysis you must be in the directory containing this
  111. program.  Typically, the program is stored in the C:\DC directory.  Use the
  112. DOS "CD" (Change Directory) command to change the default directory to the
  113. program directory as follows:
  114.  
  115.                 CD \DC
  116.  
  117. To start the program type "DC"  with or without parameters as follows:
  118.  
  119.                 DC
  120.                    or
  121.                 DC filename.DC
  122.                    or
  123.                 DC filename.DC x
  124.  
  125. If no parameters are specified after the "DC" command, the opening (help)
  126. screen of the on-line tutorial will be displayed.  This tutorial contains all
  127. the information in this document, and allows access in a Hyper-Text like
  128. fashion.  The cursor keys (or mouse) can be used to highlight keywords on the
  129. screen.  The ENTER key will display another screen of information whose
  130. subject corresponds to the selected keyword.  The PGDN key, or selecting the
  131. "More" keyword, will display the next screen of information.  The PGUP key
  132. will display the previous screen.  The F1 key will display the first screen
  133. of the tutorial.  From the first screen the "Table of Contents" keyword will
  134. display a screen containing the Table of Contents that will allow you to jump
  135. directly to the desired section.  The "Index" keyword will display a screen
  136. containing many different keywords.  The ESCAPE key will exit the Tutorial
  137. and return you to the DC Circuit Analysis program.  The F5 key will allow you
  138. to return to the tutorial at the same screen previously displayed.
  139.  
  140. Upon exiting the tutorial, the program will display a menu containing the
  141. directory of sample circuits in alphabetical order.  The PGUP and PGDN key
  142. will page through this directory.  The UP and DOWN key will highlight sample
  143. circuits in the current page, and the ENTER key will select the highlighted
  144. sample circuit file.  F10 or ESC will exit this menu without selecting a
  145. sample circuit.  At the opening menu you can select "Exit" to exit the
  146. program without modifying the sample circuit.
  147.  
  148. If a filename is specified on the command line, and it does not exist, the
  149. program will display the "Modify Circuit" screen which allows you to create
  150. a new circuit.  By convention, circuit files have the extension "DC."  Press
  151. F10 or ESC to exit this screen.  When exiting from the opening menu you can
  152. choose to Save the Circuit or Exit without saving the circuit.  If you choose
  153. to save the circuit, it will be stored in the file (filename.DC) specified on
  154. the command line when you started the program.  If a problem occurs during
  155. the writing of the file, you will be prompted to enter a new filename.
  156.  
  157. If the file specified on the command line already exist, the program will
  158. display the opening menu.  Your choices are:
  159.  
  160.                 Analyze Circuit
  161.                 Modify Circuit
  162.                 Select Sample Circuit
  163.                 Save Circuit As
  164.                 Save Circuit
  165.                 Exit
  166.  
  167. "Analyze Circuit" will evaluate the circuit, calculating, and displaying
  168. voltages at interconnect nodes.  It will also calculate and display the
  169. current and its direction across each resistor in the circuit.  Finally, it
  170. will determine if any components are overloaded.
  171. If you want to analyze a circuit and exit without modifying the circuit, add
  172. any character following the filename on the command line as follows:
  173.  
  174.                 DC filename.DC x
  175.  
  176. Sample circuit files are located in the "DC" sub-directory under the default
  177. directory.  You must prefix sample filenames with "DC\" to access files in
  178. this sub-directory as follows:
  179.  
  180.                 DC DC\filename.DC x
  181.  
  182. As an example, let's look at the "RESIST1.DC" sample circuit.  Type the
  183. following:
  184.  
  185.                 DC DC\RESIST1.DC R
  186.  
  187. Or you can enter the program without specifying a filename, and select
  188. "RESIST1.DC" from the select sample circuit menu.  Next select "Analyze
  189. Circuit" from the opening menu.
  190.  
  191. This file actually contains three separate resistor circuits.  The simplest
  192. circuit is on the left, and the circuits gradually become more complex as you
  193. move to the right.  Notice that voltages at interconnect nodes are displayed
  194. in green, and currents across resistors are displayed in orange.  Further
  195. notice, that an arrow prefixes the current indicating the direction of the
  196. current, always pointing from a larger voltage to a smaller voltage.  The ESC
  197. or F10 key is used to exit.
  198.  
  199. BASIC ELECTRICAL THEORY
  200.  
  201. Electrical potential is measured in Volts (V).  Electrical current is
  202. measured in Amperes or Amps (A).  Electrical resistance is measured in
  203. Ohms (Ω).  Electrical power is measured in Watts (W).
  204.  
  205. Conductors are usually metal wires made of copper or aluminum, and are used
  206. to conduct electricity.  These metals have a very small resistance measured
  207. in milliohms (0.001 ohms) per foot of wire, depending on the diameter of the
  208. wire.  The DC Circuit Analysis program assumes that wires used to connect
  209. components have zero resistance.  This assumption is valid if short distances
  210. (less than a few feet) are involved.
  211.  
  212. Insulators are usually made of materials like rubber and plastic, and are
  213. used to insulate wires.  Insulators have very high resistances (millions of
  214. ohms).
  215.  
  216. Resistors are components that allow electrical current to flow, but resist
  217. the current converting some of it into heat.  Resistors are typically made
  218. from carbon, and have resistances measured in ohms or Killohms (1000 ohms).
  219.  
  220. A potentiometer is a variable resistor with three connection points.  The top
  221. and bottom connections are to a fixed resistor.  The middle connection can
  222. make contact at different locations along this resistor.  Hence, the sum of
  223. the resistance between the middle connection and the top connection, and the
  224. resistance between the middle connection and the bottom connection, is the
  225. same as the resistance between the top and the bottom connection.
  226. Other basic electrical components include capacitors and inductors. 
  227. Capacitors are constructed of two large surface area conductors separated by
  228. a thin insulator.  Capacitors are typically used in an Alternating Current
  229. (AC) circuit to filter selective frequencies.  They can also be used to
  230. stabilize a DC voltage from voltage spikes. 
  231.  
  232. Inductors are wires wrapped into a coil.  When electrical current spirals
  233. through an inductor it creates a magnetic field.  Inductors are primarily
  234. used in AC circuits to produce oscillators.  Inductors have the opposite
  235. effect of capacitors on a circuit.  Inductors can also be used to create
  236. electromagnets.  If two inductors are wrapped around the same iron core, they
  237. form a transformer.  Transformers are used to raise or lower AC voltages.
  238.  
  239. It is possible to create an electrical potential by passing an inductor
  240. through a magnetic field.  This is how an electrical generator works.  
  241.  
  242. Batteries are electrical devices that use chemicals to produce an electrical
  243. potential.  The battery has an excess of electrons (negatively charged) at
  244. its negative pole, and a shortage of electrons at its positive pole.
  245.  
  246. Both generators and batteries can be used to supply power to an electrical
  247. circuit.  This program represents the power supply using fixed voltage nodes
  248. established at +10V, +5V, 0V (ground), -5V, or -10V.
  249.  
  250. In a steady state DC circuit, capacitors act like an insulator, unless the DC
  251. voltage is in excess of the capacitor rated voltage.  Inductors on the other
  252. hand, act like wires or resistors with small resistance values.  For this
  253. reason, the DC Circuit Analysis program does not support capacitors,
  254. inductors or transformers.
  255.  
  256. This program assumes a steady state DC circuit and uses the following
  257. equation to calculate voltage and current through out the circuit:
  258.  
  259.                 V = I R
  260.  
  261. where:
  262.         V is the potential measured in Volts
  263.         I is the current measured in Amps
  264.         R is the resistance measured in Ohms
  265.  
  266. Every component in the circuit is reduced to its characteristic resistance,
  267. and the voltage potential across the component is calculated based on the
  268. current flow using this equation.
  269.  
  270. The actual equation implemented in DC Circuit Analysis is a derivation of
  271. V=IR for multiple resistors connected to the same node.  The assumption is
  272. that the total current entering a node is equal to the total current exiting
  273. that node (ΣI=0).   The following equation is used to calculate the voltage
  274. at each node:
  275.  
  276.                       N
  277.                       Σ Vi/Ri 
  278.                      i=0
  279.                 V = ──────────
  280.                       N
  281.                       Σ 1/Ri
  282.                      i=0
  283.  
  284. where:
  285.         V  is the calculated voltage at a specified node
  286.         N  is the number of resistors connected to that node
  287.         Ri is the resistance of each resistor
  288.         Vi is the voltage at the node on the other end of each resistor
  289.  
  290. The calculation is continually repeated for each node in the circuit until
  291. the voltage at each node converges (barely changes).  The convergence
  292. criteria used by the program is a function of the speed of the computer.  The
  293. convergence criteria ranges from a stringent value of 0.00001 Volts for fast
  294. computers, to a relaxed value of 0.01 Volts for slow computers.  The more
  295. stringent the convergence criteria the longer the program takes to calculate
  296. voltage and current, and the more accurate the results are.  You can override
  297. the convergence value and explicitly set it external to the program using the
  298. DOS environmental variable "DC_DV" as follows:
  299.  
  300.                 SET DC_DV=0.01
  301.  
  302. Electrical power is calculated using the following equation:
  303.  
  304.                 P = V I
  305.                   or
  306.                 P = I² R
  307.  
  308. where:
  309.         P  is the calculated power in Watts
  310.         V  is the potential across a component measured in Volts
  311.         I  is the current passing through the component measured in Amps
  312.         I² is the current squared (current multiplied by itself) in Amps²
  313.         R  is the resistance of the component measured in Ohms
  314.  
  315. Power is calculated to determine if various components are overloaded.  All
  316. resistors in the library are assumed to be standard ¼ Watt resistors.  As an
  317. example, using the equation I = V/R, an 100 ohm resistor connected to a
  318. 10 Volt source and ground has a current of 0.1 Amps passing through it. 
  319. Using the power equation P = VI, the power through this resistor is 1 Watt
  320. which exceeds its rated value of a ¼ Watt.  Hence, this component (resistor)
  321. is overloaded.
  322.  
  323. USING THE PROGRAM
  324.  
  325. The DC Circuit Analysis program will automatically detect and uses the
  326. following: a math coprocessor, a two or three button mouse, and EMS
  327. (Expanded) memory.  These items are not required, but if found, will improve
  328. the performance of the program.
  329.  
  330. DC Circuit Analysis supports a mouse if one is installed with either the
  331. MOUSE.SYS or MOUSE.COM driver.  However, a mouse is not required.  In
  332. general, the left mouse button is equivalent to the ENTER key and is used to
  333. select items.  The right mouse button is equivalent to the ESC key and is
  334. used to exit screens.  If the mouse has three buttons, the middle button is
  335. supported in the Select Sample Circuit screen to page through the directory,
  336. in the Modify Circuit screen to display the Library of Components screen, and
  337. to switch pages of library components.
  338.  
  339. Let us now analyze the "RESIST2.DC" sample circuit.  This file contains two
  340. sample circuits, one with a potentiometer, and the other with a switch.  When
  341. more than one adjustable component (Switch or Potentiometer) is in a circuit,
  342. the LEFT and RIGHT cursor keys are used to select an adjustable component. 
  343. Adjustable components with blue back grounds indicate they have been
  344. selected.  If a mouse is installed, it can be used to select an adjustable
  345. component.  The ENTER key or the left mouse button will toggle the selected
  346. switch, or increment the selected potentiometer in 10% increments.  
  347.  
  348. All switches are Single-Pole Double-Throw.  When a switch is selected, the
  349. HOME, PGUP, and UP cursor keys will position the switch in the up position. 
  350. The END, PGDN, and DOWN cursor keys will position the switch in the down
  351. position.   
  352.  
  353. When a potentiometer is selected, the UP and DOWN cursor keys will increment
  354. or decrement the potentiometer in 1% increments.  The PGUP and PGDN keys will
  355. increment or decrement the potentiometer in 10% increments.  The HOME key
  356. sets the potentiometer to 99%, and the END key sets it to 1%.
  357.  
  358. If a potentiometer in the circuit is selected, the "p" key will plot a graph
  359. of the first eight interconnect node voltages (labeled A through H in yellow)
  360. versus the potentiometer voltage.  The program will automatically calculate
  361. voltages at every node as it adjusts the potentiometer.  If you have a fast
  362. computer, the potentiometer will be adjusted in 1% increments from 1% to 99%. 
  363. Slower computers will use larger increments between 2% and 5%.  Since the
  364. program must continually calculate the circuit until it converges for each
  365. time the potentiometer is incremented, plots can take up to ten minutes,
  366. depending on the complexity of the circuit and the speed of the computer.  A
  367. math coprocessor can speed up the calculation, but is not required.  The DOS
  368. environmental variable "DC_PLOT" can be used to explicitly set the
  369. potentiometer increments external to the program as follows:
  370.  
  371.                 SET DC_PLOT=5
  372.  
  373. Once the program completes this calculation, the plot will be displayed on
  374. the screen.  Press any key to exit the plot and return to the analysis
  375. screen.  Subsequent "p" commands will instantly redisplay the plot without
  376. recalculation.  Hence, you can press "p" to toggle between the plot and the
  377. analysis screen.  You can also adjust the potentiometer on the analysis
  378. screen as you toggle between the two screens.
  379.  
  380. Interconnect nodes, that are connected to fixed voltage or switches, are
  381. treated as though they are fixed nodes with the corresponding voltage, hence
  382. the program does not explicitly display a voltage adjacent to these nodes. 
  383. Interconnect nodes that are connected to other interconnect nodes are
  384. combined for calculational purposes into a single interconnect node and the
  385. calculated voltage is displayed only at the node that was created first.
  386.  
  387. Finally, the "w" key writes the Analysis or Plot screen into a PC Paintbrush
  388. compatible file called DC.PCX.  If the DOS environmental variable TMP is
  389. defined, the DC.PCX file will be written to the directory identified by the
  390. TMP variable, otherwise it will be written to the default directory.
  391.  
  392. Now let's exit (ESC) this sample circuit and look at modifying a circuit.  
  393.  
  394. Let's start with the existing circuit RESIST1.DC.  After selecting this
  395. circuit from the "Select Sample Circuit" menu, you should save it under a
  396. different name using the "Save Circuit As" menu.  To modify the circuit you
  397. should select "Modify Circuit" from the opening menu.
  398.  
  399. Now let's modify the first circuit on the left.  Let's change the 10V fixed
  400. voltage node to 5V fixed voltage node.  Use the cursor keys or the mouse to
  401. move the cursor over the 10V fixed voltage icon.  Hold the CTRL key and the
  402. BACKSPACE key down simultaneously to delete the 10V fixed voltage icon.  Now
  403. press F4, or the middle button on the mouse, to display the library of
  404. components.  If you have a slow disk drive, it may take a few seconds to
  405. display this screen, because it must read the library file containing the
  406. icons.  A 256 Kb disk cache, such as SMARTDRV (see your MS-DOS manual), would
  407. speed up the display of this screen.  Use the cursor keys or mouse to move
  408. the white box to the 5V fixed voltage icon.  Press ENTER or the left mouse
  409. button to select this icon.  The Modify Circuit screen will now reappear. 
  410. Use the cursor keys or mouse to move the icon to the same location that the
  411. 10V fixed voltage icon was in, and press ENTER or the left mouse button to
  412. lock it in place.  
  413.  
  414. Beware that if you attempt to locate the icon too close to an existing icon
  415. on the screen, you will get the message: "ERROR - Component Overlaps Another
  416. Component."  If this occurs, press any key to clear the message, move the
  417. icon to another location, and press ENTER or the left mouse button.  Icons
  418. must have some space between them.  They cannot be touching.  Think of each
  419. icon as having an invisible rectangular outline that encompass the icon.  
  420.  
  421. If you need to move an icon, locate the cursor on top of the icon and press
  422. the F3 key.  Then use the cursor keys or mouse to move the icon to a new
  423. location and press ENTER or the left mouse button to lock it in place.
  424.  
  425. We now must connect the 5V fixed voltage node to the top of the resistor. 
  426. Locate the cursor over the bottom circle (connection point) of the 5V fixed
  427. voltage node, and press ENTER or the left mouse button.  The icon will turn
  428. red.  Now locate the cursor over the top portion of the resistor and press
  429. ENTER or the left mouse button.  The program will draw a wire (line) between
  430. the two connection points.  You must always select a node (interconnect,
  431. fixed, or switch) before selecting a component (or IC) to make a connection. 
  432. You can use the same procedure to disconnect (remove) a wire.  You can
  433. connect two nodes together in any order.
  434.  
  435. You can press F1 for a brief help message.  For additional help, press F1 a
  436. second time to receive a full screen of help.  This screen identifies the
  437. different types of nodes and components in the library.
  438.  
  439. Finally, press F6 to analyze the circuit and see the results of your
  440. modification.  F6 allows you to switch between the "Analyze Circuit" and
  441. "Modify Circuit" screens.
  442.  
  443. Now is a good time for you to attempt to build your first circuit from
  444. scratch.  Exit the program and type the following:
  445.  
  446.                 DC DC\TEST2.DC
  447.  
  448. Now build a simple resistor circuit of your choosing.  Then proceed to
  449. analyze your circuit.
  450.  
  451. Lets look at the RESIST3.DC sample circuit for an example of a complex
  452. resistor network.
  453.  
  454. BASIC SEMICONDUCTOR THEORY
  455.  
  456. In addition to resistors, there are electrical components called
  457. semiconductors.  They get their name from the fact that sometimes they act as
  458. a conductor, a resistor, or an insulator depending on the circumstance. 
  459. Semiconductors are typically made of materials like silicon or germanium.
  460.  
  461. There are two types of semiconductor materials, Positive type (P-type)
  462. material, and Negative type (N-type) material.  Typically, a semiconductor
  463. starts with a chemical group IV element (with four outer electrons), such as
  464. silicon.   This material must be formed into a nearly perfect crystal.  A
  465. small quantity of a group III element (with three outer electrons), such as
  466. boron, is added to create P-type material.  This material is positive because
  467. there is a slight shortage of electrons.  (Electrons are negative, so their
  468. absence makes the material positive).  Adding a small quantity of a group V
  469. element (with five outer electrons), such as phosphorus, creates N-type
  470. material.  Other elements can also be used to form semiconductors.
  471.  
  472. The simplest semiconductor is formed by joining P-type material and N-type
  473. material to form a P-N junction.  This class of semiconductors includes
  474. diodes and rectifiers.  The P-N junction is characterized by the fact that
  475. electrons can flow (forward) from the N-type material to the P-type material
  476. easier that (in reverse) from the P-type material to the N-type material. 
  477. There is a minimum voltage required, called the threshold voltage, before
  478. electrons can flow from the N-type to the P-type material.   A typical
  479. threshold voltage for a diode is 0.6 Volts.   For electrons to flow in the
  480. opposite direction usually requires a much higher voltage, (50 Volts or
  481. larger).
  482.  
  483. In reality, electrons travel from a negative source, containing an excess of
  484. electrons, to a positive source, containing a shortage of electrons.  By
  485. convention, electrical current is assumed to flow in the opposite direction,
  486. from a positive source to a negative source.  This convention was established
  487. long before the discovery of the electron.  
  488.  
  489. The symbol for a diode looks like a triangle pointing to a vertical line, as
  490. crudely represented below.  Conventional electrical current flows in the
  491. direction that the triangle points.
  492.  
  493.                        │\ │
  494.                 (+) ───┤ >├─── (-)
  495.                        │/ │
  496.  
  497.                        Diode
  498.  
  499. Another characteristic of a diode, is once the threshold voltage is exceeded,
  500. the effective resistance of the diode will change in an attempt to maintain
  501. a constant voltage drop across the diode equivalent to the threshold voltage. 
  502. Eventually, the diode will overload and burn out if too much current passes
  503. through it.
  504.  
  505. The DIODE1.DC and DIODE2.DC circuits illustrate the characteristics of a
  506. diode.  When plotting DIODE2.DC, you may observe a slight overshoot of the
  507. input voltage when it reaches the diode threshold voltage.  This is a
  508. shortcoming of this program.  In reality, the input voltage will slightly
  509. undershoot and asymptotically approach the threshold voltage.
  510.  
  511. This brings us to the next class of semiconductors, called transistors.  The
  512. name Transistor is derived from "Transient Resistor."  There are two types of
  513. transistors, NPN and PNP, which are constructed of three semiconductor
  514. materials sandwiched together.  The middle layer is called the "Base", and
  515. the outer two layers are called the "Emitter," and "Collector."  The
  516. thicknesses of each layer are not equal.  The Collector is the thickest
  517. layer, and the Base is the thinnest layer.
  518.  
  519. This class of transistor is called a "bipolar" transistor, because current
  520. flows through the transistor using two different methods.  In N-type
  521. material, current flows as electrons move through the material.  In P-type
  522. material, current flows as "holes" move through the material.
  523.  
  524. The symbol for a bipolar transistor is a three prong icon as crudely
  525. represented below.  The prong with an arrow head is always the Emitter and it
  526. points in the direction the (conventional) current flows.  The Emitter in an
  527. NPN transistor points away from the Base, and the Emitter in a PNP transistor
  528. points toward the Base.
  529.  
  530.  
  531.                 │ / Collector                   │  / Emitter
  532.                 │/                              │ /
  533.         Base ───┤\                      Base ───┤└
  534.                 │ \                             │\
  535.                 │  ┘ Emitter                    │ \ Collector
  536.  
  537.                NPN                             PNP
  538.  
  539. I will only discuss the NPN transistor.  The PNP transistor works
  540. identically, except that the direction of the current is reversed.  The Base-
  541. Emitter junction acts like a diode, but with a slightly higher threshold
  542. voltage of approximately 0.7 Volts.  When the Base-Emitter junction is
  543. reversed biased (the Emitter voltage is larger than the Base voltage), the
  544. transistor is considered to be "Off," and very little current can flow
  545. through the transistor.  When the Base-Emitter junction is forward biased
  546. (the Base voltage is larger than the Emitter voltage), the resistance between
  547. the Collector and Emitter is a function of the current flowing between the
  548. Base and Emitter.  The more current through the Base-Emitter junction, the
  549. smaller the resistance, and hence the larger the current flowing between the
  550. Collector and Emitter.  The ratio of current flowing between the Collector
  551. and Emitter, and the current flowing between the Base and Emitter, is called
  552. the current gain designated "Hfe," and is typically of the order of 100. 
  553. Hence, bipolar transistors are current amplifiers.  The difference between
  554. the different bipolar transistors is primarily the amount of current they can
  555. handle before overloading.  Computer circuits are designed to be fast, not
  556. powerful.
  557.  
  558. The TRANNPN.DC and TRANPNP.DC sample circuits illustrate the characteristics
  559. of bipolar transistors.
  560.  
  561. A special type of transistor designed for high power and high gain (Hfe) is
  562. called a darlington.  It is essentially two bipolar transistors back to back
  563. on the same piece of silicon.  It is characterized by a threshold voltage
  564. that is typically twice that of a bipolar transistor and has a current gain
  565. (Hfe) of the order of a 1000 instead of a 100.  The TRANDNPN.DC and
  566. TRANDPNP.DC sample circuits illustrate the characteristics of darlingtons.
  567.  
  568. A typical transistor in a computer circuit can only handle about 10 milliamps
  569. (mA) of current.  A typical medium range transistor, like the 2N2222, can
  570. handle up to ½ Amp.  A typical power darlington, like the TIP100, can handle
  571. up to 8 Amps.
  572.  
  573. The last type of transistor to discuss is called the Metal Oxide
  574. Semiconductor (MOS).  It is a type of Field Effect Transistor (FET).  This
  575. transistor is similar to a bipolar transistor (NPN or PNP) with the addition
  576. of a metal Gate over the Base.  The Gate is separated from the Base by a thin
  577. insulator, usually SiO2 (glass).  The symbols for these types of transistors
  578. are crudely represented below:
  579.  
  580.         Gate ──┐├─── Source                    │├─── Drain
  581.                │ ──> Base                      │ <── Base
  582.                │├─── Drain              Gate ──┘├─── Source
  583.   
  584.               PMOS                            NMOS
  585.  
  586. When a positive voltage of at least 2 Volts is applied between the Gate and
  587. a P-type Base, the electrons in the Base are pulled toward the Gate allowing
  588. current to flow between the two N-type material called the "Source" and the
  589. "Drain."  This is called an N-channel MOS (NMOS) transistor.  The larger the
  590. voltage, the less resistance between the Source and the Drain.  The
  591. resistance is inversely proportional to the voltage (less the 2 Volt
  592. threshold voltage) squared as illustrated in the following equation:
  593.  
  594.                       K
  595.                 R = ──────
  596.                     (V-2)²
  597.  
  598. where:  R = The calculated resistance between the Source and the Drain
  599.         K = A constant, approximately 5000 Ohms/Volt²
  600.         V = Voltage potential between the Gate and the Base.
  601.  
  602. A similar P-channel MOS (PMOS) transistor exists, but requires a negative
  603. voltage between the Gate and the N-type Base for current to flow between the
  604. P-type Source and Drain.  The TRANPMOS.DC and TRANNMOS.DC sample circuits
  605. illustrate the characteristics of MOS type transistors.
  606.  
  607. LOGIC
  608.  
  609. Before we can discuss actual computer circuits, we must first discuss the
  610. concept of logic.  There are only two logical values: "TRUE" and "FALSE." 
  611. There are three fundamental logical operators from which all other logical
  612. operators can be derived.  They are "NOT," "AND," and "OR."   The NOT
  613. operator works as follows:  If it is NOT TRUE, it must be FALSE.  Conversely,
  614. if it is NOT FALSE, it must be TRUE.  
  615.  
  616. All of the inputs must be TRUE for the AND operator to be TRUE.  Any of the
  617. inputs can be TRUE for the OR operator to be TRUE.  The following table
  618. summarize these fundamental logical operators:
  619.  
  620.  
  621.                ╔═══════════════╦═══════════════════════════╗
  622.                ║     Input     ║          Output           ║
  623.                ╟───────┬───────╫────────┬─────────┬────────╢
  624.                ║   A   │   B   ║ NOT A  │ A AND B │ A OR B ║
  625.                ╠═══════╪═══════╬════════╪═════════╪════════╣
  626.                ║ FALSE │ FALSE ║ TRUE   │  FALSE  │  FALSE ║
  627.                ║ FALSE │ TRUE  ║ TRUE   │  FALSE  │  TRUE  ║
  628.                ║ TRUE  │ FALSE ║ FALSE  │  FALSE  │  TRUE  ║
  629.                ║ TRUE  │ TRUE  ║ FALSE  │  TRUE   │  TRUE  ║
  630.                ╚═══════╧═══════╩════════╧═════════╧════════╝
  631.  
  632. In addition to the fundamental logical operators, there are three additional
  633. logical operators that are commonly used and can be derived from the three
  634. fundamental operators.  They are "NAND," "NOR," and Exclusive OR "XOR."  The
  635. NAND operators is the same as "NOT AND."  In other words, the result of the
  636. AND operator is complemented by the NOT operator.   The logical equation for
  637. the NAND operator is the following:
  638.  
  639.                 A NAND B = NOT (A AND B)
  640.  
  641. Similarly, the NOR operator is the same as "NOT OR."  The logical equation
  642. for the NOR operator is the following:
  643.  
  644.                 A NOR B = NOT (A OR B)
  645. The Exclusive OR is similar to the OR operator, except only one input is
  646. allowed to be TRUE at a time for the answer to be TRUE.  In other words, the
  647. answer is TRUE if one or the other input is TRUE, but not both.  The logical
  648. equation for Exclusive OR (XOR) is the following:
  649.  
  650.                 A XOR B = (A OR B) AND NOT (A AND B)
  651.                                 or
  652.                 A XOR B = (A OR B) AND (A NAND B)
  653.  
  654. The following table summarizes the NAND, NOR, and XOR logical operators:
  655.  
  656.              ╔═══════════════╦═══════════════════════════════╗
  657.              ║     Input     ║             Output            ║
  658.              ╟───────┬───────╫───────────┬─────────┬─────────╢
  659.              ║   A   │   B   ║ A NAND B  │ A NOR B │ A XOR B ║
  660.              ╠═══════╪═══════╬═══════════╪═════════╪═════════╣
  661.              ║ FALSE │ FALSE ║   TRUE    │  TRUE   │  FALSE  ║
  662.              ║ FALSE │ TRUE  ║   TRUE    │  FALSE  │  TRUE   ║
  663.              ║ TRUE  │ FALSE ║   TRUE    │  FALSE  │  TRUE   ║
  664.              ║ TRUE  │ TRUE  ║   FALSE   │  FALSE  │  FALSE  ║
  665.              ╚═══════╧═══════╩═══════════╧═════════╧═════════╝
  666.  
  667. I will now discuss the DeMorgan's theorem.  This theorem states that if you
  668. invert the input and output of the AND operator, you obtain the same results
  669. as the OR operator.  Conversely, if you invert the input and output of the OR
  670. operator, you obtain the same results as the AND operator.  In addition,
  671. there are corollaries to this theorem.  The logical equations for this
  672. theorem and its corollaries are listed below:
  673.  
  674.                  A AND B = NOT ( (NOT A) OR (NOT B) )
  675.                  A AND B = (NOT A) NOR (NOT B)
  676.                   A OR B = NOT ( (NOT A) AND (NOT B) )
  677.                   A OR B = (NOT A) NAND (NOT B)
  678.                 A NAND B = (NOT A) OR (NOT B)
  679.                  A NOR B = (NOT A) AND (NOT B)
  680.  
  681. The DeMorgan's theorem can be extremely useful when designing logic circuits.
  682.  
  683. It is actually possible to derive the three fundamental logical operators,
  684. NOT, AND, and OR using a single logical operator, and subsequently derive all
  685. logical operators from this single logical operator.  (The original computer
  686. designers only had one or two logical operator circuits to work with).  This
  687. logical operator can be either a NAND or a NOR logical operator.  
  688.  
  689. The following logical equations illustrate this capability:
  690.  
  691.                    NOT A = A NAND A
  692.                  A AND B = NOT (A NAND B)
  693.                   A OR B = (NOT A) NAND (NOT B)
  694.                  A NOR B = NOT ( (NOT A) NAND (NOT B) )
  695.                  A XOR B = NOT ( ( (NOT A) NAND (NOT B) NAND (A NAND B) )
  696.  
  697.                    NOT A = A NOR A
  698.                  A AND B = (NOT A) NOR (NOT B)
  699.                   A OR B = NOT (A NOR B)
  700.                 A NAND B = NOT ( (NOT A) NAND (NOT B) )
  701.                  A XOR B = (A NOR B) NOR ( (NOT A) NOR (NOT B) )
  702.  
  703. How does this discussion on logic help explain how digital computers work? 
  704. A digital computer is a "Binary" computer.  Binary computers deal with only
  705. two states: TRUE or FALSE, 1 or 0, On or Off, Voltage or Ground.  Binary
  706. computers do not use varying voltages to represent values, instead they use
  707. simple On/Off circuits.  This means that binary computer circuits do not
  708. require precision electrical components.
  709.  
  710. The decimal numbering system we are familiar with uses ten different digits
  711. (0 through 9), and is referred to as base 10.  A binary computer represents
  712. numbers using base 2, which only has two digits "0" and "1."  In base 10, the
  713. least significant (right most) digit is multiplied by 1, the next digit by
  714. 10, 100, 1000, etc.  In base 2, the least significant digit is multiplied by
  715. 1, the next by 2, 4, 8, etc.  So the decimal number 9 can be represented by
  716. the binary number 1001.  (A binary digit is called a bit.)
  717.  
  718. The Exclusive OR logical operator is the fundamental basis for a binary
  719. adder.  Once you have the ability to add two numbers together, you can than
  720. subtract two numbers by converting one number to its negative value and
  721. adding it to the other number.  Negative numbers are represented by using a
  722. method called "Twos Compliment."  This method represents a negative one by
  723. the largest possible number (all binary ones).  Hence when you add positive
  724. one and negative one you get zero (and carry out).  To convert a number to
  725. its negative value you must invert each digit using the NOT logical operator,
  726. and add one via carry in.  You can multiply two numbers by using a series of
  727. shifts and additions similar to long hand multiplication.  Finally you can
  728. divide two numbers by using a series of shifts and subtractions.
  729.  
  730. LOGIC GATES
  731.  
  732. We finally get to the good stuff.  It is time to start building circuits that
  733. can perform the various logical operations discussed above.  Circuits that
  734. perform logical operations are usually referred to as "Logic Gates."  We will
  735. start with the simplest circuit using diodes.  
  736.  
  737. Using only diodes and resistors we can build the AND and OR logic gates.  The
  738. sample circuits DIODEAND.DC and DIODEOR.DC illustrate these logic gates.  In
  739. these circuits the switches are the inputs, where 5 Volts represents a TRUE
  740. value, and ground (0 Volts) represents a FALSE value.  
  741.  
  742. The DIODEAO.DC depicts a circuit with two ANDs and one OR logical operator
  743. that solve the following equation:
  744.  
  745.                 E = (A AND B) OR (C AND D)
  746.  
  747.                 where E is the output
  748.  
  749. This sample circuit illustrates some of the limitations to pure diode logic
  750. gates.  The first limitation is that the output voltage is not regenerated
  751. (reset to 0 or 5 Volts) after each logic gate, hence the TRUE output of the
  752. AND gate can be as little as 2.8 Volts, instead of 5 Volts as illustrated in
  753. the previous example.  The reduced voltage is due to the Resistor-Diode-
  754. Resistor circuit between the input diodes and the output stage.  To make
  755. matters worse, the TRUE output of the OR gate can be as little as 2.2 Volts. 
  756. The second limitation is that diode circuits cannot function as a logical NOT
  757. operator.
  758.  
  759. If we look back to the sample circuit of the NPN transistor (TRANNPN.DC), we
  760. see that a single transistor can perform the function of the logical NOT
  761. operator.  When the input is 5 Volts the output is 0 Volts, and vice versa.
  762. DTL
  763.  
  764. By combining the Diode AND circuit for input and the Transistor NOT circuit
  765. for output, we form the Diode-Transistor Logic (DTL) NAND gate, as depicted
  766. in the sample circuit DTLNAND.DC.  It was necessary to add a diode between
  767. the Diode AND input and the transistor output because the threshold voltage
  768. of the transistor and the diode is almost the same.  This diode protects
  769. against false triggering of the transistor.  This circuit has the advantage
  770. that the output voltage of each gate is always regenerated, so there is no
  771. limit to how many gates can be connected in series. 
  772.  
  773. By removing one of the input diodes, the NAND gate now functions as a NOT
  774. gate (or Inverter).  The DTLNOT.DC sample circuit illustrates the NOT gate. 
  775. The PLTDTL.DC sample circuit allows you to vary the input voltage to see how
  776. this circuit responds.  If you use the "p" command, you can plot the voltage
  777. at each node as the input voltage varies from 0 Volts to 5 Volts.  When the
  778. input is approximately 0.6 Volts, the output of the logic gate will change.
  779.  
  780. The logic AND gate can be formed by combining the NAND gate with the NOT
  781. gate.  It is not necessary to use diodes in the internal NOT gate, when a
  782. single transistor will suffice.  The sample circuit DTLAND.DC illustrates
  783. this circuit.
  784.  
  785. The DTL OR gate does not use the Diode OR gate as an input stage.  If a Diode
  786. OR was used, current would be allowed to flow through the input stage into
  787. the remainder of the circuit.  The DTL NAND gate isolates the input current
  788. from the remainder of the circuit.  To provide the same isolation for the DTL
  789. OR gate, the OR gate is created using three NOT gates and an AND gate as
  790. defined by DeMorgan's theorem:
  791.  
  792.                 A OR B = NOT ( (NOT A) AND (NOT B) )
  793.  
  794. Two DTL NOT gates are used as an input stage, and the transistors' Collectors
  795. and Emitters are tied together to form an AND gate.  A third DTL NOT gate (a
  796. single transistor) is used for the output stage.  The final NOT gate is
  797. required to provide a consistent output voltage independent of whether one or
  798. both inputs are in the On position.  The sample circuit DTLOR.DC illustrates
  799. this circuit.
  800.  
  801. By adding another NOT gate to the output stage of the OR gate, we form the
  802. DTL NOR gate as illustrated in the DTLNOR.DC sample circuit.
  803.  
  804. Finally, the Exclusive OR (XOR) gate is illustrated in the DTLXOR.DC sample
  805. circuit, and uses the DTL AND, OR, and NAND gates to solve the Exclusive OR
  806. equation discussed earlier.  The traditional icons for the AND, OR, and NAND
  807. gates are used in this program.  If you press the F1 key, a full screen help
  808. message will appear identifying the icons used for logical gates.
  809.  
  810. TTL
  811.  
  812. This brings us to the next family of logic gates called Transistor-Transistor
  813. Logic (TTL).  The original TTL logic circuits used a multiple Emitter
  814. transistor for input, and a pair of transistors arranged one above the other
  815. for output.  The upper transistor is only On when the output is TRUE, and the
  816. lower transistor is only On when the output is FALSE.   This output
  817. configuration of transistors is referred to as the "Totem-Pole" output.  The
  818. multiple Emitter transistor, which could only be manufactured in an
  819. Integrated Circuit (IC) chip, performs the same basic function as the Diode
  820. AND gate used in the DTL NAND gate.  Today's TTL circuits actually use diodes
  821. for their input stage, just like the DTL circuits.  For this reason, the
  822. sample TTL circuits in this program use diodes for input, instead of the
  823. multiple Emitter transistor.  However, the rest of the TTL circuit is
  824. characteristic of the original TTL circuits.
  825.  
  826. The sample circuits TTLNOT.DC, TTLNAND.DC, and TTLAND.DC depict the TTL NOT,
  827. NAND and AND logic gates.  Notice that the TRUE output is not 5 Volts, but
  828. 3.7 Volts.  The PLTTTL.DC sample circuit is configured with a potentiometer
  829. for input and the voltage at each node can be plotted using the "p" option.
  830.  
  831. The sample circuits TTLOR.DC and TTLNOR.DC illustrate the TTL OR and NOR
  832. gates.  The input stage of these circuits are similar to the corresponding
  833. DTL input stages, and the output stage contains the standard TTL totem-pole
  834. output.
  835.  
  836. The Exclusive OR (XOR) gate is illustrated in the TTLXOR.DC sample circuit,
  837. and uses the TTL AND, OR, and NAND gates to solve the Exclusive OR equation
  838. discussed earlier.
  839.  
  840. In addition to the standard logic gates, TTL circuits offer a three state
  841. gate that can turn Off both transistors in the totem-pole output stage. 
  842. Three state gates are typically used when the output of many gates are
  843. connected to a bus, and only one gate is permitted to be active at a time. 
  844. The TTL3NOT.DC sample circuit is an example of a TTL three state gate.  The
  845. top switch is connected to the data input.  Only when the bottom switch is
  846. Off, will the output be enabled.
  847.  
  848. In general, TTL circuits are faster than DTL circuits.  Over the years
  849. several variations of TTL circuits have evolved.  These variations include
  850. Low-power (L), Schottky (S), Low-power Schottky (LS), and Advanced Low-power
  851. Schottky (ALS or F) circuits.  Of these variations, the LS series is the most
  852. commonly available since it is faster, cheaper, and requires less power than
  853. the original TTL circuits.
  854.  
  855. The Low-power Schottky (LS) series employs surface barrier diodes called
  856. "Schottky Diodes" between the Base and Collector junction of each transistor
  857. preventing the transistor from fully saturating (fully turned On).  By not
  858. fully saturating the transistor, it can switch from On to Off much faster. 
  859. These transistors are referred to as "Schottky Transistors" and are crudely
  860. depicted below:
  861.  
  862.                 ┌┐                              ┌┐
  863.                 │ / Collector                   │  / Emitter
  864.                 │/                              │ /
  865.         Base ───┤\                      Base ───┤└
  866.                 │ \                             │\
  867.                 │  ┘ Emitter                    │ \ Collector
  868.                └┘                              └┘
  869.  
  870.                NPN                             PNP
  871.  
  872. The SCHOTTKY.DC sample circuit illustrates the Schottky transistor and its
  873. equivalent circuit.  The input stage of the LS series gates use Schottky
  874. diodes instead of conventional diodes or multiple Emitter transistors.  In
  875. addition, the LS series uses Schottky diodes for negative input voltage
  876. protection.  The LSNOT.DC sample circuit depicts a typical LS series NOT
  877. gate.  (I apologize for the use of conventional diodes instead of Schottky
  878. diodes in this example).  The PLTLS.DC sample circuit is configured with a
  879. potentiometer for input and the voltage at each node can be plotted using the
  880. "p" option.
  881.  
  882. ECL
  883.  
  884. The last family of logic gates that use bipolar transistors is called
  885. Emitter-Coupled Logic (ECL).  ECL gates maintain a partial current in each
  886. transistor preventing them from saturating or turning Off.  This makes ECL
  887. gates the fastest logic gates on the market.  Also, the difference in voltage
  888. between TRUE and FALSE, is approximately 1 Volt.  The typical ECL circuit
  889. consists of a differential amplifier input stage, a bias circuit, and an
  890. Emitter-follower output.  Traditional ECL circuits operate using ground and
  891. -5.2 Volts for power supply.  However, they can operate at 5 Volts and ground
  892. like other logic gates.  All the sample circuits in this program use the
  893. 5 Volts and ground power supply for ECL logic gates.
  894.  
  895. The basic ECL gate is an OR-NOR gate, which is characterized by a dual
  896. complementary output.  The ECLORNOR.DC sample circuit illustrates this logic
  897. gate.  You may notice that an input device labeled "ECL" is inserted between
  898. the switch and the circuit input.  This device consists of three resistors
  899. and is required to convert 5 Volts and ground from a switch to input voltages
  900. that are compatible with ECL circuits.  If this circuit was not installed,
  901. the ECL node voltages would not be characteristic of ECL circuits.  In
  902. addition to the switch-to-ECL input device, 47 Kilohms resistors are added to
  903. the output stage to provide a reference necessary to calculate the output
  904. voltage.
  905.  
  906. The ECLNOT.DC sample circuit illustrates the simplest of the ECL circuits,
  907. with a single input and the traditional dual complementary outputs.  The
  908. PLTECL.DC sample circuit, is the same NOT gate, but with a potentiometer for
  909. input to illustrate the effects of varying the input voltage, on the output
  910. voltage.
  911.  
  912. The ECL AND-NAND gate is derived using the OR-NOR gate as described by
  913. DeMorgan's theorem:
  914.  
  915.                  A AND B = (NOT A) NOR (NOT B)
  916.                 A NAND B = (NOT A) OR (NOT B)
  917.  
  918. The ECLNAND.DC sample circuit illustrates the ECL AND-NAND gate.  Both input
  919. stages start with a switch, followed by a switch-to-ECL converter, followed
  920. by an ECL NOT gate.  The outputs of the OR-NOR gate must be reversed, since
  921. the NOR output (top) becomes the AND output, and the OR output (bottom)
  922. becomes the NAND output.
  923.  
  924. The ECL Exclusive OR gate also has dual complementary outputs and is
  925. constructed using only NOT and OR-NOR gates.  You must reverse the OR-NOR
  926. gate outputs, since OR becomes NXOR, and NOR becomes XOR.  The sample circuit
  927. ECLXOR.DC illustrates this circuit which can also be represented by the
  928. logical equation:
  929.  
  930.                 A XOR B = (A NOR B) NOR ( (NOT A) OR (NOT B) )
  931.  
  932. ECL gates are the fastest logic gates on the market, but they also require
  933. the most power.  Hence, it is difficult to pack a lot of ECL gates on a
  934. single integrated circuit chip without overheating the chip.
  935.  
  936. CMOS
  937.  
  938. The last family of logic gates I will discuss are called Complementary Metal
  939. Oxide Semiconductors (CMOS).  The term complementary refers to the use of two
  940. types of transistors in the output circuit in a configuration similar to the
  941. totem-pole output in TTL.  The PMOS transistor is on top, and the NMOS
  942. transistor is on the bottom.  The CMOSNOT.DC sample circuit illustrates the
  943. NOT gate, which is the simplest of the CMOS gates.  The PLTCMOS.DC sample
  944. circuits illustrates the effects of varying input voltage on this gate.
  945.  
  946. The CMOS NAND gate consists of four transistors, two PMOS transistors in
  947. parallel, and two NMOS transistors in series, as illustrated by the
  948. CMOSNAND.DC sample circuit.  Both NMOS transistors must be On for the output
  949. to be FALSE (0 Volts).  The CMOS AND gate is the same circuit followed by a
  950. CMOS NOT gate as illustrated in the CMOSAND.DC sample circuit.
  951.  
  952. The CMOS NOR gate also consists of four transistors, however the two PMOS
  953. transistors are in series, and the two NMOS transistors are in parallel, as
  954. illustrated CMOSNOR.DC sample circuit.  Both PMOS transistors must be On for
  955. the output to be TRUE (5 Volts).  The CMOS OR gate is the same circuit
  956. followed by a CMOS NOT gate as illustrated in the CMOSOR.DC sample circuit.
  957.  
  958. The CMOS Exclusive OR gate is similar to the DTL and TTL Exclusive OR gates,
  959. except it uses CMOS AND, NAND, and OR gates as illustrated in the CMOSXOR.DC
  960. sample circuit.
  961.  
  962. CMOS circuits can operate using a wide variety of power supply voltages. 
  963. Since the threshold voltage for the PMOS and NMOS transistors is 2 Volts, the
  964. minimum power supply that CMOS circuits can use is 3 Volts.  On the other
  965. hand, the power supply can be as large as 15 Volts.  This makes battery
  966. driven circuits very practical, since the circuits will continue to operate
  967. as the battery gradually runs down.
  968.  
  969. CMOS gates are characterized by requiring very little power because the MOS
  970. transistors use voltage to trigger, instead of current.  The same reason that
  971. explains their low power consumption, also explains why CMOS gates are the
  972. slowest logic gates (when the transistors are physically the same size as the
  973. bipolar transistors in the previous logic families).  The speed of a circuit
  974. is limited by the size and spacing of the components, and the speed of light. 
  975. The speed of the electrons flowing through a circuit approaches the speed of
  976. light, which is the theoretical speed limit.  However, today's CMOS
  977. technology use very small transistors, with very thin insulators between the
  978. Gate and Base of the transistor, and the Gates are now made out of
  979. semiconductor material instead of aluminum metal.  Therefore today's CMOS
  980. logic gates can be fast.  Because of their low power consumption, they can be
  981. more densely packed on an integrated circuit chip.  As an example, the Intel
  982. 486 CPU is based on CMOS technology, contains more than a million transistors
  983. on a single chip, and can operate at speeds up to 66 MHz (million
  984. cycles/second).
  985.  
  986. INTEGRATED CIRCUITS (IC)
  987.  
  988. After the invention of semiconductors, the next major invention was the
  989. Integrated Circuit (IC) chip, which places multiple semiconductor components
  990. on a single semiconductor wafer.  An entire circuit constructed of resistors,
  991. capacitors, diodes, and transistors can be etched on to a single chip.  All
  992. the components are made from semiconductor P-type and N-type material, and
  993. are connected together with a metal conductor, like aluminum.  The resistor
  994. can be made of either P-type or N-type material.  By varying the thickness of
  995. this material and by winding it back and forth in a small area, different
  996. resistance values can be achieved.  Diodes are formed by the junction of
  997. P-type and N-type material.  Capacitors are typically reverse biased diodes,
  998. which are characterized by small reverse biased threshold voltages.  NPN
  999. bipolar transistors are constructed by embedding N-type material for both the
  1000. Emitter and the Collector into a P-type Base.  (To make PNP transistors,
  1001. replace N-type with P-type and vice versa).  CMOS transistors are similar to
  1002. bipolar transistors, except there is a metal or semiconductor (P-type or N-
  1003. type) Gate over the Base of the transistor separated by a thin insulator of
  1004. SiO2 (glass).
  1005.  
  1006. The original ICs only contained a few components, possibly a single logic
  1007. gate.  As the technology improved, the components became smaller, and more
  1008. gates were placed on a single chip.  Eventually the ability to dissipate the
  1009. heat became the limiting factor.  Using today's CMOS technology, over a
  1010. million transistors can be placed on a single IC chip.
  1011.  
  1012. In the DC Circuit Analysis program, the term "Integrated Circuit" (IC) takes
  1013. on a slightly different meaning.  The DC Circuit Analysis library contains
  1014. both basic components (like resistors, diodes, and transistors) and
  1015. Integrated Circuits (like DTL NOT, TTL NAND, and CMOS NOR gates), which are
  1016. circuits created using the DC Circuit Analysis program, saved in a file with
  1017. a "DCL" extension, and referenced in the library.  The DC.DCL file contains
  1018. all the parameters and screen locations for each item in the library.  (See
  1019. the section below that describes this file format).  Each IC is stored in a
  1020. separate file.  As an example, the DTL NOT gate is stored in the file
  1021. DTLNOT.DCL located in the DCL sub-directory.  You can view this circuit using
  1022. the following command:
  1023.  
  1024.                 DC DCL\DTLNOT.DCL R
  1025.  
  1026. You will notice that there is no power supply, no switches for input, and all
  1027. the nodes are set to 2.5 Volts (the default starting voltage for
  1028. calculational purposes).  The first nodes created correspond to the
  1029. connection points.  By convention, the connections are in the following
  1030. order: power supply, ground, inputs, and outputs.  DCL files are not always
  1031. easy to read, since they use the fewest number of nodes necessary for the
  1032. library.  Nodes can be moved around on the screen, but if you delete one of
  1033. the connection nodes, you cannot simply recreate it.  Since the order in
  1034. which the nodes were created is essential to maintain compatibility with the
  1035. DC.DCL file.  Please do not modify the DCL library files.
  1036.  
  1037. USER DEFINED ICs
  1038.  
  1039. Why did I discuss DCL files?  Because you can create your own circuits and
  1040. add them to the library.  The last eight icons in the library are reserved
  1041. for your use.  They are stored in the files DCL\U1.DCL through DCL\U8.DCL. 
  1042. The connection nodes are already created and organized on the screen in a
  1043. pattern matching the icon connection points.  All you have to do is add your
  1044. circuits to these files.  You can embed other Ics into your circuit, the only
  1045. limitation is the 100 total components which includes the components within
  1046. each IC and the IC icon itself.  You can move the nodes around the screen,
  1047. but please do not delete them.  If you make a mistake in your user defined IC
  1048. file, you can start all over by copying the DCL\USER.DCL file into the file
  1049. you were working on.  This file provides a good starting point.  Please do
  1050. not modify the DCL\USER.DCL file.
  1051.  
  1052. MISCELLANEOUS EXAMPLES
  1053.  
  1054. Let's look at some miscellaneous examples.  Since my primary intention of
  1055. writing this program was to introduce you to computer circuits, I will
  1056. discuss some common computer circuits.  Due to the limitation of 100
  1057. components and the computer overhead to analyze complex circuits, I can only
  1058. discuss a few simple circuits.  To reduce the time required to analyze these
  1059. circuits, only CMOS technology will be used for these sample circuits.
  1060.  
  1061. How does computer memory work?  The basis for all computer memory is the
  1062. Set-Reset (S-R) Latch, which consists of two NAND gates that are cross
  1063. connected.  The SRLATCH.DC sample circuit illustrates the S-R Latch.  This
  1064. circuits have two inputs and two outputs.  The output of the top NAND gate is
  1065. the normal output, and the output of the bottom NAND gate is the complemented
  1066. output.  The top switch Sets the latch to TRUE, when it is in the Off
  1067. position.  The bottom switch Resets the latch to FALSE, when it is in the Off
  1068. position.  When both switches are in the On position, the circuit "remembers"
  1069. what it was last set to.  However, both switches should not be in the Off
  1070. position, since both outputs (which are suppose to be opposites of each
  1071. other) will both become TRUE.
  1072.  
  1073. The Data Latch is an improvement on the Set-Reset Latch.  The DLATCH.DC
  1074. sample circuit illustrates the Data Latch.  This circuits consists of four
  1075. NAND gates, where the two NAND gates on the right form the familiar Set-Reset
  1076. Latch described above.  The top switch is the data input, and the bottom
  1077. switch is the enable input.  When the bottom switch is On, the input data is
  1078. stored in the latch.  When the bottom switch is Off, the input data is
  1079. ignored, and the circuit remembers its last setting.
  1080.  
  1081. The Data Flip-Flop is an example of a Master-Slave Flip-Flop.  It consists of
  1082. two latches connected in series and is illustrated in the FLIPFLOP.DC sample
  1083. circuit.  The first (Master) latch is a standard Data Latch as described
  1084. above.  The second (Slave) latch is a Set-Reset Latch with enable.  When the
  1085. enable input is On, the value of the Data input is stored in the first latch. 
  1086. When the enable input is Off, the value stored in the first latch is
  1087. transferred to the second latch.  Applications for Flip-Flops include binary
  1088. counters.
  1089.  
  1090. The next set of circuits I will discuss are adders.  I will start with the
  1091. Half-Adder.  This circuits adds two binary numbers together and has two
  1092. outputs: Sum and Carry.  The Half-Adder is a variation on the Exclusive OR
  1093. circuit.  The HALFADDR.DC sample circuit illustrates the Half-Adder, as
  1094. described by the following logical equations:
  1095.  
  1096.                   Sum = A XOR B
  1097.                 Carry = A AND B
  1098.  
  1099. The truth table for a Half-Adder is as follows:
  1100.  
  1101.                           ╔═══════╦════════════╗
  1102.                           ║ Input ║   Output   ║
  1103.                           ╟───┬───╫─────┬──────╢
  1104.                           ║ A │ B ║ Sum │ Carry║
  1105.                           ╠═══╪═══╬═════╪══════╣
  1106.                           ║ 0 │ 0 ║  0  │   0  ║
  1107.                           ║ 0 │ 1 ║  1  │   0  ║
  1108.                           ║ 1 │ 0 ║  1  │   0  ║
  1109.                           ║ 1 │ 1 ║  0  │   1  ║
  1110.                           ╚═══╧═══╩═════╧══════╝
  1111.  
  1112. The Full-Adder is essentially two Half-Adders in series.  The Full-Adder has
  1113. three inputs: A, B, and Carry (C) from the previous least significant digit. 
  1114. It also has two outputs: Sum and Carry.  Full-Adders can be connected in
  1115. series to handle larger numbers.  The FULLADDR.DC sample circuit illustrates
  1116. a Full-Adder, as described by the following logical equations:
  1117.  
  1118.                   Sum = (A XOR B) XOR C
  1119.                 Carry = (A AND B) OR (A AND C) OR (B AND C)
  1120.  
  1121. The truth table for a Full-Adder is as follows:
  1122.  
  1123.                         ╔═══════════╦════════════╗
  1124.                         ║   Input   ║   Output   ║
  1125.                         ╟───┬───┬───╫─────┬──────╢
  1126.                         ║ A │ B │ C ║ Sum │ Carry║
  1127.                         ╠═══╪═══╪═══╬═════╪══════╣
  1128.                         ║ 0 │ 0 │ 0 ║  0  │   0  ║
  1129.                         ║ 0 │ 0 │ 1 ║  1  │   0  ║
  1130.                         ║ 0 │ 1 │ 0 ║  1  │   0  ║
  1131.                         ║ 0 │ 1 │ 1 ║  0  │   1  ║
  1132.                         ║ 1 │ 0 │ 0 ║  1  │   0  ║
  1133.                         ║ 1 │ 0 │ 1 ║  0  │   1  ║
  1134.                         ║ 1 │ 1 │ 0 ║  0  │   1  ║
  1135.                         ║ 1 │ 1 │ 1 ║  1  │   1  ║
  1136.                         ╚═══╧═══╧═══╩═════╧══════╝
  1137.  
  1138. Due to limitations of this program, it is not practical to attempt to show
  1139. more complex logic circuits.  If you would like to learn more about computer
  1140. logic circuits, I recommend you invest in the "Logic Circuit Analysis"
  1141. program that I wrote.  It is cable of handling 1,000 logic gates, which is
  1142. enough to model an entire 4-bit Central Processing Unit (CPU).
  1143.  
  1144. Sometimes it is necessary to interface computer circuits to the outside
  1145. world.  The first circuit I will discuss is a Digital to Analog (D/A)
  1146. converter.  The simplest D/A consists of a resistor circuit.  The DTOA.DC
  1147. sample circuit is an example of a D/A.  The top switch is the most
  1148. significant digit and the bottom switch is the least significant digit.  If
  1149. you turn Off all the switches, and then turn only one switch On at a time,
  1150. you will notice that the top switch adds 2.5 Volts (½ the power supply
  1151. voltage), the second switch adds 1.25 Volts (¼ the power supply voltage), the
  1152. third switch 0.625 Volts, and the last switch 0.3125 Volts (or 1/16 the power
  1153. supply voltage).  This circuit can easily be interfaced with CMOS logic
  1154. gates, but not with the other family of logic gates.  That is because CMOS
  1155. logic is the only logic family with full 0 to 5 Volt output.
  1156.  
  1157. The next circuit is a CMOS Analog Switch.  The ANALOGSW.DC sample circuit
  1158. illustrates this circuit.  It uses a CMOS NOT circuit and a pair of MOS
  1159. transistors.  However, they are configured such that the switch can turn both
  1160. transistors On, or both Off.  When they are both On, they will provide a
  1161. small resistance allowing current to flow in either direction.  A typical use
  1162. of analog switches is to multiplex multiple analog signals into a single
  1163. Analog to Digital converter.
  1164.  
  1165. This brings us to Solid State Switches.  Sometimes it is necessary for a
  1166. digital circuit to control an electrical device, such as a light bulb, or a
  1167. motor.  The SSSW.DC and SSPOWSW.DC sample circuits illustrate solid state
  1168. switches capable of switching loads up to ½ Amp and 8 Amps respectively.  The
  1169. first circuit uses a 2N2222 transistor to switch up to a ½ Amp load, and the
  1170. second circuit adds a TIP100 power darlington to switch up to an 8 Amp load. 
  1171. The 100 ohm resistor represents the load in both cases.  Higher voltages can
  1172. be controlled, but the resistor values must be changed and you will have to
  1173. use larger Wattage resistors.  (All resistors in this library are only rated
  1174. at ¼ Watts).  
  1175.  
  1176. The final sample circuit, SSRPOWSW.DC is a Solid State Reversible Power
  1177. Switch which uses four power darlingtons (two NPN and two PNP) for its
  1178. output.  This circuit can turn the load On and Off, as well as reverse the
  1179. power applied to the load.  The right switch is the On/Off switch, and the
  1180. left switch is the Forward/Reverse switch.  In this circuit each TTL AND gate
  1181. controls one 2N2222 transistor, which in-turn controls two power darlingtons,
  1182. one NPN and the other PNP, each located in opposite corners of the output
  1183. stage.  The TTL logic assures that all four darlingtons are not turned On at
  1184. the same time, but can all be turned Off.  If you intend to use this circuit
  1185. with a motor, you will have to add additional rectifiers and capacitors to
  1186. protect the circuit from the side effects of the motor.
  1187.  
  1188. I hope you enjoyed this tutorial and will continue to use this program to
  1189. explore other Direct Current (DC) circuits.  This program allows you to try
  1190. some circuits without actually building the circuit.
  1191.  
  1192. SPECIFICATIONS
  1193.  
  1194.         REQUIREMENTS
  1195.         ────────────
  1196.         IBM-PC or compatible computer
  1197.         800 Kb of disk space
  1198.         300 Kb minimum available RAM, (after DOS, drivers and TSR)
  1199.         350 Kb maximum available RAM required for complex circuits and no EMS
  1200.         EGA or VGA graphics adapter with 256 Kb of RAM installed
  1201.         Color Monitor
  1202.  
  1203.         SUPPORTS (but not required)
  1204.         ───────────────────────────
  1205.         Mouse (2 or 3 button) with mouse.sys or mouse.com device driver.
  1206.         Math coprocessor.  If one is installed, the program will run faster.
  1207.         Expanded Memory (EMS).  If 64 Kb EMS is available, it will be used.
  1208.  
  1209.         DOS ENVIRONMENTAL VARIABLES
  1210.         ───────────────────────────
  1211.         TMP     Sets location of DC.PCX and DC.DC file, otherwise written to
  1212.                 the default directory.
  1213.                 Example: SET TMP=D:\
  1214.  
  1215.         MONITOR Can be set to EGA or VGA.  The program will automatically
  1216.                 detect if an EGA or VGA adapter is installed.  The MONITOR
  1217.                 variable will override the automatic detection.
  1218.                 Example: SET MONITOR=EGA
  1219.  
  1220.         EMS     Can be set to OFF or NO to override auto-detection so not to
  1221.                 use EMS memory even if it is available.
  1222.                 Example: SET EMS=OFF
  1223.  
  1224.         DC_DV   Used to override the convergence criteria.  If it takes a
  1225.                 long time to display calculation results, you may want to set
  1226.                 this variable to 0.01.  This will speed up the program but
  1227.                 reduce the accuracy of the results.  
  1228.                 Example: SET DC_DV=0.01
  1229.  
  1230.         DC_PLOT Used to override the potentiometer increments used during
  1231.                 plotting.  This value may range from 1% to 5%.
  1232.                 Example: SET DC_PLOT=5
  1233.  
  1234.  
  1235.         PROGRAM LIMITS
  1236.         ──────────────
  1237.         112 Library Entries
  1238.         100 Components per circuit, including ICs and their components
  1239.         250 Nodes per circuit
  1240.         750 Connections per circuit
  1241.           8 User Definable Circuits
  1242.           8 Connection terminals per IC
  1243.           5 Connections per node.
  1244.  
  1245. SUMMARY OF KEYS
  1246.  
  1247.         TUTORIAL SCREEN
  1248.                 Cursor Keys - Highlight the desired keyword
  1249.                 ENTER - Select the highlighted keyword
  1250.                 PGDN - Display next screen
  1251.                 PGUP - Display previous screen
  1252.                 F1 - Display opening tutorial screen
  1253.                 ESC - Exit tutorial
  1254.  
  1255.         OPENING MENU
  1256.                 Cursor Keys - Highlight the desired item
  1257.                 HOME - Highlight "Analyze Circuit"
  1258.                 END - Highlight "Exit"
  1259.                 F5 - Display tutorial
  1260.                 ENTER - Select the highlighted item
  1261.  
  1262.         SELECT SAMPLE CIRCUIT MENU
  1263.                 PGUP, PGDN - Display additional pages of sample circuits
  1264.                 Cursor Keys - Highlight the desired sample circuit
  1265.                 HOME - Highlight the first sample circuit on this page
  1266.                 END - Highlight the last sample circuit on this page
  1267.                 ENTER - Select the highlighted sample circuit
  1268.                 ESC, F10 - Exit this menu without selecting a sample circuit
  1269.  
  1270.         ANALYZE CIRCUIT
  1271.                 LEFT and RIGHT - Highlight Adjustable Component
  1272.                                  (Switch or Potentiometer)
  1273.                 Switch:
  1274.                         UP, PGUP, HOME - Set to up position
  1275.                         DOWN, PGDN, END - Set to down position
  1276.                         ENTER - Toggle Switch
  1277.                 Potentiometer:
  1278.                         HOME - Set to 99%
  1279.                         ENTER, PGUP - Increment by 10%
  1280.                         UP - Increment by 1%
  1281.                         DOWN - Decrement by 1%
  1282.                         PGDN - Decrement by 10%
  1283.                         END - Set to 1%
  1284.                 F5 - Display tutorial
  1285.                 F6 - Edit circuit
  1286.                 p - Plot node voltage vs. potentiometer voltage
  1287.                 w - Save screen into PC Paintbrush compatible file
  1288.                 F10, ESC - Exit 
  1289.  
  1290.         MODIFY CIRCUIT
  1291.                 F1 - Help (Second F1 for full screen help)
  1292.                 F2 - Redraw screen
  1293.                 F3 - Move a Component (Node or IC)
  1294.                 F4 - Access Library of Components 
  1295.                 F5 - Display tutorial
  1296.                 F6 - Analyze circuit
  1297.                 Cursor Keys - Move Cursor
  1298.                 CTRL-BACKSPACE - Delete Component (Node or IC)
  1299.                 ENTER - Make a Connection, or Lock Component in position
  1300.                 F10, ESC - Exit
  1301.         LIBRARY OF COMPONENTS
  1302.                 F1 - Help (Second F1 for full screen help)
  1303.                 Cursor Keys - Highlight Component (Node or IC)
  1304.                 PGUP, PGDN - Switch Pages of Library Components
  1305.                 ENTER - Select Component
  1306.                 F10, ESC - Exit
  1307.  
  1308. LIBRARY
  1309.  
  1310. The Library is based on the following components:
  1311. Resistors are standard values, ¼ Watts, 5% carbon resistors
  1312. Potentiometers are linear and are rated at 2 Watts
  1313. Diodes are 1N914 high speed switching Diodes (10 mA)
  1314. NPN Transistors are 2N2222 500 mA, with Hfe = 150
  1315. PNP Transistors are 2N2904 500 mA, with Hfe = 150
  1316. NPN Darlingtons are TIP100 8 Amp, with Hfe = 2000
  1317. PNP Darlingtons are TIP105 8 Amp, with Hfe = 3000
  1318. PMOS and NMOS transistors are standard CMOS transistors
  1319. ICs are circuits created using the DC Circuit Analysis program and made
  1320. available in the library.
  1321.  
  1322. The Library contains the following items:
  1323.  
  1324. Type                    Description
  1325. ─────   ───────────────────────────────────────────────
  1326. INODE   Interconnect Node
  1327. VNODE   Fixed Voltage Node,   0 Volts (Ground)
  1328. VNODE   Fixed Voltage Node,   5 Volts
  1329. VNODE   Fixed Voltage Node,  -5 Volts
  1330. VNODE   Fixed Voltage Node,  10 Volts
  1331. VNODE   Fixed Voltage Node, -10 Volts
  1332. SNODE   Switch Node,          5 Volts and   0 Volts (Ground)
  1333. SNODE   Switch Node,         10 Volts and -10 Volts
  1334.  
  1335. R       Resistor,           100 Ohms, ¼ Watts
  1336. R       Resistor,           130 Ohms, ¼ Watts
  1337. R       Resistor,           240 Ohms, ¼ Watts
  1338. R       Resistor,           470 Ohms, ¼ Watts
  1339. R       Resistor,           750 Ohms, ¼ Watts
  1340. R       Resistor,         1,000 Ohms, ¼ Watts
  1341. R       Resistor,         1,600 Ohms, ¼ Watts
  1342. R       Resistor,         2,000 Ohms, ¼ Watts
  1343.  
  1344. R       Resistor,         3,000 Ohms, ¼ Watts
  1345. R       Resistor,         3,900 Ohms, ¼ Watts
  1346. R       Resistor,         4,700 Ohms, ¼ Watts
  1347. R       Resistor,            10 Kilohms, ¼ Watts
  1348. R       Resistor,            20 Kilohms, ¼ Watts
  1349. R       Resistor,            47 Kilohms, ¼ Watts
  1350. R       Resistor,           100 Kilohms, ¼ Watts
  1351. R       Resistor,         1,000 Kilohms, ¼ Watts
  1352.  
  1353. R       Resistor,           100 Ohms, ¼ Watts
  1354. R       Resistor,           130 Ohms, ¼ Watts
  1355. R       Resistor,           240 Ohms, ¼ Watts
  1356. R       Resistor,           470 Ohms, ¼ Watts
  1357. R       Resistor,           750 Ohms, ¼ Watts
  1358. R       Resistor,         1,000 Ohms, ¼ Watts
  1359. R       Resistor,         1,600 Ohms, ¼ Watts
  1360. R       Resistor,         2,000 Ohms, ¼ Watts
  1361. R       Resistor,         3,000 Ohms, ¼ Watts
  1362. R       Resistor,         3,900 Ohms, ¼ Watts
  1363. R       Resistor,         4,700 Ohms, ¼ Watts
  1364. R       Resistor,            10 Kilohms, ¼ Watts
  1365. R       Resistor,            20 Kilohms, ¼ Watts
  1366. R       Resistor,            47 Kilohms, ¼ Watts
  1367. R       Resistor,           100 Kilohms, ¼ Watts
  1368. R       Resistor,         1,000 Kilohms, ¼ Watts
  1369.  
  1370. POT     Potentiometer,       1 Kilohms, 2 Watts
  1371. POT     Potentiometer,      10 Kilohms, 2 Watts
  1372. DIODE   Switching Diode,  1N914 10 milliamps
  1373. DIODE   Switching Diode,  1N914 10 milliamps
  1374. DIODE   Switching Diode,  1N914 10 milliamps
  1375. DIODE   Switching Diode,  1N914 10 milliamps
  1376. PMOS    PMOS Transistor,  (CMOS) 10 milliamps
  1377. NMOS    NMOS Transistor,  (CMOS) 10 milliamps
  1378.  
  1379. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1380. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1381. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1382. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1383. NPN     NPN Darlington,   TIP100 8 Amps, Hfe=2000
  1384. NPN     NPN Darlington,   TIP100 8 Amps, Hfe=2000
  1385. PNP     PNP Darlington,   TIP105 8 Amps, Hfe=3000
  1386. PNP     PNP Darlington,   TIP105 8 Amps, Hfe=3000
  1387.  
  1388. IC      Integrated Circuit,    DTLNOT.DCL,   DTL Inverter (NOT)
  1389. IC      Integrated Circuit,    TTLNOT.DCL,   TTL Inverter (NOT)
  1390. IC      Integrated Circuit,    CMOSNOT.DCL,  CMOS Inverter (NOT)
  1391. IC      Integrated Circuit,    ECLNOT.DCL,   ECL with Differential output
  1392. IC      Integrated Circuit,    ECL116.DCL,   ECL Differential input & output
  1393. IC      Integrated Circuit,    ECLOR.DCL,    ECL 2-In OR/NOR
  1394. IC      Integrated Circuit,    ECLOR3.DCL,   ECL 3-In OR/NOR
  1395. IC      Integrated Circuit,    ECLAND.DCL,   ECL 2-In AND/NAND  
  1396.  
  1397. IC      Integrated Circuit,    DTLAND.DCL,   DTL 2-In AND
  1398. IC      Integrated Circuit,    DTLAND3.DCL,  DTL 3-In AND
  1399. IC      Integrated Circuit,    DTLOR.DCL,    DTL 2-In OR
  1400. IC      Integrated Circuit,    DTLOR3.DCL,   DTL 3-In OR
  1401. IC      Integrated Circuit,    DTLNAND.DCL,  DTL 2-In NAND
  1402. IC      Integrated Circuit,    DTLNAND3.DCL, DTL 3-In NAND
  1403. IC      Integrated Circuit,    DTLNOR.DCL,   DTL 2-In NOR
  1404. IC      Integrated Circuit,    DTLNOR3.DCL,  DTL 3-In NOR
  1405.  
  1406. IC      Integrated Circuit,    TTLAND.DCL,   TTL 2-In AND
  1407. IC      Integrated Circuit,    TTLAND3.DCL,  TTL 3-In AND
  1408. IC      Integrated Circuit,    TTLOR.DCL,    TTL 2-In OR
  1409. IC      Integrated Circuit,    TTLOR3.DCL,   TTL 3-In OR
  1410. IC      Integrated Circuit,    TTLNAND.DCL,  TTL 2-In NAND
  1411. IC      Integrated Circuit,    TTLNAND3.DCL, TTL 3-In NAND
  1412. IC      Integrated Circuit,    TTLNOR.DCL,   TTL 2-In OR
  1413. IC      Integrated Circuit,    TTLNOR3.DCL,  TTL 3-In NOR
  1414.  
  1415. IC      Integrated Circuit,    CMOSAND.DCL,  CMOS 2-In AND
  1416. IC      Integrated Circuit,    CMOSAND3.DCL, CMOS 3-In AND
  1417. IC      Integrated Circuit,    CMOSOR.DCL,   CMOS 2-In OR
  1418. IC      Integrated Circuit,    CMOSOR3.DCL,  CMOS 3-In OR
  1419. IC      Integrated Circuit,    CMOSNAND.DCL, CMOS 2-In NAND
  1420. IC      Integrated Circuit,    CMOSNND3.DCL, CMOS 3-In NAND
  1421. IC      Integrated Circuit,    CMOSNOR.DCL,  CMOS 2-In NOR
  1422. IC      Integrated Circuit,    CMOSNOR3.DCL, CMOS 3-In NOR
  1423.  
  1424. IC      Integrated Circuit,    DTLXOR.DCL,   DTL Exclusive OR
  1425. IC      Integrated Circuit,    TTLXOR.DCL.   TTL Exclusive OR
  1426. IC      Integrated Circuit,    CMOSXOR.DCL,  CMOS Exclusive OR
  1427. IC      Integrated Circuit,    ECLXOR.DCL,   ECL Exclusive OR/NOR
  1428. IC      Integrated Circuit,    ECLIN.DCL,    Switch to ECL Input
  1429. IC      Integrated Circuit,    DTOA.DCL,     Digital to Analog Converter
  1430. IC      Integrated Circuit,    SCHOTTKY.DCL, NPN Schottky Transistor
  1431. IC      Integrated Circuit,    SCHOTTKR.DCL, NPN Schottky Transistor
  1432.  
  1433. IC      Integrated Circuit,    User.DCL,     Reserved
  1434. IC      Integrated Circuit,    User.DCL,     Reserved
  1435. IC      Integrated Circuit,    User.DCL,     Reserved
  1436. IC      Integrated Circuit,    User.DCL,     Reserved
  1437. IC      Integrated Circuit,    User.DCL,     Reserved
  1438. IC      Integrated Circuit,    User.DCL,     Reserved
  1439. IC      Integrated Circuit,    User.DCL,     Reserved
  1440. IC      Integrated Circuit,    User.DCL,     Reserved
  1441.  
  1442. IC      Integrated Circuit,    U1.DCL,       User Defined IC
  1443. IC      Integrated Circuit,    U2.DCL,       User Defined IC
  1444. IC      Integrated Circuit,    U3.DCL,       User Defined IC
  1445. IC      Integrated Circuit,    U4.DCL,       User Defined IC
  1446. IC      Integrated Circuit,    U5.DCL,       User Defined IC
  1447. IC      Integrated Circuit,    U6.DCL,       User Defined IC
  1448. IC      Integrated Circuit,    U7.DCL,       User Defined IC
  1449. IC      Integrated Circuit,    U8.DCL,       User Defined IC
  1450.  
  1451. SAMPLE CIRCUITS
  1452.  
  1453. The following examples can be found in the \DC\DC sub-directory:
  1454.  
  1455. Filename                        Description
  1456. ───────────     ───────────────────────────────────────────────
  1457. ANALOGSW.DC     CMOS Analog Switch
  1458. CMOSAND.DC      CMOS 2-In AND
  1459. CMOSNAND.DC     CMOS 2-In NAND
  1460. CMOSNOR.DC      CMOS 2-In NOR
  1461. CMOSNOT.DC      CMOS Inverter (NOT)
  1462. CMOSOR.DC       CMOS 2-In OR
  1463. CMOSXOR.DC      CMOS Exclusive OR
  1464. DIODE1.DC       Sample Diode Circuits
  1465. DIODE2.DC       Plot of Diode Circuit
  1466. DIODEAND.DC     2-In Diode AND
  1467. DIODEAO.DC      Two 2-In Diode AND, and One 2-In Diode OR
  1468. DIODEOR.DC      2-In Diode OR
  1469. DLATCH.DC       Data Latch
  1470. DTLAND.DC       DTL 2-In AND
  1471. DTLNAND.DC      DTL 2-In NAND
  1472. DTLNOR.DC       DTL 2-In NOR
  1473. DTLNOT.DC       DTL Inverter (NOT)
  1474. DTLOR.DC        DTL 2-In OR
  1475. DTLXOR.DC       DTL Exclusive OR
  1476. DTOA.DC         Digital to Analog Converter
  1477. ECLNAND.DC      ECL 2-In AND/NAND
  1478. ECLNOT.DC       ECL Driver with Differential Output
  1479. ECLORNOR.DC     ECL 2-In OR/NOR
  1480. ECLXOR.DC       ECL Exclusive OR
  1481. FLIPFLOP.DC     Data Flip-Flop
  1482. FULLADDR.DC     Full Adder
  1483. HALFADDR.DC     Half Adder
  1484. LSNOT.DC        TTL Low-Power Schottky (LS) Inverter (NOT)
  1485. PLTCMOS.DC      Plot of CMOS Inverter (NOT)
  1486. PLTDTL.DC       Plot of DTL Inverter (NOT)
  1487. PLTECL.DC       Plot of ECL Driver with Differential Output
  1488. PLTLS.DC        Plot of TTL-LS Inverter (NOT)
  1489. PLTTTL.DC       Plot of TTL Inverter (NOT)
  1490. RESIST1.DC      Sample Resistor Circuits
  1491. RESIST2.DC      Sample Potentiometer Circuit
  1492. RESIST3.DC      A very complex resistor network
  1493. SCHOTTKY.DC     NPN Schottky Transistor
  1494. SRLATCH.DC      Set-Reset Latch
  1495. SSPOWSW.DC      8 Amp Solid State Switch
  1496. SSRPOWSW.DC     8 Amp Reversible Solid State Switch
  1497. SSSW.DC         ½ Amp Solid State Switch
  1498. TRANDNPN.DC     NPN Darlington
  1499. TRANDPNP.DC     PNP Darlington
  1500. TRANNMOS.DC     NMOS Transistor
  1501. TRANNPN.DC      NPN Transistor
  1502. TRANPMOS.DC     PMOS Transistor
  1503. TRANPNP.DC      PNP Transistor
  1504. TTL3NOT.DC      TTL Three State Inverter
  1505. TTLAND.DC       TTL 2-In AND
  1506. TTLNAND.DC      TTL 2-In NAND
  1507. TTLNOR.DC       TTL 2-In NOR
  1508. TTLNOT.DC       TTL Inverter (NOT)
  1509. TTLOR.DC        TTL 2-In OR
  1510. TTLXOR.DC       TTL Exclusive OR
  1511.  
  1512. DC.DCL FILE FORMAT
  1513.  
  1514. DC.DCL contains the specifications for each library entry.  There is one line
  1515. for each entry as follows:
  1516.  
  1517. TYPE NL NC NP  --- Locations x y ---  --- Parameters ---
  1518.  
  1519. where TYPE is:
  1520.    INODE - Interconnection Node
  1521.    VNODE - Fixed Voltage Node
  1522.    SNODE - Switch Voltage Node
  1523.    R     - Resistor
  1524.    POT   - Potentiometer
  1525.    DIODE - DIODE
  1526.    PMOS  - P-channel CMOS transistor
  1527.    NMOS  - N-channel CMOS transistor
  1528.    NPN   - NPN bipolar transistor or darlington
  1529.    PNP   - PNP bipolar transistor or darlington
  1530.    IC    - Integrated Circuit - Stored in separate files
  1531.  
  1532. NL: Number of Locations
  1533. NC: Number of Connections must be less then or equal to NL
  1534. NP: Number of Parameters
  1535.  
  1536. --- Locations x y ---
  1537. Locations specified in x y pairs relative to upper left corner of icon.  The
  1538. first NC locations are the connections, any additional locations are for
  1539. Resistor current, Potentiometer % turns, or INODE Voltage labels.
  1540.  
  1541. --- Parameters --- 
  1542. The number and type of parameters depends on the TYPE as follows:
  1543.  
  1544. TYPE  NL NC NP           Locations                     Parameters        
  1545. ───── ── ── ──  ───────────────────────────   ───────────────────────────
  1546. INODE  2  1  0  connection, Voltage Label     none
  1547. VNODE  1  1  1  connection                    Fixed Voltage
  1548. SNODE  1  1  2  connection                    Up Voltage, Down Voltage 
  1549. R      3  2  2  First, Second, Amp Label      Resistance, Rated Wattage 
  1550. POT    4  3  2  Top, Bottom, Middle, % Label  Resistance, Rated Wattage 
  1551. DIODE  2  2  3  Plus, Negative                Vth, Amp, HiZ Resistance 
  1552. PMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1553. NMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1554. NPN    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1555. PNP    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1556. IC     ?  ? -1  +V, -V, Inputs, Outputs       dcl\filename.DCL
  1557.                 Up to Eight Connections
  1558.  
  1559. Integrated Circuits (ICs) files are stored in the \DC\DCL sub-directory.
  1560. ICs are all predefined DC Circuits that contain Components or other ICs.
  1561.  
  1562. DC AND DCL FILE FORMATS
  1563.  
  1564. Files with the extension "DC" are sample circuit files located in the DC sub-
  1565. directory.  Files with the extension "DCL" are library (IC) circuit files
  1566. located in the DCL sub-directory.  Both files contains circuit created by the
  1567. DC Circuit Analysis program, and have the same format:
  1568.  
  1569. The first line contains two numbers as follows:
  1570.  
  1571. NC NN
  1572.         where   NC = Number of Components or ICs
  1573.                 NN = Number of Nodes (Interconnect, Fixed, or Switch)
  1574.  
  1575. The next NC lines contains the components, one per line as follows:
  1576.  
  1577. LIB ROW COL N N1 N2 ...
  1578.         where   LIB = Library entry (0-111)
  1579.                 ROW = Screen row location of icon (0-299)
  1580.                 COL = Screen column location of icon (0-79)
  1581.                 N   = Number of connection terminals
  1582.                 N1, N2, ... = Node corresponding to each connection
  1583.                         Nodes are numbered starting with 100
  1584.  
  1585. The next NN lines contains the nodes, one per line as follows:
  1586.  
  1587. LIB ROW COL N  C1 CC1  C2 CC2 
  1588.         where   LIB = Library entry (0-111)
  1589.                 ROW = Screen row location of icon (0-299)
  1590.                 COL = Screen column location of icon (0-79)
  1591.                 N   = Number of connections
  1592.                 C1, C2, ... = Component (0-99), or Node
  1593.                 CC1, CC2, ... = Connection on component or Node C1, C2, ...
  1594.