Using an undocumented display with an FPGA

When [Mike] ran across a display on Deal Extreme with 8 seven-segment displays, 8 red/green LEDs, and 8 buttons, he knew it would find a good home in a future project. There was only one problem, though: except for an Arduino library, there was absolutely no documentation available for this display. Wanting to use this display with an FPGA board, [Mike] decided against bit-banging a protocol and ported the C++ code into a hardware implementation.

This Deal Extreme display, the TM1638, features enough seven-segment displays, LEDs and buttons to build something really cool, and surprisingly isn’t terribly hard to interface with a microcontroller. The TM1638 library communicates with the outside world via only three pins and a simple serial connection.

After figuring out what commands are sent to make the display turn LEDs on or off, [Mike] wrote a hardware implementation for his Digilent Nexys2 and Digilent Basys2. Now the display operates on an FPGA just like it does with an Arduino, and is a great tool for debugging HDL code for [Mike]’s FPGA.

I ended up bit-banging the protocol on my MSP430, but there is a library out there on the 43oh forums that uses the hardware SPI interface (and a couple external diodes) to make it work without bit-banging.

Actually there is documentation, but in Chinese. You can download the datasheet of the TM1638 on the manufacturer’s website (titanmec.com). Timing diagrams are a universal language, and in case of doubt automatic translation usually works well with Chinese.

I it was your library code that I worked from, so a big public “thank you” is needed.

Thank you!

Now I must be able to do something grand with this display… I’m thinking of using a GPS module to get my car’s car speed, and then using a row of three of these to make a POV display that displays “I am going X km/hr” as I drive down the street. It can use the speed info to adjust the aspect ratio.

Has anyone found the schematic for this particular module? It differs from other similar TM1638 based modules in directly supporting daisy chaining. Some cheaper versions also have single colour 8 Leds rather than bicolour driven by the IC’s Seg 9 pin. What pins does this bicolour version use?