TIL311 replacement

Back in the day, when men were men and computers were programmed in hexadecimal, Texas Instruments produced a nifty little display chip called a TIL311. This chip took a 4-bit nibble as input, and produced a single hex digit on a built-in LED display. As if that weren’t cool enough, TI packaged it in translucent red; you could almost convince yourself that you saw the electrons moving through the traces as the display digits changed. This wasn’t a consumer-oriented BCD display for use in calculators and clock radios (though it would work nicely for that) — this was an actual hexadecimal display, capable of displaying numbers beyond zero-through-nine.

To paraphrase This Is Spinal Tap, “these went to fifteen!”

A TIL311 hex decoder and display (click for larger)


A TIL311 displaying hex digit "C": 1100, or decimal twelve. (Click for larger)


Unfortunately, although they’re still as useful as ever, TIL311s are extremely scarce today. The best price I could find online was $19.95 apiece. (For comparison, you could get several backlit 32-character LCD displays for the same cost.)

For Drexel’s EET325 Microprocessors class this term, we wanted to capture the essence of programming a vintage 8-bit CPU like the Z80. A modern LCD display would be simpler to implement, but somehow it just wouldn’t be the same. Hex displays like the TIL311 worked beautifully: one hex digit exactly covers four bits. Two digits cover one byte (for the data bus) and four cover a 16-bit word (for the full address bus on the Z80). The most recent versions of the DrACo/Z80 are true 8-bit machines, though: the address bus is 8 bits wide (although expandable to 16). Because of this, only four hex digits are needed; two for the address and two for the data.

Even so, four TIL311s per board would add $80 to the bill of materials — roughly doubling the cost. This, we figured, was an opportunity to put our LPKF PCB plotter to use creating some modern TIL311 replacements. A PIC16F1825 microcontroller, a common-anode seven-segment LED display, and seven resistors take the place of TI’s slick one-chip solution. It isn’t nearly as pretty, but it gets the job done for a bit less money.

The displays in action, and a view of the single-layer traces. (Click for larger.)

A few design revisions and squashed bugs later, the first of the new boards are up and running. The PIC runs in a continuous loop, monitoring the four data pins and updating the seven-segment output based on data in a lookup table. (The code is easily converted to a common-cathode design by inverting the display bits; the board would have to be modified to support this. It would have been nice to be able to do this in software by using an I/O pin as a switchable common, but unfortunately there were no spare pins left.)

Here is the zipped PIC project to reproduce this display for yourself, along with the layout file used to create the board layout in FreePCB. The design is completely single-layer for ease of soldering, although if using double-sided copper-clad boards like we did, the holes on the top layer must be insulated. The PIC actually runs at its slowest self-clocked speed of about 31kHz; since the monitor-lookup-and-update loop only takes 36 cycles, the display can still be updated at several hundred Hz — fast enough to be a blur if the Z80 is running that fast. (The design should work at any speed, since no timing at all is used; the PIC is simply emulating combinatorial logic as fast as possible/necessary.)

Some details on construction: All resistors are 470 ohm, although any similar value should work OK. The connector is a standard 0.1″ row connector, with the plastic insulator pressed all the way to one side. This way, the connector can be inserted through the top of the board, soldered to the bottom side like all of the other components, and have enough pin length left to comfortably fit into a solderless breadboard. Since these boards will be used in a classroom lab setting, I opted to socket the PIC. That way, if one accidentally gets its power reversed and/or is introduced to 12V instead of 5V, we can easily replace it.

Since the LED display is driven by the PIC, it is less likely to be damaged due to incorrect connections; the PIC is unlikely to pass enough current to it to cause damage. The LED is keyed, and will only go in one way. (Yes, it’s supposed to be upside-down; these boards don’t use the decimal point, and the circuit layout worked much better that way.)

I’m still working on refining the parameters for producing boards on the LPKF plotter (not to mention dealing with some persistent alignment issues) — but it’s definitely getting there.

If you decide to make one of these for yourself and have questions, please email me (“Eric” at this domain); I’ll be happy to help.


This entry was posted in Assembly, Coding, Components, Digital, DrACo/Z80, Drexel, EET325, Electronics, Level 3, Nostalgia, PIC Microcontrollers, Projects and tagged , , , , , . Bookmark the permalink.

5 Responses to TIL311 replacement

  1. Merlin Skinner says:

    I always really liked the nice, rounded font of the TIL311 devices. They run pretty hot, which probably affects reliability, though this can be improved by running the LED supply pin at a lower voltage. I used to use a couple of hefty silicon rectifier diodes to drop the 5V supply, which helped a lot.

    I once made a digital tachometer for my car using four TIL311s. It worked really well, and looked very slick. Unfortunately, some ne’er-do-well also thought so and stole it. Rats.

  2. Miles says:

    This is cool, but why use microcontrollers? There are dedicated hexadecimal 7 segment display drivers that are dedicated to the task.

  3. Peter Enmore says:

    What is the cost difference between using the seven resistors rather than just the one $80 resistor?

    • M. Eric Carr says:

      I don’t understand the question; seven resistors are needed here (due to seven LED segments being used). Otherwise, the current through the LEDs — and therefore the brightness — would vary depending if you’re displaying, for instance, a 1 (with two segments lit) or an 8 (with all seven lit). The “1” would be about 3.5x as bright as the “8”.

      Resistors, in bulk, cost perhaps a few cents each.

Leave a Reply