home *** CD-ROM | disk | FTP | other *** search
/ Kids Cube / 7_Science.iso / dc13 / dc.doc < prev    next >
Text File  |  1994-04-01  |  89KB  |  1,735 lines

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