Transistor-Transistor Logic
Fondly Remembered

    Impossibly small: One day in the early 1970’s I was speaking with an acquaintance in the math department about a logic circuit for sequencing events in an experiment.  The circuit consisted of printed circuit boards, each roughly the size of an index card, and each containing a couple of AND or OR gates or a flip flop or other logic building block.  The inputs of each gate were diodes, which connected to an amplifier, so that the output represented the desired logical combination of inputs, and was capable of driving a few other inputs.  At least that’s how I remember or imagine it was.  Unfortunately I do not have a photo or schematic of these devices.

7400 Quad 2-input NAND    After I described my project, the math guy said something like, “have you considered using TTL?”  I had no idea what he was talking about and asked him to explain. When he described a chip the size of an insect, my first thought was that TTL would be too fragile to use for the project. Surely something that small could not possibly be as durable as a printed circuit board. However, I decided to check out the devices just in case. Of course, as it turned out TTL was more robust than the circuits I had been using.  Furthermore, it didn’t matter
much if a chip were to burn out—just grab another.

    For a short while I struggled with inverting my thinking because the old circuits were all positive-logic, with the occasional explicit NOT sprinkled here or there, whereas with TTL ‘not AND
and not ORseemed more common or natural, and in fact the resulting circuits consumed fewer gates for the equivalent multi-gate function, or so it seemed.  During this phase, De Morgan’s rules (or laws) took on more vivid meaning than they had in algebra class.

    Obsolescence: Within two or three years of my initial exposure to TTL a momentous event occurred: the first so-called microcomputer was introduced to the world. This changed everything, not immediately, but within a short time. Around 1977 or
78, Heathkit offered a small single-board computer based on the Motorola 6800 CPU. The Heathkit device had 256 bytes of memory, buffered I/O, and an integrated breadboard.  In a sense this beautiful little kit anticipated Raspberry Pie and Arduino by decades. As soon as I was able to acquire one of these Heathkit boards I set about to reproduce the TTL-based experimental control circuits as 6800 programs. This effort was a great deal less time-consuming than TTL had been. In short, it rendered most TTL-based projects obsolete, in relation to my objectives at the time.

    Experimenting with the Heathkit board led to an insight, maybe an epiphany. Logic circuits of the simple kind that interested me would henceforth be computer programs, not hardware. TTL had been great fun, and amazingly inexpensive, not counting the investment of time. However, software triumphed in all respects
—well, programming was equally fun and infinitely more flexible! Programs not only required less time but also scaled better.  After the 1970s I did nothing with TTL for the next 35+ years.

    Nostalgia: One could hardly wish for a more satisfying experience than to have been a minor participant or
bystander in the information technology explosion that followed the introduction of microcomputers in the 1970’s. What was once the Pennywhistle 103 is now the “Internet of Everything.” How amazing is that?!  And yet those first steps were special in some way. They turned into memories of a uniquely positive kind. Recently I wondered if it might be fun to refresh some of these memories by revisiting TTL. Initially I wasnt sure if TTL chips were still available. —They are, and theyre still inexpensive, probably cheaper than they were back then, especially when corrected for inflation.  

    No sooner had I thought of revisiting TTL than I learned about another new thing: virtual TTL. This discovery was not the surprise that TTL had been in the distant past. I had previously tinkered a little with signal processing circuit examples in GNU Radio.  It was therefore not surprising that searching the Internet for ‘virtual breadboard
and TTL simulator produced several interesting hits, including the program Logisim.

    It is possible to design and test a simple logic circuit
using the software application called Logisim, without actually building it. For all I know it may be possible to design and exercise a quite complicated circuit. But my initial interest was only to simulate some simple thing, a ‘Hello world’ for TTL, so-to-speak.  To that end I made up an exercise, based on the TV quiz program Jeopardy. The exercise or problem was to simulate one or more features of the contestants’ signaling devices (push buttons). In so far as I understand the TV programs rules, devices are not active until the clue has been fully presented, and after one contestants button press has been detected the other contestants buttons are disabled. There may be more to it than that, but it was these rules (primarily the latter) that I set about to encode as a Logisim exercise.

TTL Exercise - Rev 3

    The diagram above is the third revision of the circuit that I constructed. Connections or wires that are logically true (high or enabled) are light green, while false or low wires are dark green. Thus, in the reset state (left)
—corresponding to the clue presentation phasethe signal device is prevented from changing the 4-input NAND’s output. Logisim circuits are saved as XML specifications with the file extension .circ. The exercise circuit shown above can be downloaded (or copied and pasted) from here. The reason I am showing a revision, rather than the first design is that this revision is the first that I was able to make work as an actual circuit as well as a simulation. But I am getting ahead of the story.

    Misadventure: Instead of ordering the very few chips that were needed to construct the original TTL exercise, I ordered a ‘grab bag’.  In my imagining, a grab bag would contain at least 3 or 4 each of the most common chips (74xx where xx stands for mainly low numbers) and maybe an equal number of esoteric circuits. However, to my disappointment, the assortment consisted of a small quantity of 14-pin DIP chips and many more special-purpose circuits. Nevertheless, there seemed to be a way to proceed.  I found one 7440 (dual 4-input NAND with buffered output) and one 7410 (triple 3-input NAND).  I only needed three 4-input NAND gates and could wire the 7410 as one of them. (Two 3-input NANDs can be configured as one 4- or 5-input AND. The middle gate in the 3-gate diagram below functions as an inverter.)

7410 as half 7420

    I should have mentioned that the grab bag also included a couple of D flip-flop chips, which also appeared to work as expected.
Testing the 7410 by itself confirmed that it functioned logically as diagramed, so without further testing I completed wiring the entire circuit. As could surely have been predicted, it did not work. Not only did it not work, but the outputs made absolutely no sense. At this point I decided to test the dual 4-input NAND chip (7440) before proceeding to retrace the circuit. Both NAND gates tested as defective, which was hard to accept.  Though they are physically small, these chips are able to tolerate significant abuse. After repeating the tests and double-checking everything it finally occurred to me that I might have misread the number stamped on the chip. Once again I got out the magnifying glass, turned on the close-up light, and squinted at the markings.  

    Aging Vision: One undisputed advantage of youth is being able to see small print, even smudged and ambiguous stampings (assuming more-or-less normal vision). I had previously read the numbers as 74HCT40SSE but those S’s could have been 5’s or 6’s. After one or two searches I came across a datasheet for a quad gated switch 74HCT4066E (TI) and tested the ‘unknown’ chip to see if that could be it.  Sure enough it was. I suppose that identifying it originally as 74HCT40 was a case of wishful thinking.  At this point I placed another order, this time including a few selected “useful chips—that is to say, useful for completing the present project and perhaps other similar ones.
 
    An irrelevant aside: While waiting for the chips to ship, I tinkered with the clock (555 astable multivibrator), and verified that it was outputting an approximate square wave. The pages of my original copy of the TTL Cookbook by Don Lancaster had been scattered by the wind decades ago. However, the book is still available (Sams) and I had acquired a replacement. It is also accessible online as a pdf here.  Chapter 4 is about timers, and includes the following helpful 555 diagram on page 172.

555 Astable Multivibrator from TTL Cookbook

Formulas for cycle times and frequency are given on the next page of the cookbook.  I decided for fun to code a JavaScript 555 frequency calculator (included at the bottom of this page).

555 frequence calculation example 

Those odd resistor values 1492 and 12820 are the results of measurement.  All this is irrelevant of course. For the purpose of the present exercise, frequency doesn
t matter, as long as it is fast enough to ensure that ties are infrequent (at 1 KHz, more than one button press in the same millisecond). However, digressions such as this sometimes acquire a life of their own. How would I know whether the calculated frequency is right, or if the capacitor is what I think it is?

    Music to my ear: To investigate this question I had the idea of listening to the clock outputto probe it with a headphone. The headphone that I used has a volume control in the audio line; however I inserted a 330 ohm resistor in series just to be safe (illustration below).

Connecting headphone to clock

Note E-flatThe other end of the black clip lead is ground, of course.  The note that sounded was very close to E♭, six semitones (12ths of an octave) above A-880.  6/12 = 1/2, and 880 Hz   √2 is roughly 1245 Hz, so the frequency differed
only a little from the computed value. I had previously checked the ohmmeter using a precision resistor, so measured resistances could be assumed valid, or very close. Well, enough is enough! The discrepancy between computed and actual auditory frequency falls within the capacitors tolerance rating, and other explanations are also possible.  

    Completing the circuit: After the second order of chips was delivered, there was no compelling reason to finish this project and I considered not doing so. At the outset, the point had been to exercise the computer application Logisim, not an actual circuit. On the other hand, having invested considerable time in one abortive try, I was determined to make the thing work.  That is when I discovered it would be necessary to change the physical circuit somewhat from my first design.

    It is possibly that the difference between simulated and actual behavior is due to differences between the theoretical D flip-flop and the TTL 7474 chip that I used. Logisim defines the ‘1’ and ‘0’ inputs differently (bottom left and right in flip-flop symbol) than ‘set’ and ‘clear’ are described in the book
(for the 7474).  It also occurred to me that simulating the flow of state changes through a logic circuit is not trivial. The timing of transitions that take place on a clock cycle (rise or fall) may be computed, but how does the simulator know how to propagate asynchronous changes through independent paths of a circuit? This question probably reflects my ignorance rather than a real problem.


Actual Circuit (Rev 3)

    The photo above shows the physical circuit that was based on the Rev.3 Logisim diagram
—the one that worked (in respect to the second ‘rule).  After signal device number 2 has been pressed momentarily the middle green LED is lit. At this point devices 1 and 3 have been rendered non-responsive by the not-Q ouptut of device 2s flip-flop. There are no actual buttons in this simulation. By “momentarily” I mean that input wire number 2 was lifted from ground state momentarily. (For NAND gates, a floating input is the same as input high.)  I also oberved that toggling power was the same as resetting the simulation, so I removed the reset circuit, as unnecessary clutter. However, see footnote.1  One final remark about the circuit shown in the photo. The breadboards design intends that chips be oriented in the opposite direction to that shown, i.e., putting pin 14 next to + (red) and 7 adjacent to the ground strip (blue). Of course, this makes no functional difference.

    A primary feature of this revision is the way that flip-flops are latched (made to stay high, once clocked to high). Input D specifies the state that the flip-flop should acquire when clocked. If the letter A stands for ‘all signal conditions satisfied’ (all inputs to the 4-input gate) and if Q stands for the flip-flop’s normal output then we want input D to be high whenever A or Q is high.  One of De Morgans laws asserts (in its usual form) that ~(A ⋁ Q) = (~A) ⋀ (~Q), where ‘~’ stands for NOT. Negating both sides yields A  Q =  ~((~A) ⋀ (~Q)), which is what the 2-input NAND does:

DeMorgan’s Law

     I don
t really like this circuit, but am using it as a simple illustration because it emulates one of the key rules for signalling devices both in Logisim and on the breadboard. While it is not a robust solution to the signal-device problem, I am not motivated to spend additional time on it. Somewhere along the way this reminiscence about TTL jumped the rails. On the other hand, TTL was and is a wonderful thing, and now having refreshed my memory, I might try to put together something interesting.



    Disclaimer: The contents of this page are intended solely for entertainment. The author makes no claim as to the accuracy or completeness of the information presented. This page does not endorse any product or methodology. In no event will the author be liable for any damages or lost effort, or for the reader’s failure to become a better person from having skimmed this page, or anything else related to a decision to use or ignore the information presented herein.




Addendum - 555 Frequency Measurement

    What a wonderful age it is when one can experiment with a digital oscilloscope without spending hundreds of dollars! I am referring to the Soundcard Oscilloscope computer application, which is free for private or public educational use (not for commercial use).2 I learned about this application from an article by Paul Danzer (N1II) in QST magazine (February 2016, pages 47-48). The article included a simple circuit for connecting test probes safely to the LINE-IN jack of a computer sound adapter. After constructing the QST circuit in a small project box (lower left in photo), I attached a test probe to the 555’s output pin, the same place that I had earlier probed with headphones.

Clock cycle time (Soundcard Oscilloscope)

    The illustration shows most of the test rig except for the red probe to the clock output on the breadboard. The vertical grid lines or ticks on the scope display area are 0.2 milliseconds apart and the width of one cycle is approximately 4 ticks or 0.8 milliseconds.  1000 (ms/sec) 0.8 (ms/cycle) is 1250 Hz, not far from the auditory tone-based frequency.

Numeric FrequencyThat little bit of arithmetic could have been skipped, had I noticed the
‘Frequency’ check box located below Soundcard Oscilloscope’s waveform display panel. Checking this box causes frequency to be displayed numerically, along with the signal itself. Since the numeric value is displayed to high precision, a warm-up effect can be observed after applying voltage to the clock. No doubt this effect would be detectable also by ear, as the tone drifts farther from E♭ and closer to E ♮ (1318 Hz).



555 Frequency Calculator
(from TTL Cookbook)


555 Clock Frequency

              



555 Capacitance Estimator
(inverse calculation)


555 Capacitance


              


Note: Formulas assume input values to be within 555 minimum and maximum R/C values (TTL Cookbook, pages 172-173.)

     Caution: If using the above calculator with the 555 circuit from page 172 of the TTL Cookbook to estimate capacitance, resistances should be selected for the expected capacitance range. Also, small capacitors (less than 500 pFthe ones least likely to be clearly marked) cannot be estimated in this way. In short, this is not a convenient method of ascertaining an unknown capacitance value. Better would be to use a capacitance tester.  


1. I subsequently reinstated the reset function, as the flip-flops did not always reset on power down/up. To reset the 3 flip-flops that participate in the switching logic, momentarily ground their CLR inputs (pins 1 and 13 on the 7474). The SET inputs were left tied to +.

2. The soundcard oscilloscope’s frequency range is approximately 20 to 20,000 Hz.