Driving the Display

A project log for TI-57 Programmable Calculator Hardware Retrofit

A modern MCU-based hardware replacement for the venerable TMC1501 used in the Texas Instruments TI-57 LED calculator.

tomcircuittomcircuit 03/02/2024 at 15:430 Comments

The TI-57 has a multiplexed 12-digit common cathode LED display. The corresponding 8 segments of all 12 digits are connected together; sort of. It turns out that TI economized on IC package pins by ”doubling up” the decimal point segment anode with the digit 1 cathode, and the “d” segment anode with the digit 12 cathode. This means it’s impossible to display a decimal point on the rightmost digit, and a “d” segment (the bottommost segment) on the leftmost digit. Each segment line is also connected to one row of keyboard switches. Each column of keyboard switches is common and connected to an MCU GPIO input. 

Due to the “segment scanning” approach that TI chose to use, each segment driver must be able to source up to 12 digit’s worth of anode current - up to 60mA. This is too much for one MCU GPIO to supply, so I chose to use a P-channel MOSFET to drive each anode line; the MCU needs to drive the gate of the P-MOS low to source current to that anode line. At the same time, the cathode for the digit(s) that require that particular segment to be illuminated must be driven low to cause current to flow. Because any digit has at most one segment illuminated at a time, the “on” current per digit is 5mA. An MCU GPIO and series resistor could carry this current, but it’s easier to use a Constant Current LED driver to do this. I chose the Texas Instruments TLC5929 for this job. It’s essentially a shift register with 16 constant current sink outputs that are turned on or off via the serial control word. This device is particularly well-suited because it allows analog current adjustment via the serial word. It also features a Power Save mode that reduces the quiescent current to tens of uA when all outputs are off. These are both notable features of this device, and what drove me to choose it. The only downside of this device is that it requires a 17-bit serial control word, but the MCU SPI peripheral only supports 8 or 16 bit word lengths - so the serial interface must be “bit-banged”.

During a display cycle, the MCU must process the display content segment by segment. The MCU must shift the correct digit enable outputs into the TLC5929 and enable the segment output by driving it low. Then pause for 800us to allow the LEDs to illuminate and be visible. At the end of this 800us period, the MCU samples the Keyboard Column inputs - if any keys in the keyboard row connected to that segment line are pressed, the corresponding keyboard column inputs will read as high. This 800us sequence is repeated for each of the segments - an entire display cycle lasts 6.4ms. The TI-57 ROM includes DISPlay instructions at the necessary intervals to generate a flicker-free display. The MCU can be put into a low power Sleep Mode for most of each segment’s 800us interval, keeping current drain to a minimum. Furthermore, the Power Save feature of the TLC5929 automatically reduces the current draw of that device anytime all of the digit output sinks are off.