A different TM1628 7-segment display

TM1628 is an LED controller IC that's used mostly at DVD players front panels. The IC can control up to 7 sets of segments (separate digits) and can also process input from up to 16 individual keys. It is controlled via SPI compatible serial interface.

The only Arduino compatible library I was able to find for TM1628 is developed by Vasyl Yudin and is available on GitHub. But, I couldn't get any readable output on display. That happened because my front panel had a different segment assignment to the controller than what I found on YouTube (the display with disc icon on it).

My front panel came from TeleSystem TS5.9RX DVD Recorder and it has 7 digits and some other indicator LEDs. The PCB also contains 5 keys - but I can expand it by adding more buttons. Below is a sketch example for this front panel. It is 5V compatible so it can be connected directly to 5V levels development boards like Arduino and compatible.

This is an example sketch that prints on display the value read from key presses.

You can see the basic usage. Declare a TM1628ts object and specify pins (Clock, Data, Strobe). Use init() with a value between 0 and 7 to initialize and turn on the display with specified intensity. Use init() without arguments and the display gets initialized but remains turned off. You will have to use turnOn() thereafter to start it. Only writeBuffer() writes local stored data to controller so don't forget to call it after setting status LEDs or setting numbers/digits. Check often if a key has been pressed using getKeyboard().

This is how segments are assigned to the buffer array that is sent to the controller.