Digital systems: Gates and counters

Digital Systems. Gates and counters. -. . transparent cover ahd secured to the ~4-hAthick pami by thumbtacks (1). This panel forms the top of a box th...
0 downloads 0 Views 2MB Size
John T. Stock University of Connect~cut Storrs, 06268

Digital readouts, often encountered in laboratory instruments, have now been rendered commonplace by the emergence of cheap pocket calculators. Although the operating principles of such readouts can be fully explained in a specialized course on instrumentation, this approach is not possible when all "electronics and general instrumentation" have to be squeezed into an already crowded chemistry major curriculum. The best that can he done is a reasonable amount of lecture-demonstration ( I ) , backed up by a few laboratory exercises. Once the more obvious properties of diodes and transistors have been grasped, the way is open to make use of the various integrated-circuit devices (ICs) that greatly facilitate the buildup of instrument subassemblies. The various forms of "logic gates" are basic units in even the most sophisticated digital instruments (2, 3). In the transistor-transistor logic (TTL) svstem. the NAND gate is very common. The gate functioxk AND, OR, NOR, and EXCLUSIVE OR can be readily obtained by the simple interconnection of several NAND gates (4). Type MC7400 is a very common IC. The small package contains four complete 2-input NAND gates (5), so that a quite complex switching system can be easily assembled. Two MC74M) ICs and one NOR gate MC7402 IC are used in the unit shown in Figure 1. The artwork is drawn e DaDer. on 11 X 8 %in. t w i n . . which is ~rotectedbv a transparent cover ahd secured to the ~ 4 - h A t h i cpka m i by thumbtacks (1). This panel forms the top of a box that is approximately 2.5 in. high, and has a transparent Lucite bottom, so that the internal wiring can be seen. Small rubber feet are provided, so that sliding on the bench top cannot scratch the Lucite. The ICs are mounted on miniature 16-segment circuit boards1 (only 14 segments are used) and the various inputs and outputs are brought out to contact points of the gate "outlines." Each contact point is the shank of a 6-32 x %-in. machine screw, so that interconnections can be made with color-coded jumper cables (1). Two NAND

Digital Systems Gates and counters

c,

L f q ! @ = @

fit?.,, -. .5v (a) '.-., Ca

I -

(b)

. Fiaure 2. Circuit details (a1 power supply, (b) ''carry" indication. c,: C , l o 0 0 p F C2, 0.1 p F D, bridge rectifier, MPA 920A-1 or equivalent F, fuse % A. slow blow IC1, voltage regulator, LM335 or equivalent iC2, dual 4-input NAND gate N7420 (only one gate is used) P, Neon pilot lamp R,, R2 22 kohm R, 1.5 kohm R1 1 kohm T, transformer, 6.3 V output All transistors are 2N5129 or equivalent ~~

~

gates are used in conjunction with a single-pole doublethrow pushbutton switch to provide "bounceless" signals for counting, etc. (6). Contact points allow either a rising or a falling signal to he selected. There are two "ground contact" points, one of which has a flying lead with a black-covered miniature alligator clip. A similar lead with a red clip can supply +5 V through a current-limiting resistor. Two other color-coded flying leads operate miniature lamps LI and Lz through transistor lamp drivers (1). These leads are used to indicate the logic states at various points in the assemblies. A 5 V regulated power is contained within the unit. The simple arrangement, shown a t (a) in Figure 2, is made possible by the use of an IC voltage regulator LM335. This has internal overload protection, can supply a t least 600 mA, and can therefore drive equipment besides that incorporated in the "gate unit." In addition to a pair of take-off sockets, power is available a t a jack that accepts only a polarized plug. Apart from the synthesis of nonprovided gate functions, the unit permits the very rapid hook-up of other impor'tant logic devices. Typical are the simple and the clocked bistable multivihrator, data latch, monostable and astable multivibrators (7), and Schmitt trigger (8). A small auxiliary unit provides the voltage levels for switching the Schmitt trigger and has a plug to fit the jack on the main unit.

'Radio Shack, 2725 W. 7th St., Fort Worth, Texas 76107; Part Figure 1 . Unit for demonstrating electronic gates

no. 276-024. Volume 51, Number 5 , May 1974

/

357

in their normal state, both "reset to zero" wires and the "latch" wire from thecircuit hoard are grounded. Pressure on a pushbutton changes the connection from "ground" to "+5 V". For example, with neither button depressed, the BCD and decimal readouts may indicate 5 (i.e., 22 20) and 2, respectively. The BCD readout will respond to further signals, hut the decimal readout remains at 2. Depression of the DISABLE LATCH button causes the decimal readout to match that of the BCD readout. Latching (which need not be done manuallv!) enables a count to he displayed while further counting i ~ . ~ * o c e e d i n ~ . Although a single-decade counter is of little practical use, several of such counters can be cascaded, so that very large counts can he made. The 9 0 transition of the units decade is used to provide a "carry" signal to the tens decade, and so forth. The arrangement used to provide visual simulation of the "carry" operation is shown at ( b ) in Figure 2. The inputs of a 4-input NAND gate are connected to the "driver" side of the BCD readout lamps as shown. For simplicity only one BCD lamp driver X is depicted. When a lamp is "out," the supply voltage appears at the gate input. Only when all lamps are "out" (i.e., a t a count of zero) will all four gate inputs he "high," so that the gate output must therefore he "low." This situation causes noninverting lamp driver Y to turn on the "carry" lamp K. This lamp goes out as soon as the count changes from zero. There are three contact points in addition to the counter input. Tests with LI or Lz will show that these three points are normally "high." The grounding of the LAMP TEST point causes all seven segments of the decimal readout to light up, so that a count of 8 is shown. The original display returns when the point is ungrounded. This test has no effect on the BCD readout. The grounding of the BLANK OUT point completely extinguishes the decimal readout. If the grounding lead is removed and transferred to the BLANK IN point, a 1-9 count can be run, but a blank is obtained instead of a zero. A test will show that the now open BLANK OUT point remains high except when the count is zero (now blanked). Suppose that a multi-decade counter had received only a few input signals. Then the displayed readout might appear as OM)M)007. If the BLANK IN connection of the tens decade can be automatically grounded, then the zero of this decade will disappear and a "low" or apparent gmund will appear a t the BLANK OUT connection. If the latter is joined to the BLANK IN of the hundreds decade, and so forth, only "7" will he displayed. Although not included in the present unit, each decade may carry a "decimal point" sign. The circuitry is then arranged to blank all of these signs except the one that is applicable.

+

-

Figure 3. Counter u n t The usage of some of these devices in groups provides striking illustrations of the statement that "the whole can he greater than the sum of the parts." A single latch can hold only one "bit" of information. However, a group of four of such devices can store any number from zero to nine and still have "memory" to spare. Such a group is available as a single IC. Other ICs perform such complex functions as counting and decoding. T o carry out similar duties with discrete components would require dozens of transistors, diodes, and resistors, as well as a maze of interconnections. The much smaller amount of wiring made possible by the use of ICs can he further reduced by the use of a printed circuit hoard. This approach is used in the decade counter unit shown in Figure 3. The printed circuit hoard, three ICs, and decimal readout were purchased as a kit with full instruction^.^ The assembled counter is mounted on a box similar to that used for the "gate" unit, but the artwork sheet is only 8.5 x 6 in. In addition.to the specified wire connections that are made to the circuit board, additional connections are made to pins 2, 3, 6, and 7 of the N7475 quad latch IC. These are the B, C, D, and A inputs, respectively, and correspond to the binary decimal coded (BCD) signals 21, Z2, 25, and 20 that arrive from decade counter IC N7490. These additional connections operate four miniature lamps through lamp driven and allow the count to be displayed in BCD code. The "gate" unit is employed to supply power through the JACK outlet and to provide the 1 0 signal required for counting. Single-pole douhle-throw pushhuttons control zeroing and latch action. When these pushbuttons are

-

a Edmund

Scientific Co., 615 Edscop Building, Barrington, New

Jersey 08007; Catalog no. 41,760.

358

/ Journal of Chemical Educafion

Literature Cited 11) S t a h . J.T.. J.CHEM.EDUC.,49.516(19721. (21 Malmatadt, H. V., and Enke. C. G.,"Digital Eloetronits forseientists." W. A. Benjamin, hc..New York. 1963, p. 132. 131 Uiefmderfcr, A. 3.. "Principles of Eleetmnic Instrumentstion." W. B. Savnders Ca., Phiisdslphia. 1972. p. 360. 141 SeeRef.(2). p. 169. 15) Diefendufv. A. J.. "Bkpic Toehnigu*i in Elaetmoic Inatrumentation." W. B. SaundenCo., Philadelphia. 1972. p. TJ2. 161 See Ref. 12J,p. 227. 17) SeeRef.12). Pp. 169-195,213-220. 181 SeeRef. 15). pp. 323-325.